@skybridge/devtools 0.0.0-dev.fb0af8c → 0.0.0-dev.fb0f54e
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,175 @@
|
|
|
1
|
+
var d7=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var bEe=d7((Vo,qo)=>{function h7(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Nm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ii(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n1={exports:{}},$d={};var CO;function p7(){if(CO)return $d;CO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var a=null;if(i!==void 0&&(a=""+i),o.key!==void 0&&(a=""+o.key),"key"in o){i={};for(var c in o)c!=="key"&&(i[c]=o[c])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:i}}return $d.Fragment=t,$d.jsx=n,$d.jsxs=n,$d}var TO;function m7(){return TO||(TO=1,n1.exports=p7()),n1.exports}var M=m7(),r1={exports:{}},bt={};var RO;function g7(){if(RO)return bt;RO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function v(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,w={};function T(D,q,U){this.props=D,this.context=q,this.refs=w,this.updater=U||y}T.prototype.isReactComponent={},T.prototype.setState=function(D,q){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,q,"setState")},T.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function b(){}b.prototype=T.prototype;function _(D,q,U){this.props=D,this.context=q,this.refs=w,this.updater=U||y}var S=_.prototype=new b;S.constructor=_,x(S,T.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function E(){}var O={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function P(D,q,U){var N=U.ref;return{$$typeof:e,type:D,key:q,ref:N!==void 0?N:null,props:U}}function $(D,q){return P(D.type,q,D.props)}function I(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function L(D){var q={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(U){return q[U]})}var F=/\/+/g;function J(D,q){return typeof D=="object"&&D!==null&&D.key!=null?L(""+D.key):q.toString(36)}function ee(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(E,E):(D.status="pending",D.then(function(q){D.status==="pending"&&(D.status="fulfilled",D.value=q)},function(q){D.status==="pending"&&(D.status="rejected",D.reason=q)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function Z(D,q,U,N,G){var te=typeof D;(te==="undefined"||te==="boolean")&&(D=null);var re=!1;if(D===null)re=!0;else switch(te){case"bigint":case"string":case"number":re=!0;break;case"object":switch(D.$$typeof){case e:case t:re=!0;break;case h:return re=D._init,Z(re(D._payload),q,U,N,G)}}if(re)return G=G(D),re=N===""?"."+J(D,0):N,C(G)?(U="",re!=null&&(U=re.replace(F,"$&/")+"/"),Z(G,q,U,"",function(Ee){return Ee})):G!=null&&(I(G)&&(G=$(G,U+(G.key==null||D&&D.key===G.key?"":(""+G.key).replace(F,"$&/")+"/")+re)),q.push(G)),1;re=0;var de=N===""?".":N+":";if(C(D))for(var we=0;we<D.length;we++)N=D[we],te=de+J(N,we),re+=Z(N,q,U,te,G);else if(we=v(D),typeof we=="function")for(D=we.call(D),we=0;!(N=D.next()).done;)N=N.value,te=de+J(N,we++),re+=Z(N,q,U,te,G);else if(te==="object"){if(typeof D.then=="function")return Z(ee(D),q,U,N,G);throw q=String(D),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return re}function H(D,q,U){if(D==null)return D;var N=[],G=0;return Z(D,N,"","",function(te){return q.call(U,te,G++)}),N}function V(D){if(D._status===-1){var q=D._result;q=q(),q.then(function(U){(D._status===0||D._status===-1)&&(D._status=1,D._result=U)},function(U){(D._status===0||D._status===-1)&&(D._status=2,D._result=U)}),D._status===-1&&(D._status=0,D._result=q)}if(D._status===1)return D._result.default;throw D._result}var oe=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},ne={map:H,forEach:function(D,q,U){H(D,function(){q.apply(this,arguments)},U)},count:function(D){var q=0;return H(D,function(){q++}),q},toArray:function(D){return H(D,function(q){return q})||[]},only:function(D){if(!I(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return bt.Activity=p,bt.Children=ne,bt.Component=T,bt.Fragment=n,bt.Profiler=o,bt.PureComponent=_,bt.StrictMode=r,bt.Suspense=u,bt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,bt.__COMPILER_RUNTIME={__proto__:null,c:function(D){return O.H.useMemoCache(D)}},bt.cache=function(D){return function(){return D.apply(null,arguments)}},bt.cacheSignal=function(){return null},bt.cloneElement=function(D,q,U){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var N=x({},D.props),G=D.key;if(q!=null)for(te in q.key!==void 0&&(G=""+q.key),q)!j.call(q,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&q.ref===void 0||(N[te]=q[te]);var te=arguments.length-2;if(te===1)N.children=U;else if(1<te){for(var re=Array(te),de=0;de<te;de++)re[de]=arguments[de+2];N.children=re}return P(D.type,G,N)},bt.createContext=function(D){return D={$$typeof:a,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:i,_context:D},D},bt.createElement=function(D,q,U){var N,G={},te=null;if(q!=null)for(N in q.key!==void 0&&(te=""+q.key),q)j.call(q,N)&&N!=="key"&&N!=="__self"&&N!=="__source"&&(G[N]=q[N]);var re=arguments.length-2;if(re===1)G.children=U;else if(1<re){for(var de=Array(re),we=0;we<re;we++)de[we]=arguments[we+2];G.children=de}if(D&&D.defaultProps)for(N in re=D.defaultProps,re)G[N]===void 0&&(G[N]=re[N]);return P(D,te,G)},bt.createRef=function(){return{current:null}},bt.forwardRef=function(D){return{$$typeof:c,render:D}},bt.isValidElement=I,bt.lazy=function(D){return{$$typeof:h,_payload:{_status:-1,_result:D},_init:V}},bt.memo=function(D,q){return{$$typeof:f,type:D,compare:q===void 0?null:q}},bt.startTransition=function(D){var q=O.T,U={};O.T=U;try{var N=D(),G=O.S;G!==null&&G(U,N),typeof N=="object"&&N!==null&&typeof N.then=="function"&&N.then(E,oe)}catch(te){oe(te)}finally{q!==null&&U.types!==null&&(q.types=U.types),O.T=q}},bt.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},bt.use=function(D){return O.H.use(D)},bt.useActionState=function(D,q,U){return O.H.useActionState(D,q,U)},bt.useCallback=function(D,q){return O.H.useCallback(D,q)},bt.useContext=function(D){return O.H.useContext(D)},bt.useDebugValue=function(){},bt.useDeferredValue=function(D,q){return O.H.useDeferredValue(D,q)},bt.useEffect=function(D,q){return O.H.useEffect(D,q)},bt.useEffectEvent=function(D){return O.H.useEffectEvent(D)},bt.useId=function(){return O.H.useId()},bt.useImperativeHandle=function(D,q,U){return O.H.useImperativeHandle(D,q,U)},bt.useInsertionEffect=function(D,q){return O.H.useInsertionEffect(D,q)},bt.useLayoutEffect=function(D,q){return O.H.useLayoutEffect(D,q)},bt.useMemo=function(D,q){return O.H.useMemo(D,q)},bt.useOptimistic=function(D,q){return O.H.useOptimistic(D,q)},bt.useReducer=function(D,q,U){return O.H.useReducer(D,q,U)},bt.useRef=function(D){return O.H.useRef(D)},bt.useState=function(D){return O.H.useState(D)},bt.useSyncExternalStore=function(D,q,U){return O.H.useSyncExternalStore(D,q,U)},bt.useTransition=function(){return O.H.useTransition()},bt.version="19.2.3",bt}var OO;function Sf(){return OO||(OO=1,r1.exports=g7()),r1.exports}var A=Sf();const zo=ii(A),Kh=h7({__proto__:null,default:zo},[A]);var o1={exports:{}},Id={},s1={exports:{}},i1={};var AO;function y7(){return AO||(AO=1,(function(e){function t(Z,H){var V=Z.length;Z.push(H);e:for(;0<V;){var oe=V-1>>>1,ne=Z[oe];if(0<o(ne,H))Z[oe]=H,Z[V]=ne,V=oe;else break e}}function n(Z){return Z.length===0?null:Z[0]}function r(Z){if(Z.length===0)return null;var H=Z[0],V=Z.pop();if(V!==H){Z[0]=V;e:for(var oe=0,ne=Z.length,D=ne>>>1;oe<D;){var q=2*(oe+1)-1,U=Z[q],N=q+1,G=Z[N];if(0>o(U,V))N<ne&&0>o(G,U)?(Z[oe]=G,Z[N]=V,oe=N):(Z[oe]=U,Z[q]=V,oe=q);else if(N<ne&&0>o(G,V))Z[oe]=G,Z[N]=V,oe=N;else break e}}return H}function o(Z,H){var V=Z.sortIndex-H.sortIndex;return V!==0?V:Z.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var u=[],f=[],h=1,p=null,g=3,v=!1,y=!1,x=!1,w=!1,T=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function S(Z){for(var H=n(f);H!==null;){if(H.callback===null)r(f);else if(H.startTime<=Z)r(f),H.sortIndex=H.expirationTime,t(u,H);else break;H=n(f)}}function C(Z){if(x=!1,S(Z),!y)if(n(u)!==null)y=!0,E||(E=!0,L());else{var H=n(f);H!==null&&ee(C,H.startTime-Z)}}var E=!1,O=-1,j=5,P=-1;function $(){return w?!0:!(e.unstable_now()-P<j)}function I(){if(w=!1,E){var Z=e.unstable_now();P=Z;var H=!0;try{e:{y=!1,x&&(x=!1,b(O),O=-1),v=!0;var V=g;try{t:{for(S(Z),p=n(u);p!==null&&!(p.expirationTime>Z&&$());){var oe=p.callback;if(typeof oe=="function"){p.callback=null,g=p.priorityLevel;var ne=oe(p.expirationTime<=Z);if(Z=e.unstable_now(),typeof ne=="function"){p.callback=ne,S(Z),H=!0;break t}p===n(u)&&r(u),S(Z)}else r(u);p=n(u)}if(p!==null)H=!0;else{var D=n(f);D!==null&&ee(C,D.startTime-Z),H=!1}}break e}finally{p=null,g=V,v=!1}H=void 0}}finally{H?L():E=!1}}}var L;if(typeof _=="function")L=function(){_(I)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,J=F.port2;F.port1.onmessage=I,L=function(){J.postMessage(null)}}else L=function(){T(I,0)};function ee(Z,H){O=T(function(){Z(e.unstable_now())},H)}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(Z){Z.callback=null},e.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<Z?Math.floor(1e3/Z):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(Z){switch(g){case 1:case 2:case 3:var H=3;break;default:H=g}var V=g;g=H;try{return Z()}finally{g=V}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(Z,H){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var V=g;g=Z;try{return H()}finally{g=V}},e.unstable_scheduleCallback=function(Z,H,V){var oe=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?oe+V:oe):V=oe,Z){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=V+ne,Z={id:h++,callback:H,priorityLevel:Z,startTime:V,expirationTime:ne,sortIndex:-1},V>oe?(Z.sortIndex=V,t(f,Z),n(u)===null&&Z===n(f)&&(x?(b(O),O=-1):x=!0,ee(C,V-oe))):(Z.sortIndex=ne,t(u,Z),y||v||(y=!0,E||(E=!0,L()))),Z},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(Z){var H=g;return function(){var V=g;g=H;try{return Z.apply(this,arguments)}finally{g=V}}}})(i1)),i1}var kO;function v7(){return kO||(kO=1,s1.exports=y7()),s1.exports}var a1={exports:{}},to={};var MO;function b7(){if(MO)return to;MO=1;var e=Sf();function t(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function i(u,f,h){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:u,containerInfo:f,implementation:h}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return to.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,to.createPortal=function(u,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return i(u,f,null,h)},to.flushSync=function(u){var f=a.T,h=r.p;try{if(a.T=null,r.p=2,u)return u()}finally{a.T=f,r.p=h,r.d.f()}},to.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(u,f))},to.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},to.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var h=f.as,p=c(h,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:v}):h==="script"&&r.d.X(u,{crossOrigin:p,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},to.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=c(f.as,f.crossOrigin);r.d.M(u,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(u)},to.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,p=c(h,f.crossOrigin);r.d.L(u,h,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},to.preloadModule=function(u,f){if(typeof u=="string")if(f){var h=c(f.as,f.crossOrigin);r.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(u)},to.requestFormReset=function(u){r.d.r(u)},to.unstable_batchedUpdates=function(u,f){return u(f)},to.useFormState=function(u,f,h){return a.H.useFormState(u,f,h)},to.useFormStatus=function(){return a.H.useHostTransitionStatus()},to.version="19.2.3",to}var jO;function g3(){if(jO)return a1.exports;jO=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(),a1.exports=b7(),a1.exports}var PO;function S7(){if(PO)return Id;PO=1;var e=v7(),t=Sf(),n=g3();function r(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function i(s){var l=s,d=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(d=l.return),s=l.return;while(s)}return l.tag===3?d:null}function a(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function c(s){if(s.tag===31){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(i(s)!==s)throw Error(r(188))}function f(s){var l=s.alternate;if(!l){if(l=i(s),l===null)throw Error(r(188));return l!==s?null:s}for(var d=s,m=l;;){var R=d.return;if(R===null)break;var k=R.alternate;if(k===null){if(m=R.return,m!==null){d=m;continue}break}if(R.child===k.child){for(k=R.child;k;){if(k===d)return u(R),s;if(k===m)return u(R),l;k=k.sibling}throw Error(r(188))}if(d.return!==m.return)d=R,m=k;else{for(var z=!1,W=R.child;W;){if(W===d){z=!0,d=R,m=k;break}if(W===m){z=!0,m=R,d=k;break}W=W.sibling}if(!z){for(W=k.child;W;){if(W===d){z=!0,d=k,m=R;break}if(W===m){z=!0,m=k,d=R;break}W=W.sibling}if(!z)throw Error(r(189))}}if(d.alternate!==m)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?s:l}function h(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=h(s),l!==null)return l;s=s.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),_=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function L(s){return s===null||typeof s!="object"?null:(s=I&&s[I]||s["@@iterator"],typeof s=="function"?s:null)}var F=Symbol.for("react.client.reference");function J(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===F?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case x:return"Fragment";case T:return"Profiler";case w:return"StrictMode";case C:return"Suspense";case E:return"SuspenseList";case P:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case y:return"Portal";case _:return s.displayName||"Context";case b:return(s._context.displayName||"Context")+".Consumer";case S:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case O:return l=s.displayName||null,l!==null?l:J(s.type)||"Memo";case j:l=s._payload,s=s._init;try{return J(s(l))}catch{}}return null}var ee=Array.isArray,Z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},oe=[],ne=-1;function D(s){return{current:s}}function q(s){0>ne||(s.current=oe[ne],oe[ne]=null,ne--)}function U(s,l){ne++,oe[ne]=s.current,s.current=l}var N=D(null),G=D(null),te=D(null),re=D(null);function de(s,l){switch(U(te,l),U(G,s),U(N,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?ZR(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=ZR(l),s=YR(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}q(N),U(N,s)}function we(){q(N),q(G),q(te)}function Ee(s){s.memoizedState!==null&&U(re,s);var l=N.current,d=YR(l,s.type);l!==d&&(U(G,s),U(N,d))}function se(s){G.current===s&&(q(N),q(G)),re.current===s&&(q(re),jd._currentValue=V)}var X,fe;function he(s){if(X===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);X=l&&l[1]||"",fe=-1<d.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+X+s+fe}var Pe=!1;function ye(s,l){if(!s||Pe)return"";Pe=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(l){var Ne=function(){throw Error()};if(Object.defineProperty(Ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ne,[])}catch(Te){var xe=Te}Reflect.construct(s,[],Ne)}else{try{Ne.call()}catch(Te){xe=Te}s.call(Ne.prototype)}}else{try{throw Error()}catch(Te){xe=Te}(Ne=s())&&typeof Ne.catch=="function"&&Ne.catch(function(){})}}catch(Te){if(Te&&xe&&typeof Te.stack=="string")return[Te.stack,xe.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var R=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");R&&R.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var k=m.DetermineComponentFrameRoot(),z=k[0],W=k[1];if(z&&W){var ie=z.split(`
|
|
4
|
+
`),Se=W.split(`
|
|
5
|
+
`);for(R=m=0;m<ie.length&&!ie[m].includes("DetermineComponentFrameRoot");)m++;for(;R<Se.length&&!Se[R].includes("DetermineComponentFrameRoot");)R++;if(m===ie.length||R===Se.length)for(m=ie.length-1,R=Se.length-1;1<=m&&0<=R&&ie[m]!==Se[R];)R--;for(;1<=m&&0<=R;m--,R--)if(ie[m]!==Se[R]){if(m!==1||R!==1)do if(m--,R--,0>R||ie[m]!==Se[R]){var Ae=`
|
|
6
|
+
`+ie[m].replace(" at new "," at ");return s.displayName&&Ae.includes("<anonymous>")&&(Ae=Ae.replace("<anonymous>",s.displayName)),Ae}while(1<=m&&0<=R);break}}}finally{Pe=!1,Error.prepareStackTrace=d}return(d=s?s.displayName||s.name:"")?he(d):""}function De(s,l){switch(s.tag){case 26:case 27:case 5:return he(s.type);case 16:return he("Lazy");case 13:return s.child!==l&&l!==null?he("Suspense Fallback"):he("Suspense");case 19:return he("SuspenseList");case 0:case 15:return ye(s.type,!1);case 11:return ye(s.type.render,!1);case 1:return ye(s.type,!0);case 31:return he("Activity");default:return""}}function Ue(s){try{var l="",d=null;do l+=De(s,d),d=s,s=s.return;while(s);return l}catch(m){return`
|
|
7
|
+
Error generating stack: `+m.message+`
|
|
8
|
+
`+m.stack}}var ve=Object.prototype.hasOwnProperty,Fe=e.unstable_scheduleCallback,Le=e.unstable_cancelCallback,Ze=e.unstable_shouldYield,Oe=e.unstable_requestPaint,ze=e.unstable_now,Be=e.unstable_getCurrentPriorityLevel,dt=e.unstable_ImmediatePriority,Ce=e.unstable_UserBlockingPriority,me=e.unstable_NormalPriority,Me=e.unstable_LowPriority,Ve=e.unstable_IdlePriority,it=e.log,Ct=e.unstable_setDisableYieldValue,Nt=null,vt=null;function Gt(s){if(typeof it=="function"&&Ct(s),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(Nt,s)}catch{}}var kt=Math.clz32?Math.clz32:wt,Tt=Math.log,Xt=Math.LN2;function wt(s){return s>>>=0,s===0?32:31-(Tt(s)/Xt|0)|0}var sn=256,rn=262144,vn=4194304;function xt(s){var l=s&42;if(l!==0)return l;switch(s&-s){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 s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function on(s,l,d){var m=s.pendingLanes;if(m===0)return 0;var R=0,k=s.suspendedLanes,z=s.pingedLanes;s=s.warmLanes;var W=m&134217727;return W!==0?(m=W&~k,m!==0?R=xt(m):(z&=W,z!==0?R=xt(z):d||(d=W&~s,d!==0&&(R=xt(d))))):(W=m&~k,W!==0?R=xt(W):z!==0?R=xt(z):d||(d=m&~s,d!==0&&(R=xt(d)))),R===0?0:l!==0&&l!==R&&(l&k)===0&&(k=R&-R,d=l&-l,k>=d||k===32&&(d&4194048)!==0)?l:R}function zt(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function $n(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 tr(){var s=vn;return vn<<=1,(vn&62914560)===0&&(vn=4194304),s}function xr(s){for(var l=[],d=0;31>d;d++)l.push(s);return l}function at(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Mt(s,l,d,m,R,k){var z=s.pendingLanes;s.pendingLanes=d,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=d,s.entangledLanes&=d,s.errorRecoveryDisabledLanes&=d,s.shellSuspendCounter=0;var W=s.entanglements,ie=s.expirationTimes,Se=s.hiddenUpdates;for(d=z&~d;0<d;){var Ae=31-kt(d),Ne=1<<Ae;W[Ae]=0,ie[Ae]=-1;var xe=Se[Ae];if(xe!==null)for(Se[Ae]=null,Ae=0;Ae<xe.length;Ae++){var Te=xe[Ae];Te!==null&&(Te.lane&=-536870913)}d&=~Ne}m!==0&&Rn(s,m,0),k!==0&&R===0&&s.tag!==0&&(s.suspendedLanes|=k&~(z&~l))}function Rn(s,l,d){s.pendingLanes|=l,s.suspendedLanes&=~l;var m=31-kt(l);s.entangledLanes|=l,s.entanglements[m]=s.entanglements[m]|1073741824|d&261930}function Lt(s,l){var d=s.entangledLanes|=l;for(s=s.entanglements;d;){var m=31-kt(d),R=1<<m;R&l|s[m]&l&&(s[m]|=l),d&=~R}}function tn(s,l){var d=l&-l;return d=(d&42)!==0?1:Rt(d),(d&(s.suspendedLanes|l))!==0?0:d}function Rt(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Er(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function ir(){var s=H.p;return s!==0?s:(s=window.event,s===void 0?32:vO(s.type))}function oo(s,l){var d=H.p;try{return H.p=s,l()}finally{H.p=d}}var _r=Math.random().toString(36).slice(2),an="__reactFiber$"+_r,On="__reactProps$"+_r,zr="__reactContainer$"+_r,Ao="__reactEvents$"+_r,Ds="__reactListeners$"+_r,Bf="__reactHandles$"+_r,vl="__reactResources$"+_r,bl="__reactMarker$"+_r;function Hf(s){delete s[an],delete s[On],delete s[Ao],delete s[Ds],delete s[Bf]}function Xi(s){var l=s[an];if(l)return l;for(var d=s.parentNode;d;){if(l=d[zr]||d[an]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(s=nO(s);s!==null;){if(d=s[an])return d;s=nO(s)}return l}s=d,d=s.parentNode}return null}function Qi(s){if(s=s[an]||s[zr]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function Sl(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(r(33))}function Ji(s){var l=s[vl];return l||(l=s[vl]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function dr(s){s[bl]=!0}var Kf=new Set,Pc={};function di(s,l){hi(s,l),hi(s+"Capture",l)}function hi(s,l){for(Pc[s]=l,s=0;s<l.length;s++)Kf.add(l[s])}var rv=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]*$"),Nc={},so={};function Tp(s){return ve.call(so,s)?!0:ve.call(Nc,s)?!1:rv.test(s)?so[s]=!0:(Nc[s]=!0,!1)}function Dc(s,l,d){if(Tp(l))if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var m=l.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+d)}}function wl(s,l,d){if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttribute(l,""+d)}}function Zo(s,l,d,m){if(m===null)s.removeAttribute(d);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(d);return}s.setAttributeNS(l,d,""+m)}}function io(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Gf(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function ov(s,l,d){var m=Object.getOwnPropertyDescriptor(s.constructor.prototype,l);if(!s.hasOwnProperty(l)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var R=m.get,k=m.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return R.call(this)},set:function(z){d=""+z,k.call(this,z)}}),Object.defineProperty(s,l,{enumerable:m.enumerable}),{getValue:function(){return d},setValue:function(z){d=""+z},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function $c(s){if(!s._valueTracker){var l=Gf(s)?"checked":"value";s._valueTracker=ov(s,l,""+s[l])}}function Rp(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var d=l.getValue(),m="";return s&&(m=Gf(s)?s.checked?"true":"false":s.value),s=m,s!==d?(l.setValue(s),!0):!1}function ea(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var sv=/[\n"\\]/g;function Lr(s){return s.replace(sv,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Zf(s,l,d,m,R,k,z,W){s.name="",z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?s.type=z:s.removeAttribute("type"),l!=null?z==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+io(l)):s.value!==""+io(l)&&(s.value=""+io(l)):z!=="submit"&&z!=="reset"||s.removeAttribute("value"),l!=null?Yf(s,z,io(l)):d!=null?Yf(s,z,io(d)):m!=null&&s.removeAttribute("value"),R==null&&k!=null&&(s.defaultChecked=!!k),R!=null&&(s.checked=R&&typeof R!="function"&&typeof R!="symbol"),W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"?s.name=""+io(W):s.removeAttribute("name")}function Op(s,l,d,m,R,k,z,W){if(k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(s.type=k),l!=null||d!=null){if(!(k!=="submit"&&k!=="reset"||l!=null)){$c(s);return}d=d!=null?""+io(d):"",l=l!=null?""+io(l):d,W||l===s.value||(s.value=l),s.defaultValue=l}m=m??R,m=typeof m!="function"&&typeof m!="symbol"&&!!m,s.checked=W?s.checked:!!m,s.defaultChecked=!!m,z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"&&(s.name=z),$c(s)}function Yf(s,l,d){l==="number"&&ea(s.ownerDocument)===s||s.defaultValue===""+d||(s.defaultValue=""+d)}function ta(s,l,d,m){if(s=s.options,l){l={};for(var R=0;R<d.length;R++)l["$"+d[R]]=!0;for(d=0;d<s.length;d++)R=l.hasOwnProperty("$"+s[d].value),s[d].selected!==R&&(s[d].selected=R),R&&m&&(s[d].defaultSelected=!0)}else{for(d=""+io(d),l=null,R=0;R<s.length;R++){if(s[R].value===d){s[R].selected=!0,m&&(s[R].defaultSelected=!0);return}l!==null||s[R].disabled||(l=s[R])}l!==null&&(l.selected=!0)}}function xl(s,l,d){if(l!=null&&(l=""+io(l),l!==s.value&&(s.value=l),d==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=d!=null?""+io(d):""}function Ap(s,l,d,m){if(l==null){if(m!=null){if(d!=null)throw Error(r(92));if(ee(m)){if(1<m.length)throw Error(r(93));m=m[0]}d=m}d==null&&(d=""),l=d}d=io(l),s.defaultValue=d,m=s.textContent,m===d&&m!==""&&m!==null&&(s.value=m),$c(s)}function Q(s,l){if(l){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=l;return}}s.textContent=l}var B=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 K(s,l,d){var m=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?m?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":m?s.setProperty(l,d):typeof d!="number"||d===0||B.has(l)?l==="float"?s.cssFloat=d:s[l]=(""+d).trim():s[l]=d+"px"}function Y(s,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(s=s.style,d!=null){for(var m in d)!d.hasOwnProperty(m)||l!=null&&l.hasOwnProperty(m)||(m.indexOf("--")===0?s.setProperty(m,""):m==="float"?s.cssFloat="":s[m]="");for(var R in l)m=l[R],l.hasOwnProperty(R)&&d[R]!==m&&K(s,R,m)}else for(var k in l)l.hasOwnProperty(k)&&K(s,k,l[k])}function ae(s){if(s.indexOf("-")===-1)return!1;switch(s){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 _e=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"]]),ge=/^[\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 le(s){return ge.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Re(){}var $e=null;function He(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var qe=null,rt=null;function Ke(s){var l=Qi(s);if(l&&(s=l.stateNode)){var d=s[On]||null;e:switch(s=l.stateNode,l.type){case"input":if(Zf(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=s;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Lr(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var m=d[l];if(m!==s&&m.form===s.form){var R=m[On]||null;if(!R)throw Error(r(90));Zf(m,R.value,R.defaultValue,R.defaultValue,R.checked,R.defaultChecked,R.type,R.name)}}for(l=0;l<d.length;l++)m=d[l],m.form===s.form&&Rp(m)}break e;case"textarea":xl(s,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&ta(s,!!d.multiple,l,!1)}}}var Ot=!1;function qt(s,l,d){if(Ot)return s(l,d);Ot=!0;try{var m=s(l);return m}finally{if(Ot=!1,(qe!==null||rt!==null)&&(dm(),qe&&(l=qe,s=rt,rt=qe=null,Ke(l),s)))for(l=0;l<s.length;l++)Ke(s[l])}}function ct(s,l){var d=s.stateNode;if(d===null)return null;var m=d[On]||null;if(m===null)return null;d=m[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(s=s.type,m=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!m;break e;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var Et=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ar=!1;if(Et)try{var hn={};Object.defineProperty(hn,"passive",{get:function(){ar=!0}}),window.addEventListener("test",hn,hn),window.removeEventListener("test",hn,hn)}catch{ar=!1}var Cr=null,Nr=null,$s=null;function pi(){if($s)return $s;var s,l=Nr,d=l.length,m,R="value"in Cr?Cr.value:Cr.textContent,k=R.length;for(s=0;s<d&&l[s]===R[s];s++);var z=d-s;for(m=1;m<=z&&l[d-m]===R[k-m];m++);return $s=R.slice(s,1<m?1-m:void 0)}function ws(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function ao(){return!0}function Wf(){return!1}function Dr(s){function l(d,m,R,k,z){this._reactName=d,this._targetInst=R,this.type=m,this.nativeEvent=k,this.target=z,this.currentTarget=null;for(var W in s)s.hasOwnProperty(W)&&(d=s[W],this[W]=d?d(k):k[W]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?ao:Wf,this.isPropagationStopped=Wf,this}return p(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=ao)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=ao)},persist:function(){},isPersistent:ao}),l}var Is={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zs=Dr(Is),mi=p({},Is,{view:0,detail:0}),Xf=Dr(mi),El,Qf,na,kp=p({},mi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:av,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==na&&(na&&s.type==="mousemove"?(El=s.screenX-na.screenX,Qf=s.screenY-na.screenY):Qf=El=0,na=s),El)},movementY:function(s){return"movementY"in s?s.movementY:Qf}}),X2=Dr(kp),fL=p({},kp,{dataTransfer:0}),dL=Dr(fL),hL=p({},mi,{relatedTarget:0}),iv=Dr(hL),pL=p({},Is,{animationName:0,elapsedTime:0,pseudoElement:0}),mL=Dr(pL),gL=p({},Is,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),yL=Dr(gL),vL=p({},Is,{data:0}),Q2=Dr(vL),bL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},SL={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"},wL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xL(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=wL[s])?!!l[s]:!1}function av(){return xL}var EL=p({},mi,{key:function(s){if(s.key){var l=bL[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=ws(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?SL[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:av,charCode:function(s){return s.type==="keypress"?ws(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?ws(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),_L=Dr(EL),CL=p({},kp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),J2=Dr(CL),TL=p({},mi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:av}),RL=Dr(TL),OL=p({},Is,{propertyName:0,elapsedTime:0,pseudoElement:0}),AL=Dr(OL),kL=p({},kp,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),ML=Dr(kL),jL=p({},Is,{newState:0,oldState:0}),PL=Dr(jL),NL=[9,13,27,32],lv=Et&&"CompositionEvent"in window,Jf=null;Et&&"documentMode"in document&&(Jf=document.documentMode);var DL=Et&&"TextEvent"in window&&!Jf,eC=Et&&(!lv||Jf&&8<Jf&&11>=Jf),tC=" ",nC=!1;function rC(s,l){switch(s){case"keyup":return NL.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oC(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Ic=!1;function $L(s,l){switch(s){case"compositionend":return oC(l);case"keypress":return l.which!==32?null:(nC=!0,tC);case"textInput":return s=l.data,s===tC&&nC?null:s;default:return null}}function IL(s,l){if(Ic)return s==="compositionend"||!lv&&rC(s,l)?(s=pi(),$s=Nr=Cr=null,Ic=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return eC&&l.locale!=="ko"?null:l.data;default:return null}}var zL={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 sC(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!zL[s.type]:l==="textarea"}function iC(s,l,d,m){qe?rt?rt.push(m):rt=[m]:qe=m,l=bm(l,"onChange"),0<l.length&&(d=new zs("onChange","change",null,d,m),s.push({event:d,listeners:l}))}var ed=null,td=null;function LL(s){VR(s,0)}function Mp(s){var l=Sl(s);if(Rp(l))return s}function aC(s,l){if(s==="change")return l}var lC=!1;if(Et){var cv;if(Et){var uv="oninput"in document;if(!uv){var cC=document.createElement("div");cC.setAttribute("oninput","return;"),uv=typeof cC.oninput=="function"}cv=uv}else cv=!1;lC=cv&&(!document.documentMode||9<document.documentMode)}function uC(){ed&&(ed.detachEvent("onpropertychange",fC),td=ed=null)}function fC(s){if(s.propertyName==="value"&&Mp(td)){var l=[];iC(l,td,s,He(s)),qt(LL,l)}}function FL(s,l,d){s==="focusin"?(uC(),ed=l,td=d,ed.attachEvent("onpropertychange",fC)):s==="focusout"&&uC()}function UL(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Mp(td)}function VL(s,l){if(s==="click")return Mp(l)}function qL(s,l){if(s==="input"||s==="change")return Mp(l)}function BL(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var ko=typeof Object.is=="function"?Object.is:BL;function nd(s,l){if(ko(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var d=Object.keys(s),m=Object.keys(l);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var R=d[m];if(!ve.call(l,R)||!ko(s[R],l[R]))return!1}return!0}function dC(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function hC(s,l){var d=dC(s);s=0;for(var m;d;){if(d.nodeType===3){if(m=s+d.textContent.length,s<=l&&m>=l)return{node:d,offset:l-s};s=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=dC(d)}}function pC(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?pC(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function mC(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=ea(s.document);l instanceof s.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)s=l.contentWindow;else break;l=ea(s.document)}return l}function fv(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var HL=Et&&"documentMode"in document&&11>=document.documentMode,zc=null,dv=null,rd=null,hv=!1;function gC(s,l,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;hv||zc==null||zc!==ea(m)||(m=zc,"selectionStart"in m&&fv(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),rd&&nd(rd,m)||(rd=m,m=bm(dv,"onSelect"),0<m.length&&(l=new zs("onSelect","select",null,l,d),s.push({event:l,listeners:m}),l.target=zc)))}function _l(s,l){var d={};return d[s.toLowerCase()]=l.toLowerCase(),d["Webkit"+s]="webkit"+l,d["Moz"+s]="moz"+l,d}var Lc={animationend:_l("Animation","AnimationEnd"),animationiteration:_l("Animation","AnimationIteration"),animationstart:_l("Animation","AnimationStart"),transitionrun:_l("Transition","TransitionRun"),transitionstart:_l("Transition","TransitionStart"),transitioncancel:_l("Transition","TransitionCancel"),transitionend:_l("Transition","TransitionEnd")},pv={},yC={};Et&&(yC=document.createElement("div").style,"AnimationEvent"in window||(delete Lc.animationend.animation,delete Lc.animationiteration.animation,delete Lc.animationstart.animation),"TransitionEvent"in window||delete Lc.transitionend.transition);function Cl(s){if(pv[s])return pv[s];if(!Lc[s])return s;var l=Lc[s],d;for(d in l)if(l.hasOwnProperty(d)&&d in yC)return pv[s]=l[d];return s}var vC=Cl("animationend"),bC=Cl("animationiteration"),SC=Cl("animationstart"),KL=Cl("transitionrun"),GL=Cl("transitionstart"),ZL=Cl("transitioncancel"),wC=Cl("transitionend"),xC=new Map,mv="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(" ");mv.push("scrollEnd");function xs(s,l){xC.set(s,l),di(l,[s])}var jp=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Yo=[],Fc=0,gv=0;function Pp(){for(var s=Fc,l=gv=Fc=0;l<s;){var d=Yo[l];Yo[l++]=null;var m=Yo[l];Yo[l++]=null;var R=Yo[l];Yo[l++]=null;var k=Yo[l];if(Yo[l++]=null,m!==null&&R!==null){var z=m.pending;z===null?R.next=R:(R.next=z.next,z.next=R),m.pending=R}k!==0&&EC(d,R,k)}}function Np(s,l,d,m){Yo[Fc++]=s,Yo[Fc++]=l,Yo[Fc++]=d,Yo[Fc++]=m,gv|=m,s.lanes|=m,s=s.alternate,s!==null&&(s.lanes|=m)}function yv(s,l,d,m){return Np(s,l,d,m),Dp(s)}function Tl(s,l){return Np(s,null,null,l),Dp(s)}function EC(s,l,d){s.lanes|=d;var m=s.alternate;m!==null&&(m.lanes|=d);for(var R=!1,k=s.return;k!==null;)k.childLanes|=d,m=k.alternate,m!==null&&(m.childLanes|=d),k.tag===22&&(s=k.stateNode,s===null||s._visibility&1||(R=!0)),s=k,k=k.return;return s.tag===3?(k=s.stateNode,R&&l!==null&&(R=31-kt(d),s=k.hiddenUpdates,m=s[R],m===null?s[R]=[l]:m.push(l),l.lane=d|536870912),k):null}function Dp(s){if(50<Cd)throw Cd=0,Tb=null,Error(r(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var Uc={};function YL(s,l,d,m){this.tag=s,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mo(s,l,d,m){return new YL(s,l,d,m)}function vv(s){return s=s.prototype,!(!s||!s.isReactComponent)}function gi(s,l){var d=s.alternate;return d===null?(d=Mo(s.tag,l,s.key,s.mode),d.elementType=s.elementType,d.type=s.type,d.stateNode=s.stateNode,d.alternate=s,s.alternate=d):(d.pendingProps=l,d.type=s.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=s.flags&65011712,d.childLanes=s.childLanes,d.lanes=s.lanes,d.child=s.child,d.memoizedProps=s.memoizedProps,d.memoizedState=s.memoizedState,d.updateQueue=s.updateQueue,l=s.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=s.sibling,d.index=s.index,d.ref=s.ref,d.refCleanup=s.refCleanup,d}function _C(s,l){s.flags&=65011714;var d=s.alternate;return d===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=d.childLanes,s.lanes=d.lanes,s.child=d.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=d.memoizedProps,s.memoizedState=d.memoizedState,s.updateQueue=d.updateQueue,s.type=d.type,l=d.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function $p(s,l,d,m,R,k){var z=0;if(m=s,typeof s=="function")vv(s)&&(z=1);else if(typeof s=="string")z=e7(s,d,N.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case P:return s=Mo(31,d,l,R),s.elementType=P,s.lanes=k,s;case x:return Rl(d.children,R,k,l);case w:z=8,R|=24;break;case T:return s=Mo(12,d,l,R|2),s.elementType=T,s.lanes=k,s;case C:return s=Mo(13,d,l,R),s.elementType=C,s.lanes=k,s;case E:return s=Mo(19,d,l,R),s.elementType=E,s.lanes=k,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case _:z=10;break e;case b:z=9;break e;case S:z=11;break e;case O:z=14;break e;case j:z=16,m=null;break e}z=29,d=Error(r(130,s===null?"null":typeof s,"")),m=null}return l=Mo(z,d,l,R),l.elementType=s,l.type=m,l.lanes=k,l}function Rl(s,l,d,m){return s=Mo(7,s,m,l),s.lanes=d,s}function bv(s,l,d){return s=Mo(6,s,null,l),s.lanes=d,s}function CC(s){var l=Mo(18,null,null,0);return l.stateNode=s,l}function Sv(s,l,d){return l=Mo(4,s.children!==null?s.children:[],s.key,l),l.lanes=d,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var TC=new WeakMap;function Wo(s,l){if(typeof s=="object"&&s!==null){var d=TC.get(s);return d!==void 0?d:(l={value:s,source:l,stack:Ue(l)},TC.set(s,l),l)}return{value:s,source:l,stack:Ue(l)}}var Vc=[],qc=0,Ip=null,od=0,Xo=[],Qo=0,ra=null,Ls=1,Fs="";function yi(s,l){Vc[qc++]=od,Vc[qc++]=Ip,Ip=s,od=l}function RC(s,l,d){Xo[Qo++]=Ls,Xo[Qo++]=Fs,Xo[Qo++]=ra,ra=s;var m=Ls;s=Fs;var R=32-kt(m)-1;m&=~(1<<R),d+=1;var k=32-kt(l)+R;if(30<k){var z=R-R%5;k=(m&(1<<z)-1).toString(32),m>>=z,R-=z,Ls=1<<32-kt(l)+R|d<<R|m,Fs=k+s}else Ls=1<<k|d<<R|m,Fs=s}function wv(s){s.return!==null&&(yi(s,1),RC(s,1,0))}function xv(s){for(;s===Ip;)Ip=Vc[--qc],Vc[qc]=null,od=Vc[--qc],Vc[qc]=null;for(;s===ra;)ra=Xo[--Qo],Xo[Qo]=null,Fs=Xo[--Qo],Xo[Qo]=null,Ls=Xo[--Qo],Xo[Qo]=null}function OC(s,l){Xo[Qo++]=Ls,Xo[Qo++]=Fs,Xo[Qo++]=ra,Ls=l.id,Fs=l.overflow,ra=s}var Fr=null,In=null,Qt=!1,oa=null,Jo=!1,Ev=Error(r(519));function sa(s){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw sd(Wo(l,s)),Ev}function AC(s){var l=s.stateNode,d=s.type,m=s.memoizedProps;switch(l[an]=s,l[On]=m,d){case"dialog":Ht("cancel",l),Ht("close",l);break;case"iframe":case"object":case"embed":Ht("load",l);break;case"video":case"audio":for(d=0;d<Rd.length;d++)Ht(Rd[d],l);break;case"source":Ht("error",l);break;case"img":case"image":case"link":Ht("error",l),Ht("load",l);break;case"details":Ht("toggle",l);break;case"input":Ht("invalid",l),Op(l,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Ht("invalid",l);break;case"textarea":Ht("invalid",l),Ap(l,m.value,m.defaultValue,m.children)}d=m.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||m.suppressHydrationWarning===!0||KR(l.textContent,d)?(m.popover!=null&&(Ht("beforetoggle",l),Ht("toggle",l)),m.onScroll!=null&&Ht("scroll",l),m.onScrollEnd!=null&&Ht("scrollend",l),m.onClick!=null&&(l.onclick=Re),l=!0):l=!1,l||sa(s,!0)}function kC(s){for(Fr=s.return;Fr;)switch(Fr.tag){case 5:case 31:case 13:Jo=!1;return;case 27:case 3:Jo=!0;return;default:Fr=Fr.return}}function Bc(s){if(s!==Fr)return!1;if(!Qt)return kC(s),Qt=!0,!1;var l=s.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=s.type,d=!(d!=="form"&&d!=="button")||Ub(s.type,s.memoizedProps)),d=!d),d&&In&&sa(s),kC(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));In=tO(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));In=tO(s)}else l===27?(l=In,ba(s.type)?(s=Kb,Kb=null,In=s):In=l):In=Fr?ts(s.stateNode.nextSibling):null;return!0}function Ol(){In=Fr=null,Qt=!1}function _v(){var s=oa;return s!==null&&(So===null?So=s:So.push.apply(So,s),oa=null),s}function sd(s){oa===null?oa=[s]:oa.push(s)}var Cv=D(null),Al=null,vi=null;function ia(s,l,d){U(Cv,l._currentValue),l._currentValue=d}function bi(s){s._currentValue=Cv.current,q(Cv)}function Tv(s,l,d){for(;s!==null;){var m=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,m!==null&&(m.childLanes|=l)):m!==null&&(m.childLanes&l)!==l&&(m.childLanes|=l),s===d)break;s=s.return}}function Rv(s,l,d,m){var R=s.child;for(R!==null&&(R.return=s);R!==null;){var k=R.dependencies;if(k!==null){var z=R.child;k=k.firstContext;e:for(;k!==null;){var W=k;k=R;for(var ie=0;ie<l.length;ie++)if(W.context===l[ie]){k.lanes|=d,W=k.alternate,W!==null&&(W.lanes|=d),Tv(k.return,d,s),m||(z=null);break e}k=W.next}}else if(R.tag===18){if(z=R.return,z===null)throw Error(r(341));z.lanes|=d,k=z.alternate,k!==null&&(k.lanes|=d),Tv(z,d,s),z=null}else z=R.child;if(z!==null)z.return=R;else for(z=R;z!==null;){if(z===s){z=null;break}if(R=z.sibling,R!==null){R.return=z.return,z=R;break}z=z.return}R=z}}function Hc(s,l,d,m){s=null;for(var R=l,k=!1;R!==null;){if(!k){if((R.flags&524288)!==0)k=!0;else if((R.flags&262144)!==0)break}if(R.tag===10){var z=R.alternate;if(z===null)throw Error(r(387));if(z=z.memoizedProps,z!==null){var W=R.type;ko(R.pendingProps.value,z.value)||(s!==null?s.push(W):s=[W])}}else if(R===re.current){if(z=R.alternate,z===null)throw Error(r(387));z.memoizedState.memoizedState!==R.memoizedState.memoizedState&&(s!==null?s.push(jd):s=[jd])}R=R.return}s!==null&&Rv(l,s,d,m),l.flags|=262144}function zp(s){for(s=s.firstContext;s!==null;){if(!ko(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function kl(s){Al=s,vi=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Ur(s){return MC(Al,s)}function Lp(s,l){return Al===null&&kl(s),MC(s,l)}function MC(s,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},vi===null){if(s===null)throw Error(r(308));vi=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else vi=vi.next=l;return d}var WL=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(d,m){s.push(m)}};this.abort=function(){l.aborted=!0,s.forEach(function(d){return d()})}},XL=e.unstable_scheduleCallback,QL=e.unstable_NormalPriority,hr={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ov(){return{controller:new WL,data:new Map,refCount:0}}function id(s){s.refCount--,s.refCount===0&&XL(QL,function(){s.controller.abort()})}var ad=null,Av=0,Kc=0,Gc=null;function JL(s,l){if(ad===null){var d=ad=[];Av=0,Kc=jb(),Gc={status:"pending",value:void 0,then:function(m){d.push(m)}}}return Av++,l.then(jC,jC),l}function jC(){if(--Av===0&&ad!==null){Gc!==null&&(Gc.status="fulfilled");var s=ad;ad=null,Kc=0,Gc=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function eF(s,l){var d=[],m={status:"pending",value:null,reason:null,then:function(R){d.push(R)}};return s.then(function(){m.status="fulfilled",m.value=l;for(var R=0;R<d.length;R++)(0,d[R])(l)},function(R){for(m.status="rejected",m.reason=R,R=0;R<d.length;R++)(0,d[R])(void 0)}),m}var PC=Z.S;Z.S=function(s,l){gR=ze(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&JL(s,l),PC!==null&&PC(s,l)};var Ml=D(null);function kv(){var s=Ml.current;return s!==null?s:An.pooledCache}function Fp(s,l){l===null?U(Ml,Ml.current):U(Ml,l.pool)}function NC(){var s=kv();return s===null?null:{parent:hr._currentValue,pool:s}}var Zc=Error(r(460)),Mv=Error(r(474)),Up=Error(r(542)),Vp={then:function(){}};function DC(s){return s=s.status,s==="fulfilled"||s==="rejected"}function $C(s,l,d){switch(d=s[d],d===void 0?s.push(l):d!==l&&(l.then(Re,Re),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,zC(s),s;default:if(typeof l.status=="string")l.then(Re,Re);else{if(s=An,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=l,s.status="pending",s.then(function(m){if(l.status==="pending"){var R=l;R.status="fulfilled",R.value=m}},function(m){if(l.status==="pending"){var R=l;R.status="rejected",R.reason=m}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,zC(s),s}throw Pl=l,Zc}}function jl(s){try{var l=s._init;return l(s._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Pl=d,Zc):d}}var Pl=null;function IC(){if(Pl===null)throw Error(r(459));var s=Pl;return Pl=null,s}function zC(s){if(s===Zc||s===Up)throw Error(r(483))}var Yc=null,ld=0;function qp(s){var l=ld;return ld+=1,Yc===null&&(Yc=[]),$C(Yc,s,l)}function cd(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function Bp(s,l){throw l.$$typeof===g?Error(r(525)):(s=Object.prototype.toString.call(l),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function LC(s){function l(pe,ue){if(s){var be=pe.deletions;be===null?(pe.deletions=[ue],pe.flags|=16):be.push(ue)}}function d(pe,ue){if(!s)return null;for(;ue!==null;)l(pe,ue),ue=ue.sibling;return null}function m(pe){for(var ue=new Map;pe!==null;)pe.key!==null?ue.set(pe.key,pe):ue.set(pe.index,pe),pe=pe.sibling;return ue}function R(pe,ue){return pe=gi(pe,ue),pe.index=0,pe.sibling=null,pe}function k(pe,ue,be){return pe.index=be,s?(be=pe.alternate,be!==null?(be=be.index,be<ue?(pe.flags|=67108866,ue):be):(pe.flags|=67108866,ue)):(pe.flags|=1048576,ue)}function z(pe){return s&&pe.alternate===null&&(pe.flags|=67108866),pe}function W(pe,ue,be,je){return ue===null||ue.tag!==6?(ue=bv(be,pe.mode,je),ue.return=pe,ue):(ue=R(ue,be),ue.return=pe,ue)}function ie(pe,ue,be,je){var ut=be.type;return ut===x?Ae(pe,ue,be.props.children,je,be.key):ue!==null&&(ue.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===j&&jl(ut)===ue.type)?(ue=R(ue,be.props),cd(ue,be),ue.return=pe,ue):(ue=$p(be.type,be.key,be.props,null,pe.mode,je),cd(ue,be),ue.return=pe,ue)}function Se(pe,ue,be,je){return ue===null||ue.tag!==4||ue.stateNode.containerInfo!==be.containerInfo||ue.stateNode.implementation!==be.implementation?(ue=Sv(be,pe.mode,je),ue.return=pe,ue):(ue=R(ue,be.children||[]),ue.return=pe,ue)}function Ae(pe,ue,be,je,ut){return ue===null||ue.tag!==7?(ue=Rl(be,pe.mode,je,ut),ue.return=pe,ue):(ue=R(ue,be),ue.return=pe,ue)}function Ne(pe,ue,be){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return ue=bv(""+ue,pe.mode,be),ue.return=pe,ue;if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case v:return be=$p(ue.type,ue.key,ue.props,null,pe.mode,be),cd(be,ue),be.return=pe,be;case y:return ue=Sv(ue,pe.mode,be),ue.return=pe,ue;case j:return ue=jl(ue),Ne(pe,ue,be)}if(ee(ue)||L(ue))return ue=Rl(ue,pe.mode,be,null),ue.return=pe,ue;if(typeof ue.then=="function")return Ne(pe,qp(ue),be);if(ue.$$typeof===_)return Ne(pe,Lp(pe,ue),be);Bp(pe,ue)}return null}function xe(pe,ue,be,je){var ut=ue!==null?ue.key:null;if(typeof be=="string"&&be!==""||typeof be=="number"||typeof be=="bigint")return ut!==null?null:W(pe,ue,""+be,je);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case v:return be.key===ut?ie(pe,ue,be,je):null;case y:return be.key===ut?Se(pe,ue,be,je):null;case j:return be=jl(be),xe(pe,ue,be,je)}if(ee(be)||L(be))return ut!==null?null:Ae(pe,ue,be,je,null);if(typeof be.then=="function")return xe(pe,ue,qp(be),je);if(be.$$typeof===_)return xe(pe,ue,Lp(pe,be),je);Bp(pe,be)}return null}function Te(pe,ue,be,je,ut){if(typeof je=="string"&&je!==""||typeof je=="number"||typeof je=="bigint")return pe=pe.get(be)||null,W(ue,pe,""+je,ut);if(typeof je=="object"&&je!==null){switch(je.$$typeof){case v:return pe=pe.get(je.key===null?be:je.key)||null,ie(ue,pe,je,ut);case y:return pe=pe.get(je.key===null?be:je.key)||null,Se(ue,pe,je,ut);case j:return je=jl(je),Te(pe,ue,be,je,ut)}if(ee(je)||L(je))return pe=pe.get(be)||null,Ae(ue,pe,je,ut,null);if(typeof je.then=="function")return Te(pe,ue,be,qp(je),ut);if(je.$$typeof===_)return Te(pe,ue,be,Lp(ue,je),ut);Bp(ue,je)}return null}function et(pe,ue,be,je){for(var ut=null,ln=null,ot=ue,jt=ue=0,Yt=null;ot!==null&&jt<be.length;jt++){ot.index>jt?(Yt=ot,ot=null):Yt=ot.sibling;var cn=xe(pe,ot,be[jt],je);if(cn===null){ot===null&&(ot=Yt);break}s&&ot&&cn.alternate===null&&l(pe,ot),ue=k(cn,ue,jt),ln===null?ut=cn:ln.sibling=cn,ln=cn,ot=Yt}if(jt===be.length)return d(pe,ot),Qt&&yi(pe,jt),ut;if(ot===null){for(;jt<be.length;jt++)ot=Ne(pe,be[jt],je),ot!==null&&(ue=k(ot,ue,jt),ln===null?ut=ot:ln.sibling=ot,ln=ot);return Qt&&yi(pe,jt),ut}for(ot=m(ot);jt<be.length;jt++)Yt=Te(ot,pe,jt,be[jt],je),Yt!==null&&(s&&Yt.alternate!==null&&ot.delete(Yt.key===null?jt:Yt.key),ue=k(Yt,ue,jt),ln===null?ut=Yt:ln.sibling=Yt,ln=Yt);return s&&ot.forEach(function(_a){return l(pe,_a)}),Qt&&yi(pe,jt),ut}function ht(pe,ue,be,je){if(be==null)throw Error(r(151));for(var ut=null,ln=null,ot=ue,jt=ue=0,Yt=null,cn=be.next();ot!==null&&!cn.done;jt++,cn=be.next()){ot.index>jt?(Yt=ot,ot=null):Yt=ot.sibling;var _a=xe(pe,ot,cn.value,je);if(_a===null){ot===null&&(ot=Yt);break}s&&ot&&_a.alternate===null&&l(pe,ot),ue=k(_a,ue,jt),ln===null?ut=_a:ln.sibling=_a,ln=_a,ot=Yt}if(cn.done)return d(pe,ot),Qt&&yi(pe,jt),ut;if(ot===null){for(;!cn.done;jt++,cn=be.next())cn=Ne(pe,cn.value,je),cn!==null&&(ue=k(cn,ue,jt),ln===null?ut=cn:ln.sibling=cn,ln=cn);return Qt&&yi(pe,jt),ut}for(ot=m(ot);!cn.done;jt++,cn=be.next())cn=Te(ot,pe,jt,cn.value,je),cn!==null&&(s&&cn.alternate!==null&&ot.delete(cn.key===null?jt:cn.key),ue=k(cn,ue,jt),ln===null?ut=cn:ln.sibling=cn,ln=cn);return s&&ot.forEach(function(f7){return l(pe,f7)}),Qt&&yi(pe,jt),ut}function _n(pe,ue,be,je){if(typeof be=="object"&&be!==null&&be.type===x&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case v:e:{for(var ut=be.key;ue!==null;){if(ue.key===ut){if(ut=be.type,ut===x){if(ue.tag===7){d(pe,ue.sibling),je=R(ue,be.props.children),je.return=pe,pe=je;break e}}else if(ue.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===j&&jl(ut)===ue.type){d(pe,ue.sibling),je=R(ue,be.props),cd(je,be),je.return=pe,pe=je;break e}d(pe,ue);break}else l(pe,ue);ue=ue.sibling}be.type===x?(je=Rl(be.props.children,pe.mode,je,be.key),je.return=pe,pe=je):(je=$p(be.type,be.key,be.props,null,pe.mode,je),cd(je,be),je.return=pe,pe=je)}return z(pe);case y:e:{for(ut=be.key;ue!==null;){if(ue.key===ut)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){d(pe,ue.sibling),je=R(ue,be.children||[]),je.return=pe,pe=je;break e}else{d(pe,ue);break}else l(pe,ue);ue=ue.sibling}je=Sv(be,pe.mode,je),je.return=pe,pe=je}return z(pe);case j:return be=jl(be),_n(pe,ue,be,je)}if(ee(be))return et(pe,ue,be,je);if(L(be)){if(ut=L(be),typeof ut!="function")throw Error(r(150));return be=ut.call(be),ht(pe,ue,be,je)}if(typeof be.then=="function")return _n(pe,ue,qp(be),je);if(be.$$typeof===_)return _n(pe,ue,Lp(pe,be),je);Bp(pe,be)}return typeof be=="string"&&be!==""||typeof be=="number"||typeof be=="bigint"?(be=""+be,ue!==null&&ue.tag===6?(d(pe,ue.sibling),je=R(ue,be),je.return=pe,pe=je):(d(pe,ue),je=bv(be,pe.mode,je),je.return=pe,pe=je),z(pe)):d(pe,ue)}return function(pe,ue,be,je){try{ld=0;var ut=_n(pe,ue,be,je);return Yc=null,ut}catch(ot){if(ot===Zc||ot===Up)throw ot;var ln=Mo(29,ot,null,pe.mode);return ln.lanes=je,ln.return=pe,ln}}}var Nl=LC(!0),FC=LC(!1),aa=!1;function jv(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pv(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function la(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function ca(s,l,d){var m=s.updateQueue;if(m===null)return null;if(m=m.shared,(dn&2)!==0){var R=m.pending;return R===null?l.next=l:(l.next=R.next,R.next=l),m.pending=l,l=Dp(s),EC(s,null,d),l}return Np(s,m,l,d),Dp(s)}function ud(s,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var m=l.lanes;m&=s.pendingLanes,d|=m,l.lanes=d,Lt(s,d)}}function Nv(s,l){var d=s.updateQueue,m=s.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var R=null,k=null;if(d=d.firstBaseUpdate,d!==null){do{var z={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};k===null?R=k=z:k=k.next=z,d=d.next}while(d!==null);k===null?R=k=l:k=k.next=l}else R=k=l;d={baseState:m.baseState,firstBaseUpdate:R,lastBaseUpdate:k,shared:m.shared,callbacks:m.callbacks},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=l:s.next=l,d.lastBaseUpdate=l}var Dv=!1;function fd(){if(Dv){var s=Gc;if(s!==null)throw s}}function dd(s,l,d,m){Dv=!1;var R=s.updateQueue;aa=!1;var k=R.firstBaseUpdate,z=R.lastBaseUpdate,W=R.shared.pending;if(W!==null){R.shared.pending=null;var ie=W,Se=ie.next;ie.next=null,z===null?k=Se:z.next=Se,z=ie;var Ae=s.alternate;Ae!==null&&(Ae=Ae.updateQueue,W=Ae.lastBaseUpdate,W!==z&&(W===null?Ae.firstBaseUpdate=Se:W.next=Se,Ae.lastBaseUpdate=ie))}if(k!==null){var Ne=R.baseState;z=0,Ae=Se=ie=null,W=k;do{var xe=W.lane&-536870913,Te=xe!==W.lane;if(Te?(Zt&xe)===xe:(m&xe)===xe){xe!==0&&xe===Kc&&(Dv=!0),Ae!==null&&(Ae=Ae.next={lane:0,tag:W.tag,payload:W.payload,callback:null,next:null});e:{var et=s,ht=W;xe=l;var _n=d;switch(ht.tag){case 1:if(et=ht.payload,typeof et=="function"){Ne=et.call(_n,Ne,xe);break e}Ne=et;break e;case 3:et.flags=et.flags&-65537|128;case 0:if(et=ht.payload,xe=typeof et=="function"?et.call(_n,Ne,xe):et,xe==null)break e;Ne=p({},Ne,xe);break e;case 2:aa=!0}}xe=W.callback,xe!==null&&(s.flags|=64,Te&&(s.flags|=8192),Te=R.callbacks,Te===null?R.callbacks=[xe]:Te.push(xe))}else Te={lane:xe,tag:W.tag,payload:W.payload,callback:W.callback,next:null},Ae===null?(Se=Ae=Te,ie=Ne):Ae=Ae.next=Te,z|=xe;if(W=W.next,W===null){if(W=R.shared.pending,W===null)break;Te=W,W=Te.next,Te.next=null,R.lastBaseUpdate=Te,R.shared.pending=null}}while(!0);Ae===null&&(ie=Ne),R.baseState=ie,R.firstBaseUpdate=Se,R.lastBaseUpdate=Ae,k===null&&(R.shared.lanes=0),pa|=z,s.lanes=z,s.memoizedState=Ne}}function UC(s,l){if(typeof s!="function")throw Error(r(191,s));s.call(l)}function VC(s,l){var d=s.callbacks;if(d!==null)for(s.callbacks=null,s=0;s<d.length;s++)UC(d[s],l)}var Wc=D(null),Hp=D(0);function qC(s,l){s=Oi,U(Hp,s),U(Wc,l),Oi=s|l.baseLanes}function $v(){U(Hp,Oi),U(Wc,Wc.current)}function Iv(){Oi=Hp.current,q(Wc),q(Hp)}var jo=D(null),es=null;function ua(s){var l=s.alternate;U(lr,lr.current&1),U(jo,s),es===null&&(l===null||Wc.current!==null||l.memoizedState!==null)&&(es=s)}function zv(s){U(lr,lr.current),U(jo,s),es===null&&(es=s)}function BC(s){s.tag===22?(U(lr,lr.current),U(jo,s),es===null&&(es=s)):fa()}function fa(){U(lr,lr.current),U(jo,jo.current)}function Po(s){q(jo),es===s&&(es=null),q(lr)}var lr=D(0);function Kp(s){for(var l=s;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||Bb(d)||Hb(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Si=0,At=null,xn=null,pr=null,Gp=!1,Xc=!1,Dl=!1,Zp=0,hd=0,Qc=null,tF=0;function nr(){throw Error(r(321))}function Lv(s,l){if(l===null)return!1;for(var d=0;d<l.length&&d<s.length;d++)if(!ko(s[d],l[d]))return!1;return!0}function Fv(s,l,d,m,R,k){return Si=k,At=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,Z.H=s===null||s.memoizedState===null?RT:tb,Dl=!1,k=d(m,R),Dl=!1,Xc&&(k=KC(l,d,m,R)),HC(s),k}function HC(s){Z.H=gd;var l=xn!==null&&xn.next!==null;if(Si=0,pr=xn=At=null,Gp=!1,hd=0,Qc=null,l)throw Error(r(300));s===null||mr||(s=s.dependencies,s!==null&&zp(s)&&(mr=!0))}function KC(s,l,d,m){At=s;var R=0;do{if(Xc&&(Qc=null),hd=0,Xc=!1,25<=R)throw Error(r(301));if(R+=1,pr=xn=null,s.updateQueue!=null){var k=s.updateQueue;k.lastEffect=null,k.events=null,k.stores=null,k.memoCache!=null&&(k.memoCache.index=0)}Z.H=OT,k=l(d,m)}while(Xc);return k}function nF(){var s=Z.H,l=s.useState()[0];return l=typeof l.then=="function"?pd(l):l,s=s.useState()[0],(xn!==null?xn.memoizedState:null)!==s&&(At.flags|=1024),l}function Uv(){var s=Zp!==0;return Zp=0,s}function Vv(s,l,d){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~d}function qv(s){if(Gp){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}Gp=!1}Si=0,pr=xn=At=null,Xc=!1,hd=Zp=0,Qc=null}function lo(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pr===null?At.memoizedState=pr=s:pr=pr.next=s,pr}function cr(){if(xn===null){var s=At.alternate;s=s!==null?s.memoizedState:null}else s=xn.next;var l=pr===null?At.memoizedState:pr.next;if(l!==null)pr=l,xn=s;else{if(s===null)throw At.alternate===null?Error(r(467)):Error(r(310));xn=s,s={memoizedState:xn.memoizedState,baseState:xn.baseState,baseQueue:xn.baseQueue,queue:xn.queue,next:null},pr===null?At.memoizedState=pr=s:pr=pr.next=s}return pr}function Yp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pd(s){var l=hd;return hd+=1,Qc===null&&(Qc=[]),s=$C(Qc,s,l),l=At,(pr===null?l.memoizedState:pr.next)===null&&(l=l.alternate,Z.H=l===null||l.memoizedState===null?RT:tb),s}function Wp(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return pd(s);if(s.$$typeof===_)return Ur(s)}throw Error(r(438,String(s)))}function Bv(s){var l=null,d=At.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var m=At.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(l={data:m.data.map(function(R){return R.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Yp(),At.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(s),m=0;m<s;m++)d[m]=$;return l.index++,d}function wi(s,l){return typeof l=="function"?l(s):l}function Xp(s){var l=cr();return Hv(l,xn,s)}function Hv(s,l,d){var m=s.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=d;var R=s.baseQueue,k=m.pending;if(k!==null){if(R!==null){var z=R.next;R.next=k.next,k.next=z}l.baseQueue=R=k,m.pending=null}if(k=s.baseState,R===null)s.memoizedState=k;else{l=R.next;var W=z=null,ie=null,Se=l,Ae=!1;do{var Ne=Se.lane&-536870913;if(Ne!==Se.lane?(Zt&Ne)===Ne:(Si&Ne)===Ne){var xe=Se.revertLane;if(xe===0)ie!==null&&(ie=ie.next={lane:0,revertLane:0,gesture:null,action:Se.action,hasEagerState:Se.hasEagerState,eagerState:Se.eagerState,next:null}),Ne===Kc&&(Ae=!0);else if((Si&xe)===xe){Se=Se.next,xe===Kc&&(Ae=!0);continue}else Ne={lane:0,revertLane:Se.revertLane,gesture:null,action:Se.action,hasEagerState:Se.hasEagerState,eagerState:Se.eagerState,next:null},ie===null?(W=ie=Ne,z=k):ie=ie.next=Ne,At.lanes|=xe,pa|=xe;Ne=Se.action,Dl&&d(k,Ne),k=Se.hasEagerState?Se.eagerState:d(k,Ne)}else xe={lane:Ne,revertLane:Se.revertLane,gesture:Se.gesture,action:Se.action,hasEagerState:Se.hasEagerState,eagerState:Se.eagerState,next:null},ie===null?(W=ie=xe,z=k):ie=ie.next=xe,At.lanes|=Ne,pa|=Ne;Se=Se.next}while(Se!==null&&Se!==l);if(ie===null?z=k:ie.next=W,!ko(k,s.memoizedState)&&(mr=!0,Ae&&(d=Gc,d!==null)))throw d;s.memoizedState=k,s.baseState=z,s.baseQueue=ie,m.lastRenderedState=k}return R===null&&(m.lanes=0),[s.memoizedState,m.dispatch]}function Kv(s){var l=cr(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=s;var m=d.dispatch,R=d.pending,k=l.memoizedState;if(R!==null){d.pending=null;var z=R=R.next;do k=s(k,z.action),z=z.next;while(z!==R);ko(k,l.memoizedState)||(mr=!0),l.memoizedState=k,l.baseQueue===null&&(l.baseState=k),d.lastRenderedState=k}return[k,m]}function GC(s,l,d){var m=At,R=cr(),k=Qt;if(k){if(d===void 0)throw Error(r(407));d=d()}else d=l();var z=!ko((xn||R).memoizedState,d);if(z&&(R.memoizedState=d,mr=!0),R=R.queue,Yv(WC.bind(null,m,R,s),[s]),R.getSnapshot!==l||z||pr!==null&&pr.memoizedState.tag&1){if(m.flags|=2048,Jc(9,{destroy:void 0},YC.bind(null,m,R,d,l),null),An===null)throw Error(r(349));k||(Si&127)!==0||ZC(m,l,d)}return d}function ZC(s,l,d){s.flags|=16384,s={getSnapshot:l,value:d},l=At.updateQueue,l===null?(l=Yp(),At.updateQueue=l,l.stores=[s]):(d=l.stores,d===null?l.stores=[s]:d.push(s))}function YC(s,l,d,m){l.value=d,l.getSnapshot=m,XC(l)&&QC(s)}function WC(s,l,d){return d(function(){XC(l)&&QC(s)})}function XC(s){var l=s.getSnapshot;s=s.value;try{var d=l();return!ko(s,d)}catch{return!0}}function QC(s){var l=Tl(s,2);l!==null&&wo(l,s,2)}function Gv(s){var l=lo();if(typeof s=="function"){var d=s;if(s=d(),Dl){Gt(!0);try{d()}finally{Gt(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wi,lastRenderedState:s},l}function JC(s,l,d,m){return s.baseState=d,Hv(s,xn,typeof m=="function"?m:wi)}function rF(s,l,d,m,R){if(em(s))throw Error(r(485));if(s=l.action,s!==null){var k={payload:R,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(z){k.listeners.push(z)}};Z.T!==null?d(!0):k.isTransition=!1,m(k),d=l.pending,d===null?(k.next=l.pending=k,eT(l,k)):(k.next=d.next,l.pending=d.next=k)}}function eT(s,l){var d=l.action,m=l.payload,R=s.state;if(l.isTransition){var k=Z.T,z={};Z.T=z;try{var W=d(R,m),ie=Z.S;ie!==null&&ie(z,W),tT(s,l,W)}catch(Se){Zv(s,l,Se)}finally{k!==null&&z.types!==null&&(k.types=z.types),Z.T=k}}else try{k=d(R,m),tT(s,l,k)}catch(Se){Zv(s,l,Se)}}function tT(s,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(m){nT(s,l,m)},function(m){return Zv(s,l,m)}):nT(s,l,d)}function nT(s,l,d){l.status="fulfilled",l.value=d,rT(l),s.state=d,l=s.pending,l!==null&&(d=l.next,d===l?s.pending=null:(d=d.next,l.next=d,eT(s,d)))}function Zv(s,l,d){var m=s.pending;if(s.pending=null,m!==null){m=m.next;do l.status="rejected",l.reason=d,rT(l),l=l.next;while(l!==m)}s.action=null}function rT(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function oT(s,l){return l}function sT(s,l){if(Qt){var d=An.formState;if(d!==null){e:{var m=At;if(Qt){if(In){t:{for(var R=In,k=Jo;R.nodeType!==8;){if(!k){R=null;break t}if(R=ts(R.nextSibling),R===null){R=null;break t}}k=R.data,R=k==="F!"||k==="F"?R:null}if(R){In=ts(R.nextSibling),m=R.data==="F!";break e}}sa(m)}m=!1}m&&(l=d[0])}}return d=lo(),d.memoizedState=d.baseState=l,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oT,lastRenderedState:l},d.queue=m,d=_T.bind(null,At,m),m.dispatch=d,m=Gv(!1),k=eb.bind(null,At,!1,m.queue),m=lo(),R={state:l,dispatch:null,action:s,pending:null},m.queue=R,d=rF.bind(null,At,R,k,d),R.dispatch=d,m.memoizedState=s,[l,d,!1]}function iT(s){var l=cr();return aT(l,xn,s)}function aT(s,l,d){if(l=Hv(s,l,oT)[0],s=Xp(wi)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var m=pd(l)}catch(z){throw z===Zc?Up:z}else m=l;l=cr();var R=l.queue,k=R.dispatch;return d!==l.memoizedState&&(At.flags|=2048,Jc(9,{destroy:void 0},oF.bind(null,R,d),null)),[m,k,s]}function oF(s,l){s.action=l}function lT(s){var l=cr(),d=xn;if(d!==null)return aT(l,d,s);cr(),l=l.memoizedState,d=cr();var m=d.queue.dispatch;return d.memoizedState=s,[l,m,!1]}function Jc(s,l,d,m){return s={tag:s,create:d,deps:m,inst:l,next:null},l=At.updateQueue,l===null&&(l=Yp(),At.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=s.next=s:(m=d.next,d.next=s,s.next=m,l.lastEffect=s),s}function cT(){return cr().memoizedState}function Qp(s,l,d,m){var R=lo();At.flags|=s,R.memoizedState=Jc(1|l,{destroy:void 0},d,m===void 0?null:m)}function Jp(s,l,d,m){var R=cr();m=m===void 0?null:m;var k=R.memoizedState.inst;xn!==null&&m!==null&&Lv(m,xn.memoizedState.deps)?R.memoizedState=Jc(l,k,d,m):(At.flags|=s,R.memoizedState=Jc(1|l,k,d,m))}function uT(s,l){Qp(8390656,8,s,l)}function Yv(s,l){Jp(2048,8,s,l)}function sF(s){At.flags|=4;var l=At.updateQueue;if(l===null)l=Yp(),At.updateQueue=l,l.events=[s];else{var d=l.events;d===null?l.events=[s]:d.push(s)}}function fT(s){var l=cr().memoizedState;return sF({ref:l,nextImpl:s}),function(){if((dn&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function dT(s,l){return Jp(4,2,s,l)}function hT(s,l){return Jp(4,4,s,l)}function pT(s,l){if(typeof l=="function"){s=s();var d=l(s);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function mT(s,l,d){d=d!=null?d.concat([s]):null,Jp(4,4,pT.bind(null,l,s),d)}function Wv(){}function gT(s,l){var d=cr();l=l===void 0?null:l;var m=d.memoizedState;return l!==null&&Lv(l,m[1])?m[0]:(d.memoizedState=[s,l],s)}function yT(s,l){var d=cr();l=l===void 0?null:l;var m=d.memoizedState;if(l!==null&&Lv(l,m[1]))return m[0];if(m=s(),Dl){Gt(!0);try{s()}finally{Gt(!1)}}return d.memoizedState=[m,l],m}function Xv(s,l,d){return d===void 0||(Si&1073741824)!==0&&(Zt&261930)===0?s.memoizedState=l:(s.memoizedState=d,s=vR(),At.lanes|=s,pa|=s,d)}function vT(s,l,d,m){return ko(d,l)?d:Wc.current!==null?(s=Xv(s,d,m),ko(s,l)||(mr=!0),s):(Si&42)===0||(Si&1073741824)!==0&&(Zt&261930)===0?(mr=!0,s.memoizedState=d):(s=vR(),At.lanes|=s,pa|=s,l)}function bT(s,l,d,m,R){var k=H.p;H.p=k!==0&&8>k?k:8;var z=Z.T,W={};Z.T=W,eb(s,!1,l,d);try{var ie=R(),Se=Z.S;if(Se!==null&&Se(W,ie),ie!==null&&typeof ie=="object"&&typeof ie.then=="function"){var Ae=eF(ie,m);md(s,l,Ae,$o(s))}else md(s,l,m,$o(s))}catch(Ne){md(s,l,{then:function(){},status:"rejected",reason:Ne},$o())}finally{H.p=k,z!==null&&W.types!==null&&(z.types=W.types),Z.T=z}}function iF(){}function Qv(s,l,d,m){if(s.tag!==5)throw Error(r(476));var R=ST(s).queue;bT(s,R,l,V,d===null?iF:function(){return wT(s),d(m)})}function ST(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wi,lastRenderedState:V},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wi,lastRenderedState:d},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function wT(s){var l=ST(s);l.next===null&&(l=s.alternate.memoizedState),md(s,l.next.queue,{},$o())}function Jv(){return Ur(jd)}function xT(){return cr().memoizedState}function ET(){return cr().memoizedState}function aF(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var d=$o();s=la(d);var m=ca(l,s,d);m!==null&&(wo(m,l,d),ud(m,l,d)),l={cache:Ov()},s.payload=l;return}l=l.return}}function lF(s,l,d){var m=$o();d={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},em(s)?CT(l,d):(d=yv(s,l,d,m),d!==null&&(wo(d,s,m),TT(d,l,m)))}function _T(s,l,d){var m=$o();md(s,l,d,m)}function md(s,l,d,m){var R={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(em(s))CT(l,R);else{var k=s.alternate;if(s.lanes===0&&(k===null||k.lanes===0)&&(k=l.lastRenderedReducer,k!==null))try{var z=l.lastRenderedState,W=k(z,d);if(R.hasEagerState=!0,R.eagerState=W,ko(W,z))return Np(s,l,R,0),An===null&&Pp(),!1}catch{}if(d=yv(s,l,R,m),d!==null)return wo(d,s,m),TT(d,l,m),!0}return!1}function eb(s,l,d,m){if(m={lane:2,revertLane:jb(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},em(s)){if(l)throw Error(r(479))}else l=yv(s,d,m,2),l!==null&&wo(l,s,2)}function em(s){var l=s.alternate;return s===At||l!==null&&l===At}function CT(s,l){Xc=Gp=!0;var d=s.pending;d===null?l.next=l:(l.next=d.next,d.next=l),s.pending=l}function TT(s,l,d){if((d&4194048)!==0){var m=l.lanes;m&=s.pendingLanes,d|=m,l.lanes=d,Lt(s,d)}}var gd={readContext:Ur,use:Wp,useCallback:nr,useContext:nr,useEffect:nr,useImperativeHandle:nr,useLayoutEffect:nr,useInsertionEffect:nr,useMemo:nr,useReducer:nr,useRef:nr,useState:nr,useDebugValue:nr,useDeferredValue:nr,useTransition:nr,useSyncExternalStore:nr,useId:nr,useHostTransitionStatus:nr,useFormState:nr,useActionState:nr,useOptimistic:nr,useMemoCache:nr,useCacheRefresh:nr};gd.useEffectEvent=nr;var RT={readContext:Ur,use:Wp,useCallback:function(s,l){return lo().memoizedState=[s,l===void 0?null:l],s},useContext:Ur,useEffect:uT,useImperativeHandle:function(s,l,d){d=d!=null?d.concat([s]):null,Qp(4194308,4,pT.bind(null,l,s),d)},useLayoutEffect:function(s,l){return Qp(4194308,4,s,l)},useInsertionEffect:function(s,l){Qp(4,2,s,l)},useMemo:function(s,l){var d=lo();l=l===void 0?null:l;var m=s();if(Dl){Gt(!0);try{s()}finally{Gt(!1)}}return d.memoizedState=[m,l],m},useReducer:function(s,l,d){var m=lo();if(d!==void 0){var R=d(l);if(Dl){Gt(!0);try{d(l)}finally{Gt(!1)}}}else R=l;return m.memoizedState=m.baseState=R,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:R},m.queue=s,s=s.dispatch=lF.bind(null,At,s),[m.memoizedState,s]},useRef:function(s){var l=lo();return s={current:s},l.memoizedState=s},useState:function(s){s=Gv(s);var l=s.queue,d=_T.bind(null,At,l);return l.dispatch=d,[s.memoizedState,d]},useDebugValue:Wv,useDeferredValue:function(s,l){var d=lo();return Xv(d,s,l)},useTransition:function(){var s=Gv(!1);return s=bT.bind(null,At,s.queue,!0,!1),lo().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,d){var m=At,R=lo();if(Qt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),An===null)throw Error(r(349));(Zt&127)!==0||ZC(m,l,d)}R.memoizedState=d;var k={value:d,getSnapshot:l};return R.queue=k,uT(WC.bind(null,m,k,s),[s]),m.flags|=2048,Jc(9,{destroy:void 0},YC.bind(null,m,k,d,l),null),d},useId:function(){var s=lo(),l=An.identifierPrefix;if(Qt){var d=Fs,m=Ls;d=(m&~(1<<32-kt(m)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Zp++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=tF++,l="_"+l+"r_"+d.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:Jv,useFormState:sT,useActionState:sT,useOptimistic:function(s){var l=lo();l.memoizedState=l.baseState=s;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=eb.bind(null,At,!0,d),d.dispatch=l,[s,l]},useMemoCache:Bv,useCacheRefresh:function(){return lo().memoizedState=aF.bind(null,At)},useEffectEvent:function(s){var l=lo(),d={impl:s};return l.memoizedState=d,function(){if((dn&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},tb={readContext:Ur,use:Wp,useCallback:gT,useContext:Ur,useEffect:Yv,useImperativeHandle:mT,useInsertionEffect:dT,useLayoutEffect:hT,useMemo:yT,useReducer:Xp,useRef:cT,useState:function(){return Xp(wi)},useDebugValue:Wv,useDeferredValue:function(s,l){var d=cr();return vT(d,xn.memoizedState,s,l)},useTransition:function(){var s=Xp(wi)[0],l=cr().memoizedState;return[typeof s=="boolean"?s:pd(s),l]},useSyncExternalStore:GC,useId:xT,useHostTransitionStatus:Jv,useFormState:iT,useActionState:iT,useOptimistic:function(s,l){var d=cr();return JC(d,xn,s,l)},useMemoCache:Bv,useCacheRefresh:ET};tb.useEffectEvent=fT;var OT={readContext:Ur,use:Wp,useCallback:gT,useContext:Ur,useEffect:Yv,useImperativeHandle:mT,useInsertionEffect:dT,useLayoutEffect:hT,useMemo:yT,useReducer:Kv,useRef:cT,useState:function(){return Kv(wi)},useDebugValue:Wv,useDeferredValue:function(s,l){var d=cr();return xn===null?Xv(d,s,l):vT(d,xn.memoizedState,s,l)},useTransition:function(){var s=Kv(wi)[0],l=cr().memoizedState;return[typeof s=="boolean"?s:pd(s),l]},useSyncExternalStore:GC,useId:xT,useHostTransitionStatus:Jv,useFormState:lT,useActionState:lT,useOptimistic:function(s,l){var d=cr();return xn!==null?JC(d,xn,s,l):(d.baseState=s,[s,d.queue.dispatch])},useMemoCache:Bv,useCacheRefresh:ET};OT.useEffectEvent=fT;function nb(s,l,d,m){l=s.memoizedState,d=d(m,l),d=d==null?l:p({},l,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var rb={enqueueSetState:function(s,l,d){s=s._reactInternals;var m=$o(),R=la(m);R.payload=l,d!=null&&(R.callback=d),l=ca(s,R,m),l!==null&&(wo(l,s,m),ud(l,s,m))},enqueueReplaceState:function(s,l,d){s=s._reactInternals;var m=$o(),R=la(m);R.tag=1,R.payload=l,d!=null&&(R.callback=d),l=ca(s,R,m),l!==null&&(wo(l,s,m),ud(l,s,m))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var d=$o(),m=la(d);m.tag=2,l!=null&&(m.callback=l),l=ca(s,m,d),l!==null&&(wo(l,s,d),ud(l,s,d))}};function AT(s,l,d,m,R,k,z){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(m,k,z):l.prototype&&l.prototype.isPureReactComponent?!nd(d,m)||!nd(R,k):!0}function kT(s,l,d,m){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,m),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,m),l.state!==s&&rb.enqueueReplaceState(l,l.state,null)}function $l(s,l){var d=l;if("ref"in l){d={};for(var m in l)m!=="ref"&&(d[m]=l[m])}if(s=s.defaultProps){d===l&&(d=p({},d));for(var R in s)d[R]===void 0&&(d[R]=s[R])}return d}function MT(s){jp(s)}function jT(s){console.error(s)}function PT(s){jp(s)}function tm(s,l){try{var d=s.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(m){setTimeout(function(){throw m})}}function NT(s,l,d){try{var m=s.onCaughtError;m(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(R){setTimeout(function(){throw R})}}function ob(s,l,d){return d=la(d),d.tag=3,d.payload={element:null},d.callback=function(){tm(s,l)},d}function DT(s){return s=la(s),s.tag=3,s}function $T(s,l,d,m){var R=d.type.getDerivedStateFromError;if(typeof R=="function"){var k=m.value;s.payload=function(){return R(k)},s.callback=function(){NT(l,d,m)}}var z=d.stateNode;z!==null&&typeof z.componentDidCatch=="function"&&(s.callback=function(){NT(l,d,m),typeof R!="function"&&(ma===null?ma=new Set([this]):ma.add(this));var W=m.stack;this.componentDidCatch(m.value,{componentStack:W!==null?W:""})})}function cF(s,l,d,m,R){if(d.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(l=d.alternate,l!==null&&Hc(l,d,R,!0),d=jo.current,d!==null){switch(d.tag){case 31:case 13:return es===null?hm():d.alternate===null&&rr===0&&(rr=3),d.flags&=-257,d.flags|=65536,d.lanes=R,m===Vp?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([m]):l.add(m),Ab(s,m,R)),!1;case 22:return d.flags|=65536,m===Vp?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([m])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([m]):d.add(m)),Ab(s,m,R)),!1}throw Error(r(435,d.tag))}return Ab(s,m,R),hm(),!1}if(Qt)return l=jo.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=R,m!==Ev&&(s=Error(r(422),{cause:m}),sd(Wo(s,d)))):(m!==Ev&&(l=Error(r(423),{cause:m}),sd(Wo(l,d))),s=s.current.alternate,s.flags|=65536,R&=-R,s.lanes|=R,m=Wo(m,d),R=ob(s.stateNode,m,R),Nv(s,R),rr!==4&&(rr=2)),!1;var k=Error(r(520),{cause:m});if(k=Wo(k,d),_d===null?_d=[k]:_d.push(k),rr!==4&&(rr=2),l===null)return!0;m=Wo(m,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,s=R&-R,d.lanes|=s,s=ob(d.stateNode,m,s),Nv(d,s),!1;case 1:if(l=d.type,k=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(ma===null||!ma.has(k))))return d.flags|=65536,R&=-R,d.lanes|=R,R=DT(R),$T(R,s,d,m),Nv(d,R),!1}d=d.return}while(d!==null);return!1}var sb=Error(r(461)),mr=!1;function Vr(s,l,d,m){l.child=s===null?FC(l,null,d,m):Nl(l,s.child,d,m)}function IT(s,l,d,m,R){d=d.render;var k=l.ref;if("ref"in m){var z={};for(var W in m)W!=="ref"&&(z[W]=m[W])}else z=m;return kl(l),m=Fv(s,l,d,z,k,R),W=Uv(),s!==null&&!mr?(Vv(s,l,R),xi(s,l,R)):(Qt&&W&&wv(l),l.flags|=1,Vr(s,l,m,R),l.child)}function zT(s,l,d,m,R){if(s===null){var k=d.type;return typeof k=="function"&&!vv(k)&&k.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=k,LT(s,l,k,m,R)):(s=$p(d.type,null,m,l,l.mode,R),s.ref=l.ref,s.return=l,l.child=s)}if(k=s.child,!hb(s,R)){var z=k.memoizedProps;if(d=d.compare,d=d!==null?d:nd,d(z,m)&&s.ref===l.ref)return xi(s,l,R)}return l.flags|=1,s=gi(k,m),s.ref=l.ref,s.return=l,l.child=s}function LT(s,l,d,m,R){if(s!==null){var k=s.memoizedProps;if(nd(k,m)&&s.ref===l.ref)if(mr=!1,l.pendingProps=m=k,hb(s,R))(s.flags&131072)!==0&&(mr=!0);else return l.lanes=s.lanes,xi(s,l,R)}return ib(s,l,d,m,R)}function FT(s,l,d,m){var R=m.children,k=s!==null?s.memoizedState:null;if(s===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((l.flags&128)!==0){if(k=k!==null?k.baseLanes|d:d,s!==null){for(m=l.child=s.child,R=0;m!==null;)R=R|m.lanes|m.childLanes,m=m.sibling;m=R&~k}else m=0,l.child=null;return UT(s,l,k,d,m)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&Fp(l,k!==null?k.cachePool:null),k!==null?qC(l,k):$v(),BC(l);else return m=l.lanes=536870912,UT(s,l,k!==null?k.baseLanes|d:d,d,m)}else k!==null?(Fp(l,k.cachePool),qC(l,k),fa(),l.memoizedState=null):(s!==null&&Fp(l,null),$v(),fa());return Vr(s,l,R,d),l.child}function yd(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function UT(s,l,d,m,R){var k=kv();return k=k===null?null:{parent:hr._currentValue,pool:k},l.memoizedState={baseLanes:d,cachePool:k},s!==null&&Fp(l,null),$v(),BC(l),s!==null&&Hc(s,l,m,!0),l.childLanes=R,null}function nm(s,l){return l=om({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function VT(s,l,d){return Nl(l,s.child,null,d),s=nm(l,l.pendingProps),s.flags|=2,Po(l),l.memoizedState=null,s}function uF(s,l,d){var m=l.pendingProps,R=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(Qt){if(m.mode==="hidden")return s=nm(l,m),l.lanes=536870912,yd(null,s);if(zv(l),(s=In)?(s=eO(s,Jo),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:ra!==null?{id:Ls,overflow:Fs}:null,retryLane:536870912,hydrationErrors:null},d=CC(s),d.return=l,l.child=d,Fr=l,In=null)):s=null,s===null)throw sa(l);return l.lanes=536870912,null}return nm(l,m)}var k=s.memoizedState;if(k!==null){var z=k.dehydrated;if(zv(l),R)if(l.flags&256)l.flags&=-257,l=VT(s,l,d);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(r(558));else if(mr||Hc(s,l,d,!1),R=(d&s.childLanes)!==0,mr||R){if(m=An,m!==null&&(z=tn(m,d),z!==0&&z!==k.retryLane))throw k.retryLane=z,Tl(s,z),wo(m,s,z),sb;hm(),l=VT(s,l,d)}else s=k.treeContext,In=ts(z.nextSibling),Fr=l,Qt=!0,oa=null,Jo=!1,s!==null&&OC(l,s),l=nm(l,m),l.flags|=4096;return l}return s=gi(s.child,{mode:m.mode,children:m.children}),s.ref=l.ref,l.child=s,s.return=l,s}function rm(s,l){var d=l.ref;if(d===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(s===null||s.ref!==d)&&(l.flags|=4194816)}}function ib(s,l,d,m,R){return kl(l),d=Fv(s,l,d,m,void 0,R),m=Uv(),s!==null&&!mr?(Vv(s,l,R),xi(s,l,R)):(Qt&&m&&wv(l),l.flags|=1,Vr(s,l,d,R),l.child)}function qT(s,l,d,m,R,k){return kl(l),l.updateQueue=null,d=KC(l,m,d,R),HC(s),m=Uv(),s!==null&&!mr?(Vv(s,l,k),xi(s,l,k)):(Qt&&m&&wv(l),l.flags|=1,Vr(s,l,d,k),l.child)}function BT(s,l,d,m,R){if(kl(l),l.stateNode===null){var k=Uc,z=d.contextType;typeof z=="object"&&z!==null&&(k=Ur(z)),k=new d(m,k),l.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,k.updater=rb,l.stateNode=k,k._reactInternals=l,k=l.stateNode,k.props=m,k.state=l.memoizedState,k.refs={},jv(l),z=d.contextType,k.context=typeof z=="object"&&z!==null?Ur(z):Uc,k.state=l.memoizedState,z=d.getDerivedStateFromProps,typeof z=="function"&&(nb(l,d,z,m),k.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(z=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),z!==k.state&&rb.enqueueReplaceState(k,k.state,null),dd(l,m,k,R),fd(),k.state=l.memoizedState),typeof k.componentDidMount=="function"&&(l.flags|=4194308),m=!0}else if(s===null){k=l.stateNode;var W=l.memoizedProps,ie=$l(d,W);k.props=ie;var Se=k.context,Ae=d.contextType;z=Uc,typeof Ae=="object"&&Ae!==null&&(z=Ur(Ae));var Ne=d.getDerivedStateFromProps;Ae=typeof Ne=="function"||typeof k.getSnapshotBeforeUpdate=="function",W=l.pendingProps!==W,Ae||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(W||Se!==z)&&kT(l,k,m,z),aa=!1;var xe=l.memoizedState;k.state=xe,dd(l,m,k,R),fd(),Se=l.memoizedState,W||xe!==Se||aa?(typeof Ne=="function"&&(nb(l,d,Ne,m),Se=l.memoizedState),(ie=aa||AT(l,d,ie,m,xe,Se,z))?(Ae||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(l.flags|=4194308)):(typeof k.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=m,l.memoizedState=Se),k.props=m,k.state=Se,k.context=z,m=ie):(typeof k.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{k=l.stateNode,Pv(s,l),z=l.memoizedProps,Ae=$l(d,z),k.props=Ae,Ne=l.pendingProps,xe=k.context,Se=d.contextType,ie=Uc,typeof Se=="object"&&Se!==null&&(ie=Ur(Se)),W=d.getDerivedStateFromProps,(Se=typeof W=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(z!==Ne||xe!==ie)&&kT(l,k,m,ie),aa=!1,xe=l.memoizedState,k.state=xe,dd(l,m,k,R),fd();var Te=l.memoizedState;z!==Ne||xe!==Te||aa||s!==null&&s.dependencies!==null&&zp(s.dependencies)?(typeof W=="function"&&(nb(l,d,W,m),Te=l.memoizedState),(Ae=aa||AT(l,d,Ae,m,xe,Te,ie)||s!==null&&s.dependencies!==null&&zp(s.dependencies))?(Se||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(m,Te,ie),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(m,Te,ie)),typeof k.componentDidUpdate=="function"&&(l.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof k.componentDidUpdate!="function"||z===s.memoizedProps&&xe===s.memoizedState||(l.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||z===s.memoizedProps&&xe===s.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=Te),k.props=m,k.state=Te,k.context=ie,m=Ae):(typeof k.componentDidUpdate!="function"||z===s.memoizedProps&&xe===s.memoizedState||(l.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||z===s.memoizedProps&&xe===s.memoizedState||(l.flags|=1024),m=!1)}return k=m,rm(s,l),m=(l.flags&128)!==0,k||m?(k=l.stateNode,d=m&&typeof d.getDerivedStateFromError!="function"?null:k.render(),l.flags|=1,s!==null&&m?(l.child=Nl(l,s.child,null,R),l.child=Nl(l,null,d,R)):Vr(s,l,d,R),l.memoizedState=k.state,s=l.child):s=xi(s,l,R),s}function HT(s,l,d,m){return Ol(),l.flags|=256,Vr(s,l,d,m),l.child}var ab={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lb(s){return{baseLanes:s,cachePool:NC()}}function cb(s,l,d){return s=s!==null?s.childLanes&~d:0,l&&(s|=Do),s}function KT(s,l,d){var m=l.pendingProps,R=!1,k=(l.flags&128)!==0,z;if((z=k)||(z=s!==null&&s.memoizedState===null?!1:(lr.current&2)!==0),z&&(R=!0,l.flags&=-129),z=(l.flags&32)!==0,l.flags&=-33,s===null){if(Qt){if(R?ua(l):fa(),(s=In)?(s=eO(s,Jo),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:ra!==null?{id:Ls,overflow:Fs}:null,retryLane:536870912,hydrationErrors:null},d=CC(s),d.return=l,l.child=d,Fr=l,In=null)):s=null,s===null)throw sa(l);return Hb(s)?l.lanes=32:l.lanes=536870912,null}var W=m.children;return m=m.fallback,R?(fa(),R=l.mode,W=om({mode:"hidden",children:W},R),m=Rl(m,R,d,null),W.return=l,m.return=l,W.sibling=m,l.child=W,m=l.child,m.memoizedState=lb(d),m.childLanes=cb(s,z,d),l.memoizedState=ab,yd(null,m)):(ua(l),ub(l,W))}var ie=s.memoizedState;if(ie!==null&&(W=ie.dehydrated,W!==null)){if(k)l.flags&256?(ua(l),l.flags&=-257,l=fb(s,l,d)):l.memoizedState!==null?(fa(),l.child=s.child,l.flags|=128,l=null):(fa(),W=m.fallback,R=l.mode,m=om({mode:"visible",children:m.children},R),W=Rl(W,R,d,null),W.flags|=2,m.return=l,W.return=l,m.sibling=W,l.child=m,Nl(l,s.child,null,d),m=l.child,m.memoizedState=lb(d),m.childLanes=cb(s,z,d),l.memoizedState=ab,l=yd(null,m));else if(ua(l),Hb(W)){if(z=W.nextSibling&&W.nextSibling.dataset,z)var Se=z.dgst;z=Se,m=Error(r(419)),m.stack="",m.digest=z,sd({value:m,source:null,stack:null}),l=fb(s,l,d)}else if(mr||Hc(s,l,d,!1),z=(d&s.childLanes)!==0,mr||z){if(z=An,z!==null&&(m=tn(z,d),m!==0&&m!==ie.retryLane))throw ie.retryLane=m,Tl(s,m),wo(z,s,m),sb;Bb(W)||hm(),l=fb(s,l,d)}else Bb(W)?(l.flags|=192,l.child=s.child,l=null):(s=ie.treeContext,In=ts(W.nextSibling),Fr=l,Qt=!0,oa=null,Jo=!1,s!==null&&OC(l,s),l=ub(l,m.children),l.flags|=4096);return l}return R?(fa(),W=m.fallback,R=l.mode,ie=s.child,Se=ie.sibling,m=gi(ie,{mode:"hidden",children:m.children}),m.subtreeFlags=ie.subtreeFlags&65011712,Se!==null?W=gi(Se,W):(W=Rl(W,R,d,null),W.flags|=2),W.return=l,m.return=l,m.sibling=W,l.child=m,yd(null,m),m=l.child,W=s.child.memoizedState,W===null?W=lb(d):(R=W.cachePool,R!==null?(ie=hr._currentValue,R=R.parent!==ie?{parent:ie,pool:ie}:R):R=NC(),W={baseLanes:W.baseLanes|d,cachePool:R}),m.memoizedState=W,m.childLanes=cb(s,z,d),l.memoizedState=ab,yd(s.child,m)):(ua(l),d=s.child,s=d.sibling,d=gi(d,{mode:"visible",children:m.children}),d.return=l,d.sibling=null,s!==null&&(z=l.deletions,z===null?(l.deletions=[s],l.flags|=16):z.push(s)),l.child=d,l.memoizedState=null,d)}function ub(s,l){return l=om({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function om(s,l){return s=Mo(22,s,null,l),s.lanes=0,s}function fb(s,l,d){return Nl(l,s.child,null,d),s=ub(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function GT(s,l,d){s.lanes|=l;var m=s.alternate;m!==null&&(m.lanes|=l),Tv(s.return,l,d)}function db(s,l,d,m,R,k){var z=s.memoizedState;z===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:R,treeForkCount:k}:(z.isBackwards=l,z.rendering=null,z.renderingStartTime=0,z.last=m,z.tail=d,z.tailMode=R,z.treeForkCount=k)}function ZT(s,l,d){var m=l.pendingProps,R=m.revealOrder,k=m.tail;m=m.children;var z=lr.current,W=(z&2)!==0;if(W?(z=z&1|2,l.flags|=128):z&=1,U(lr,z),Vr(s,l,m,d),m=Qt?od:0,!W&&s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&>(s,d,l);else if(s.tag===19)GT(s,d,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(R){case"forwards":for(d=l.child,R=null;d!==null;)s=d.alternate,s!==null&&Kp(s)===null&&(R=d),d=d.sibling;d=R,d===null?(R=l.child,l.child=null):(R=d.sibling,d.sibling=null),db(l,!1,R,d,k,m);break;case"backwards":case"unstable_legacy-backwards":for(d=null,R=l.child,l.child=null;R!==null;){if(s=R.alternate,s!==null&&Kp(s)===null){l.child=R;break}s=R.sibling,R.sibling=d,d=R,R=s}db(l,!0,d,null,k,m);break;case"together":db(l,!1,null,null,void 0,m);break;default:l.memoizedState=null}return l.child}function xi(s,l,d){if(s!==null&&(l.dependencies=s.dependencies),pa|=l.lanes,(d&l.childLanes)===0)if(s!==null){if(Hc(s,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(r(153));if(l.child!==null){for(s=l.child,d=gi(s,s.pendingProps),l.child=d,d.return=l;s.sibling!==null;)s=s.sibling,d=d.sibling=gi(s,s.pendingProps),d.return=l;d.sibling=null}return l.child}function hb(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&zp(s)))}function fF(s,l,d){switch(l.tag){case 3:de(l,l.stateNode.containerInfo),ia(l,hr,s.memoizedState.cache),Ol();break;case 27:case 5:Ee(l);break;case 4:de(l,l.stateNode.containerInfo);break;case 10:ia(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,zv(l),null;break;case 13:var m=l.memoizedState;if(m!==null)return m.dehydrated!==null?(ua(l),l.flags|=128,null):(d&l.child.childLanes)!==0?KT(s,l,d):(ua(l),s=xi(s,l,d),s!==null?s.sibling:null);ua(l);break;case 19:var R=(s.flags&128)!==0;if(m=(d&l.childLanes)!==0,m||(Hc(s,l,d,!1),m=(d&l.childLanes)!==0),R){if(m)return ZT(s,l,d);l.flags|=128}if(R=l.memoizedState,R!==null&&(R.rendering=null,R.tail=null,R.lastEffect=null),U(lr,lr.current),m)break;return null;case 22:return l.lanes=0,FT(s,l,d,l.pendingProps);case 24:ia(l,hr,s.memoizedState.cache)}return xi(s,l,d)}function YT(s,l,d){if(s!==null)if(s.memoizedProps!==l.pendingProps)mr=!0;else{if(!hb(s,d)&&(l.flags&128)===0)return mr=!1,fF(s,l,d);mr=(s.flags&131072)!==0}else mr=!1,Qt&&(l.flags&1048576)!==0&&RC(l,od,l.index);switch(l.lanes=0,l.tag){case 16:e:{var m=l.pendingProps;if(s=jl(l.elementType),l.type=s,typeof s=="function")vv(s)?(m=$l(s,m),l.tag=1,l=BT(null,l,s,m,d)):(l.tag=0,l=ib(null,l,s,m,d));else{if(s!=null){var R=s.$$typeof;if(R===S){l.tag=11,l=IT(null,l,s,m,d);break e}else if(R===O){l.tag=14,l=zT(null,l,s,m,d);break e}}throw l=J(s)||s,Error(r(306,l,""))}}return l;case 0:return ib(s,l,l.type,l.pendingProps,d);case 1:return m=l.type,R=$l(m,l.pendingProps),BT(s,l,m,R,d);case 3:e:{if(de(l,l.stateNode.containerInfo),s===null)throw Error(r(387));m=l.pendingProps;var k=l.memoizedState;R=k.element,Pv(s,l),dd(l,m,null,d);var z=l.memoizedState;if(m=z.cache,ia(l,hr,m),m!==k.cache&&Rv(l,[hr],d,!0),fd(),m=z.element,k.isDehydrated)if(k={element:m,isDehydrated:!1,cache:z.cache},l.updateQueue.baseState=k,l.memoizedState=k,l.flags&256){l=HT(s,l,m,d);break e}else if(m!==R){R=Wo(Error(r(424)),l),sd(R),l=HT(s,l,m,d);break e}else for(s=l.stateNode.containerInfo,s.nodeType===9?s=s.body:s=s.nodeName==="HTML"?s.ownerDocument.body:s,In=ts(s.firstChild),Fr=l,Qt=!0,oa=null,Jo=!0,d=FC(l,null,m,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Ol(),m===R){l=xi(s,l,d);break e}Vr(s,l,m,d)}l=l.child}return l;case 26:return rm(s,l),s===null?(d=iO(l.type,null,l.pendingProps,null))?l.memoizedState=d:Qt||(d=l.type,s=l.pendingProps,m=Sm(te.current).createElement(d),m[an]=l,m[On]=s,qr(m,d,s),dr(m),l.stateNode=m):l.memoizedState=iO(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return Ee(l),s===null&&Qt&&(m=l.stateNode=rO(l.type,l.pendingProps,te.current),Fr=l,Jo=!0,R=In,ba(l.type)?(Kb=R,In=ts(m.firstChild)):In=R),Vr(s,l,l.pendingProps.children,d),rm(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&Qt&&((R=m=In)&&(m=UF(m,l.type,l.pendingProps,Jo),m!==null?(l.stateNode=m,Fr=l,In=ts(m.firstChild),Jo=!1,R=!0):R=!1),R||sa(l)),Ee(l),R=l.type,k=l.pendingProps,z=s!==null?s.memoizedProps:null,m=k.children,Ub(R,k)?m=null:z!==null&&Ub(R,z)&&(l.flags|=32),l.memoizedState!==null&&(R=Fv(s,l,nF,null,null,d),jd._currentValue=R),rm(s,l),Vr(s,l,m,d),l.child;case 6:return s===null&&Qt&&((s=d=In)&&(d=VF(d,l.pendingProps,Jo),d!==null?(l.stateNode=d,Fr=l,In=null,s=!0):s=!1),s||sa(l)),null;case 13:return KT(s,l,d);case 4:return de(l,l.stateNode.containerInfo),m=l.pendingProps,s===null?l.child=Nl(l,null,m,d):Vr(s,l,m,d),l.child;case 11:return IT(s,l,l.type,l.pendingProps,d);case 7:return Vr(s,l,l.pendingProps,d),l.child;case 8:return Vr(s,l,l.pendingProps.children,d),l.child;case 12:return Vr(s,l,l.pendingProps.children,d),l.child;case 10:return m=l.pendingProps,ia(l,l.type,m.value),Vr(s,l,m.children,d),l.child;case 9:return R=l.type._context,m=l.pendingProps.children,kl(l),R=Ur(R),m=m(R),l.flags|=1,Vr(s,l,m,d),l.child;case 14:return zT(s,l,l.type,l.pendingProps,d);case 15:return LT(s,l,l.type,l.pendingProps,d);case 19:return ZT(s,l,d);case 31:return uF(s,l,d);case 22:return FT(s,l,d,l.pendingProps);case 24:return kl(l),m=Ur(hr),s===null?(R=kv(),R===null&&(R=An,k=Ov(),R.pooledCache=k,k.refCount++,k!==null&&(R.pooledCacheLanes|=d),R=k),l.memoizedState={parent:m,cache:R},jv(l),ia(l,hr,R)):((s.lanes&d)!==0&&(Pv(s,l),dd(l,null,null,d),fd()),R=s.memoizedState,k=l.memoizedState,R.parent!==m?(R={parent:m,cache:m},l.memoizedState=R,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=R),ia(l,hr,m)):(m=k.cache,ia(l,hr,m),m!==R.cache&&Rv(l,[hr],d,!0))),Vr(s,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Ei(s){s.flags|=4}function pb(s,l,d,m,R){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(R&335544128)===R)if(s.stateNode.complete)s.flags|=8192;else if(xR())s.flags|=8192;else throw Pl=Vp,Mv}else s.flags&=-16777217}function WT(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!fO(l))if(xR())s.flags|=8192;else throw Pl=Vp,Mv}function sm(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?tr():536870912,s.lanes|=l,ru|=l)}function vd(s,l){if(!Qt)switch(s.tailMode){case"hidden":l=s.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s.tail=null:d.sibling=null;break;case"collapsed":d=s.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:m.sibling=null}}function zn(s){var l=s.alternate!==null&&s.alternate.child===s.child,d=0,m=0;if(l)for(var R=s.child;R!==null;)d|=R.lanes|R.childLanes,m|=R.subtreeFlags&65011712,m|=R.flags&65011712,R.return=s,R=R.sibling;else for(R=s.child;R!==null;)d|=R.lanes|R.childLanes,m|=R.subtreeFlags,m|=R.flags,R.return=s,R=R.sibling;return s.subtreeFlags|=m,s.childLanes=d,l}function dF(s,l,d){var m=l.pendingProps;switch(xv(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zn(l),null;case 1:return zn(l),null;case 3:return d=l.stateNode,m=null,s!==null&&(m=s.memoizedState.cache),l.memoizedState.cache!==m&&(l.flags|=2048),bi(hr),we(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(Bc(l)?Ei(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,_v())),zn(l),null;case 26:var R=l.type,k=l.memoizedState;return s===null?(Ei(l),k!==null?(zn(l),WT(l,k)):(zn(l),pb(l,R,null,m,d))):k?k!==s.memoizedState?(Ei(l),zn(l),WT(l,k)):(zn(l),l.flags&=-16777217):(s=s.memoizedProps,s!==m&&Ei(l),zn(l),pb(l,R,s,m,d)),null;case 27:if(se(l),d=te.current,R=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&Ei(l);else{if(!m){if(l.stateNode===null)throw Error(r(166));return zn(l),null}s=N.current,Bc(l)?AC(l):(s=rO(R,m,d),l.stateNode=s,Ei(l))}return zn(l),null;case 5:if(se(l),R=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&Ei(l);else{if(!m){if(l.stateNode===null)throw Error(r(166));return zn(l),null}if(k=N.current,Bc(l))AC(l);else{var z=Sm(te.current);switch(k){case 1:k=z.createElementNS("http://www.w3.org/2000/svg",R);break;case 2:k=z.createElementNS("http://www.w3.org/1998/Math/MathML",R);break;default:switch(R){case"svg":k=z.createElementNS("http://www.w3.org/2000/svg",R);break;case"math":k=z.createElementNS("http://www.w3.org/1998/Math/MathML",R);break;case"script":k=z.createElement("div"),k.innerHTML="<script><\/script>",k=k.removeChild(k.firstChild);break;case"select":k=typeof m.is=="string"?z.createElement("select",{is:m.is}):z.createElement("select"),m.multiple?k.multiple=!0:m.size&&(k.size=m.size);break;default:k=typeof m.is=="string"?z.createElement(R,{is:m.is}):z.createElement(R)}}k[an]=l,k[On]=m;e:for(z=l.child;z!==null;){if(z.tag===5||z.tag===6)k.appendChild(z.stateNode);else if(z.tag!==4&&z.tag!==27&&z.child!==null){z.child.return=z,z=z.child;continue}if(z===l)break e;for(;z.sibling===null;){if(z.return===null||z.return===l)break e;z=z.return}z.sibling.return=z.return,z=z.sibling}l.stateNode=k;e:switch(qr(k,R,m),R){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Ei(l)}}return zn(l),pb(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,d),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==m&&Ei(l);else{if(typeof m!="string"&&l.stateNode===null)throw Error(r(166));if(s=te.current,Bc(l)){if(s=l.stateNode,d=l.memoizedProps,m=null,R=Fr,R!==null)switch(R.tag){case 27:case 5:m=R.memoizedProps}s[an]=l,s=!!(s.nodeValue===d||m!==null&&m.suppressHydrationWarning===!0||KR(s.nodeValue,d)),s||sa(l,!0)}else s=Sm(s).createTextNode(m),s[an]=l,l.stateNode=s}return zn(l),null;case 31:if(d=l.memoizedState,s===null||s.memoizedState!==null){if(m=Bc(l),d!==null){if(s===null){if(!m)throw Error(r(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[an]=l}else Ol(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;zn(l),s=!1}else d=_v(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=d),s=!0;if(!s)return l.flags&256?(Po(l),l):(Po(l),null);if((l.flags&128)!==0)throw Error(r(558))}return zn(l),null;case 13:if(m=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(R=Bc(l),m!==null&&m.dehydrated!==null){if(s===null){if(!R)throw Error(r(318));if(R=l.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[an]=l}else Ol(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;zn(l),R=!1}else R=_v(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=R),R=!0;if(!R)return l.flags&256?(Po(l),l):(Po(l),null)}return Po(l),(l.flags&128)!==0?(l.lanes=d,l):(d=m!==null,s=s!==null&&s.memoizedState!==null,d&&(m=l.child,R=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(R=m.alternate.memoizedState.cachePool.pool),k=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(k=m.memoizedState.cachePool.pool),k!==R&&(m.flags|=2048)),d!==s&&d&&(l.child.flags|=8192),sm(l,l.updateQueue),zn(l),null);case 4:return we(),s===null&&$b(l.stateNode.containerInfo),zn(l),null;case 10:return bi(l.type),zn(l),null;case 19:if(q(lr),m=l.memoizedState,m===null)return zn(l),null;if(R=(l.flags&128)!==0,k=m.rendering,k===null)if(R)vd(m,!1);else{if(rr!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(k=Kp(s),k!==null){for(l.flags|=128,vd(m,!1),s=k.updateQueue,l.updateQueue=s,sm(l,s),l.subtreeFlags=0,s=d,d=l.child;d!==null;)_C(d,s),d=d.sibling;return U(lr,lr.current&1|2),Qt&&yi(l,m.treeForkCount),l.child}s=s.sibling}m.tail!==null&&ze()>um&&(l.flags|=128,R=!0,vd(m,!1),l.lanes=4194304)}else{if(!R)if(s=Kp(k),s!==null){if(l.flags|=128,R=!0,s=s.updateQueue,l.updateQueue=s,sm(l,s),vd(m,!0),m.tail===null&&m.tailMode==="hidden"&&!k.alternate&&!Qt)return zn(l),null}else 2*ze()-m.renderingStartTime>um&&d!==536870912&&(l.flags|=128,R=!0,vd(m,!1),l.lanes=4194304);m.isBackwards?(k.sibling=l.child,l.child=k):(s=m.last,s!==null?s.sibling=k:l.child=k,m.last=k)}return m.tail!==null?(s=m.tail,m.rendering=s,m.tail=s.sibling,m.renderingStartTime=ze(),s.sibling=null,d=lr.current,U(lr,R?d&1|2:d&1),Qt&&yi(l,m.treeForkCount),s):(zn(l),null);case 22:case 23:return Po(l),Iv(),m=l.memoizedState!==null,s!==null?s.memoizedState!==null!==m&&(l.flags|=8192):m&&(l.flags|=8192),m?(d&536870912)!==0&&(l.flags&128)===0&&(zn(l),l.subtreeFlags&6&&(l.flags|=8192)):zn(l),d=l.updateQueue,d!==null&&sm(l,d.retryQueue),d=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==d&&(l.flags|=2048),s!==null&&q(Ml),null;case 24:return d=null,s!==null&&(d=s.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),bi(hr),zn(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function hF(s,l){switch(xv(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return bi(hr),we(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return se(l),null;case 31:if(l.memoizedState!==null){if(Po(l),l.alternate===null)throw Error(r(340));Ol()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(Po(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Ol()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return q(lr),null;case 4:return we(),null;case 10:return bi(l.type),null;case 22:case 23:return Po(l),Iv(),s!==null&&q(Ml),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return bi(hr),null;case 25:return null;default:return null}}function XT(s,l){switch(xv(l),l.tag){case 3:bi(hr),we();break;case 26:case 27:case 5:se(l);break;case 4:we();break;case 31:l.memoizedState!==null&&Po(l);break;case 13:Po(l);break;case 19:q(lr);break;case 10:bi(l.type);break;case 22:case 23:Po(l),Iv(),s!==null&&q(Ml);break;case 24:bi(hr)}}function bd(s,l){try{var d=l.updateQueue,m=d!==null?d.lastEffect:null;if(m!==null){var R=m.next;d=R;do{if((d.tag&s)===s){m=void 0;var k=d.create,z=d.inst;m=k(),z.destroy=m}d=d.next}while(d!==R)}}catch(W){Sn(l,l.return,W)}}function da(s,l,d){try{var m=l.updateQueue,R=m!==null?m.lastEffect:null;if(R!==null){var k=R.next;m=k;do{if((m.tag&s)===s){var z=m.inst,W=z.destroy;if(W!==void 0){z.destroy=void 0,R=l;var ie=d,Se=W;try{Se()}catch(Ae){Sn(R,ie,Ae)}}}m=m.next}while(m!==k)}}catch(Ae){Sn(l,l.return,Ae)}}function QT(s){var l=s.updateQueue;if(l!==null){var d=s.stateNode;try{VC(l,d)}catch(m){Sn(s,s.return,m)}}}function JT(s,l,d){d.props=$l(s.type,s.memoizedProps),d.state=s.memoizedState;try{d.componentWillUnmount()}catch(m){Sn(s,l,m)}}function Sd(s,l){try{var d=s.ref;if(d!==null){switch(s.tag){case 26:case 27:case 5:var m=s.stateNode;break;case 30:m=s.stateNode;break;default:m=s.stateNode}typeof d=="function"?s.refCleanup=d(m):d.current=m}}catch(R){Sn(s,l,R)}}function Us(s,l){var d=s.ref,m=s.refCleanup;if(d!==null)if(typeof m=="function")try{m()}catch(R){Sn(s,l,R)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(R){Sn(s,l,R)}else d.current=null}function eR(s){var l=s.type,d=s.memoizedProps,m=s.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&m.focus();break e;case"img":d.src?m.src=d.src:d.srcSet&&(m.srcset=d.srcSet)}}catch(R){Sn(s,s.return,R)}}function mb(s,l,d){try{var m=s.stateNode;DF(m,s.type,d,l),m[On]=l}catch(R){Sn(s,s.return,R)}}function tR(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&ba(s.type)||s.tag===4}function gb(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||tR(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&ba(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function yb(s,l,d){var m=s.tag;if(m===5||m===6)s=s.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(s,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(s),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Re));else if(m!==4&&(m===27&&ba(s.type)&&(d=s.stateNode,l=null),s=s.child,s!==null))for(yb(s,l,d),s=s.sibling;s!==null;)yb(s,l,d),s=s.sibling}function im(s,l,d){var m=s.tag;if(m===5||m===6)s=s.stateNode,l?d.insertBefore(s,l):d.appendChild(s);else if(m!==4&&(m===27&&ba(s.type)&&(d=s.stateNode),s=s.child,s!==null))for(im(s,l,d),s=s.sibling;s!==null;)im(s,l,d),s=s.sibling}function nR(s){var l=s.stateNode,d=s.memoizedProps;try{for(var m=s.type,R=l.attributes;R.length;)l.removeAttributeNode(R[0]);qr(l,m,d),l[an]=s,l[On]=d}catch(k){Sn(s,s.return,k)}}var _i=!1,gr=!1,vb=!1,rR=typeof WeakSet=="function"?WeakSet:Set,$r=null;function pF(s,l){if(s=s.containerInfo,Lb=Rm,s=mC(s),fv(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else e:{d=(d=s.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var R=m.anchorOffset,k=m.focusNode;m=m.focusOffset;try{d.nodeType,k.nodeType}catch{d=null;break e}var z=0,W=-1,ie=-1,Se=0,Ae=0,Ne=s,xe=null;t:for(;;){for(var Te;Ne!==d||R!==0&&Ne.nodeType!==3||(W=z+R),Ne!==k||m!==0&&Ne.nodeType!==3||(ie=z+m),Ne.nodeType===3&&(z+=Ne.nodeValue.length),(Te=Ne.firstChild)!==null;)xe=Ne,Ne=Te;for(;;){if(Ne===s)break t;if(xe===d&&++Se===R&&(W=z),xe===k&&++Ae===m&&(ie=z),(Te=Ne.nextSibling)!==null)break;Ne=xe,xe=Ne.parentNode}Ne=Te}d=W===-1||ie===-1?null:{start:W,end:ie}}else d=null}d=d||{start:0,end:0}}else d=null;for(Fb={focusedElem:s,selectionRange:d},Rm=!1,$r=l;$r!==null;)if(l=$r,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,$r=s;else for(;$r!==null;){switch(l=$r,k=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(d=0;d<s.length;d++)R=s[d],R.ref.impl=R.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&k!==null){s=void 0,d=l,R=k.memoizedProps,k=k.memoizedState,m=d.stateNode;try{var et=$l(d.type,R);s=m.getSnapshotBeforeUpdate(et,k),m.__reactInternalSnapshotBeforeUpdate=s}catch(ht){Sn(d,d.return,ht)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,d=s.nodeType,d===9)qb(s);else if(d===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":qb(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=l.sibling,s!==null){s.return=l.return,$r=s;break}$r=l.return}}function oR(s,l,d){var m=d.flags;switch(d.tag){case 0:case 11:case 15:Ti(s,d),m&4&&bd(5,d);break;case 1:if(Ti(s,d),m&4)if(s=d.stateNode,l===null)try{s.componentDidMount()}catch(z){Sn(d,d.return,z)}else{var R=$l(d.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(R,l,s.__reactInternalSnapshotBeforeUpdate)}catch(z){Sn(d,d.return,z)}}m&64&&QT(d),m&512&&Sd(d,d.return);break;case 3:if(Ti(s,d),m&64&&(s=d.updateQueue,s!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{VC(s,l)}catch(z){Sn(d,d.return,z)}}break;case 27:l===null&&m&4&&nR(d);case 26:case 5:Ti(s,d),l===null&&m&4&&eR(d),m&512&&Sd(d,d.return);break;case 12:Ti(s,d);break;case 31:Ti(s,d),m&4&&aR(s,d);break;case 13:Ti(s,d),m&4&&lR(s,d),m&64&&(s=d.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(d=EF.bind(null,d),qF(s,d))));break;case 22:if(m=d.memoizedState!==null||_i,!m){l=l!==null&&l.memoizedState!==null||gr,R=_i;var k=gr;_i=m,(gr=l)&&!k?Ri(s,d,(d.subtreeFlags&8772)!==0):Ti(s,d),_i=R,gr=k}break;case 30:break;default:Ti(s,d)}}function sR(s){var l=s.alternate;l!==null&&(s.alternate=null,sR(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&Hf(l)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var Kn=null,yo=!1;function Ci(s,l,d){for(d=d.child;d!==null;)iR(s,l,d),d=d.sibling}function iR(s,l,d){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Nt,d)}catch{}switch(d.tag){case 26:gr||Us(d,l),Ci(s,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:gr||Us(d,l);var m=Kn,R=yo;ba(d.type)&&(Kn=d.stateNode,yo=!1),Ci(s,l,d),Ad(d.stateNode),Kn=m,yo=R;break;case 5:gr||Us(d,l);case 6:if(m=Kn,R=yo,Kn=null,Ci(s,l,d),Kn=m,yo=R,Kn!==null)if(yo)try{(Kn.nodeType===9?Kn.body:Kn.nodeName==="HTML"?Kn.ownerDocument.body:Kn).removeChild(d.stateNode)}catch(k){Sn(d,l,k)}else try{Kn.removeChild(d.stateNode)}catch(k){Sn(d,l,k)}break;case 18:Kn!==null&&(yo?(s=Kn,QR(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,d.stateNode),fu(s)):QR(Kn,d.stateNode));break;case 4:m=Kn,R=yo,Kn=d.stateNode.containerInfo,yo=!0,Ci(s,l,d),Kn=m,yo=R;break;case 0:case 11:case 14:case 15:da(2,d,l),gr||da(4,d,l),Ci(s,l,d);break;case 1:gr||(Us(d,l),m=d.stateNode,typeof m.componentWillUnmount=="function"&&JT(d,l,m)),Ci(s,l,d);break;case 21:Ci(s,l,d);break;case 22:gr=(m=gr)||d.memoizedState!==null,Ci(s,l,d),gr=m;break;default:Ci(s,l,d)}}function aR(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{fu(s)}catch(d){Sn(l,l.return,d)}}}function lR(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{fu(s)}catch(d){Sn(l,l.return,d)}}function mF(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new rR),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new rR),l;default:throw Error(r(435,s.tag))}}function am(s,l){var d=mF(s);l.forEach(function(m){if(!d.has(m)){d.add(m);var R=_F.bind(null,s,m);m.then(R,R)}})}function vo(s,l){var d=l.deletions;if(d!==null)for(var m=0;m<d.length;m++){var R=d[m],k=s,z=l,W=z;e:for(;W!==null;){switch(W.tag){case 27:if(ba(W.type)){Kn=W.stateNode,yo=!1;break e}break;case 5:Kn=W.stateNode,yo=!1;break e;case 3:case 4:Kn=W.stateNode.containerInfo,yo=!0;break e}W=W.return}if(Kn===null)throw Error(r(160));iR(k,z,R),Kn=null,yo=!1,k=R.alternate,k!==null&&(k.return=null),R.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)cR(l,s),l=l.sibling}var Es=null;function cR(s,l){var d=s.alternate,m=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:vo(l,s),bo(s),m&4&&(da(3,s,s.return),bd(3,s),da(5,s,s.return));break;case 1:vo(l,s),bo(s),m&512&&(gr||d===null||Us(d,d.return)),m&64&&_i&&(s=s.updateQueue,s!==null&&(m=s.callbacks,m!==null&&(d=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=d===null?m:d.concat(m))));break;case 26:var R=Es;if(vo(l,s),bo(s),m&512&&(gr||d===null||Us(d,d.return)),m&4){var k=d!==null?d.memoizedState:null;if(m=s.memoizedState,d===null)if(m===null)if(s.stateNode===null){e:{m=s.type,d=s.memoizedProps,R=R.ownerDocument||R;t:switch(m){case"title":k=R.getElementsByTagName("title")[0],(!k||k[bl]||k[an]||k.namespaceURI==="http://www.w3.org/2000/svg"||k.hasAttribute("itemprop"))&&(k=R.createElement(m),R.head.insertBefore(k,R.querySelector("head > title"))),qr(k,m,d),k[an]=s,dr(k),m=k;break e;case"link":var z=cO("link","href",R).get(m+(d.href||""));if(z){for(var W=0;W<z.length;W++)if(k=z[W],k.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&k.getAttribute("rel")===(d.rel==null?null:d.rel)&&k.getAttribute("title")===(d.title==null?null:d.title)&&k.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){z.splice(W,1);break t}}k=R.createElement(m),qr(k,m,d),R.head.appendChild(k);break;case"meta":if(z=cO("meta","content",R).get(m+(d.content||""))){for(W=0;W<z.length;W++)if(k=z[W],k.getAttribute("content")===(d.content==null?null:""+d.content)&&k.getAttribute("name")===(d.name==null?null:d.name)&&k.getAttribute("property")===(d.property==null?null:d.property)&&k.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&k.getAttribute("charset")===(d.charSet==null?null:d.charSet)){z.splice(W,1);break t}}k=R.createElement(m),qr(k,m,d),R.head.appendChild(k);break;default:throw Error(r(468,m))}k[an]=s,dr(k),m=k}s.stateNode=m}else uO(R,s.type,s.stateNode);else s.stateNode=lO(R,m,s.memoizedProps);else k!==m?(k===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):k.count--,m===null?uO(R,s.type,s.stateNode):lO(R,m,s.memoizedProps)):m===null&&s.stateNode!==null&&mb(s,s.memoizedProps,d.memoizedProps)}break;case 27:vo(l,s),bo(s),m&512&&(gr||d===null||Us(d,d.return)),d!==null&&m&4&&mb(s,s.memoizedProps,d.memoizedProps);break;case 5:if(vo(l,s),bo(s),m&512&&(gr||d===null||Us(d,d.return)),s.flags&32){R=s.stateNode;try{Q(R,"")}catch(et){Sn(s,s.return,et)}}m&4&&s.stateNode!=null&&(R=s.memoizedProps,mb(s,R,d!==null?d.memoizedProps:R)),m&1024&&(vb=!0);break;case 6:if(vo(l,s),bo(s),m&4){if(s.stateNode===null)throw Error(r(162));m=s.memoizedProps,d=s.stateNode;try{d.nodeValue=m}catch(et){Sn(s,s.return,et)}}break;case 3:if(Em=null,R=Es,Es=wm(l.containerInfo),vo(l,s),Es=R,bo(s),m&4&&d!==null&&d.memoizedState.isDehydrated)try{fu(l.containerInfo)}catch(et){Sn(s,s.return,et)}vb&&(vb=!1,uR(s));break;case 4:m=Es,Es=wm(s.stateNode.containerInfo),vo(l,s),bo(s),Es=m;break;case 12:vo(l,s),bo(s);break;case 31:vo(l,s),bo(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,am(s,m)));break;case 13:vo(l,s),bo(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(cm=ze()),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,am(s,m)));break;case 22:R=s.memoizedState!==null;var ie=d!==null&&d.memoizedState!==null,Se=_i,Ae=gr;if(_i=Se||R,gr=Ae||ie,vo(l,s),gr=Ae,_i=Se,bo(s),m&8192)e:for(l=s.stateNode,l._visibility=R?l._visibility&-2:l._visibility|1,R&&(d===null||ie||_i||gr||Il(s)),d=null,l=s;;){if(l.tag===5||l.tag===26){if(d===null){ie=d=l;try{if(k=ie.stateNode,R)z=k.style,typeof z.setProperty=="function"?z.setProperty("display","none","important"):z.display="none";else{W=ie.stateNode;var Ne=ie.memoizedProps.style,xe=Ne!=null&&Ne.hasOwnProperty("display")?Ne.display:null;W.style.display=xe==null||typeof xe=="boolean"?"":(""+xe).trim()}}catch(et){Sn(ie,ie.return,et)}}}else if(l.tag===6){if(d===null){ie=l;try{ie.stateNode.nodeValue=R?"":ie.memoizedProps}catch(et){Sn(ie,ie.return,et)}}}else if(l.tag===18){if(d===null){ie=l;try{var Te=ie.stateNode;R?JR(Te,!0):JR(ie.stateNode,!1)}catch(et){Sn(ie,ie.return,et)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break e;for(;l.sibling===null;){if(l.return===null||l.return===s)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}m&4&&(m=s.updateQueue,m!==null&&(d=m.retryQueue,d!==null&&(m.retryQueue=null,am(s,d))));break;case 19:vo(l,s),bo(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,am(s,m)));break;case 30:break;case 21:break;default:vo(l,s),bo(s)}}function bo(s){var l=s.flags;if(l&2){try{for(var d,m=s.return;m!==null;){if(tR(m)){d=m;break}m=m.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var R=d.stateNode,k=gb(s);im(s,k,R);break;case 5:var z=d.stateNode;d.flags&32&&(Q(z,""),d.flags&=-33);var W=gb(s);im(s,W,z);break;case 3:case 4:var ie=d.stateNode.containerInfo,Se=gb(s);yb(s,Se,ie);break;default:throw Error(r(161))}}catch(Ae){Sn(s,s.return,Ae)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function uR(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;uR(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function Ti(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)oR(s,l.alternate,l),l=l.sibling}function Il(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:da(4,l,l.return),Il(l);break;case 1:Us(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&JT(l,l.return,d),Il(l);break;case 27:Ad(l.stateNode);case 26:case 5:Us(l,l.return),Il(l);break;case 22:l.memoizedState===null&&Il(l);break;case 30:Il(l);break;default:Il(l)}s=s.sibling}}function Ri(s,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var m=l.alternate,R=s,k=l,z=k.flags;switch(k.tag){case 0:case 11:case 15:Ri(R,k,d),bd(4,k);break;case 1:if(Ri(R,k,d),m=k,R=m.stateNode,typeof R.componentDidMount=="function")try{R.componentDidMount()}catch(Se){Sn(m,m.return,Se)}if(m=k,R=m.updateQueue,R!==null){var W=m.stateNode;try{var ie=R.shared.hiddenCallbacks;if(ie!==null)for(R.shared.hiddenCallbacks=null,R=0;R<ie.length;R++)UC(ie[R],W)}catch(Se){Sn(m,m.return,Se)}}d&&z&64&&QT(k),Sd(k,k.return);break;case 27:nR(k);case 26:case 5:Ri(R,k,d),d&&m===null&&z&4&&eR(k),Sd(k,k.return);break;case 12:Ri(R,k,d);break;case 31:Ri(R,k,d),d&&z&4&&aR(R,k);break;case 13:Ri(R,k,d),d&&z&4&&lR(R,k);break;case 22:k.memoizedState===null&&Ri(R,k,d),Sd(k,k.return);break;case 30:break;default:Ri(R,k,d)}l=l.sibling}}function bb(s,l){var d=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==d&&(s!=null&&s.refCount++,d!=null&&id(d))}function Sb(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&id(s))}function _s(s,l,d,m){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)fR(s,l,d,m),l=l.sibling}function fR(s,l,d,m){var R=l.flags;switch(l.tag){case 0:case 11:case 15:_s(s,l,d,m),R&2048&&bd(9,l);break;case 1:_s(s,l,d,m);break;case 3:_s(s,l,d,m),R&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&id(s)));break;case 12:if(R&2048){_s(s,l,d,m),s=l.stateNode;try{var k=l.memoizedProps,z=k.id,W=k.onPostCommit;typeof W=="function"&&W(z,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(ie){Sn(l,l.return,ie)}}else _s(s,l,d,m);break;case 31:_s(s,l,d,m);break;case 13:_s(s,l,d,m);break;case 23:break;case 22:k=l.stateNode,z=l.alternate,l.memoizedState!==null?k._visibility&2?_s(s,l,d,m):wd(s,l):k._visibility&2?_s(s,l,d,m):(k._visibility|=2,eu(s,l,d,m,(l.subtreeFlags&10256)!==0||!1)),R&2048&&bb(z,l);break;case 24:_s(s,l,d,m),R&2048&&Sb(l.alternate,l);break;default:_s(s,l,d,m)}}function eu(s,l,d,m,R){for(R=R&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var k=s,z=l,W=d,ie=m,Se=z.flags;switch(z.tag){case 0:case 11:case 15:eu(k,z,W,ie,R),bd(8,z);break;case 23:break;case 22:var Ae=z.stateNode;z.memoizedState!==null?Ae._visibility&2?eu(k,z,W,ie,R):wd(k,z):(Ae._visibility|=2,eu(k,z,W,ie,R)),R&&Se&2048&&bb(z.alternate,z);break;case 24:eu(k,z,W,ie,R),R&&Se&2048&&Sb(z.alternate,z);break;default:eu(k,z,W,ie,R)}l=l.sibling}}function wd(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=s,m=l,R=m.flags;switch(m.tag){case 22:wd(d,m),R&2048&&bb(m.alternate,m);break;case 24:wd(d,m),R&2048&&Sb(m.alternate,m);break;default:wd(d,m)}l=l.sibling}}var xd=8192;function tu(s,l,d){if(s.subtreeFlags&xd)for(s=s.child;s!==null;)dR(s,l,d),s=s.sibling}function dR(s,l,d){switch(s.tag){case 26:tu(s,l,d),s.flags&xd&&s.memoizedState!==null&&t7(d,Es,s.memoizedState,s.memoizedProps);break;case 5:tu(s,l,d);break;case 3:case 4:var m=Es;Es=wm(s.stateNode.containerInfo),tu(s,l,d),Es=m;break;case 22:s.memoizedState===null&&(m=s.alternate,m!==null&&m.memoizedState!==null?(m=xd,xd=16777216,tu(s,l,d),xd=m):tu(s,l,d));break;default:tu(s,l,d)}}function hR(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function Ed(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];$r=m,mR(m,s)}hR(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)pR(s),s=s.sibling}function pR(s){switch(s.tag){case 0:case 11:case 15:Ed(s),s.flags&2048&&da(9,s,s.return);break;case 3:Ed(s);break;case 12:Ed(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,lm(s)):Ed(s);break;default:Ed(s)}}function lm(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];$r=m,mR(m,s)}hR(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:da(8,l,l.return),lm(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,lm(l));break;default:lm(l)}s=s.sibling}}function mR(s,l){for(;$r!==null;){var d=$r;switch(d.tag){case 0:case 11:case 15:da(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var m=d.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:id(d.memoizedState.cache)}if(m=d.child,m!==null)m.return=d,$r=m;else e:for(d=s;$r!==null;){m=$r;var R=m.sibling,k=m.return;if(sR(m),m===d){$r=null;break e}if(R!==null){R.return=k,$r=R;break e}$r=k}}}var gF={getCacheForType:function(s){var l=Ur(hr),d=l.data.get(s);return d===void 0&&(d=s(),l.data.set(s,d)),d},cacheSignal:function(){return Ur(hr).controller.signal}},yF=typeof WeakMap=="function"?WeakMap:Map,dn=0,An=null,Bt=null,Zt=0,bn=0,No=null,ha=!1,nu=!1,wb=!1,Oi=0,rr=0,pa=0,zl=0,xb=0,Do=0,ru=0,_d=null,So=null,Eb=!1,cm=0,gR=0,um=1/0,fm=null,ma=null,Tr=0,ga=null,ou=null,Ai=0,_b=0,Cb=null,yR=null,Cd=0,Tb=null;function $o(){return(dn&2)!==0&&Zt!==0?Zt&-Zt:Z.T!==null?jb():ir()}function vR(){if(Do===0)if((Zt&536870912)===0||Qt){var s=rn;rn<<=1,(rn&3932160)===0&&(rn=262144),Do=s}else Do=536870912;return s=jo.current,s!==null&&(s.flags|=32),Do}function wo(s,l,d){(s===An&&(bn===2||bn===9)||s.cancelPendingCommit!==null)&&(su(s,0),ya(s,Zt,Do,!1)),at(s,d),((dn&2)===0||s!==An)&&(s===An&&((dn&2)===0&&(zl|=d),rr===4&&ya(s,Zt,Do,!1)),Vs(s))}function bR(s,l,d){if((dn&6)!==0)throw Error(r(327));var m=!d&&(l&127)===0&&(l&s.expiredLanes)===0||zt(s,l),R=m?SF(s,l):Ob(s,l,!0),k=m;do{if(R===0){nu&&!m&&ya(s,l,0,!1);break}else{if(d=s.current.alternate,k&&!vF(d)){R=Ob(s,l,!1),k=!1;continue}if(R===2){if(k=l,s.errorRecoveryDisabledLanes&k)var z=0;else z=s.pendingLanes&-536870913,z=z!==0?z:z&536870912?536870912:0;if(z!==0){l=z;e:{var W=s;R=_d;var ie=W.current.memoizedState.isDehydrated;if(ie&&(su(W,z).flags|=256),z=Ob(W,z,!1),z!==2){if(wb&&!ie){W.errorRecoveryDisabledLanes|=k,zl|=k,R=4;break e}k=So,So=R,k!==null&&(So===null?So=k:So.push.apply(So,k))}R=z}if(k=!1,R!==2)continue}}if(R===1){su(s,0),ya(s,l,0,!0);break}e:{switch(m=s,k=R,k){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:ya(m,l,Do,!ha);break e;case 2:So=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(R=cm+300-ze(),10<R)){if(ya(m,l,Do,!ha),on(m,0,!0)!==0)break e;Ai=l,m.timeoutHandle=WR(SR.bind(null,m,d,So,fm,Eb,l,Do,zl,ru,ha,k,"Throttled",-0,0),R);break e}SR(m,d,So,fm,Eb,l,Do,zl,ru,ha,k,null,-0,0)}}break}while(!0);Vs(s)}function SR(s,l,d,m,R,k,z,W,ie,Se,Ae,Ne,xe,Te){if(s.timeoutHandle=-1,Ne=l.subtreeFlags,Ne&8192||(Ne&16785408)===16785408){Ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Re},dR(l,k,Ne);var et=(k&62914560)===k?cm-ze():(k&4194048)===k?gR-ze():0;if(et=n7(Ne,et),et!==null){Ai=k,s.cancelPendingCommit=et(OR.bind(null,s,l,k,d,m,R,z,W,ie,Ae,Ne,null,xe,Te)),ya(s,k,z,!Se);return}}OR(s,l,k,d,m,R,z,W,ie)}function vF(s){for(var l=s;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var m=0;m<d.length;m++){var R=d[m],k=R.getSnapshot;R=R.value;try{if(!ko(k(),R))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function ya(s,l,d,m){l&=~xb,l&=~zl,s.suspendedLanes|=l,s.pingedLanes&=~l,m&&(s.warmLanes|=l),m=s.expirationTimes;for(var R=l;0<R;){var k=31-kt(R),z=1<<k;m[k]=-1,R&=~z}d!==0&&Rn(s,d,l)}function dm(){return(dn&6)===0?(Td(0),!1):!0}function Rb(){if(Bt!==null){if(bn===0)var s=Bt.return;else s=Bt,vi=Al=null,qv(s),Yc=null,ld=0,s=Bt;for(;s!==null;)XT(s.alternate,s),s=s.return;Bt=null}}function su(s,l){var d=s.timeoutHandle;d!==-1&&(s.timeoutHandle=-1,zF(d)),d=s.cancelPendingCommit,d!==null&&(s.cancelPendingCommit=null,d()),Ai=0,Rb(),An=s,Bt=d=gi(s.current,null),Zt=l,bn=0,No=null,ha=!1,nu=zt(s,l),wb=!1,ru=Do=xb=zl=pa=rr=0,So=_d=null,Eb=!1,(l&8)!==0&&(l|=l&32);var m=s.entangledLanes;if(m!==0)for(s=s.entanglements,m&=l;0<m;){var R=31-kt(m),k=1<<R;l|=s[R],m&=~k}return Oi=l,Pp(),d}function wR(s,l){At=null,Z.H=gd,l===Zc||l===Up?(l=IC(),bn=3):l===Mv?(l=IC(),bn=4):bn=l===sb?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,No=l,Bt===null&&(rr=1,tm(s,Wo(l,s.current)))}function xR(){var s=jo.current;return s===null?!0:(Zt&4194048)===Zt?es===null:(Zt&62914560)===Zt||(Zt&536870912)!==0?s===es:!1}function ER(){var s=Z.H;return Z.H=gd,s===null?gd:s}function _R(){var s=Z.A;return Z.A=gF,s}function hm(){rr=4,ha||(Zt&4194048)!==Zt&&jo.current!==null||(nu=!0),(pa&134217727)===0&&(zl&134217727)===0||An===null||ya(An,Zt,Do,!1)}function Ob(s,l,d){var m=dn;dn|=2;var R=ER(),k=_R();(An!==s||Zt!==l)&&(fm=null,su(s,l)),l=!1;var z=rr;e:do try{if(bn!==0&&Bt!==null){var W=Bt,ie=No;switch(bn){case 8:Rb(),z=6;break e;case 3:case 2:case 9:case 6:jo.current===null&&(l=!0);var Se=bn;if(bn=0,No=null,iu(s,W,ie,Se),d&&nu){z=0;break e}break;default:Se=bn,bn=0,No=null,iu(s,W,ie,Se)}}bF(),z=rr;break}catch(Ae){wR(s,Ae)}while(!0);return l&&s.shellSuspendCounter++,vi=Al=null,dn=m,Z.H=R,Z.A=k,Bt===null&&(An=null,Zt=0,Pp()),z}function bF(){for(;Bt!==null;)CR(Bt)}function SF(s,l){var d=dn;dn|=2;var m=ER(),R=_R();An!==s||Zt!==l?(fm=null,um=ze()+500,su(s,l)):nu=zt(s,l);e:do try{if(bn!==0&&Bt!==null){l=Bt;var k=No;t:switch(bn){case 1:bn=0,No=null,iu(s,l,k,1);break;case 2:case 9:if(DC(k)){bn=0,No=null,TR(l);break}l=function(){bn!==2&&bn!==9||An!==s||(bn=7),Vs(s)},k.then(l,l);break e;case 3:bn=7;break e;case 4:bn=5;break e;case 7:DC(k)?(bn=0,No=null,TR(l)):(bn=0,No=null,iu(s,l,k,7));break;case 5:var z=null;switch(Bt.tag){case 26:z=Bt.memoizedState;case 5:case 27:var W=Bt;if(z?fO(z):W.stateNode.complete){bn=0,No=null;var ie=W.sibling;if(ie!==null)Bt=ie;else{var Se=W.return;Se!==null?(Bt=Se,pm(Se)):Bt=null}break t}}bn=0,No=null,iu(s,l,k,5);break;case 6:bn=0,No=null,iu(s,l,k,6);break;case 8:Rb(),rr=6;break e;default:throw Error(r(462))}}wF();break}catch(Ae){wR(s,Ae)}while(!0);return vi=Al=null,Z.H=m,Z.A=R,dn=d,Bt!==null?0:(An=null,Zt=0,Pp(),rr)}function wF(){for(;Bt!==null&&!Ze();)CR(Bt)}function CR(s){var l=YT(s.alternate,s,Oi);s.memoizedProps=s.pendingProps,l===null?pm(s):Bt=l}function TR(s){var l=s,d=l.alternate;switch(l.tag){case 15:case 0:l=qT(d,l,l.pendingProps,l.type,void 0,Zt);break;case 11:l=qT(d,l,l.pendingProps,l.type.render,l.ref,Zt);break;case 5:qv(l);default:XT(d,l),l=Bt=_C(l,Oi),l=YT(d,l,Oi)}s.memoizedProps=s.pendingProps,l===null?pm(s):Bt=l}function iu(s,l,d,m){vi=Al=null,qv(l),Yc=null,ld=0;var R=l.return;try{if(cF(s,R,l,d,Zt)){rr=1,tm(s,Wo(d,s.current)),Bt=null;return}}catch(k){if(R!==null)throw Bt=R,k;rr=1,tm(s,Wo(d,s.current)),Bt=null;return}l.flags&32768?(Qt||m===1?s=!0:nu||(Zt&536870912)!==0?s=!1:(ha=s=!0,(m===2||m===9||m===3||m===6)&&(m=jo.current,m!==null&&m.tag===13&&(m.flags|=16384))),RR(l,s)):pm(l)}function pm(s){var l=s;do{if((l.flags&32768)!==0){RR(l,ha);return}s=l.return;var d=dF(l.alternate,l,Oi);if(d!==null){Bt=d;return}if(l=l.sibling,l!==null){Bt=l;return}Bt=l=s}while(l!==null);rr===0&&(rr=5)}function RR(s,l){do{var d=hF(s.alternate,s);if(d!==null){d.flags&=32767,Bt=d;return}if(d=s.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(s=s.sibling,s!==null)){Bt=s;return}Bt=s=d}while(s!==null);rr=6,Bt=null}function OR(s,l,d,m,R,k,z,W,ie){s.cancelPendingCommit=null;do mm();while(Tr!==0);if((dn&6)!==0)throw Error(r(327));if(l!==null){if(l===s.current)throw Error(r(177));if(k=l.lanes|l.childLanes,k|=gv,Mt(s,d,k,z,W,ie),s===An&&(Bt=An=null,Zt=0),ou=l,ga=s,Ai=d,_b=k,Cb=R,yR=m,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,CF(me,function(){return PR(),null})):(s.callbackNode=null,s.callbackPriority=0),m=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||m){m=Z.T,Z.T=null,R=H.p,H.p=2,z=dn,dn|=4;try{pF(s,l,d)}finally{dn=z,H.p=R,Z.T=m}}Tr=1,AR(),kR(),MR()}}function AR(){if(Tr===1){Tr=0;var s=ga,l=ou,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=Z.T,Z.T=null;var m=H.p;H.p=2;var R=dn;dn|=4;try{cR(l,s);var k=Fb,z=mC(s.containerInfo),W=k.focusedElem,ie=k.selectionRange;if(z!==W&&W&&W.ownerDocument&&pC(W.ownerDocument.documentElement,W)){if(ie!==null&&fv(W)){var Se=ie.start,Ae=ie.end;if(Ae===void 0&&(Ae=Se),"selectionStart"in W)W.selectionStart=Se,W.selectionEnd=Math.min(Ae,W.value.length);else{var Ne=W.ownerDocument||document,xe=Ne&&Ne.defaultView||window;if(xe.getSelection){var Te=xe.getSelection(),et=W.textContent.length,ht=Math.min(ie.start,et),_n=ie.end===void 0?ht:Math.min(ie.end,et);!Te.extend&&ht>_n&&(z=_n,_n=ht,ht=z);var pe=hC(W,ht),ue=hC(W,_n);if(pe&&ue&&(Te.rangeCount!==1||Te.anchorNode!==pe.node||Te.anchorOffset!==pe.offset||Te.focusNode!==ue.node||Te.focusOffset!==ue.offset)){var be=Ne.createRange();be.setStart(pe.node,pe.offset),Te.removeAllRanges(),ht>_n?(Te.addRange(be),Te.extend(ue.node,ue.offset)):(be.setEnd(ue.node,ue.offset),Te.addRange(be))}}}}for(Ne=[],Te=W;Te=Te.parentNode;)Te.nodeType===1&&Ne.push({element:Te,left:Te.scrollLeft,top:Te.scrollTop});for(typeof W.focus=="function"&&W.focus(),W=0;W<Ne.length;W++){var je=Ne[W];je.element.scrollLeft=je.left,je.element.scrollTop=je.top}}Rm=!!Lb,Fb=Lb=null}finally{dn=R,H.p=m,Z.T=d}}s.current=l,Tr=2}}function kR(){if(Tr===2){Tr=0;var s=ga,l=ou,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=Z.T,Z.T=null;var m=H.p;H.p=2;var R=dn;dn|=4;try{oR(s,l.alternate,l)}finally{dn=R,H.p=m,Z.T=d}}Tr=3}}function MR(){if(Tr===4||Tr===3){Tr=0,Oe();var s=ga,l=ou,d=Ai,m=yR;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Tr=5:(Tr=0,ou=ga=null,jR(s,s.pendingLanes));var R=s.pendingLanes;if(R===0&&(ma=null),Er(d),l=l.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(Nt,l,void 0,(l.current.flags&128)===128)}catch{}if(m!==null){l=Z.T,R=H.p,H.p=2,Z.T=null;try{for(var k=s.onRecoverableError,z=0;z<m.length;z++){var W=m[z];k(W.value,{componentStack:W.stack})}}finally{Z.T=l,H.p=R}}(Ai&3)!==0&&mm(),Vs(s),R=s.pendingLanes,(d&261930)!==0&&(R&42)!==0?s===Tb?Cd++:(Cd=0,Tb=s):Cd=0,Td(0)}}function jR(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,id(l)))}function mm(){return AR(),kR(),MR(),PR()}function PR(){if(Tr!==5)return!1;var s=ga,l=_b;_b=0;var d=Er(Ai),m=Z.T,R=H.p;try{H.p=32>d?32:d,Z.T=null,d=Cb,Cb=null;var k=ga,z=Ai;if(Tr=0,ou=ga=null,Ai=0,(dn&6)!==0)throw Error(r(331));var W=dn;if(dn|=4,pR(k.current),fR(k,k.current,z,d),dn=W,Td(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Nt,k)}catch{}return!0}finally{H.p=R,Z.T=m,jR(s,l)}}function NR(s,l,d){l=Wo(d,l),l=ob(s.stateNode,l,2),s=ca(s,l,2),s!==null&&(at(s,2),Vs(s))}function Sn(s,l,d){if(s.tag===3)NR(s,s,d);else for(;l!==null;){if(l.tag===3){NR(l,s,d);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(ma===null||!ma.has(m))){s=Wo(d,s),d=DT(2),m=ca(l,d,2),m!==null&&($T(d,m,l,s),at(m,2),Vs(m));break}}l=l.return}}function Ab(s,l,d){var m=s.pingCache;if(m===null){m=s.pingCache=new yF;var R=new Set;m.set(l,R)}else R=m.get(l),R===void 0&&(R=new Set,m.set(l,R));R.has(d)||(wb=!0,R.add(d),s=xF.bind(null,s,l,d),l.then(s,s))}function xF(s,l,d){var m=s.pingCache;m!==null&&m.delete(l),s.pingedLanes|=s.suspendedLanes&d,s.warmLanes&=~d,An===s&&(Zt&d)===d&&(rr===4||rr===3&&(Zt&62914560)===Zt&&300>ze()-cm?(dn&2)===0&&su(s,0):xb|=d,ru===Zt&&(ru=0)),Vs(s)}function DR(s,l){l===0&&(l=tr()),s=Tl(s,l),s!==null&&(at(s,l),Vs(s))}function EF(s){var l=s.memoizedState,d=0;l!==null&&(d=l.retryLane),DR(s,d)}function _F(s,l){var d=0;switch(s.tag){case 31:case 13:var m=s.stateNode,R=s.memoizedState;R!==null&&(d=R.retryLane);break;case 19:m=s.stateNode;break;case 22:m=s.stateNode._retryCache;break;default:throw Error(r(314))}m!==null&&m.delete(l),DR(s,d)}function CF(s,l){return Fe(s,l)}var gm=null,au=null,kb=!1,ym=!1,Mb=!1,va=0;function Vs(s){s!==au&&s.next===null&&(au===null?gm=au=s:au=au.next=s),ym=!0,kb||(kb=!0,RF())}function Td(s,l){if(!Mb&&ym){Mb=!0;do for(var d=!1,m=gm;m!==null;){if(s!==0){var R=m.pendingLanes;if(R===0)var k=0;else{var z=m.suspendedLanes,W=m.pingedLanes;k=(1<<31-kt(42|s)+1)-1,k&=R&~(z&~W),k=k&201326741?k&201326741|1:k?k|2:0}k!==0&&(d=!0,LR(m,k))}else k=Zt,k=on(m,m===An?k:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(k&3)===0||zt(m,k)||(d=!0,LR(m,k));m=m.next}while(d);Mb=!1}}function TF(){$R()}function $R(){ym=kb=!1;var s=0;va!==0&&IF()&&(s=va);for(var l=ze(),d=null,m=gm;m!==null;){var R=m.next,k=IR(m,l);k===0?(m.next=null,d===null?gm=R:d.next=R,R===null&&(au=d)):(d=m,(s!==0||(k&3)!==0)&&(ym=!0)),m=R}Tr!==0&&Tr!==5||Td(s),va!==0&&(va=0)}function IR(s,l){for(var d=s.suspendedLanes,m=s.pingedLanes,R=s.expirationTimes,k=s.pendingLanes&-62914561;0<k;){var z=31-kt(k),W=1<<z,ie=R[z];ie===-1?((W&d)===0||(W&m)!==0)&&(R[z]=$n(W,l)):ie<=l&&(s.expiredLanes|=W),k&=~W}if(l=An,d=Zt,d=on(s,s===l?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m=s.callbackNode,d===0||s===l&&(bn===2||bn===9)||s.cancelPendingCommit!==null)return m!==null&&m!==null&&Le(m),s.callbackNode=null,s.callbackPriority=0;if((d&3)===0||zt(s,d)){if(l=d&-d,l===s.callbackPriority)return l;switch(m!==null&&Le(m),Er(d)){case 2:case 8:d=Ce;break;case 32:d=me;break;case 268435456:d=Ve;break;default:d=me}return m=zR.bind(null,s),d=Fe(d,m),s.callbackPriority=l,s.callbackNode=d,l}return m!==null&&m!==null&&Le(m),s.callbackPriority=2,s.callbackNode=null,2}function zR(s,l){if(Tr!==0&&Tr!==5)return s.callbackNode=null,s.callbackPriority=0,null;var d=s.callbackNode;if(mm()&&s.callbackNode!==d)return null;var m=Zt;return m=on(s,s===An?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m===0?null:(bR(s,m,l),IR(s,ze()),s.callbackNode!=null&&s.callbackNode===d?zR.bind(null,s):null)}function LR(s,l){if(mm())return null;bR(s,l,!0)}function RF(){LF(function(){(dn&6)!==0?Fe(dt,TF):$R()})}function jb(){if(va===0){var s=Kc;s===0&&(s=sn,sn<<=1,(sn&261888)===0&&(sn=256)),va=s}return va}function FR(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:le(""+s)}function UR(s,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,s.id&&d.setAttribute("form",s.id),l.parentNode.insertBefore(d,l),s=new FormData(s),d.parentNode.removeChild(d),s}function OF(s,l,d,m,R){if(l==="submit"&&d&&d.stateNode===R){var k=FR((R[On]||null).action),z=m.submitter;z&&(l=(l=z[On]||null)?FR(l.formAction):z.getAttribute("formAction"),l!==null&&(k=l,z=null));var W=new zs("action","action",null,m,R);s.push({event:W,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(va!==0){var ie=z?UR(R,z):new FormData(R);Qv(d,{pending:!0,data:ie,method:R.method,action:k},null,ie)}}else typeof k=="function"&&(W.preventDefault(),ie=z?UR(R,z):new FormData(R),Qv(d,{pending:!0,data:ie,method:R.method,action:k},k,ie))},currentTarget:R}]})}}for(var Pb=0;Pb<mv.length;Pb++){var Nb=mv[Pb],AF=Nb.toLowerCase(),kF=Nb[0].toUpperCase()+Nb.slice(1);xs(AF,"on"+kF)}xs(vC,"onAnimationEnd"),xs(bC,"onAnimationIteration"),xs(SC,"onAnimationStart"),xs("dblclick","onDoubleClick"),xs("focusin","onFocus"),xs("focusout","onBlur"),xs(KL,"onTransitionRun"),xs(GL,"onTransitionStart"),xs(ZL,"onTransitionCancel"),xs(wC,"onTransitionEnd"),hi("onMouseEnter",["mouseout","mouseover"]),hi("onMouseLeave",["mouseout","mouseover"]),hi("onPointerEnter",["pointerout","pointerover"]),hi("onPointerLeave",["pointerout","pointerover"]),di("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),di("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),di("onBeforeInput",["compositionend","keypress","textInput","paste"]),di("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),di("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),di("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rd="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(" "),MF=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rd));function VR(s,l){l=(l&4)!==0;for(var d=0;d<s.length;d++){var m=s[d],R=m.event;m=m.listeners;e:{var k=void 0;if(l)for(var z=m.length-1;0<=z;z--){var W=m[z],ie=W.instance,Se=W.currentTarget;if(W=W.listener,ie!==k&&R.isPropagationStopped())break e;k=W,R.currentTarget=Se;try{k(R)}catch(Ae){jp(Ae)}R.currentTarget=null,k=ie}else for(z=0;z<m.length;z++){if(W=m[z],ie=W.instance,Se=W.currentTarget,W=W.listener,ie!==k&&R.isPropagationStopped())break e;k=W,R.currentTarget=Se;try{k(R)}catch(Ae){jp(Ae)}R.currentTarget=null,k=ie}}}}function Ht(s,l){var d=l[Ao];d===void 0&&(d=l[Ao]=new Set);var m=s+"__bubble";d.has(m)||(qR(l,s,2,!1),d.add(m))}function Db(s,l,d){var m=0;l&&(m|=4),qR(d,s,m,l)}var vm="_reactListening"+Math.random().toString(36).slice(2);function $b(s){if(!s[vm]){s[vm]=!0,Kf.forEach(function(d){d!=="selectionchange"&&(MF.has(d)||Db(d,!1,s),Db(d,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[vm]||(l[vm]=!0,Db("selectionchange",!1,l))}}function qR(s,l,d,m){switch(vO(l)){case 2:var R=s7;break;case 8:R=i7;break;default:R=Xb}d=R.bind(null,l,d,s),R=void 0,!ar||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(R=!0),m?R!==void 0?s.addEventListener(l,d,{capture:!0,passive:R}):s.addEventListener(l,d,!0):R!==void 0?s.addEventListener(l,d,{passive:R}):s.addEventListener(l,d,!1)}function Ib(s,l,d,m,R){var k=m;if((l&1)===0&&(l&2)===0&&m!==null)e:for(;;){if(m===null)return;var z=m.tag;if(z===3||z===4){var W=m.stateNode.containerInfo;if(W===R)break;if(z===4)for(z=m.return;z!==null;){var ie=z.tag;if((ie===3||ie===4)&&z.stateNode.containerInfo===R)return;z=z.return}for(;W!==null;){if(z=Xi(W),z===null)return;if(ie=z.tag,ie===5||ie===6||ie===26||ie===27){m=k=z;continue e}W=W.parentNode}}m=m.return}qt(function(){var Se=k,Ae=He(d),Ne=[];e:{var xe=xC.get(s);if(xe!==void 0){var Te=zs,et=s;switch(s){case"keypress":if(ws(d)===0)break e;case"keydown":case"keyup":Te=_L;break;case"focusin":et="focus",Te=iv;break;case"focusout":et="blur",Te=iv;break;case"beforeblur":case"afterblur":Te=iv;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Te=X2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Te=dL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Te=RL;break;case vC:case bC:case SC:Te=mL;break;case wC:Te=AL;break;case"scroll":case"scrollend":Te=Xf;break;case"wheel":Te=ML;break;case"copy":case"cut":case"paste":Te=yL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Te=J2;break;case"toggle":case"beforetoggle":Te=PL}var ht=(l&4)!==0,_n=!ht&&(s==="scroll"||s==="scrollend"),pe=ht?xe!==null?xe+"Capture":null:xe;ht=[];for(var ue=Se,be;ue!==null;){var je=ue;if(be=je.stateNode,je=je.tag,je!==5&&je!==26&&je!==27||be===null||pe===null||(je=ct(ue,pe),je!=null&&ht.push(Od(ue,je,be))),_n)break;ue=ue.return}0<ht.length&&(xe=new Te(xe,et,null,d,Ae),Ne.push({event:xe,listeners:ht}))}}if((l&7)===0){e:{if(xe=s==="mouseover"||s==="pointerover",Te=s==="mouseout"||s==="pointerout",xe&&d!==$e&&(et=d.relatedTarget||d.fromElement)&&(Xi(et)||et[zr]))break e;if((Te||xe)&&(xe=Ae.window===Ae?Ae:(xe=Ae.ownerDocument)?xe.defaultView||xe.parentWindow:window,Te?(et=d.relatedTarget||d.toElement,Te=Se,et=et?Xi(et):null,et!==null&&(_n=i(et),ht=et.tag,et!==_n||ht!==5&&ht!==27&&ht!==6)&&(et=null)):(Te=null,et=Se),Te!==et)){if(ht=X2,je="onMouseLeave",pe="onMouseEnter",ue="mouse",(s==="pointerout"||s==="pointerover")&&(ht=J2,je="onPointerLeave",pe="onPointerEnter",ue="pointer"),_n=Te==null?xe:Sl(Te),be=et==null?xe:Sl(et),xe=new ht(je,ue+"leave",Te,d,Ae),xe.target=_n,xe.relatedTarget=be,je=null,Xi(Ae)===Se&&(ht=new ht(pe,ue+"enter",et,d,Ae),ht.target=be,ht.relatedTarget=_n,je=ht),_n=je,Te&&et)t:{for(ht=jF,pe=Te,ue=et,be=0,je=pe;je;je=ht(je))be++;je=0;for(var ut=ue;ut;ut=ht(ut))je++;for(;0<be-je;)pe=ht(pe),be--;for(;0<je-be;)ue=ht(ue),je--;for(;be--;){if(pe===ue||ue!==null&&pe===ue.alternate){ht=pe;break t}pe=ht(pe),ue=ht(ue)}ht=null}else ht=null;Te!==null&&BR(Ne,xe,Te,ht,!1),et!==null&&_n!==null&&BR(Ne,_n,et,ht,!0)}}e:{if(xe=Se?Sl(Se):window,Te=xe.nodeName&&xe.nodeName.toLowerCase(),Te==="select"||Te==="input"&&xe.type==="file")var ln=aC;else if(sC(xe))if(lC)ln=qL;else{ln=UL;var ot=FL}else Te=xe.nodeName,!Te||Te.toLowerCase()!=="input"||xe.type!=="checkbox"&&xe.type!=="radio"?Se&&ae(Se.elementType)&&(ln=aC):ln=VL;if(ln&&(ln=ln(s,Se))){iC(Ne,ln,d,Ae);break e}ot&&ot(s,xe,Se),s==="focusout"&&Se&&xe.type==="number"&&Se.memoizedProps.value!=null&&Yf(xe,"number",xe.value)}switch(ot=Se?Sl(Se):window,s){case"focusin":(sC(ot)||ot.contentEditable==="true")&&(zc=ot,dv=Se,rd=null);break;case"focusout":rd=dv=zc=null;break;case"mousedown":hv=!0;break;case"contextmenu":case"mouseup":case"dragend":hv=!1,gC(Ne,d,Ae);break;case"selectionchange":if(HL)break;case"keydown":case"keyup":gC(Ne,d,Ae)}var jt;if(lv)e:{switch(s){case"compositionstart":var Yt="onCompositionStart";break e;case"compositionend":Yt="onCompositionEnd";break e;case"compositionupdate":Yt="onCompositionUpdate";break e}Yt=void 0}else Ic?rC(s,d)&&(Yt="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(Yt="onCompositionStart");Yt&&(eC&&d.locale!=="ko"&&(Ic||Yt!=="onCompositionStart"?Yt==="onCompositionEnd"&&Ic&&(jt=pi()):(Cr=Ae,Nr="value"in Cr?Cr.value:Cr.textContent,Ic=!0)),ot=bm(Se,Yt),0<ot.length&&(Yt=new Q2(Yt,s,null,d,Ae),Ne.push({event:Yt,listeners:ot}),jt?Yt.data=jt:(jt=oC(d),jt!==null&&(Yt.data=jt)))),(jt=DL?$L(s,d):IL(s,d))&&(Yt=bm(Se,"onBeforeInput"),0<Yt.length&&(ot=new Q2("onBeforeInput","beforeinput",null,d,Ae),Ne.push({event:ot,listeners:Yt}),ot.data=jt)),OF(Ne,s,Se,d,Ae)}VR(Ne,l)})}function Od(s,l,d){return{instance:s,listener:l,currentTarget:d}}function bm(s,l){for(var d=l+"Capture",m=[];s!==null;){var R=s,k=R.stateNode;if(R=R.tag,R!==5&&R!==26&&R!==27||k===null||(R=ct(s,d),R!=null&&m.unshift(Od(s,R,k)),R=ct(s,l),R!=null&&m.push(Od(s,R,k))),s.tag===3)return m;s=s.return}return[]}function jF(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function BR(s,l,d,m,R){for(var k=l._reactName,z=[];d!==null&&d!==m;){var W=d,ie=W.alternate,Se=W.stateNode;if(W=W.tag,ie!==null&&ie===m)break;W!==5&&W!==26&&W!==27||Se===null||(ie=Se,R?(Se=ct(d,k),Se!=null&&z.unshift(Od(d,Se,ie))):R||(Se=ct(d,k),Se!=null&&z.push(Od(d,Se,ie)))),d=d.return}z.length!==0&&s.push({event:l,listeners:z})}var PF=/\r\n?/g,NF=/\u0000|\uFFFD/g;function HR(s){return(typeof s=="string"?s:""+s).replace(PF,`
|
|
9
|
+
`).replace(NF,"")}function KR(s,l){return l=HR(l),HR(s)===l}function En(s,l,d,m,R,k){switch(d){case"children":typeof m=="string"?l==="body"||l==="textarea"&&m===""||Q(s,m):(typeof m=="number"||typeof m=="bigint")&&l!=="body"&&Q(s,""+m);break;case"className":wl(s,"class",m);break;case"tabIndex":wl(s,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":wl(s,d,m);break;case"style":Y(s,m,k);break;case"data":if(l!=="object"){wl(s,"data",m);break}case"src":case"href":if(m===""&&(l!=="a"||d!=="href")){s.removeAttribute(d);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(d);break}m=le(""+m),s.setAttribute(d,m);break;case"action":case"formAction":if(typeof m=="function"){s.setAttribute(d,"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 k=="function"&&(d==="formAction"?(l!=="input"&&En(s,l,"name",R.name,R,null),En(s,l,"formEncType",R.formEncType,R,null),En(s,l,"formMethod",R.formMethod,R,null),En(s,l,"formTarget",R.formTarget,R,null)):(En(s,l,"encType",R.encType,R,null),En(s,l,"method",R.method,R,null),En(s,l,"target",R.target,R,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(d);break}m=le(""+m),s.setAttribute(d,m);break;case"onClick":m!=null&&(s.onclick=Re);break;case"onScroll":m!=null&&Ht("scroll",s);break;case"onScrollEnd":m!=null&&Ht("scrollend",s);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(d=m.__html,d!=null){if(R.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"multiple":s.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":s.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){s.removeAttribute("xlink:href");break}d=le(""+m),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,""+m):s.removeAttribute(d);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":m&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,""):s.removeAttribute(d);break;case"capture":case"download":m===!0?s.setAttribute(d,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,m):s.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?s.setAttribute(d,m):s.removeAttribute(d);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?s.removeAttribute(d):s.setAttribute(d,m);break;case"popover":Ht("beforetoggle",s),Ht("toggle",s),Dc(s,"popover",m);break;case"xlinkActuate":Zo(s,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":Zo(s,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":Zo(s,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":Zo(s,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":Zo(s,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":Zo(s,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":Zo(s,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":Zo(s,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":Zo(s,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Dc(s,"is",m);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=_e.get(d)||d,Dc(s,d,m))}}function zb(s,l,d,m,R,k){switch(d){case"style":Y(s,m,k);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(d=m.__html,d!=null){if(R.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"children":typeof m=="string"?Q(s,m):(typeof m=="number"||typeof m=="bigint")&&Q(s,""+m);break;case"onScroll":m!=null&&Ht("scroll",s);break;case"onScrollEnd":m!=null&&Ht("scrollend",s);break;case"onClick":m!=null&&(s.onclick=Re);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Pc.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(R=d.endsWith("Capture"),l=d.slice(2,R?d.length-7:void 0),k=s[On]||null,k=k!=null?k[d]:null,typeof k=="function"&&s.removeEventListener(l,k,R),typeof m=="function")){typeof k!="function"&&k!==null&&(d in s?s[d]=null:s.hasAttribute(d)&&s.removeAttribute(d)),s.addEventListener(l,m,R);break e}d in s?s[d]=m:m===!0?s.setAttribute(d,""):Dc(s,d,m)}}}function qr(s,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ht("error",s),Ht("load",s);var m=!1,R=!1,k;for(k in d)if(d.hasOwnProperty(k)){var z=d[k];if(z!=null)switch(k){case"src":m=!0;break;case"srcSet":R=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:En(s,l,k,z,d,null)}}R&&En(s,l,"srcSet",d.srcSet,d,null),m&&En(s,l,"src",d.src,d,null);return;case"input":Ht("invalid",s);var W=k=z=R=null,ie=null,Se=null;for(m in d)if(d.hasOwnProperty(m)){var Ae=d[m];if(Ae!=null)switch(m){case"name":R=Ae;break;case"type":z=Ae;break;case"checked":ie=Ae;break;case"defaultChecked":Se=Ae;break;case"value":k=Ae;break;case"defaultValue":W=Ae;break;case"children":case"dangerouslySetInnerHTML":if(Ae!=null)throw Error(r(137,l));break;default:En(s,l,m,Ae,d,null)}}Op(s,k,W,ie,Se,z,R,!1);return;case"select":Ht("invalid",s),m=z=k=null;for(R in d)if(d.hasOwnProperty(R)&&(W=d[R],W!=null))switch(R){case"value":k=W;break;case"defaultValue":z=W;break;case"multiple":m=W;default:En(s,l,R,W,d,null)}l=k,d=z,s.multiple=!!m,l!=null?ta(s,!!m,l,!1):d!=null&&ta(s,!!m,d,!0);return;case"textarea":Ht("invalid",s),k=R=m=null;for(z in d)if(d.hasOwnProperty(z)&&(W=d[z],W!=null))switch(z){case"value":m=W;break;case"defaultValue":R=W;break;case"children":k=W;break;case"dangerouslySetInnerHTML":if(W!=null)throw Error(r(91));break;default:En(s,l,z,W,d,null)}Ap(s,m,R,k);return;case"option":for(ie in d)d.hasOwnProperty(ie)&&(m=d[ie],m!=null)&&(ie==="selected"?s.selected=m&&typeof m!="function"&&typeof m!="symbol":En(s,l,ie,m,d,null));return;case"dialog":Ht("beforetoggle",s),Ht("toggle",s),Ht("cancel",s),Ht("close",s);break;case"iframe":case"object":Ht("load",s);break;case"video":case"audio":for(m=0;m<Rd.length;m++)Ht(Rd[m],s);break;case"image":Ht("error",s),Ht("load",s);break;case"details":Ht("toggle",s);break;case"embed":case"source":case"link":Ht("error",s),Ht("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Se in d)if(d.hasOwnProperty(Se)&&(m=d[Se],m!=null))switch(Se){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:En(s,l,Se,m,d,null)}return;default:if(ae(l)){for(Ae in d)d.hasOwnProperty(Ae)&&(m=d[Ae],m!==void 0&&zb(s,l,Ae,m,d,void 0));return}}for(W in d)d.hasOwnProperty(W)&&(m=d[W],m!=null&&En(s,l,W,m,d,null))}function DF(s,l,d,m){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var R=null,k=null,z=null,W=null,ie=null,Se=null,Ae=null;for(Te in d){var Ne=d[Te];if(d.hasOwnProperty(Te)&&Ne!=null)switch(Te){case"checked":break;case"value":break;case"defaultValue":ie=Ne;default:m.hasOwnProperty(Te)||En(s,l,Te,null,m,Ne)}}for(var xe in m){var Te=m[xe];if(Ne=d[xe],m.hasOwnProperty(xe)&&(Te!=null||Ne!=null))switch(xe){case"type":k=Te;break;case"name":R=Te;break;case"checked":Se=Te;break;case"defaultChecked":Ae=Te;break;case"value":z=Te;break;case"defaultValue":W=Te;break;case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(r(137,l));break;default:Te!==Ne&&En(s,l,xe,Te,m,Ne)}}Zf(s,z,W,ie,Se,Ae,k,R);return;case"select":Te=z=W=xe=null;for(k in d)if(ie=d[k],d.hasOwnProperty(k)&&ie!=null)switch(k){case"value":break;case"multiple":Te=ie;default:m.hasOwnProperty(k)||En(s,l,k,null,m,ie)}for(R in m)if(k=m[R],ie=d[R],m.hasOwnProperty(R)&&(k!=null||ie!=null))switch(R){case"value":xe=k;break;case"defaultValue":W=k;break;case"multiple":z=k;default:k!==ie&&En(s,l,R,k,m,ie)}l=W,d=z,m=Te,xe!=null?ta(s,!!d,xe,!1):!!m!=!!d&&(l!=null?ta(s,!!d,l,!0):ta(s,!!d,d?[]:"",!1));return;case"textarea":Te=xe=null;for(W in d)if(R=d[W],d.hasOwnProperty(W)&&R!=null&&!m.hasOwnProperty(W))switch(W){case"value":break;case"children":break;default:En(s,l,W,null,m,R)}for(z in m)if(R=m[z],k=d[z],m.hasOwnProperty(z)&&(R!=null||k!=null))switch(z){case"value":xe=R;break;case"defaultValue":Te=R;break;case"children":break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:R!==k&&En(s,l,z,R,m,k)}xl(s,xe,Te);return;case"option":for(var et in d)xe=d[et],d.hasOwnProperty(et)&&xe!=null&&!m.hasOwnProperty(et)&&(et==="selected"?s.selected=!1:En(s,l,et,null,m,xe));for(ie in m)xe=m[ie],Te=d[ie],m.hasOwnProperty(ie)&&xe!==Te&&(xe!=null||Te!=null)&&(ie==="selected"?s.selected=xe&&typeof xe!="function"&&typeof xe!="symbol":En(s,l,ie,xe,m,Te));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 ht in d)xe=d[ht],d.hasOwnProperty(ht)&&xe!=null&&!m.hasOwnProperty(ht)&&En(s,l,ht,null,m,xe);for(Se in m)if(xe=m[Se],Te=d[Se],m.hasOwnProperty(Se)&&xe!==Te&&(xe!=null||Te!=null))switch(Se){case"children":case"dangerouslySetInnerHTML":if(xe!=null)throw Error(r(137,l));break;default:En(s,l,Se,xe,m,Te)}return;default:if(ae(l)){for(var _n in d)xe=d[_n],d.hasOwnProperty(_n)&&xe!==void 0&&!m.hasOwnProperty(_n)&&zb(s,l,_n,void 0,m,xe);for(Ae in m)xe=m[Ae],Te=d[Ae],!m.hasOwnProperty(Ae)||xe===Te||xe===void 0&&Te===void 0||zb(s,l,Ae,xe,m,Te);return}}for(var pe in d)xe=d[pe],d.hasOwnProperty(pe)&&xe!=null&&!m.hasOwnProperty(pe)&&En(s,l,pe,null,m,xe);for(Ne in m)xe=m[Ne],Te=d[Ne],!m.hasOwnProperty(Ne)||xe===Te||xe==null&&Te==null||En(s,l,Ne,xe,m,Te)}function GR(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $F(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,d=performance.getEntriesByType("resource"),m=0;m<d.length;m++){var R=d[m],k=R.transferSize,z=R.initiatorType,W=R.duration;if(k&&W&&GR(z)){for(z=0,W=R.responseEnd,m+=1;m<d.length;m++){var ie=d[m],Se=ie.startTime;if(Se>W)break;var Ae=ie.transferSize,Ne=ie.initiatorType;Ae&&GR(Ne)&&(ie=ie.responseEnd,z+=Ae*(ie<W?1:(W-Se)/(ie-Se)))}if(--m,l+=8*(k+z)/(R.duration/1e3),s++,10<s)break}}if(0<s)return l/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var Lb=null,Fb=null;function Sm(s){return s.nodeType===9?s:s.ownerDocument}function ZR(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function YR(s,l){if(s===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&l==="foreignObject"?0:s}function Ub(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Vb=null;function IF(){var s=window.event;return s&&s.type==="popstate"?s===Vb?!1:(Vb=s,!0):(Vb=null,!1)}var WR=typeof setTimeout=="function"?setTimeout:void 0,zF=typeof clearTimeout=="function"?clearTimeout:void 0,XR=typeof Promise=="function"?Promise:void 0,LF=typeof queueMicrotask=="function"?queueMicrotask:typeof XR<"u"?function(s){return XR.resolve(null).then(s).catch(FF)}:WR;function FF(s){setTimeout(function(){throw s})}function ba(s){return s==="head"}function QR(s,l){var d=l,m=0;do{var R=d.nextSibling;if(s.removeChild(d),R&&R.nodeType===8)if(d=R.data,d==="/$"||d==="/&"){if(m===0){s.removeChild(R),fu(l);return}m--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")m++;else if(d==="html")Ad(s.ownerDocument.documentElement);else if(d==="head"){d=s.ownerDocument.head,Ad(d);for(var k=d.firstChild;k;){var z=k.nextSibling,W=k.nodeName;k[bl]||W==="SCRIPT"||W==="STYLE"||W==="LINK"&&k.rel.toLowerCase()==="stylesheet"||d.removeChild(k),k=z}}else d==="body"&&Ad(s.ownerDocument.body);d=R}while(d);fu(l)}function JR(s,l){var d=s;s=0;do{var m=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),m&&m.nodeType===8)if(d=m.data,d==="/$"){if(s===0)break;s--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||s++;d=m}while(d)}function qb(s){var l=s.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":qb(d),Hf(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}s.removeChild(d)}}function UF(s,l,d,m){for(;s.nodeType===1;){var R=d;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!m&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(m){if(!s[bl])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(k=s.getAttribute("rel"),k==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(k!==R.rel||s.getAttribute("href")!==(R.href==null||R.href===""?null:R.href)||s.getAttribute("crossorigin")!==(R.crossOrigin==null?null:R.crossOrigin)||s.getAttribute("title")!==(R.title==null?null:R.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(k=s.getAttribute("src"),(k!==(R.src==null?null:R.src)||s.getAttribute("type")!==(R.type==null?null:R.type)||s.getAttribute("crossorigin")!==(R.crossOrigin==null?null:R.crossOrigin))&&k&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var k=R.name==null?null:""+R.name;if(R.type==="hidden"&&s.getAttribute("name")===k)return s}else return s;if(s=ts(s.nextSibling),s===null)break}return null}function VF(s,l,d){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!d||(s=ts(s.nextSibling),s===null))return null;return s}function eO(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=ts(s.nextSibling),s===null))return null;return s}function Bb(s){return s.data==="$?"||s.data==="$~"}function Hb(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function qF(s,l){var d=s.ownerDocument;if(s.data==="$~")s._reactRetry=l;else if(s.data!=="$?"||d.readyState!=="loading")l();else{var m=function(){l(),d.removeEventListener("DOMContentLoaded",m)};d.addEventListener("DOMContentLoaded",m),s._reactRetry=m}}function ts(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return s}var Kb=null;function tO(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"||d==="/&"){if(l===0)return ts(s.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}s=s.nextSibling}return null}function nO(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return s;l--}else d!=="/$"&&d!=="/&"||l++}s=s.previousSibling}return null}function rO(s,l,d){switch(l=Sm(d),s){case"html":if(s=l.documentElement,!s)throw Error(r(452));return s;case"head":if(s=l.head,!s)throw Error(r(453));return s;case"body":if(s=l.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function Ad(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);Hf(s)}var ns=new Map,oO=new Set;function wm(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var ki=H.d;H.d={f:BF,r:HF,D:KF,C:GF,L:ZF,m:YF,X:XF,S:WF,M:QF};function BF(){var s=ki.f(),l=dm();return s||l}function HF(s){var l=Qi(s);l!==null&&l.tag===5&&l.type==="form"?wT(l):ki.r(s)}var lu=typeof document>"u"?null:document;function sO(s,l,d){var m=lu;if(m&&typeof l=="string"&&l){var R=Lr(l);R='link[rel="'+s+'"][href="'+R+'"]',typeof d=="string"&&(R+='[crossorigin="'+d+'"]'),oO.has(R)||(oO.add(R),s={rel:s,crossOrigin:d,href:l},m.querySelector(R)===null&&(l=m.createElement("link"),qr(l,"link",s),dr(l),m.head.appendChild(l)))}}function KF(s){ki.D(s),sO("dns-prefetch",s,null)}function GF(s,l){ki.C(s,l),sO("preconnect",s,l)}function ZF(s,l,d){ki.L(s,l,d);var m=lu;if(m&&s&&l){var R='link[rel="preload"][as="'+Lr(l)+'"]';l==="image"&&d&&d.imageSrcSet?(R+='[imagesrcset="'+Lr(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(R+='[imagesizes="'+Lr(d.imageSizes)+'"]')):R+='[href="'+Lr(s)+'"]';var k=R;switch(l){case"style":k=cu(s);break;case"script":k=uu(s)}ns.has(k)||(s=p({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:s,as:l},d),ns.set(k,s),m.querySelector(R)!==null||l==="style"&&m.querySelector(kd(k))||l==="script"&&m.querySelector(Md(k))||(l=m.createElement("link"),qr(l,"link",s),dr(l),m.head.appendChild(l)))}}function YF(s,l){ki.m(s,l);var d=lu;if(d&&s){var m=l&&typeof l.as=="string"?l.as:"script",R='link[rel="modulepreload"][as="'+Lr(m)+'"][href="'+Lr(s)+'"]',k=R;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":k=uu(s)}if(!ns.has(k)&&(s=p({rel:"modulepreload",href:s},l),ns.set(k,s),d.querySelector(R)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Md(k)))return}m=d.createElement("link"),qr(m,"link",s),dr(m),d.head.appendChild(m)}}}function WF(s,l,d){ki.S(s,l,d);var m=lu;if(m&&s){var R=Ji(m).hoistableStyles,k=cu(s);l=l||"default";var z=R.get(k);if(!z){var W={loading:0,preload:null};if(z=m.querySelector(kd(k)))W.loading=5;else{s=p({rel:"stylesheet",href:s,"data-precedence":l},d),(d=ns.get(k))&&Gb(s,d);var ie=z=m.createElement("link");dr(ie),qr(ie,"link",s),ie._p=new Promise(function(Se,Ae){ie.onload=Se,ie.onerror=Ae}),ie.addEventListener("load",function(){W.loading|=1}),ie.addEventListener("error",function(){W.loading|=2}),W.loading|=4,xm(z,l,m)}z={type:"stylesheet",instance:z,count:1,state:W},R.set(k,z)}}}function XF(s,l){ki.X(s,l);var d=lu;if(d&&s){var m=Ji(d).hoistableScripts,R=uu(s),k=m.get(R);k||(k=d.querySelector(Md(R)),k||(s=p({src:s,async:!0},l),(l=ns.get(R))&&Zb(s,l),k=d.createElement("script"),dr(k),qr(k,"link",s),d.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},m.set(R,k))}}function QF(s,l){ki.M(s,l);var d=lu;if(d&&s){var m=Ji(d).hoistableScripts,R=uu(s),k=m.get(R);k||(k=d.querySelector(Md(R)),k||(s=p({src:s,async:!0,type:"module"},l),(l=ns.get(R))&&Zb(s,l),k=d.createElement("script"),dr(k),qr(k,"link",s),d.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},m.set(R,k))}}function iO(s,l,d,m){var R=(R=te.current)?wm(R):null;if(!R)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=cu(d.href),d=Ji(R).hoistableStyles,m=d.get(l),m||(m={type:"style",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){s=cu(d.href);var k=Ji(R).hoistableStyles,z=k.get(s);if(z||(R=R.ownerDocument||R,z={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},k.set(s,z),(k=R.querySelector(kd(s)))&&!k._p&&(z.instance=k,z.state.loading=5),ns.has(s)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},ns.set(s,d),k||JF(R,s,d,z.state))),l&&m===null)throw Error(r(528,""));return z}if(l&&m!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=uu(d),d=Ji(R).hoistableScripts,m=d.get(l),m||(m={type:"script",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function cu(s){return'href="'+Lr(s)+'"'}function kd(s){return'link[rel="stylesheet"]['+s+"]"}function aO(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function JF(s,l,d,m){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?m.loading=1:(l=s.createElement("link"),m.preload=l,l.addEventListener("load",function(){return m.loading|=1}),l.addEventListener("error",function(){return m.loading|=2}),qr(l,"link",d),dr(l),s.head.appendChild(l))}function uu(s){return'[src="'+Lr(s)+'"]'}function Md(s){return"script[async]"+s}function lO(s,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var m=s.querySelector('style[data-href~="'+Lr(d.href)+'"]');if(m)return l.instance=m,dr(m),m;var R=p({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return m=(s.ownerDocument||s).createElement("style"),dr(m),qr(m,"style",R),xm(m,d.precedence,s),l.instance=m;case"stylesheet":R=cu(d.href);var k=s.querySelector(kd(R));if(k)return l.state.loading|=4,l.instance=k,dr(k),k;m=aO(d),(R=ns.get(R))&&Gb(m,R),k=(s.ownerDocument||s).createElement("link"),dr(k);var z=k;return z._p=new Promise(function(W,ie){z.onload=W,z.onerror=ie}),qr(k,"link",m),l.state.loading|=4,xm(k,d.precedence,s),l.instance=k;case"script":return k=uu(d.src),(R=s.querySelector(Md(k)))?(l.instance=R,dr(R),R):(m=d,(R=ns.get(k))&&(m=p({},d),Zb(m,R)),s=s.ownerDocument||s,R=s.createElement("script"),dr(R),qr(R,"link",m),s.head.appendChild(R),l.instance=R);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(m=l.instance,l.state.loading|=4,xm(m,d.precedence,s));return l.instance}function xm(s,l,d){for(var m=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=m.length?m[m.length-1]:null,k=R,z=0;z<m.length;z++){var W=m[z];if(W.dataset.precedence===l)k=W;else if(k!==R)break}k?k.parentNode.insertBefore(s,k.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(s,l.firstChild))}function Gb(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function Zb(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var Em=null;function cO(s,l,d){if(Em===null){var m=new Map,R=Em=new Map;R.set(d,m)}else R=Em,m=R.get(d),m||(m=new Map,R.set(d,m));if(m.has(s))return m;for(m.set(s,null),d=d.getElementsByTagName(s),R=0;R<d.length;R++){var k=d[R];if(!(k[bl]||k[an]||s==="link"&&k.getAttribute("rel")==="stylesheet")&&k.namespaceURI!=="http://www.w3.org/2000/svg"){var z=k.getAttribute(l)||"";z=s+z;var W=m.get(z);W?W.push(k):m.set(z,[k])}}return m}function uO(s,l,d){s=s.ownerDocument||s,s.head.insertBefore(d,l==="title"?s.querySelector("head > title"):null)}function e7(s,l,d){if(d===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(s=l.disabled,typeof l.precedence=="string"&&s==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function fO(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function t7(s,l,d,m){if(d.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var R=cu(m.href),k=l.querySelector(kd(R));if(k){l=k._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=_m.bind(s),l.then(s,s)),d.state.loading|=4,d.instance=k,dr(k);return}k=l.ownerDocument||l,m=aO(m),(R=ns.get(R))&&Gb(m,R),k=k.createElement("link"),dr(k);var z=k;z._p=new Promise(function(W,ie){z.onload=W,z.onerror=ie}),qr(k,"link",m),d.instance=k}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(s.count++,d=_m.bind(s),l.addEventListener("load",d),l.addEventListener("error",d))}}var Yb=0;function n7(s,l){return s.stylesheets&&s.count===0&&Tm(s,s.stylesheets),0<s.count||0<s.imgCount?function(d){var m=setTimeout(function(){if(s.stylesheets&&Tm(s,s.stylesheets),s.unsuspend){var k=s.unsuspend;s.unsuspend=null,k()}},6e4+l);0<s.imgBytes&&Yb===0&&(Yb=62500*$F());var R=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&Tm(s,s.stylesheets),s.unsuspend)){var k=s.unsuspend;s.unsuspend=null,k()}},(s.imgBytes>Yb?50:800)+l);return s.unsuspend=d,function(){s.unsuspend=null,clearTimeout(m),clearTimeout(R)}}:null}function _m(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tm(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Cm=null;function Tm(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Cm=new Map,l.forEach(r7,s),Cm=null,_m.call(s))}function r7(s,l){if(!(l.state.loading&4)){var d=Cm.get(s);if(d)var m=d.get(null);else{d=new Map,Cm.set(s,d);for(var R=s.querySelectorAll("link[data-precedence],style[data-precedence]"),k=0;k<R.length;k++){var z=R[k];(z.nodeName==="LINK"||z.getAttribute("media")!=="not all")&&(d.set(z.dataset.precedence,z),m=z)}m&&d.set(null,m)}R=l.instance,z=R.getAttribute("data-precedence"),k=d.get(z)||m,k===m&&d.set(null,R),d.set(z,R),this.count++,m=_m.bind(this),R.addEventListener("load",m),R.addEventListener("error",m),k?k.parentNode.insertBefore(R,k.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(R,s.firstChild)),l.state.loading|=4}}var jd={$$typeof:_,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function o7(s,l,d,m,R,k,z,W,ie){this.tag=1,this.containerInfo=s,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=xr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xr(0),this.hiddenUpdates=xr(null),this.identifierPrefix=m,this.onUncaughtError=R,this.onCaughtError=k,this.onRecoverableError=z,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ie,this.incompleteTransitions=new Map}function dO(s,l,d,m,R,k,z,W,ie,Se,Ae,Ne){return s=new o7(s,l,d,z,ie,Se,Ae,Ne,W),l=1,k===!0&&(l|=24),k=Mo(3,null,null,l),s.current=k,k.stateNode=s,l=Ov(),l.refCount++,s.pooledCache=l,l.refCount++,k.memoizedState={element:m,isDehydrated:d,cache:l},jv(k),s}function hO(s){return s?(s=Uc,s):Uc}function pO(s,l,d,m,R,k){R=hO(R),m.context===null?m.context=R:m.pendingContext=R,m=la(l),m.payload={element:d},k=k===void 0?null:k,k!==null&&(m.callback=k),d=ca(s,m,l),d!==null&&(wo(d,s,l),ud(d,s,l))}function mO(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<l?d:l}}function Wb(s,l){mO(s,l),(s=s.alternate)&&mO(s,l)}function gO(s){if(s.tag===13||s.tag===31){var l=Tl(s,67108864);l!==null&&wo(l,s,67108864),Wb(s,67108864)}}function yO(s){if(s.tag===13||s.tag===31){var l=$o();l=Rt(l);var d=Tl(s,l);d!==null&&wo(d,s,l),Wb(s,l)}}var Rm=!0;function s7(s,l,d,m){var R=Z.T;Z.T=null;var k=H.p;try{H.p=2,Xb(s,l,d,m)}finally{H.p=k,Z.T=R}}function i7(s,l,d,m){var R=Z.T;Z.T=null;var k=H.p;try{H.p=8,Xb(s,l,d,m)}finally{H.p=k,Z.T=R}}function Xb(s,l,d,m){if(Rm){var R=Qb(m);if(R===null)Ib(s,l,m,Om,d),bO(s,m);else if(l7(R,s,l,d,m))m.stopPropagation();else if(bO(s,m),l&4&&-1<a7.indexOf(s)){for(;R!==null;){var k=Qi(R);if(k!==null)switch(k.tag){case 3:if(k=k.stateNode,k.current.memoizedState.isDehydrated){var z=xt(k.pendingLanes);if(z!==0){var W=k;for(W.pendingLanes|=2,W.entangledLanes|=2;z;){var ie=1<<31-kt(z);W.entanglements[1]|=ie,z&=~ie}Vs(k),(dn&6)===0&&(um=ze()+500,Td(0))}}break;case 31:case 13:W=Tl(k,2),W!==null&&wo(W,k,2),dm(),Wb(k,2)}if(k=Qb(m),k===null&&Ib(s,l,m,Om,d),k===R)break;R=k}R!==null&&m.stopPropagation()}else Ib(s,l,m,null,d)}}function Qb(s){return s=He(s),Jb(s)}var Om=null;function Jb(s){if(Om=null,s=Xi(s),s!==null){var l=i(s);if(l===null)s=null;else{var d=l.tag;if(d===13){if(s=a(l),s!==null)return s;s=null}else if(d===31){if(s=c(l),s!==null)return s;s=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return Om=s,null}function vO(s){switch(s){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(Be()){case dt:return 2;case Ce:return 8;case me:case Me:return 32;case Ve:return 268435456;default:return 32}default:return 32}}var e1=!1,Sa=null,wa=null,xa=null,Pd=new Map,Nd=new Map,Ea=[],a7="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 bO(s,l){switch(s){case"focusin":case"focusout":Sa=null;break;case"dragenter":case"dragleave":wa=null;break;case"mouseover":case"mouseout":xa=null;break;case"pointerover":case"pointerout":Pd.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nd.delete(l.pointerId)}}function Dd(s,l,d,m,R,k){return s===null||s.nativeEvent!==k?(s={blockedOn:l,domEventName:d,eventSystemFlags:m,nativeEvent:k,targetContainers:[R]},l!==null&&(l=Qi(l),l!==null&&gO(l)),s):(s.eventSystemFlags|=m,l=s.targetContainers,R!==null&&l.indexOf(R)===-1&&l.push(R),s)}function l7(s,l,d,m,R){switch(l){case"focusin":return Sa=Dd(Sa,s,l,d,m,R),!0;case"dragenter":return wa=Dd(wa,s,l,d,m,R),!0;case"mouseover":return xa=Dd(xa,s,l,d,m,R),!0;case"pointerover":var k=R.pointerId;return Pd.set(k,Dd(Pd.get(k)||null,s,l,d,m,R)),!0;case"gotpointercapture":return k=R.pointerId,Nd.set(k,Dd(Nd.get(k)||null,s,l,d,m,R)),!0}return!1}function SO(s){var l=Xi(s.target);if(l!==null){var d=i(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){s.blockedOn=l,oo(s.priority,function(){yO(d)});return}}else if(l===31){if(l=c(d),l!==null){s.blockedOn=l,oo(s.priority,function(){yO(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){s.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Am(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var d=Qb(s.nativeEvent);if(d===null){d=s.nativeEvent;var m=new d.constructor(d.type,d);$e=m,d.target.dispatchEvent(m),$e=null}else return l=Qi(d),l!==null&&gO(l),s.blockedOn=d,!1;l.shift()}return!0}function wO(s,l,d){Am(s)&&d.delete(l)}function c7(){e1=!1,Sa!==null&&Am(Sa)&&(Sa=null),wa!==null&&Am(wa)&&(wa=null),xa!==null&&Am(xa)&&(xa=null),Pd.forEach(wO),Nd.forEach(wO)}function km(s,l){s.blockedOn===l&&(s.blockedOn=null,e1||(e1=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,c7)))}var Mm=null;function xO(s){Mm!==s&&(Mm=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Mm===s&&(Mm=null);for(var l=0;l<s.length;l+=3){var d=s[l],m=s[l+1],R=s[l+2];if(typeof m!="function"){if(Jb(m||d)===null)continue;break}var k=Qi(d);k!==null&&(s.splice(l,3),l-=3,Qv(k,{pending:!0,data:R,method:d.method,action:m},m,R))}}))}function fu(s){function l(ie){return km(ie,s)}Sa!==null&&km(Sa,s),wa!==null&&km(wa,s),xa!==null&&km(xa,s),Pd.forEach(l),Nd.forEach(l);for(var d=0;d<Ea.length;d++){var m=Ea[d];m.blockedOn===s&&(m.blockedOn=null)}for(;0<Ea.length&&(d=Ea[0],d.blockedOn===null);)SO(d),d.blockedOn===null&&Ea.shift();if(d=(s.ownerDocument||s).$$reactFormReplay,d!=null)for(m=0;m<d.length;m+=3){var R=d[m],k=d[m+1],z=R[On]||null;if(typeof k=="function")z||xO(d);else if(z){var W=null;if(k&&k.hasAttribute("formAction")){if(R=k,z=k[On]||null)W=z.formAction;else if(Jb(R)!==null)continue}else W=z.action;typeof W=="function"?d[m+1]=W:(d.splice(m,3),m-=3),xO(d)}}}function EO(){function s(k){k.canIntercept&&k.info==="react-transition"&&k.intercept({handler:function(){return new Promise(function(z){return R=z})},focusReset:"manual",scroll:"manual"})}function l(){R!==null&&(R(),R=null),m||setTimeout(d,20)}function d(){if(!m&&!navigation.transition){var k=navigation.currentEntry;k&&k.url!=null&&navigation.navigate(k.url,{state:k.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,R=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){m=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),R!==null&&(R(),R=null)}}}function t1(s){this._internalRoot=s}jm.prototype.render=t1.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,m=$o();pO(d,m,s,l,null,null)},jm.prototype.unmount=t1.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;pO(s.current,2,null,s,null,null),dm(),l[zr]=null}};function jm(s){this._internalRoot=s}jm.prototype.unstable_scheduleHydration=function(s){if(s){var l=ir();s={blockedOn:null,target:s,priority:l};for(var d=0;d<Ea.length&&l!==0&&l<Ea[d].priority;d++);Ea.splice(d,0,s),d===0&&SO(s)}};var _O=t.version;if(_O!=="19.2.3")throw Error(r(527,_O,"19.2.3"));H.findDOMNode=function(s){var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=f(l),s=s!==null?h(s):null,s=s===null?null:s.stateNode,s};var u7={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pm.isDisabled&&Pm.supportsFiber)try{Nt=Pm.inject(u7),vt=Pm}catch{}}return Id.createRoot=function(s,l){if(!o(s))throw Error(r(299));var d=!1,m="",R=MT,k=jT,z=PT;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(R=l.onUncaughtError),l.onCaughtError!==void 0&&(k=l.onCaughtError),l.onRecoverableError!==void 0&&(z=l.onRecoverableError)),l=dO(s,1,!1,null,null,d,m,null,R,k,z,EO),s[zr]=l.current,$b(s),new t1(l)},Id.hydrateRoot=function(s,l,d){if(!o(s))throw Error(r(299));var m=!1,R="",k=MT,z=jT,W=PT,ie=null;return d!=null&&(d.unstable_strictMode===!0&&(m=!0),d.identifierPrefix!==void 0&&(R=d.identifierPrefix),d.onUncaughtError!==void 0&&(k=d.onUncaughtError),d.onCaughtError!==void 0&&(z=d.onCaughtError),d.onRecoverableError!==void 0&&(W=d.onRecoverableError),d.formState!==void 0&&(ie=d.formState)),l=dO(s,1,!0,l,d??null,m,R,ie,k,z,W,EO),l.context=hO(null),d=l.current,m=$o(),m=Rt(m),R=la(m),R.callback=null,ca(d,R,m),d=m,l.current.lanes=d,at(l,d),Vs(l),s[zr]=l.current,$b(s),new jm(l)},Id.version="19.2.3",Id}var NO;function w7(){if(NO)return o1.exports;NO=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(),o1.exports=S7(),o1.exports}var x7=w7(),wf=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(){}},E7={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},_7=class{#e=E7;#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)}},Xl=new _7;function C7(e){setTimeout(e,0)}var ic=typeof window>"u"||"Deno"in globalThis;function fo(){}function T7(e,t){return typeof e=="function"?e(t):e}function tw(e){return typeof e=="number"&&e>=0&&e!==1/0}function y3(e,t){return Math.max(e+(t||0)-Date.now(),0)}function za(e,t){return typeof e=="function"?e(t):e}function ss(e,t){return typeof e=="function"?e(t):e}function DO(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:c}=e;if(a){if(r){if(t.queryHash!==Yx(a,t.options))return!1}else if(!gh(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||i&&!i(t))}function $O(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(ac(t.options.mutationKey)!==ac(i))return!1}else if(!gh(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Yx(e,t){return(t?.queryKeyHashFn||ac)(e)}function ac(e){return JSON.stringify(e,(t,n)=>nw(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function gh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>gh(e[n],t[n])):!1}var R7=Object.prototype.hasOwnProperty;function v3(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=IO(e)&&IO(t);if(!r&&!(nw(e)&&nw(t)))return t;const i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),c=a.length,u=r?new Array(c):{};let f=0;for(let h=0;h<c;h++){const p=r?h:a[h],g=e[p],v=t[p];if(g===v){u[p]=g,(r?h<i:R7.call(e,p))&&f++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){u[p]=v;continue}const y=v3(g,v,n+1);u[p]=y,y===g&&f++}return i===c&&f===i?e:u}function wy(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function IO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function nw(e){if(!zO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!zO(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function zO(e){return Object.prototype.toString.call(e)==="[object Object]"}function O7(e){return new Promise(t=>{Xl.setTimeout(t,e)})}function rw(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?v3(e,t):t}function A7(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function k7(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Wx=Symbol();function b3(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Wx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Xx(e,t){return typeof e=="function"?e(...t):!!e}function M7(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var j7=class extends wf{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!ic&&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"}},Qx=new j7;function ow(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var P7=C7;function N7(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=P7;const i=c=>{t?e.push(c):o(()=>{n(c)})},a=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(u=>{n(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||a()}return u},batchCalls:c=>(...u)=>{i(()=>{c(...u)})},schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var Ar=N7(),D7=class extends wf{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!ic&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}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(n=>{n(e)}))}isOnline(){return this.#e}},xy=new D7;function $7(e){return Math.min(1e3*2**e,3e4)}function S3(e){return(e??"online")==="online"?xy.isOnline():!0}var sw=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function w3(e){let t=!1,n=0,r;const o=ow(),i=()=>o.status!=="pending",a=x=>{if(!i()){const w=new sw(x);g(w),e.onCancel?.(w)}},c=()=>{t=!0},u=()=>{t=!1},f=()=>Qx.isFocused()&&(e.networkMode==="always"||xy.isOnline())&&e.canRun(),h=()=>S3(e.networkMode)&&e.canRun(),p=x=>{i()||(r?.(),o.resolve(x))},g=x=>{i()||(r?.(),o.reject(x))},v=()=>new Promise(x=>{r=w=>{(i()||f())&&x(w)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),y=()=>{if(i())return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(T){x=Promise.reject(T)}Promise.resolve(x).then(p).catch(T=>{if(i())return;const b=e.retry??(ic?0:3),_=e.retryDelay??$7,S=typeof _=="function"?_(n,T):_,C=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,T);if(t||!C){g(T);return}n++,e.onFail?.(n,T),O7(S).then(()=>f()?void 0:v()).then(()=>{t?g(T):y()})})};return{promise:o,status:()=>o.status,cancel:a,continue:()=>(r?.(),o),cancelRetry:c,continueRetry:u,canStart:h,start:()=>(h()?y():v().then(y),o)}}var x3=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),tw(this.gcTime)&&(this.#e=Xl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ic?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Xl.clearTimeout(this.#e),this.#e=void 0)}},I7=class extends x3{#e;#t;#n;#o;#r;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=FO(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.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=FO(this.options);t.data!==void 0&&(this.setState(LO(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=rw(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(fo).catch(fo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>ss(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Wx||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>za(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:!y3(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.#a?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.#s({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 c=this.observers.find(u=>u.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},o=()=>{const c=b3(this.options,t),f=(()=>{const h={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(h),h})();return this.#a=!1,this.options.persister?this.options.persister(c,f,this):c(f)},a=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:o};return r(c),c})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#s({type:"fetch",meta:a.fetchOptions?.meta}),this.#r=w3({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof sw&&c.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(c,u)=>{this.#s({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const c=await this.#r.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof sw){if(c.silent)return this.#r.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#s({type:"error",error:c}),this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...E3(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...LO(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ar.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function E3(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:S3(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function LO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function FO(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var z7=class extends wf{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#a=ow(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#a;#s;#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),UO(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return iw(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return iw(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,n=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 ss(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#t.setOptions(this.options),t._defaulted&&!wy(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&VO(this.#t,n,this.options,t)&&this.#f(),this.updateResult(),r&&(this.#t!==n||ss(this.options.enabled,this.#t)!==ss(t.enabled,this.#t)||za(this.options.staleTime,this.#t)!==za(t.staleTime,this.#t))&&this.#g();const o=this.#y();r&&(this.#t!==n||ss(this.options.enabled,this.#t)!==ss(t.enabled,this.#t)||o!==this.#l)&&this.#v(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return F7(this,n)&&(this.#o=n,this.#i=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#f(e){this.#x();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(fo)),t}#g(){this.#S();const e=za(this.options.staleTime,this.#t);if(ic||this.#o.isStale||!tw(e))return;const n=y3(this.#o.dataUpdatedAt,e)+1;this.#c=Xl.setTimeout(()=>{this.#o.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#l=e,!(ic||ss(this.options.enabled,this.#t)===!1||!tw(this.#l)||this.#l===0)&&(this.#u=Xl.setInterval(()=>{(this.options.refetchIntervalInBackground||Qx.isFocused())&&this.#f()},this.#l))}#b(){this.#g(),this.#v(this.#y())}#S(){this.#c&&(Xl.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(Xl.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#o,i=this.#r,a=this.#i,u=e!==n?e.state:this.#n,{state:f}=e;let h={...f},p=!1,g;if(t._optimisticResults){const j=this.hasListeners(),P=!j&&UO(e,t),$=j&&VO(e,n,t,r);(P||$)&&(h={...h,...E3(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:v,errorUpdatedAt:y,status:x}=h;g=h.data;let w=!1;if(t.placeholderData!==void 0&&g===void 0&&x==="pending"){let j;o?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(j=o.data,w=!0):j=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,j!==void 0&&(x="success",g=rw(o?.data,j,t),p=!0)}if(t.select&&g!==void 0&&!w)if(o&&g===i?.data&&t.select===this.#m)g=this.#d;else try{this.#m=t.select,g=t.select(g),g=rw(o?.data,g,t),this.#d=g,this.#s=null}catch(j){this.#s=j}this.#s&&(v=this.#s,g=this.#d,y=Date.now(),x="error");const T=h.fetchStatus==="fetching",b=x==="pending",_=x==="error",S=b&&T,C=g!==void 0,O={status:x,fetchStatus:h.fetchStatus,isPending:b,isSuccess:x==="success",isError:_,isInitialLoading:S,isLoading:S,data:g,dataUpdatedAt:h.dataUpdatedAt,error:v,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:T,isRefetching:T&&!b,isLoadingError:_&&!C,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:_&&C,isStale:Jx(e,t),refetch:this.refetch,promise:this.#a,isEnabled:ss(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const j=O.data!==void 0,P=O.status==="error"&&!j,$=F=>{P?F.reject(O.error):j&&F.resolve(O.data)},I=()=>{const F=this.#a=O.promise=ow();$(F)},L=this.#a;switch(L.status){case"pending":e.queryHash===n.queryHash&&$(L);break;case"fulfilled":(P||O.data!==L.value)&&I();break;case"rejected":(!P||O.error!==L.reason)&&I();break}}return O}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#h=this.#t),wy(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#p.size)return!0;const i=new Set(o??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#o).some(a=>{const c=a;return this.#o[c]!==e[c]&&i.has(c)})};this.#E({listeners:n()})}#x(){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()}#E(e){Ar.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function L7(e,t){return ss(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function UO(e,t){return L7(e,t)||e.state.data!==void 0&&iw(e,t,t.refetchOnMount)}function iw(e,t,n){if(ss(t.enabled,e)!==!1&&za(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Jx(e,t)}return!1}function VO(e,t,n,r){return(e!==t||ss(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Jx(e,n)}function Jx(e,t){return ss(t.enabled,e)!==!1&&e.isStaleByTime(za(t.staleTime,e))}function F7(e,t){return!wy(e.getCurrentResult(),t)}function qO(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},u=0;const f=async()=>{let h=!1;const p=y=>{M7(y,()=>t.signal,()=>h=!0)},g=b3(t.options,t.fetchOptions),v=async(y,x,w)=>{if(h)return Promise.reject();if(x==null&&y.pages.length)return Promise.resolve(y);const b=(()=>{const E={client:t.client,queryKey:t.queryKey,pageParam:x,direction:w?"backward":"forward",meta:t.options.meta};return p(E),E})(),_=await g(b),{maxPages:S}=t.options,C=w?k7:A7;return{pages:C(y.pages,_,S),pageParams:C(y.pageParams,x,S)}};if(o&&i.length){const y=o==="backward",x=y?U7:BO,w={pages:i,pageParams:a},T=x(r,w);c=await v(w,T,y)}else{const y=e??i.length;do{const x=u===0?a[0]??r.initialPageParam:BO(r,c);if(u>0&&x==null)break;c=await v(c,x),u++}while(u<y)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function BO(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function U7(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var V7=class extends x3{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||_3(),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.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=w3({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,a)=>{this.#r({type:"failed",failureCount:i,error:a})},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 r=this.state.status==="pending",o=!this.#o.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:o}),await this.#n.config.onMutate?.(e,this,n);const a=await this.options.onMutate?.(e,n);a!==this.state.context&&this.#r({type:"pending",context:a,variables:e,isPaused:o})}const i=await this.#o.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#r({type:"success",data:i}),i}catch(i){try{await this.#n.config.onError?.(i,e,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(i,e,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#r({type:"error",error:i}),i}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ar.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function _3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var q7=class extends wf{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new V7({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Dm(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Dm(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Dm(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Dm(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ar.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(n=>$O(t,n))}findAll(e={}){return this.getAll().filter(t=>$O(e,t))}notify(e){Ar.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ar.batch(()=>Promise.all(e.map(t=>t.continue().catch(fo))))}};function Dm(e){return e.options.scope?.id}var B7=class extends wf{#e;#t=void 0;#n;#o;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),wy(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&ac(n.mutationKey)!==ac(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.#i(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#i()}mutate(t,n){return this.#o=n,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??_3();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}}#i(t){Ar.batch(()=>{if(this.#o&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,n,r,o)}catch(i){Promise.reject(i)}try{this.#o.onSettled?.(t.data,null,n,r,o)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,n,r,o)}catch(i){Promise.reject(i)}try{this.#o.onSettled?.(void 0,t.error,n,r,o)}catch(i){Promise.reject(i)}}}this.listeners.forEach(n=>{n(this.#t)})})}},H7=class extends wf{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??Yx(r,t);let i=this.get(o);return i||(i=new I7({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}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(){Ar.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(n=>DO(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>DO(e,n)):t}notify(e){Ar.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ar.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ar.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},K7=class{#e;#t;#n;#o;#r;#i;#a;#s;constructor(e={}){this.#e=e.queryCache||new H7,this.#t=e.mutationCache||new q7,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Qx.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=xy.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=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),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(za(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=T7(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ar.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ar.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Ar.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ar.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(fo).catch(fo)}invalidateQueries(e,t={}){return Ar.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ar.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(fo)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(fo)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(za(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(fo).catch(fo)}fetchInfiniteQuery(e){return e.behavior=qO(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(fo).catch(fo)}ensureInfiniteQueryData(e){return e.behavior=qO(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return xy.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.#o.set(ac(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{gh(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(ac(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{gh(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Yx(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===Wx&&(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()}},C3=A.createContext(void 0),T3=e=>{const t=A.useContext(C3);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},G7=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),M.jsx(C3.Provider,{value:e,children:t})),R3=A.createContext(!1),Z7=()=>A.useContext(R3);R3.Provider;function Y7(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var W7=A.createContext(Y7()),X7=()=>A.useContext(W7),Q7=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?Xx(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},J7=e=>{A.useEffect(()=>{e.clearReset()},[e])},eU=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Xx(n,[e.error,r])),tU=(e,t)=>t.state.data===void 0,nU=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},rU=(e,t)=>e.isLoading&&e.isFetching&&!t,oU=(e,t)=>e?.suspense&&t.isPending,HO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sU(e,t,n){const r=Z7(),o=X7(),i=T3(),a=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const c=i.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",nU(a),Q7(a,o,c),J7(o);const u=!i.getQueryCache().get(a.queryHash),[f]=A.useState(()=>new t(i,a)),h=f.getOptimisticResult(a),p=!r&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(g=>{const v=p?f.subscribe(Ar.batchCalls(g)):fo;return f.updateResult(),v},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),A.useEffect(()=>{f.setOptions(a)},[a,f]),oU(a,h))throw HO(a,f,o);if(eU({result:h,errorResetBoundary:o,throwOnError:a.throwOnError,query:c,suspense:a.suspense}))throw h.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(a,h),a.experimental_prefetchInRender&&!ic&&rU(h,r)&&(u?HO(a,f,o):c?.promise)?.catch(fo).finally(()=>{f.updateResult()}),a.notifyOnChangeProps?h:f.trackResult(h)}function O3(e,t){return sU({...e,enabled:!0,suspense:!0,throwOnError:tU,placeholderData:void 0},z7)}function iU(e,t){const n=T3(),[r]=A.useState(()=>new B7(n,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const o=A.useSyncExternalStore(A.useCallback(a=>r.subscribe(Ar.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=A.useCallback((a,c)=>{r.mutate(a,c).catch(fo)},[r]);if(o.error&&Xx(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}const eE=cU();function Gn(e,...t){if(!eE)return;const n=lU(e,...t);performance.mark(n);try{console.log(e,...t)}catch{console.log(n)}}function aU(e,...t){eE&&console.warn(e,...t)}function lU(e,...t){return e.replace(/%[sfdO]/g,n=>{const r=t.shift();return n==="%O"&&r?JSON.stringify(r).replace(/"([^"]+)":/g,"$1:"):String(r)})}function cU(){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 uU={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 Gh(e){return`[nuqs] ${uU[e]}
|
|
10
|
+
See https://nuqs.dev/NUQS-${e}`}function fU(e){if(e.size===0)return"";const t=[];for(const[r,o]of e.entries()){const i=r.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");t.push(`${i}=${dU(o)}`)}return"?"+t.join("&")}function dU(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 lc=A.createContext({useAdapter(){throw new Error(Gh(404))}});lc.displayName="NuqsAdapterContext";eE&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==lc&&console.error(Gh(303)),window.__NuqsAdapterContext=lc);function hU(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...o})=>A.createElement(lc.Provider,{...o,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function pU(e){const t=A.useContext(lc);if(!("useAdapter"in t))throw new Error(Gh(404));return t.useAdapter(e)}const mU=()=>A.useContext(lc).defaultOptions,gU=()=>A.useContext(lc).processUrlSearchParams;function yU(){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 vU(e){return{method:"throttle",timeMs:e}}const rh=vU(yU());function bU(e){return e===null||Array.isArray(e)&&e.length===0}function SU(e,t,n){if(typeof e=="string")n.set(t,e);else{n.delete(t);for(const r of e)n.append(t,r);n.has(t)||n.set(t,"")}return n}function tE(){const e=new Map;return{on(t,n){const r=e.get(t)||[];return r.push(n),e.set(t,r),()=>this.off(t,n)},off(t,n){const r=e.get(t);r&&e.set(t,r.filter(o=>o!==n))},emit(t,n){e.get(t)?.forEach(r=>r(n))}}}function aw(e,t,n){function r(){e(),n.removeEventListener("abort",i)}const o=setTimeout(r,t);function i(){clearTimeout(o),n.removeEventListener("abort",i)}n.addEventListener("abort",i)}function lw(){const e=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let t=()=>{},n=()=>{};return{promise:new e((r,o)=>{t=r,n=o}),resolve:t,reject:n}}function wU(e,t){let n=t;for(let r=e.length-1;r>=0;r--){const o=e[r];if(!o)continue;const i=n;n=()=>o(i)}n()}function cw(){return new URLSearchParams(location.search)}var A3=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=rh.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:n},r=rh.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),Gn("[nuqs gtq] Enqueueing %s=%s %O",e,t,n),this.updateMap.set(e,t),n.history==="push"&&(this.options.history="push"),n.scroll&&(this.options.scroll=!0),n.shallow===!1&&(this.options.shallow=!1),n.startTransition&&this.transitions.add(n.startTransition),(!Number.isFinite(this.timeMs)||r>this.timeMs)&&(this.timeMs=r)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=cw}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=cw,rateLimitFactor:t=1,...n},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return Gn("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=lw();const o=()=>{this.lastFlushedAt=performance.now();const[a,c]=this.applyPendingUpdates({...n,autoResetQueueOnUpdate:n.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},r);c===null?(this.resolvers.resolve(a),this.resetQueueOnNextPush=!0):this.resolvers.reject(a),this.resolvers=null};return aw(()=>{const a=performance.now()-this.lastFlushedAt,c=this.timeMs,u=t*Math.max(0,c-a);Gn("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",u,c,t),u===0?o():aw(o,u,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 Gn("[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=rh.timeMs,e}applyPendingUpdates(e,t){const{updateUrl:n,getSearchParamsSnapshot:r}=e;let o=r();if(Gn("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,o.toString()),this.updateMap.size===0)return[o,null];const i=Array.from(this.updateMap.entries()),a={...this.options},c=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),Gn("[nuqs gtq] Flushing queue %O with options %O",i,a);for(const[u,f]of i)f===null?o.delete(u):o=SU(f,u,o);t&&(o=t(o));try{return wU(c,()=>{n(o,a)}),[o,null]}catch(u){return console.error(Gh(429),i.map(([f])=>f).join(),u),[o,u]}}};const Jg=new A3;function xU(e,t,n){const r=A.useCallback(()=>{const i=Object.fromEntries(e.map(a=>[a,n(a)]));return[JSON.stringify(i),i]},[e.join(","),n]),o=A.useRef(null);return o.current===null&&(o.current=r()),A.useSyncExternalStore(A.useCallback(i=>{const a=e.map(c=>t(c,i));return()=>a.forEach(c=>c())},[e.join(","),t]),()=>{const[i,a]=r();return o.current[0]===i?o.current[1]:(o.current=[i,a],a)},()=>o.current[1])}var EU=class{callback;resolvers=lw();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,aw(()=>{const n=this.resolvers;try{Gn("[nuqs dq] Flushing debounce queue",e);const r=this.callback(e);Gn("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=lw(),r.then(o=>n.resolve(o)).catch(o=>n.reject(o))}catch(r){this.queuedValue=void 0,n.reject(r)}},t,this.controller.signal),this.resolvers.promise}},_U=class{throttleQueue;queues=new Map;queuedQuerySync=tE();constructor(e=new A3){this.throttleQueue=e}useQueuedQueries(e){return xU(e,(t,n)=>this.queuedQuerySync.on(t,n),t=>this.getQueuedQuery(t))}push(e,t,n,r){if(!Number.isFinite(t)){const a=n.getSearchParamsSnapshot??cw;return Promise.resolve(a())}const o=e.key;if(!this.queues.has(o)){Gn("[nuqs dqc] Creating debounce queue for `%s`",o);const a=new EU(c=>(this.throttleQueue.push(c),this.throttleQueue.flush(n,r).finally(()=>{this.queues.get(c.key)?.queuedValue===void 0&&(Gn("[nuqs dqc] Cleaning up empty queue for `%s`",c.key),this.queues.delete(c.key)),this.queuedQuerySync.emit(c.key)})));this.queues.set(o,a)}Gn("[nuqs dqc] Enqueueing debounce update %O",e);const i=this.queues.get(o).push(e,t);return this.queuedQuerySync.emit(o),i}abort(e){const t=this.queues.get(e);return t?(Gn("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),n=>(n.then(t.resolvers.resolve,t.resolvers.reject),n)):n=>n}abortAll(){for(const[e,t]of this.queues.entries())Gn("[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 l1=new _U(Jg);function k3(e,t){return e===t?!0:e===null||t===null||typeof e=="string"||typeof t=="string"||e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function KO(e,t,n){return r=>{if(!(t.length===0||t.some(i=>!k3(r.getAll(i),e.getAll(i)))))return Gn("[nuqs `%s`] no change, returning previous",t.join(","),r),r;const o=M3(e,t,n);return Gn("[nuqs `%s`] subbed search params change\n from %O\n to %O",t.join(","),r,o),o}}function M3(e,t,n){if(t.length===0)return e;const r=n?new URLSearchParams(e):e;for(const o of e.keys())t.includes(o)||r.delete(o);return r}const CU="__nuqs__",uw=tE();function TU(e){return function(n,r){const o=new URL(location.href);o.search=fU(n),Gn("[nuqs react] Updating url: %s",o),e&&r.shallow===!1?(r.history==="push"?location.assign:location.replace).call(location,o):(r.history==="push"?history.pushState:history.replaceState).call(history,history.state,CU,o),uw.emit("update",n),r.scroll===!0&&window.scrollTo({top:0})}}const j3=A.createContext({fullPageNavigationOnShallowFalseUpdates:!1});function RU(e){const{fullPageNavigationOnShallowFalseUpdates:t}=A.useContext(j3),[n,r]=A.useState(()=>typeof location>"u"?new URLSearchParams:M3(new URLSearchParams(location.search),e,!1));return A.useEffect(()=>{const o=()=>{r(KO(new URLSearchParams(location.search),e,!1))},i=a=>{r(KO(a,e,!0))};return uw.on("update",i),window.addEventListener("popstate",o),()=>{uw.off("update",i),window.removeEventListener("popstate",o)}},[e.join("&")]),{searchParams:n,updateUrl:A.useMemo(()=>TU(t),[t])}}const OU=hU(RU);function AU({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return A.createElement(j3.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},A.createElement(OU,{...n,children:e}))}function kn(e,t="Assertion error"){if(!e)throw Error(t)}function Ju({group:e}){const{orientation:t,panels:n}=e;return n.reduce((r,o)=>(r+=t==="horizontal"?o.element.offsetWidth:o.element.offsetHeight,r),0)}function fw(e,t){return t.sort(e==="horizontal"?kU:MU)}function kU(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function MU(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function P3(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function N3(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 jU({orientation:e,rects:t,targetRect:n}){const r={x:n.x+n.width/2,y:n.y+n.height/2};let o,i=Number.MAX_VALUE;for(const a of t){const{x:c,y:u}=N3(r,a),f=e==="horizontal"?c:u;f<i&&(i=f,o=a)}return kn(o,"No rect found"),o}function D3(e){const{element:t,orientation:n,panels:r,separators:o}=e,i=fw(n,Array.from(t.children).filter(P3).map(h=>({element:h}))).map(({element:h})=>h),a=[];let c=!1,u,f=[];for(const h of i)if(h.hasAttribute("data-panel")){const p=r.find(g=>g.element===h);if(p){if(u){const g=u.element.getBoundingClientRect(),v=h.getBoundingClientRect();let y;if(c){const x=n==="horizontal"?new DOMRect(g.right,g.top,0,g.height):new DOMRect(g.left,g.bottom,g.width,0),w=n==="horizontal"?new DOMRect(v.left,v.top,0,v.height):new DOMRect(v.left,v.top,v.width,0);switch(f.length){case 0:{y=[x,w];break}case 1:{const T=f[0],b=jU({orientation:n,rects:[g,v],targetRect:T.element.getBoundingClientRect()});y=[T,b===g?w:x];break}default:{y=f;break}}}else f.length?y=f:y=[n==="horizontal"?new DOMRect(g.right,v.top,v.left-g.right,v.height):new DOMRect(v.left,g.bottom,v.width,v.top-g.bottom)];for(const x of y)a.push({group:e,groupSize:Ju({group:e}),panels:[u,p],separator:"width"in x?void 0:x,rect:"width"in x?x:x.element.getBoundingClientRect()})}c=!1,u=p,f=[]}}else if(h.hasAttribute("data-separator")){const p=o.find(g=>g.element===h);p?f.push(p):(u=void 0,f=[])}else c=!0;return a}function PU(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function NU(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function DU(e){return e/100*window.innerHeight}function $U(e){return e/100*window.innerWidth}function IU(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 $m({groupSize:e,panelElement:t,styleProp:n}){let r;const[o,i]=IU(n);switch(i){case"%":{r=o/100*e;break}case"px":{r=o;break}case"rem":{r=NU(t,o);break}case"em":{r=PU(t,o);break}case"vh":{r=DU(o);break}case"vw":{r=$U(o);break}}return r}function ks(e){return parseFloat(e.toFixed(3))}function GO(e){const{panels:t}=e,n=Ju({group:e});return n===0?t.map(r=>({collapsedSize:0,collapsible:r.panelConstraints.collapsible===!0,defaultSize:void 0,minSize:0,maxSize:100,panelId:r.id})):t.map(r=>{const{element:o,panelConstraints:i}=r;let a=0;if(i.collapsedSize!==void 0){const h=$m({groupSize:n,panelElement:o,styleProp:i.collapsedSize});a=ks(h/n*100)}let c;if(i.defaultSize!==void 0){const h=$m({groupSize:n,panelElement:o,styleProp:i.defaultSize});c=ks(h/n*100)}let u=0;if(i.minSize!==void 0){const h=$m({groupSize:n,panelElement:o,styleProp:i.minSize});u=ks(h/n*100)}let f=100;if(i.maxSize!==void 0){const h=$m({groupSize:n,panelElement:o,styleProp:i.maxSize});f=ks(h/n*100)}return{collapsedSize:a,collapsible:i.collapsible===!0,defaultSize:c,minSize:u,maxSize:f,panelId:r.id}})}class zU{#e={};addListener(t,n){const r=this.#e[t];return r===void 0?this.#e[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=this.#e[t];if(r!==void 0)if(r.length===1)r[0].call(null,n);else{let o=!1,i=null;const a=Array.from(r);for(let c=0;c<a.length;c++){const u=a[c];try{u.call(null,n)}catch(f){i===null&&(o=!0,i=f)}}if(o)throw i}}removeAllListeners(){this.#e={}}removeListener(t,n){const r=this.#e[t];if(r!==void 0){const o=r.indexOf(n);o>=0&&r.splice(o,1)}}}function ho(e,t,n=0){return Math.abs(ks(e)-ks(t))<=n}let rs={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const nc=new zU;function us(){return rs}function Eo(e){const t=typeof e=="function"?e(rs):e;if(rs===t)return rs;const n=rs;return rs={...rs,...t},t.cursorFlags!==void 0&&nc.emit("cursorFlagsChange",rs.cursorFlags),t.interactionState!==void 0&&nc.emit("interactionStateChange",rs.interactionState),t.mountedGroups!==void 0&&(rs.mountedGroups.forEach((r,o)=>{r.derivedPanelConstraints.forEach(i=>{if(i.collapsible){const{layout:a}=n.mountedGroups.get(o)??{};if(a){const c=ho(i.collapsedSize,r.layout[i.panelId]),u=ho(i.collapsedSize,a[i.panelId]);c&&!u&&(o.inMemoryLastExpandedPanelSizes[i.panelId]=a[i.panelId])}}})}),nc.emit("mountedGroupsChange",rs.mountedGroups)),rs}function LU(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function yh(e,t){return ho(e,t)?0:e>t?1:-1}function Ou({panelConstraints:e,size:t}){const{collapsedSize:n=0,collapsible:r,maxSize:o=100,minSize:i=0}=e;if(yh(t,i)<0)if(r){const a=(n+i)/2;yh(t,a)<0?t=n:t=i}else t=i;return t=Math.min(o,t),t=ks(t),t}function vh({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:i}){if(ho(e,0))return t;const a=Object.values(t),c=Object.values(o),u=[...a],[f,h]=r;kn(f!=null,"Invalid first pivot index"),kn(h!=null,"Invalid second pivot index");let p=0;if(i==="keyboard"){{const y=e<0?h:f,x=n[y];kn(x,`Panel constraints not found for index ${y}`);const{collapsedSize:w=0,collapsible:T,minSize:b=0}=x;if(T){const _=a[y];if(kn(_!=null,`Previous layout not found for panel index ${y}`),ho(_,w)){const S=b-_;yh(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}{const y=e<0?f:h,x=n[y];kn(x,`No panel constraints found for index ${y}`);const{collapsedSize:w=0,collapsible:T,minSize:b=0}=x;if(T){const _=a[y];if(kn(_!=null,`Previous layout not found for panel index ${y}`),ho(_,b)){const S=_-w;yh(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}}{const y=e<0?1:-1;let x=e<0?h:f,w=0;for(;;){const b=a[x];kn(b!=null,`Previous layout not found for panel index ${x}`);const _=Ou({panelConstraints:n[x],size:100})-b;if(w+=_,x+=y,x<0||x>=n.length)break}const T=Math.min(Math.abs(e),Math.abs(w));e=e<0?0-T:T}{let y=e<0?f:h;for(;y>=0&&y<n.length;){const x=Math.abs(e)-Math.abs(p),w=a[y];kn(w!=null,`Previous layout not found for panel index ${y}`);const T=w-x,b=Ou({panelConstraints:n[y],size:T});if(!ho(w,b)&&(p+=w-b,u[y]=b,p.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?y--:y++}}if(LU(c,u))return o;{const y=e<0?h:f,x=a[y];kn(x!=null,`Previous layout not found for panel index ${y}`);const w=x+p,T=Ou({panelConstraints:n[y],size:w});if(u[y]=T,!ho(T,w)){let b=w-T,_=e<0?h:f;for(;_>=0&&_<n.length;){const S=u[_];kn(S!=null,`Previous layout not found for panel index ${_}`);const C=S+b,E=Ou({panelConstraints:n[_],size:C});if(ho(S,E)||(b-=E-S,u[_]=E),ho(b,0))break;e>0?_--:_++}}}const g=Object.values(u).reduce((y,x)=>x+y,0);if(!ho(g,100,.1))return o;const v=Object.keys(o);return u.reduce((y,x,w)=>(y[v[w]]=x,y),{})}function ey(e){const{mountedGroups:t}=us();for(const[n]of t)if(n.separators.some(r=>r.element===e))return n;throw Error("Could not find parent Group for separator element")}function cc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||yh(e[n],t[n])!==0)return!1;return!0}function uc({layout:e,panelConstraints:t}){const n=[...Object.values(e)],r=n.reduce((a,c)=>a+c,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(a=>`${a}%`).join(", ")}`);if(!ho(r,100)&&n.length>0)for(let a=0;a<t.length;a++){const c=n[a];kn(c!=null,`No layout data found for index ${a}`);const u=100/r*c;n[a]=u}let o=0;for(let a=0;a<t.length;a++){const c=n[a];kn(c!=null,`No layout data found for index ${a}`);const u=Ou({panelConstraints:t[a],size:c});c!=u&&(o+=c-u,n[a]=u)}if(!ho(o,0))for(let a=0;a<t.length;a++){const c=n[a];kn(c!=null,`No layout data found for index ${a}`);const u=c+o,f=Ou({panelConstraints:t[a],size:u});if(c!==f&&(o-=f-c,n[a]=f,ho(o,0)))break}const i=Object.keys(e);return n.reduce((a,c,u)=>(a[i[u]]=c,a),{})}function $3({groupId:e}){const t=()=>{const{mountedGroups:n}=us();for(const[r,o]of n)if(r.id===e)return{group:r,...o};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:r}=t();return n?{}:r},setLayout(n){const{defaultLayoutDeferred:r,derivedPanelConstraints:o,group:i,layout:a,separatorToPanels:c}=t(),u=uc({layout:n,panelConstraints:o});return r?a:(cc(a,u)||Eo(f=>({mountedGroups:new Map(f.mountedGroups).set(i,{defaultLayoutDeferred:r,derivedPanelConstraints:o,layout:u,separatorToPanels:c})})),u)}}}function I3(e){const{mountedGroups:t}=us(),n=t.get(e);return kn(n,`Mounted Group ${e.id} not found`),n}function Ll(e,t){const n=ey(e),r=I3(n),o=n.separators.find(h=>h.element===e);kn(o,"Matching separator not found");const i=r.separatorToPanels.get(o);kn(i,"Matching panels not found");const a=i.map(h=>n.panels.indexOf(h)),c=$3({groupId:n.id}).getLayout(),u=vh({delta:t,initialLayout:c,panelConstraints:r.derivedPanelConstraints,pivotIndices:a,prevLayout:c,trigger:"keyboard"}),f=uc({layout:u,panelConstraints:r.derivedPanelConstraints});cc(c,f)||Eo(h=>({mountedGroups:new Map(h.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:f,separatorToPanels:r.separatorToPanels})}))}function ZO(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=ey(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&Ll(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&Ll(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&Ll(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&Ll(t,-5);break}case"End":{e.preventDefault(),Ll(t,100);break}case"Enter":{e.preventDefault();const r=ey(t),{derivedPanelConstraints:o,layout:i,separatorToPanels:a}=I3(r),c=r.separators.find(p=>p.element===t);kn(c,"Matching separator not found");const u=a.get(c);kn(u,"Matching panels not found");const f=u[0],h=o.find(p=>p.panelId===f.id);if(kn(h,"Panel metadata not found"),h.collapsible){const p=i[f.id],g=h.collapsedSize===p?r.inMemoryLastExpandedPanelSizes[f.id]??h.minSize:h.collapsedSize;Ll(t,g-p)}break}case"F6":{e.preventDefault();const r=ey(t).separators.map(a=>a.element),o=Array.from(r).findIndex(a=>a===e.currentTarget);kn(o!==null,"Index not found");const i=e.shiftKey?o>0?o-1:r.length-1:o+1<r.length?o+1:0;r[i].focus();break}case"Home":{e.preventDefault(),Ll(t,-100);break}}}const FU=e=>e,c1=()=>{},z3=1,L3=2,F3=4,U3=8,YO={coarse:10,precise:5};function UU(e,t,n){let r,o={x:1/0,y:1/0};for(const i of t){const a=N3(n,i.rect);switch(e){case"horizontal":{a.x<=o.x&&(r=i,o=a);break}case"vertical":{a.y<=o.y&&(r=i,o=a);break}}}return r?{distance:o,hitRegion:r}:void 0}let Im;function VU(){return Im===void 0&&(typeof matchMedia=="function"?Im=!!matchMedia("(pointer:coarse)").matches:Im=!1),Im}function qU(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function BU(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:QO(e),b:QO(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;kn(r,"Stacking order can only be calculated for elements with a common ancestor");const o={a:XO(WO(n.a)),b:XO(WO(n.b))};if(o.a===o.b){const i=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let c=i.length;for(;c--;){const u=i[c];if(u===a.a)return 1;if(u===a.b)return-1}}return Math.sign(o.a-o.b)}const HU=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function KU(e){const t=getComputedStyle(V3(e)??e).display;return t==="flex"||t==="inline-flex"}function GU(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||KU(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"||HU.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function WO(e){let t=e.length;for(;t--;){const n=e[t];if(kn(n,"Missing node"),GU(n))return n}return null}function XO(e){return e&&Number(getComputedStyle(e).zIndex)||0}function QO(e){const t=[];for(;e;)t.push(e),e=V3(e);return t}function V3(e){const{parentNode:t}=e;return qU(t)?t.host:t}function ZU(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 YU({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!P3(n)||n.contains(e)||e.contains(n))return!0;if(BU(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(ZU(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function q3(e,t){const n=[];return t.forEach((r,o)=>{if(o.disabled)return;const i=VU()?YO.coarse:YO.precise,a=D3(o),c=UU(o.orientation,a,{x:e.clientX,y:e.clientY});c&&c.distance.x<=i&&c.distance.y<=i&&YU({groupElement:o.element,hitRegion:c.hitRegion.rect,pointerEventTarget:e.target})&&n.push(c.hitRegion)}),n}function JO(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{mountedGroups:t}=us(),n=q3(e,t),r=new Set,o=new Set,i=new Set,a=new Map;let c=!1;n.forEach(u=>{r.add(u.group),u.panels.forEach(h=>{o.add(h)}),u.separator&&(i.add(u.separator),c||(c=!0,u.separator.element.focus()));const f=t.get(u.group);f&&a.set(u.group,f.layout)}),Eo({interactionState:{hitRegions:n,initialLayoutMap:a,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),n.length&&e.preventDefault()}function WU({cursorFlags:e,groups:t,state:n}){let r=0,o=0;switch(n){case"active":case"hover":t.forEach(i=>{if(!i.disableCursor)switch(i.orientation){case"horizontal":{r++;break}case"vertical":{o++;break}}})}if(r===0&&o===0)return null;switch(n){case"active":{const i=(e&z3)!==0,a=(e&L3)!==0,c=(e&F3)!==0,u=(e&U3)!==0;if(e){if(i)return c?"se-resize":u?"ne-resize":"e-resize";if(a)return c?"sw-resize":u?"nw-resize":"w-resize";if(c)return"s-resize";if(u)return"n-resize"}break}}return r>0&&o>0?"move":r>0?"ew-resize":"ns-resize"}const eA=new WeakMap;function nE(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=eA.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets=[n]);const{cursorFlags:r,interactionState:o}=us();switch(o.state){case"active":case"hover":{const i=WU({cursorFlags:r,groups:o.hitRegions.map(c=>c.group),state:o.state}),a=`*{cursor: ${i} !important; ${o.state==="active"?"touch-action: none;":""} }`;if(t===a)return;t=a,i?n.cssRules.length===0?n.insertRule(a):n.replaceSync(a):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}eA.set(e,{prevStyle:t,styleSheet:n})}function B3({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:o,pointerDownAtPoint:i}){let a=0;const c=new Map(o);n.forEach(u=>{const{group:f,groupSize:h}=u,{disableCursor:p,orientation:g,panels:v}=f;let y=0;i?g==="horizontal"?y=(t.clientX-i.x)/h*100:y=(t.clientY-i.y)/h*100:g==="horizontal"?y=t.clientX<0?-100:100:y=t.clientY<0?-100:100;const x=r.get(f),{defaultLayoutDeferred:w,derivedPanelConstraints:T,layout:b,separatorToPanels:_}=o.get(f)??{defaultLayoutDeferred:!1};if(T&&x&&b&&_){const S=vh({delta:y,initialLayout:x,panelConstraints:T,pivotIndices:u.panels.map(C=>v.indexOf(C)),prevLayout:b,trigger:"mouse-or-touch"});if(cc(S,b)){if(y!==0&&!p)switch(g){case"horizontal":{a|=y<0?z3:L3;break}case"vertical":{a|=y<0?F3:U3;break}}}else{c.set(u.group,{defaultLayoutDeferred:w,derivedPanelConstraints:T,layout:S,separatorToPanels:_});const C=u.group.panels.map(({id:E})=>E).join(",");u.group.inMemoryLayouts[C]=S}}}),Eo({cursorFlags:a,mountedGroups:c}),nE(e)}function tA(e){const{interactionState:t,mountedGroups:n}=us();t.state==="active"&&B3({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n})}function nA(e){if(e.defaultPrevented)return;const{interactionState:t,mountedGroups:n}=us();switch(t.state){case"active":{if(e.buttons===0){Eo(r=>r.interactionState.state==="inactive"?r:{cursorFlags:0,interactionState:{state:"inactive"}}),Eo(r=>({mountedGroups:new Map(r.mountedGroups)}));return}B3({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint});break}default:{const r=q3(e,n);r.length===0?t.state!=="inactive"&&Eo({interactionState:{state:"inactive"}}):Eo({interactionState:{hitRegions:r,state:"hover"}}),nE(e.currentTarget);break}}}function rA(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{interactionState:t}=us();t.state==="active"&&(Eo({cursorFlags:0,interactionState:{state:"inactive"}}),t.hitRegions.length>0&&(nE(e.currentTarget),Eo(n=>({mountedGroups:new Map(n.mountedGroups)})),e.preventDefault()))}function oA(e){let t=0,n=0;const r={};for(const i of e)if(i.defaultSize!==void 0){t++;const a=ks(i.defaultSize);n+=a,r[i.panelId]=a}else r[i.panelId]=void 0;const o=e.length-t;if(o!==0){const i=ks((100-n)/o);for(const a of e)a.defaultSize===void 0&&(r[a.panelId]=i)}return r}function XU(e,t,n){if(!n[0])return;const r=e.panels.find(u=>u.element===t);if(!r||!r.onResize)return;const o=Ju({group:e}),i=e.orientation==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,a=r.mutableValues.prevSize,c={asPercentage:ks(i/o*100),inPixels:i};r.mutableValues.prevSize=c,r.onResize(c,r.id,a)}function QU(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function JU(e,t){const n=e.map(o=>o.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!r.includes(o))return!1;return!0}const du=new Map;function eV(e){let t=!0;kn(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,o=new Set,i=new n(y=>{for(const x of y){const{borderBoxSize:w,target:T}=x;if(T===e.element){if(t){if(Ju({group:e})===0)return;Eo(b=>{const _=b.mountedGroups.get(e);if(_){const S=GO(e),C=_.defaultLayoutDeferred?oA(S):_.layout,E=uc({layout:C,panelConstraints:S});return!_.defaultLayoutDeferred&&cc(C,E)&&QU(_.derivedPanelConstraints,S)?b:{mountedGroups:new Map(b.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:S,layout:E,separatorToPanels:_.separatorToPanels})}}return b})}}else XU(e,T,w)}});i.observe(e.element),e.panels.forEach(y=>{kn(!r.has(y.id),`Panel ids must be unique; id "${y.id}" was used more than once`),r.add(y.id),y.onResize&&i.observe(y.element)});const a=Ju({group:e}),c=GO(e),u=e.panels.map(({id:y})=>y).join(",");let f=e.defaultLayout;f&&(JU(e.panels,f)||(f=void 0));const h=e.inMemoryLayouts[u]??f??oA(c),p=uc({layout:h,panelConstraints:c}),g=D3(e),v=e.element.ownerDocument;return Eo(y=>{const x=new Map;return du.set(v,(du.get(v)??0)+1),g.forEach(w=>{w.separator&&x.set(w.separator,w.panels)}),{mountedGroups:new Map(y.mountedGroups).set(e,{defaultLayoutDeferred:a===0,derivedPanelConstraints:c,layout:p,separatorToPanels:x})}}),e.separators.forEach(y=>{kn(!o.has(y.id),`Separator ids must be unique; id "${y.id}" was used more than once`),o.add(y.id),y.element.addEventListener("keydown",ZO)}),du.get(v)===1&&(v.addEventListener("pointerdown",JO,!0),v.addEventListener("pointerleave",tA),v.addEventListener("pointermove",nA),v.addEventListener("pointerup",rA,!0)),function(){t=!1,du.set(v,Math.max(0,(du.get(v)??0)-1)),Eo(y=>{const x=new Map(y.mountedGroups);return x.delete(e),{mountedGroups:x}}),e.separators.forEach(y=>{y.element.removeEventListener("keydown",ZO)}),du.get(v)||(v.removeEventListener("pointerdown",JO,!0),v.removeEventListener("pointerleave",tA),v.removeEventListener("pointermove",nA),v.removeEventListener("pointerup",rA,!0)),i.disconnect()}}function H3(){const[e,t]=A.useState({}),n=A.useCallback(()=>t({}),[]);return[e,n]}function rE(e){const t=A.useId();return`${e??t}`}const bc=typeof window<"u"?A.useLayoutEffect:A.useEffect;function oh(e){const t=A.useRef(e);return bc(()=>{t.current=e},[e]),A.useCallback((...n)=>t.current?.(...n),[t])}function oE(...e){return oh(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function tV(e){const t=A.useRef({...e});return bc(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const K3=A.createContext(null);function nV(e,t){const n=A.useRef({getLayout:()=>({}),setLayout:FU});A.useImperativeHandle(t,()=>n.current,[]),bc(()=>{Object.assign(n.current,$3({groupId:e}))})}function Au({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:o,elementRef:i,groupRef:a,id:c,onLayoutChange:u,onLayoutChanged:f,orientation:h="horizontal",style:p,...g}){const v=A.useRef({onLayoutChange:{},onLayoutChanged:{}}),y=oh($=>{cc(v.current.onLayoutChange,$)||(v.current.onLayoutChange=$,u?.($))}),x=oh($=>{cc(v.current.onLayoutChanged,$)||(v.current.onLayoutChanged=$,f?.($))}),w=rE(c),T=A.useRef(null),[b,_]=H3(),S=A.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],separators:[]}),C=oE(T,i);nV(w,a);const E=oh(($,I)=>{const{interactionState:L,mountedGroups:F}=us();for(const J of F.keys())if(J.id===$){const ee=F.get(J);if(ee){let Z=!1;return L.state==="active"&&(Z=L.hitRegions.some(H=>H.group===J)),{flexGrow:ee.layout[I]??1,pointerEvents:Z?"none":void 0}}}return{flexGrow:n?.[I]??1}}),O=A.useMemo(()=>({getPanelStyles:E,id:w,orientation:h,registerPanel:$=>{const I=S.current;return I.panels=fw(h,[...I.panels,$]),_(),()=>{I.panels=I.panels.filter(L=>L!==$),_()}},registerSeparator:$=>{const I=S.current;return I.separators=fw(h,[...I.separators,$]),_(),()=>{I.separators=I.separators.filter(L=>L!==$),_()}}}),[E,w,_,h]),j=tV({defaultLayout:n,disableCursor:r}),P=A.useRef(null);return bc(()=>{const $=T.current;if($===null)return;const I=S.current,L={defaultLayout:j.defaultLayout,disableCursor:!!j.disableCursor,disabled:!!o,element:$,id:w,inMemoryLastExpandedPanelSizes:S.current.lastExpandedPanelSizes,inMemoryLayouts:S.current.layouts,orientation:h,panels:I.panels,separators:I.separators};P.current=L;const F=eV(L),J=us().mountedGroups.get(L);if(J){const{defaultLayoutDeferred:H,derivedPanelConstraints:V,layout:oe}=J;!H&&V.length>0&&(y(oe),x(oe),I.panels.forEach(ne=>{ne.scheduleUpdate()}))}const ee=nc.addListener("interactionStateChange",()=>{I.panels.forEach(H=>{H.scheduleUpdate()})}),Z=nc.addListener("mountedGroupsChange",H=>{const V=H.get(L);if(V){const{defaultLayoutDeferred:oe,derivedPanelConstraints:ne,layout:D}=V;if(oe||ne.length===0)return;const{interactionState:q}=us(),U=q.state!=="active";y(D),U&&x(D),I.panels.forEach(N=>{N.scheduleUpdate()})}});return()=>{P.current=null,F(),ee(),Z()}},[o,w,x,y,h,b,j]),A.useEffect(()=>{const $=P.current;$&&($.defaultLayout=n,$.disableCursor=!!r)}),M.jsx(K3.Provider,{value:O,children:M.jsx("div",{...g,"aria-orientation":h,className:t,"data-group":!0,"data-testid":w,id:w,ref:C,style:{height:"100%",width:"100%",overflow:"hidden",...p,display:"flex",flexDirection:h==="horizontal"?"row":"column",flexWrap:"nowrap"},children:e})})}Au.displayName="Group";function u1(e,t){return`react-resizable-panels:${[e,...t].join(":")}`}function Zd({debounceSaveMs:e=100,panelIds:t,storage:n=localStorage,...r}){const o=t!==void 0,i="id"in r?r.id:r.groupId,a=u1(i,t??[]),c=A.useSyncExternalStore(rV,()=>n.getItem(a),()=>n.getItem(a)),u=A.useMemo(()=>c?JSON.parse(c):void 0,[c]),f=A.useRef(null),h=A.useCallback(()=>{const v=f.current;v&&(f.current=null,clearTimeout(v))},[]);A.useLayoutEffect(()=>()=>{h()},[h]);const p=A.useCallback(v=>{h();let y;o?y=u1(i,Object.keys(v)):y=u1(i,[]);try{n.setItem(y,JSON.stringify(v))}catch(x){console.error(x)}},[h,o,i,n]),g=A.useCallback(v=>{h(),e===0?p(v):f.current=setTimeout(()=>{p(v)},e)},[h,e,p]);return{defaultLayout:u,onLayoutChange:g,onLayoutChanged:p}}function rV(){return function(){}}function sE(){const e=A.useContext(K3);return kn(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function oV({groupId:e,panelId:t}){const n=()=>{const{mountedGroups:c}=us();for(const[u,{defaultLayoutDeferred:f,derivedPanelConstraints:h,layout:p,separatorToPanels:g}]of c)if(u.id===e)return{defaultLayoutDeferred:f,derivedPanelConstraints:h,group:u,layout:p,separatorToPanels:g};throw Error(`Group ${e} not found`)},r=()=>{const c=n().derivedPanelConstraints.find(u=>u.panelId===t);if(c!==void 0)return c;throw Error(`Panel constraints not found for Panel ${t}`)},o=()=>{const c=n().group.panels.find(u=>u.id===t);if(c!==void 0)return c;throw Error(`Layout not found for Panel ${t}`)},i=()=>{const c=n().layout[t];if(c!==void 0)return c;throw Error(`Layout not found for Panel ${t}`)},a=c=>{const u=i();if(c===u)return;const{defaultLayoutDeferred:f,derivedPanelConstraints:h,group:p,layout:g,separatorToPanels:v}=n(),y=p.panels.findIndex(b=>b.id===t),x=y===p.panels.length-1,w=vh({delta:x?u-c:c-u,initialLayout:g,panelConstraints:h,pivotIndices:x?[y-1,y]:[y,y+1],prevLayout:g,trigger:"imperative-api"}),T=uc({layout:w,panelConstraints:h});cc(g,T)||Eo(b=>({mountedGroups:new Map(b.mountedGroups).set(p,{defaultLayoutDeferred:f,derivedPanelConstraints:h,layout:T,separatorToPanels:v})}))};return{collapse:()=>{const{collapsible:c,collapsedSize:u}=r(),{mutableValues:f}=o(),h=i();c&&h!==u&&(f.expandToSize=h,a(u))},expand:()=>{const{collapsible:c,collapsedSize:u,minSize:f}=r(),{mutableValues:h}=o(),p=i();if(c&&p===u){let g=h.expandToSize??f;g===0&&(g=1),a(g)}},getSize:()=>{const{group:c}=n(),u=i(),{element:f}=o(),h=c.orientation==="horizontal"?f.offsetWidth:f.offsetHeight;return{asPercentage:u,inPixels:h}},isCollapsed:()=>{const{collapsible:c,collapsedSize:u}=r(),f=i();return c&&ho(u,f)},resize:c=>{if(i()!==c){let u;switch(typeof c){case"number":{const{group:f}=n(),h=Ju({group:f});u=ks(c/h*100);break}case"string":{u=parseFloat(c);break}}a(u)}}}}function sV(e,t){const{id:n}=sE(),r=A.useRef({collapse:c1,expand:c1,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:c1});A.useImperativeHandle(t,()=>r.current,[]),bc(()=>{Object.assign(r.current,oV({groupId:n,panelId:e}))})}function As({children:e,className:t,collapsedSize:n="0%",collapsible:r=!1,defaultSize:o,elementRef:i,id:a,maxSize:c="100%",minSize:u="0%",onResize:f,panelRef:h,style:p,...g}){const v=!!a,y=rE(a),x=A.useRef(null),w=oE(x,i),[,T]=H3(),{getPanelStyles:b,id:_,registerPanel:S}=sE(),C=f!==null,E=oh((j,P,$)=>{f?.(j,a,$)});bc(()=>{const j=x.current;if(j!==null)return S({element:j,id:y,idIsStable:v,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:C?E:void 0,panelConstraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:c,minSize:u},scheduleUpdate:T})},[n,r,o,T,C,y,v,c,u,E,S]),sV(y,h);const O=b(_,y);return M.jsx("div",{...g,"data-panel":!0,"data-testid":y,id:y,ref:w,style:{...iV,flexBasis:0,flexShrink:1,overflow:"hidden",...O},children:M.jsx("div",{className:t,style:{width:"100%",height:"100%",...p},children:e})})}As.displayName="Panel";const iV={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function aV({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let o,i;const a=e[n],c=t.find(u=>u.panelId===n);if(c){const u=c.maxSize,f=i=c.collapsible?c.collapsedSize:c.minSize,h=[r,r+1];i=uc({layout:vh({delta:f-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e,trigger:"keyboard"}),panelConstraints:t})[n],o=uc({layout:vh({delta:u-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e,trigger:"keyboard"}),panelConstraints:t})[n]}return{valueControls:n,valueMax:o,valueMin:i,valueNow:a}}function ku({children:e,className:t,elementRef:n,id:r,style:o,...i}){const a=rE(r),[c,u]=A.useState({}),[f,h]=A.useState("inactive"),p=A.useRef(null),g=oE(p,n),{id:v,orientation:y,registerSeparator:x}=sE(),w=y==="horizontal"?"vertical":"horizontal";return bc(()=>{const T=p.current;if(T!==null){const b={element:T,id:a},_=x(b),S=nc.addListener("interactionStateChange",E=>{h(E.state!=="inactive"&&E.hitRegions.some(O=>O.separator===b)?E.state:"inactive")}),C=nc.addListener("mountedGroupsChange",E=>{E.forEach(({derivedPanelConstraints:O,layout:j,separatorToPanels:P},$)=>{if($.id===v){const I=P.get(b);if(I){const L=I[0],F=$.panels.indexOf(L);u(aV({layout:j,panelConstraints:O,panelId:L.id,panelIndex:F}))}}})});return()=>{S(),C(),_()}}},[v,a,x]),M.jsx("div",{...i,"aria-controls":c.valueControls,"aria-orientation":w,"aria-valuemax":c.valueMax,"aria-valuemin":c.valueMin,"aria-valuenow":c.valueNow,children:e,className:t,"data-separator":f,"data-testid":a,id:a,ref:g,role:"separator",style:{flexBasis:"auto",...o,flexGrow:0,flexShrink:0},tabIndex:0})}ku.displayName="Separator";var G3=typeof global=="object"&&global&&global.Object===Object&&global,lV=typeof self=="object"&&self&&self.Object===Object&&self,ai=G3||lV||Function("return this")(),ds=ai.Symbol,Z3=Object.prototype,cV=Z3.hasOwnProperty,uV=Z3.toString,zd=ds?ds.toStringTag:void 0;function fV(e){var t=cV.call(e,zd),n=e[zd];try{e[zd]=void 0;var r=!0}catch{}var o=uV.call(e);return r&&(t?e[zd]=n:delete e[zd]),o}var dV=Object.prototype,hV=dV.toString;function pV(e){return hV.call(e)}var mV="[object Null]",gV="[object Undefined]",sA=ds?ds.toStringTag:void 0;function Ki(e){return e==null?e===void 0?gV:mV:sA&&sA in Object(e)?fV(e):pV(e)}function hs(e){return e!=null&&typeof e=="object"}var yV="[object Symbol]";function Zh(e){return typeof e=="symbol"||hs(e)&&Ki(e)==yV}function xf(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var Pr=Array.isArray,iA=ds?ds.prototype:void 0,aA=iA?iA.toString:void 0;function Y3(e){if(typeof e=="string")return e;if(Pr(e))return xf(e,Y3)+"";if(Zh(e))return aA?aA.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var vV=/\s/;function bV(e){for(var t=e.length;t--&&vV.test(e.charAt(t)););return t}var SV=/^\s+/;function wV(e){return e&&e.slice(0,bV(e)+1).replace(SV,"")}function nn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var lA=NaN,xV=/^[-+]0x[0-9a-f]+$/i,EV=/^0b[01]+$/i,_V=/^0o[0-7]+$/i,CV=parseInt;function TV(e){if(typeof e=="number")return e;if(Zh(e))return lA;if(nn(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=nn(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=wV(e);var n=EV.test(e);return n||_V.test(e)?CV(e.slice(2),n?2:8):xV.test(e)?lA:+e}var cA=1/0,RV=17976931348623157e292;function OV(e){if(!e)return e===0?e:0;if(e=TV(e),e===cA||e===-cA){var t=e<0?-1:1;return t*RV}return e===e?e:0}function W3(e){var t=OV(e),n=t%1;return t===t?n?t-n:t:0}function a0(e){return e}var AV="[object AsyncFunction]",kV="[object Function]",MV="[object GeneratorFunction]",jV="[object Proxy]";function Yh(e){if(!nn(e))return!1;var t=Ki(e);return t==kV||t==MV||t==AV||t==jV}var f1=ai["__core-js_shared__"],uA=(function(){var e=/[^.]+$/.exec(f1&&f1.keys&&f1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function PV(e){return!!uA&&uA in e}var NV=Function.prototype,DV=NV.toString;function Sc(e){if(e!=null){try{return DV.call(e)}catch{}try{return e+""}catch{}}return""}var $V=/[\\^$.*+?()[\]{}|]/g,IV=/^\[object .+?Constructor\]$/,zV=Function.prototype,LV=Object.prototype,FV=zV.toString,UV=LV.hasOwnProperty,VV=RegExp("^"+FV.call(UV).replace($V,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qV(e){if(!nn(e)||PV(e))return!1;var t=Yh(e)?VV:IV;return t.test(Sc(e))}function BV(e,t){return e?.[t]}function wc(e,t){var n=BV(e,t);return qV(n)?n:void 0}var dw=wc(ai,"WeakMap"),fA=Object.create,X3=(function(){function e(){}return function(t){if(!nn(t))return{};if(fA)return fA(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function HV(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ty(){}function iE(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var KV=800,GV=16,ZV=Date.now;function YV(e){var t=0,n=0;return function(){var r=ZV(),o=GV-(r-n);if(n=r,o>0){if(++t>=KV)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function WV(e){return function(){return e}}var Ey=(function(){try{var e=wc(Object,"defineProperty");return e({},"",{}),e}catch{}})(),XV=Ey?function(e,t){return Ey(e,"toString",{configurable:!0,enumerable:!1,value:WV(t),writable:!0})}:a0,Q3=YV(XV);function aE(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function QV(e,t,n,r){for(var o=e.length,i=n+-1;++i<o;)if(t(e[i],i,e))return i;return-1}function JV(e){return e!==e}function eq(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}function J3(e,t,n){return t===t?eq(e,t,n):QV(e,JV,n)}function lE(e,t){var n=e==null?0:e.length;return!!n&&J3(e,t,0)>-1}var tq=9007199254740991,nq=/^(?:0|[1-9]\d*)$/;function l0(e,t){var n=typeof e;return t=t??tq,!!t&&(n=="number"||n!="symbol"&&nq.test(e))&&e>-1&&e%1==0&&e<t}function cE(e,t,n){t=="__proto__"&&Ey?Ey(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Wh(e,t){return e===t||e!==e&&t!==t}var rq=Object.prototype,oq=rq.hasOwnProperty;function c0(e,t,n){var r=e[t];(!(oq.call(e,t)&&Wh(r,n))||n===void 0&&!(t in e))&&cE(e,t,n)}function xc(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var c=t[i],u=void 0;u===void 0&&(u=e[c]),o?cE(n,c,u):c0(n,c,u)}return n}var dA=Math.max;function eN(e,t,n){return t=dA(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=dA(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=n(a),HV(e,this,c)}}function u0(e,t){return Q3(eN(e,t,a0),e+"")}var sq=9007199254740991;function uE(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sq}function cl(e){return e!=null&&uE(e.length)&&!Yh(e)}function iq(e,t,n){if(!nn(n))return!1;var r=typeof t;return(r=="number"?cl(n)&&l0(t,n.length):r=="string"&&t in n)?Wh(n[t],e):!1}function tN(e){return u0(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&iq(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var c=n[r];c&&e(t,c,r,i)}return t})}var aq=Object.prototype;function Xh(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||aq;return e===n}function nN(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var lq="[object Arguments]";function hA(e){return hs(e)&&Ki(e)==lq}var rN=Object.prototype,cq=rN.hasOwnProperty,uq=rN.propertyIsEnumerable,ef=hA((function(){return arguments})())?hA:function(e){return hs(e)&&cq.call(e,"callee")&&!uq.call(e,"callee")};function fq(){return!1}var oN=typeof Vo=="object"&&Vo&&!Vo.nodeType&&Vo,pA=oN&&typeof qo=="object"&&qo&&!qo.nodeType&&qo,dq=pA&&pA.exports===oN,mA=dq?ai.Buffer:void 0,hq=mA?mA.isBuffer:void 0,fc=hq||fq,pq="[object Arguments]",mq="[object Array]",gq="[object Boolean]",yq="[object Date]",vq="[object Error]",bq="[object Function]",Sq="[object Map]",wq="[object Number]",xq="[object Object]",Eq="[object RegExp]",_q="[object Set]",Cq="[object String]",Tq="[object WeakMap]",Rq="[object ArrayBuffer]",Oq="[object DataView]",Aq="[object Float32Array]",kq="[object Float64Array]",Mq="[object Int8Array]",jq="[object Int16Array]",Pq="[object Int32Array]",Nq="[object Uint8Array]",Dq="[object Uint8ClampedArray]",$q="[object Uint16Array]",Iq="[object Uint32Array]",Ln={};Ln[Aq]=Ln[kq]=Ln[Mq]=Ln[jq]=Ln[Pq]=Ln[Nq]=Ln[Dq]=Ln[$q]=Ln[Iq]=!0;Ln[pq]=Ln[mq]=Ln[Rq]=Ln[gq]=Ln[Oq]=Ln[yq]=Ln[vq]=Ln[bq]=Ln[Sq]=Ln[wq]=Ln[xq]=Ln[Eq]=Ln[_q]=Ln[Cq]=Ln[Tq]=!1;function zq(e){return hs(e)&&uE(e.length)&&!!Ln[Ki(e)]}function fE(e){return function(t){return e(t)}}var sN=typeof Vo=="object"&&Vo&&!Vo.nodeType&&Vo,sh=sN&&typeof qo=="object"&&qo&&!qo.nodeType&&qo,Lq=sh&&sh.exports===sN,d1=Lq&&G3.process,tf=(function(){try{var e=sh&&sh.require&&sh.require("util").types;return e||d1&&d1.binding&&d1.binding("util")}catch{}})(),gA=tf&&tf.isTypedArray,Qh=gA?fE(gA):zq,Fq=Object.prototype,Uq=Fq.hasOwnProperty;function iN(e,t){var n=Pr(e),r=!n&&ef(e),o=!n&&!r&&fc(e),i=!n&&!r&&!o&&Qh(e),a=n||r||o||i,c=a?nN(e.length,String):[],u=c.length;for(var f in e)(t||Uq.call(e,f))&&!(a&&(f=="length"||o&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||l0(f,u)))&&c.push(f);return c}function aN(e,t){return function(n){return e(t(n))}}var Vq=aN(Object.keys,Object),qq=Object.prototype,Bq=qq.hasOwnProperty;function lN(e){if(!Xh(e))return Vq(e);var t=[];for(var n in Object(e))Bq.call(e,n)&&n!="constructor"&&t.push(n);return t}function as(e){return cl(e)?iN(e):lN(e)}var Hq=Object.prototype,Kq=Hq.hasOwnProperty,Gq=tN(function(e,t){if(Xh(t)||cl(t)){xc(t,as(t),e);return}for(var n in t)Kq.call(t,n)&&c0(e,n,t[n])});function Zq(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Yq=Object.prototype,Wq=Yq.hasOwnProperty;function Xq(e){if(!nn(e))return Zq(e);var t=Xh(e),n=[];for(var r in e)r=="constructor"&&(t||!Wq.call(e,r))||n.push(r);return n}function Jh(e){return cl(e)?iN(e,!0):Xq(e)}var Qq=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jq=/^\w*$/;function dE(e,t){if(Pr(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Zh(e)?!0:Jq.test(e)||!Qq.test(e)||t!=null&&e in Object(t)}var bh=wc(Object,"create");function eB(){this.__data__=bh?bh(null):{},this.size=0}function tB(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var nB="__lodash_hash_undefined__",rB=Object.prototype,oB=rB.hasOwnProperty;function sB(e){var t=this.__data__;if(bh){var n=t[e];return n===nB?void 0:n}return oB.call(t,e)?t[e]:void 0}var iB=Object.prototype,aB=iB.hasOwnProperty;function lB(e){var t=this.__data__;return bh?t[e]!==void 0:aB.call(t,e)}var cB="__lodash_hash_undefined__";function uB(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=bh&&t===void 0?cB:t,this}function dc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}dc.prototype.clear=eB;dc.prototype.delete=tB;dc.prototype.get=sB;dc.prototype.has=lB;dc.prototype.set=uB;function fB(){this.__data__=[],this.size=0}function f0(e,t){for(var n=e.length;n--;)if(Wh(e[n][0],t))return n;return-1}var dB=Array.prototype,hB=dB.splice;function pB(e){var t=this.__data__,n=f0(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():hB.call(t,n,1),--this.size,!0}function mB(e){var t=this.__data__,n=f0(t,e);return n<0?void 0:t[n][1]}function gB(e){return f0(this.__data__,e)>-1}function yB(e,t){var n=this.__data__,r=f0(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Gi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Gi.prototype.clear=fB;Gi.prototype.delete=pB;Gi.prototype.get=mB;Gi.prototype.has=gB;Gi.prototype.set=yB;var Sh=wc(ai,"Map");function vB(){this.size=0,this.__data__={hash:new dc,map:new(Sh||Gi),string:new dc}}function bB(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function d0(e,t){var n=e.__data__;return bB(t)?n[typeof t=="string"?"string":"hash"]:n.map}function SB(e){var t=d0(this,e).delete(e);return this.size-=t?1:0,t}function wB(e){return d0(this,e).get(e)}function xB(e){return d0(this,e).has(e)}function EB(e,t){var n=d0(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Zi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zi.prototype.clear=vB;Zi.prototype.delete=SB;Zi.prototype.get=wB;Zi.prototype.has=xB;Zi.prototype.set=EB;var _B="Expected a function";function hE(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(_B);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(hE.Cache||Zi),n}hE.Cache=Zi;var CB=500;function TB(e){var t=hE(e,function(r){return n.size===CB&&n.clear(),r}),n=t.cache;return t}var RB=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,OB=/\\(\\)?/g,cN=TB(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(RB,function(n,r,o,i){t.push(o?i.replace(OB,"$1"):r||n)}),t});function pE(e){return e==null?"":Y3(e)}function Ef(e,t){return Pr(e)?e:dE(e,t)?[e]:cN(pE(e))}function Ec(e){if(typeof e=="string"||Zh(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function h0(e,t){t=Ef(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Ec(t[n++])];return n&&n==r?e:void 0}function Ie(e,t,n){var r=e==null?void 0:h0(e,t);return r===void 0?n:r}function mE(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var yA=ds?ds.isConcatSpreadable:void 0;function AB(e){return Pr(e)||ef(e)||!!(yA&&e&&e[yA])}function ep(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=AB),o||(o=[]);++i<a;){var c=e[i];t>0&&n(c)?t>1?ep(c,t-1,n,r,o):mE(o,c):r||(o[o.length]=c)}return o}function hw(e){var t=e==null?0:e.length;return t?ep(e,1):[]}function uN(e){return Q3(eN(e,void 0,hw),e+"")}var p0=aN(Object.getPrototypeOf,Object),kB="[object Object]",MB=Function.prototype,jB=Object.prototype,fN=MB.toString,PB=jB.hasOwnProperty,NB=fN.call(Object);function Ya(e){if(!hs(e)||Ki(e)!=kB)return!1;var t=p0(e);if(t===null)return!0;var n=PB.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&fN.call(n)==NB}function DB(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}function $B(e,t,n,r){var o=-1,i=e==null?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function IB(){this.__data__=new Gi,this.size=0}function zB(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function LB(e){return this.__data__.get(e)}function FB(e){return this.__data__.has(e)}var UB=200;function VB(e,t){var n=this.__data__;if(n instanceof Gi){var r=n.__data__;if(!Sh||r.length<UB-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Zi(r)}return n.set(e,t),this.size=n.size,this}function Ms(e){var t=this.__data__=new Gi(e);this.size=t.size}Ms.prototype.clear=IB;Ms.prototype.delete=zB;Ms.prototype.get=LB;Ms.prototype.has=FB;Ms.prototype.set=VB;function qB(e,t){return e&&xc(t,as(t),e)}function BB(e,t){return e&&xc(t,Jh(t),e)}var dN=typeof Vo=="object"&&Vo&&!Vo.nodeType&&Vo,vA=dN&&typeof qo=="object"&&qo&&!qo.nodeType&&qo,HB=vA&&vA.exports===dN,bA=HB?ai.Buffer:void 0,SA=bA?bA.allocUnsafe:void 0;function hN(e,t){if(t)return e.slice();var n=e.length,r=SA?SA(n):new e.constructor(n);return e.copy(r),r}function KB(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function pN(){return[]}var GB=Object.prototype,ZB=GB.propertyIsEnumerable,wA=Object.getOwnPropertySymbols,gE=wA?function(e){return e==null?[]:(e=Object(e),KB(wA(e),function(t){return ZB.call(e,t)}))}:pN;function YB(e,t){return xc(e,gE(e),t)}var WB=Object.getOwnPropertySymbols,mN=WB?function(e){for(var t=[];e;)mE(t,gE(e)),e=p0(e);return t}:pN;function XB(e,t){return xc(e,mN(e),t)}function gN(e,t,n){var r=t(e);return Pr(e)?r:mE(r,n(e))}function pw(e){return gN(e,as,gE)}function yE(e){return gN(e,Jh,mN)}var mw=wc(ai,"DataView"),gw=wc(ai,"Promise"),Uu=wc(ai,"Set"),xA="[object Map]",QB="[object Object]",EA="[object Promise]",_A="[object Set]",CA="[object WeakMap]",TA="[object DataView]",JB=Sc(mw),eH=Sc(Sh),tH=Sc(gw),nH=Sc(Uu),rH=Sc(dw),is=Ki;(mw&&is(new mw(new ArrayBuffer(1)))!=TA||Sh&&is(new Sh)!=xA||gw&&is(gw.resolve())!=EA||Uu&&is(new Uu)!=_A||dw&&is(new dw)!=CA)&&(is=function(e){var t=Ki(e),n=t==QB?e.constructor:void 0,r=n?Sc(n):"";if(r)switch(r){case JB:return TA;case eH:return xA;case tH:return EA;case nH:return _A;case rH:return CA}return t});var oH=Object.prototype,sH=oH.hasOwnProperty;function iH(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&sH.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var _y=ai.Uint8Array;function vE(e){var t=new e.constructor(e.byteLength);return new _y(t).set(new _y(e)),t}function aH(e,t){var n=t?vE(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var lH=/\w*$/;function cH(e){var t=new e.constructor(e.source,lH.exec(e));return t.lastIndex=e.lastIndex,t}var RA=ds?ds.prototype:void 0,OA=RA?RA.valueOf:void 0;function uH(e){return OA?Object(OA.call(e)):{}}function yN(e,t){var n=t?vE(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var fH="[object Boolean]",dH="[object Date]",hH="[object Map]",pH="[object Number]",mH="[object RegExp]",gH="[object Set]",yH="[object String]",vH="[object Symbol]",bH="[object ArrayBuffer]",SH="[object DataView]",wH="[object Float32Array]",xH="[object Float64Array]",EH="[object Int8Array]",_H="[object Int16Array]",CH="[object Int32Array]",TH="[object Uint8Array]",RH="[object Uint8ClampedArray]",OH="[object Uint16Array]",AH="[object Uint32Array]";function kH(e,t,n){var r=e.constructor;switch(t){case bH:return vE(e);case fH:case dH:return new r(+e);case SH:return aH(e,n);case wH:case xH:case EH:case _H:case CH:case TH:case RH:case OH:case AH:return yN(e,n);case hH:return new r;case pH:case yH:return new r(e);case mH:return cH(e);case gH:return new r;case vH:return uH(e)}}function vN(e){return typeof e.constructor=="function"&&!Xh(e)?X3(p0(e)):{}}var MH="[object Map]";function jH(e){return hs(e)&&is(e)==MH}var AA=tf&&tf.isMap,PH=AA?fE(AA):jH,NH="[object Set]";function DH(e){return hs(e)&&is(e)==NH}var kA=tf&&tf.isSet,$H=kA?fE(kA):DH,IH=1,zH=2,LH=4,bN="[object Arguments]",FH="[object Array]",UH="[object Boolean]",VH="[object Date]",qH="[object Error]",SN="[object Function]",BH="[object GeneratorFunction]",HH="[object Map]",KH="[object Number]",wN="[object Object]",GH="[object RegExp]",ZH="[object Set]",YH="[object String]",WH="[object Symbol]",XH="[object WeakMap]",QH="[object ArrayBuffer]",JH="[object DataView]",eK="[object Float32Array]",tK="[object Float64Array]",nK="[object Int8Array]",rK="[object Int16Array]",oK="[object Int32Array]",sK="[object Uint8Array]",iK="[object Uint8ClampedArray]",aK="[object Uint16Array]",lK="[object Uint32Array]",jn={};jn[bN]=jn[FH]=jn[QH]=jn[JH]=jn[UH]=jn[VH]=jn[eK]=jn[tK]=jn[nK]=jn[rK]=jn[oK]=jn[HH]=jn[KH]=jn[wN]=jn[GH]=jn[ZH]=jn[YH]=jn[WH]=jn[sK]=jn[iK]=jn[aK]=jn[lK]=!0;jn[qH]=jn[SN]=jn[XH]=!1;function ih(e,t,n,r,o,i){var a,c=t&IH,u=t&zH,f=t&LH;if(n&&(a=o?n(e,r,o,i):n(e)),a!==void 0)return a;if(!nn(e))return e;var h=Pr(e);if(h){if(a=iH(e),!c)return iE(e,a)}else{var p=is(e),g=p==SN||p==BH;if(fc(e))return hN(e,c);if(p==wN||p==bN||g&&!o){if(a=u||g?{}:vN(e),!c)return u?XB(e,BB(a,e)):YB(e,qB(a,e))}else{if(!jn[p])return o?e:{};a=kH(e,p,c)}}i||(i=new Ms);var v=i.get(e);if(v)return v;i.set(e,a),$H(e)?e.forEach(function(w){a.add(ih(w,t,n,w,e,i))}):PH(e)&&e.forEach(function(w,T){a.set(T,ih(w,t,n,T,e,i))});var y=f?u?yE:pw:u?Jh:as,x=h?void 0:y(e);return aE(x||e,function(w,T){x&&(T=w,w=e[T]),c0(a,T,ih(w,t,n,T,e,i))}),a}var cK=1,uK=4;function tp(e){return ih(e,cK|uK)}var fK="__lodash_hash_undefined__";function dK(e){return this.__data__.set(e,fK),this}function hK(e){return this.__data__.has(e)}function hc(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Zi;++t<n;)this.add(e[t])}hc.prototype.add=hc.prototype.push=dK;hc.prototype.has=hK;function pK(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function wh(e,t){return e.has(t)}var mK=1,gK=2;function xN(e,t,n,r,o,i){var a=n&mK,c=e.length,u=t.length;if(c!=u&&!(a&&u>c))return!1;var f=i.get(e),h=i.get(t);if(f&&h)return f==t&&h==e;var p=-1,g=!0,v=n&gK?new hc:void 0;for(i.set(e,t),i.set(t,e);++p<c;){var y=e[p],x=t[p];if(r)var w=a?r(x,y,p,t,e,i):r(y,x,p,e,t,i);if(w!==void 0){if(w)continue;g=!1;break}if(v){if(!pK(t,function(T,b){if(!wh(v,b)&&(y===T||o(y,T,n,r,i)))return v.push(b)})){g=!1;break}}else if(!(y===x||o(y,x,n,r,i))){g=!1;break}}return i.delete(e),i.delete(t),g}function yK(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function bE(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var vK=1,bK=2,SK="[object Boolean]",wK="[object Date]",xK="[object Error]",EK="[object Map]",_K="[object Number]",CK="[object RegExp]",TK="[object Set]",RK="[object String]",OK="[object Symbol]",AK="[object ArrayBuffer]",kK="[object DataView]",MA=ds?ds.prototype:void 0,h1=MA?MA.valueOf:void 0;function MK(e,t,n,r,o,i,a){switch(n){case kK:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case AK:return!(e.byteLength!=t.byteLength||!i(new _y(e),new _y(t)));case SK:case wK:case _K:return Wh(+e,+t);case xK:return e.name==t.name&&e.message==t.message;case CK:case RK:return e==t+"";case EK:var c=yK;case TK:var u=r&vK;if(c||(c=bE),e.size!=t.size&&!u)return!1;var f=a.get(e);if(f)return f==t;r|=bK,a.set(e,t);var h=xN(c(e),c(t),r,o,i,a);return a.delete(e),h;case OK:if(h1)return h1.call(e)==h1.call(t)}return!1}var jK=1,PK=Object.prototype,NK=PK.hasOwnProperty;function DK(e,t,n,r,o,i){var a=n&jK,c=pw(e),u=c.length,f=pw(t),h=f.length;if(u!=h&&!a)return!1;for(var p=u;p--;){var g=c[p];if(!(a?g in t:NK.call(t,g)))return!1}var v=i.get(e),y=i.get(t);if(v&&y)return v==t&&y==e;var x=!0;i.set(e,t),i.set(t,e);for(var w=a;++p<u;){g=c[p];var T=e[g],b=t[g];if(r)var _=a?r(b,T,g,t,e,i):r(T,b,g,e,t,i);if(!(_===void 0?T===b||o(T,b,n,r,i):_)){x=!1;break}w||(w=g=="constructor")}if(x&&!w){var S=e.constructor,C=t.constructor;S!=C&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof C=="function"&&C instanceof C)&&(x=!1)}return i.delete(e),i.delete(t),x}var $K=1,jA="[object Arguments]",PA="[object Array]",zm="[object Object]",IK=Object.prototype,NA=IK.hasOwnProperty;function zK(e,t,n,r,o,i){var a=Pr(e),c=Pr(t),u=a?PA:is(e),f=c?PA:is(t);u=u==jA?zm:u,f=f==jA?zm:f;var h=u==zm,p=f==zm,g=u==f;if(g&&fc(e)){if(!fc(t))return!1;a=!0,h=!1}if(g&&!h)return i||(i=new Ms),a||Qh(e)?xN(e,t,n,r,o,i):MK(e,t,u,n,r,o,i);if(!(n&$K)){var v=h&&NA.call(e,"__wrapped__"),y=p&&NA.call(t,"__wrapped__");if(v||y){var x=v?e.value():e,w=y?t.value():t;return i||(i=new Ms),o(x,w,n,r,i)}}return g?(i||(i=new Ms),DK(e,t,n,r,o,i)):!1}function np(e,t,n,r,o){return e===t?!0:e==null||t==null||!hs(e)&&!hs(t)?e!==e&&t!==t:zK(e,t,n,r,np,o)}var LK=1,FK=2;function UK(e,t,n,r){var o=n.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var a=n[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){a=n[o];var c=a[0],u=e[c],f=a[1];if(a[2]){if(u===void 0&&!(c in e))return!1}else{var h=new Ms,p;if(!(p===void 0?np(f,u,LK|FK,r,h):p))return!1}}return!0}function EN(e){return e===e&&!nn(e)}function VK(e){for(var t=as(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,EN(o)]}return t}function _N(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function qK(e){var t=VK(e);return t.length==1&&t[0][2]?_N(t[0][0],t[0][1]):function(n){return n===e||UK(n,e,t)}}function BK(e,t){return e!=null&&t in Object(e)}function CN(e,t,n){t=Ef(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=Ec(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&uE(o)&&l0(a,o)&&(Pr(e)||ef(e)))}function TN(e,t){return e!=null&&CN(e,t,BK)}var HK=1,KK=2;function GK(e,t){return dE(e)&&EN(t)?_N(Ec(e),t):function(n){var r=Ie(n,e);return r===void 0&&r===t?TN(n,e):np(t,r,HK|KK)}}function ZK(e){return function(t){return t?.[e]}}function YK(e){return function(t){return h0(t,e)}}function WK(e){return dE(e)?ZK(Ec(e)):YK(e)}function SE(e){return typeof e=="function"?e:e==null?a0:typeof e=="object"?Pr(e)?GK(e[0],e[1]):qK(e):WK(e)}function XK(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),c=a.length;c--;){var u=a[++o];if(n(i[u],u,i)===!1)break}return t}}var RN=XK();function ON(e,t){return e&&RN(e,t,as)}function QK(e,t){return function(n,r){if(n==null)return n;if(!cl(n))return e(n,r);for(var o=n.length,i=-1,a=Object(n);++i<o&&r(a[i],i,a)!==!1;);return n}}var AN=QK(ON);function yw(e,t,n){(n!==void 0&&!Wh(e[t],n)||n===void 0&&!(t in e))&&cE(e,t,n)}function xh(e){return hs(e)&&cl(e)}function vw(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function JK(e){return xc(e,Jh(e))}function eG(e,t,n,r,o,i,a){var c=vw(e,n),u=vw(t,n),f=a.get(u);if(f){yw(e,n,f);return}var h=i?i(c,u,n+"",e,t,a):void 0,p=h===void 0;if(p){var g=Pr(u),v=!g&&fc(u),y=!g&&!v&&Qh(u);h=u,g||v||y?Pr(c)?h=c:xh(c)?h=iE(c):v?(p=!1,h=hN(u,!0)):y?(p=!1,h=yN(u,!0)):h=[]:Ya(u)||ef(u)?(h=c,ef(c)?h=JK(c):(!nn(c)||Yh(c))&&(h=vN(u))):p=!1}p&&(a.set(u,h),o(h,u,r,i,a),a.delete(u)),yw(e,n,h)}function kN(e,t,n,r,o){e!==t&&RN(t,function(i,a){if(o||(o=new Ms),nn(i))eG(e,t,a,n,kN,r,o);else{var c=r?r(vw(e,a),i,a+"",e,t,o):void 0;c===void 0&&(c=i),yw(e,a,c)}},Jh)}var tG=200;function nG(e,t,n,r){var o=-1,i=lE,a=!0,c=e.length,u=[],f=t.length;if(!c)return u;t.length>=tG&&(i=wh,a=!1,t=new hc(t));e:for(;++o<c;){var h=e[o],p=h;if(h=h!==0?h:0,a&&p===p){for(var g=f;g--;)if(t[g]===p)continue e;u.push(h)}else i(t,p,r)||u.push(h)}return u}var rG=u0(function(e,t){return xh(e)?nG(e,ep(t,1,xh,!0)):[]});function MN(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function jN(e){return typeof e=="function"?e:a0}function oG(e,t){var n=Pr(e)?aE:AN;return n(e,jN(t))}var sG=1/0;function iG(e){var t=e==null?0:e.length;return t?ep(e,sG):[]}var aG=Object.prototype,lG=aG.hasOwnProperty;function cG(e,t){return e!=null&&lG.call(e,t)}function Wt(e,t){return e!=null&&CN(e,t,cG)}var uG="[object String]";function Wa(e){return typeof e=="string"||!Pr(e)&&hs(e)&&Ki(e)==uG}function fG(e,t){return xf(t,function(n){return e[n]})}function dG(e){return e==null?[]:fG(e,as(e))}var hG=Math.max;function pG(e,t,n,r){e=cl(e)?e:dG(e),n=n?W3(n):0;var o=e.length;return n<0&&(n=hG(o+n,0)),Wa(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&J3(e,t,n)>-1}var mG=Math.min;function gG(e,t,n){for(var r=lE,o=e[0].length,i=e.length,a=i,c=Array(i),u=1/0,f=[];a--;){var h=e[a];u=mG(h.length,u),c[a]=o>=120&&h.length>=120?new hc(a&&h):void 0}h=e[0];var p=-1,g=c[0];e:for(;++p<o&&f.length<u;){var v=h[p],y=v;if(v=v!==0?v:0,!(g?wh(g,y):r(f,y))){for(a=i;--a;){var x=c[a];if(!(x?wh(x,y):r(e[a],y)))continue e}g&&g.push(y),f.push(v)}}return f}function yG(e){return xh(e)?e:[]}var DA=u0(function(e){var t=xf(e,yG);return t.length&&t[0]===e[0]?gG(t):[]});function vG(e,t){return t.length<2?e:h0(e,DB(t,0,-1))}var bG="[object Map]",SG="[object Set]",wG=Object.prototype,xG=wG.hasOwnProperty;function ur(e){if(e==null)return!0;if(cl(e)&&(Pr(e)||typeof e=="string"||typeof e.splice=="function"||fc(e)||Qh(e)||ef(e)))return!e.length;var t=is(e);if(t==bG||t==SG)return!e.size;if(Xh(e))return!lN(e).length;for(var n in e)if(xG.call(e,n))return!1;return!0}function La(e,t){return np(e,t)}function EG(e,t,n){n=typeof n=="function"?n:void 0;var r=n?n(e,t):void 0;return r===void 0?np(e,t,void 0,n):!!r}var _G="[object Number]";function PN(e){return typeof e=="number"||hs(e)&&Ki(e)==_G}function Cy(e){return e==null}function NN(e){return e===void 0}var CG=tN(function(e,t,n){kN(e,t,n)}),TG=Object.prototype,RG=TG.hasOwnProperty;function DN(e,t){t=Ef(t,e);var n=-1,r=t.length;if(!r)return!0;for(var o=e==null||typeof e!="object"&&typeof e!="function";++n<r;){var i=t[n];if(typeof i=="string"){if(i==="__proto__"&&!RG.call(e,"__proto__"))return!1;if(i==="constructor"&&n+1<r&&typeof t[n+1]=="string"&&t[n+1]==="prototype"){if(o&&n===0)continue;return!1}}}var a=vG(e,t);return a==null||delete a[Ec(MN(t))]}function OG(e){return Ya(e)?void 0:e}var AG=1,kG=2,MG=4,Eh=uN(function(e,t){var n={};if(e==null)return n;var r=!1;t=xf(t,function(i){return i=Ef(i,e),r||(r=i.length>1),i}),xc(e,yE(e),n),r&&(n=ih(n,AG|kG|MG,OG));for(var o=t.length;o--;)DN(n,t[o]);return n});function wE(e,t,n,r){if(!nn(e))return e;t=Ef(t,e);for(var o=-1,i=t.length,a=i-1,c=e;c!=null&&++o<i;){var u=Ec(t[o]),f=n;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(o!=a){var h=c[u];f=r?r(h,u,c):void 0,f===void 0&&(f=nn(h)?h:l0(t[o+1])?[]:{})}c0(c,u,f),c=c[u]}return e}function $N(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],c=h0(e,a);n(c,a)&&wE(i,Ef(a,e),c)}return i}function jG(e,t){if(e==null)return{};var n=xf(yE(e),function(r){return[r]});return t=SE(t),$N(e,n,function(r,o){return t(r,o[0])})}function PG(e,t){return $N(e,t,function(n,r){return TN(e,r)})}var xE=uN(function(e,t){return e==null?{}:PG(e,t)});function NG(e,t,n,r,o){return o(e,function(i,a,c){n=r?(r=!1,i):t(n,i,a,c)}),n}function DG(e,t,n){var r=Pr(e)?$B:NG,o=arguments.length<3;return r(e,SE(t),n,o,AN)}function mn(e,t,n){return e==null?e:wE(e,t,n)}function $G(e,t,n,r){return r=typeof r=="function"?r:void 0,e==null?e:wE(e,t,n,r)}var IG=9007199254740991,p1=4294967295,zG=Math.min;function IN(e,t){if(e=W3(e),e<1||e>IG)return[];var n=p1,r=zG(e,p1);t=jN(t),e-=p1;for(var o=nN(r,t);++n<e;)t(n);return o}function zN(e){return Pr(e)?xf(e,Ec):Zh(e)?[e]:iE(cN(pE(e)))}function LG(e,t,n){var r=Pr(e),o=r||fc(e)||Qh(e);if(t=SE(t),n==null){var i=e&&e.constructor;o?n=r?new i:[]:nn(e)?n=Yh(i)?X3(p0(e)):{}:n={}}return(o?aE:ON)(e,function(a,c,u){return t(n,a,c,u)}),n}var FG=1/0,UG=Uu&&1/bE(new Uu([,-0]))[1]==FG?function(e){return new Uu(e)}:ty,VG=200;function LN(e,t,n){var r=-1,o=lE,i=e.length,a=!0,c=[],u=c;if(i>=VG){var f=UG(e);if(f)return bE(f);a=!1,o=wh,u=new hc}else u=c;e:for(;++r<i;){var h=e[r],p=h;if(h=h!==0?h:0,a&&p===p){for(var g=u.length;g--;)if(u[g]===p)continue e;c.push(h)}else o(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}var qG=u0(function(e){return LN(ep(e,1,xh,!0))});function FN(e){return e&&e.length?LN(e):[]}var BG=0;function UN(e){var t=++BG;return pE(e)+t}function HG(e,t){return e==null?!0:DN(e,t)}const $A=e=>{let t;const n=new Set,r=(f,h)=>{const p=typeof f=="function"?f(t):f;if(!Object.is(p,t)){const g=t;t=h??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(v=>v(t,g))}},o=()=>t,c={setState:r,getState:o,getInitialState:()=>u,subscribe:f=>(n.add(f),()=>n.delete(f))},u=t=e(r,o,c);return c},KG=(e=>e?$A(e):$A),GG=e=>e;function ZG(e,t=GG){const n=zo.useSyncExternalStore(e.subscribe,zo.useCallback(()=>t(e.getState()),[e,t]),zo.useCallback(()=>t(e.getInitialState()),[e,t]));return zo.useDebugValue(n),n}const YG=e=>{const t=KG(e),n=r=>ZG(t,r);return Object.assign(n,t),n},WG=(e=>YG),_f=WG()(e=>({tools:{},setToolData:(t,n)=>e(r=>Lm(r,`tools.${t}`,{...r.tools[t],...n})),updateOpenaiObject:(t,n,r)=>e(o=>o.tools[t]?.openaiObject?Lm(o,`tools.${t}.openaiObject.${n}`,r):o),pushOpenAiLog:(t,n)=>e(r=>{const o=r.tools[t]?.openaiLogs||[];return Lm(r,`tools.${t}.openaiLogs`,[...o,{...n,id:crypto.randomUUID()}])}),setOpenInAppUrl:(t,n)=>e(r=>Lm(r,`tools.${t}.openInAppUrl`,n))})),Cf=e=>{const{tools:t}=_f();return t[e]},Lm=(e,t,n)=>{const r=tp(e);return mn(r,t,n),r};function VN(e,t,n){try{return e(t)}catch(r){return aU("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":""),t,r,n),null}}function Yi(e){function t(n){if(typeof n>"u")return null;let r="";if(Array.isArray(n)){if(n[0]===void 0)return null;r=n[0]}return typeof n=="string"&&(r=n),VN(e.parse,r)}return{type:"single",eq:(n,r)=>n===r,...e,parseServerSide:t,withDefault(n){return{...this,defaultValue:n,parseServerSide(r){return t(r)??n}}},withOptions(n){return{...this,...n}}}}const XG=Yi({parse:e=>e,serialize:String});Yi({parse:e=>{const t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});Yi({parse:e=>{const t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)});Yi({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}});Yi({parse:e=>{const t=parseFloat(e);return t==t?t:null},serialize:String});Yi({parse:e=>e.toLowerCase()==="true",serialize:String});function EE(e,t){return e.valueOf()===t.valueOf()}Yi({parse:e=>{const t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:EE});Yi({parse:e=>{const t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:EE});Yi({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:EE});const m1=tE(),QG={};function JG(e,t={}){const n=A.useId(),r=mU(),o=gU(),{history:i="replace",scroll:a=r?.scroll??!1,shallow:c=r?.shallow??!0,throttleMs:u=rh.timeMs,limitUrlUpdates:f=r?.limitUrlUpdates,clearOnDefault:h=r?.clearOnDefault??!0,startTransition:p,urlKeys:g=QG}=t,v=Object.keys(e).join(","),y=A.useMemo(()=>Object.fromEntries(Object.keys(e).map(j=>[j,g[j]??j])),[v,JSON.stringify(g)]),x=pU(Object.values(y)),w=x.searchParams,T=A.useRef({}),b=A.useMemo(()=>Object.fromEntries(Object.keys(e).map(j=>[j,e[j].defaultValue??null])),[Object.values(e).map(({defaultValue:j})=>j).join(",")]),_=l1.useQueuedQueries(Object.values(y)),[S,C]=A.useState(()=>g1(e,g,w??new URLSearchParams,_).state),E=A.useRef(S);if(Gn("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,v,S,w),Object.keys(T.current).join("&")!==Object.values(y).join("&")){const{state:j,hasChanged:P}=g1(e,g,w,_,T.current,E.current);P&&(Gn("[nuq+ %s `%s`] State changed: %O",n,v,{state:j,initialSearchParams:w,queuedQueries:_,queryRef:T.current,stateRef:E.current}),E.current=j,C(j)),T.current=Object.fromEntries(Object.entries(y).map(([$,I])=>[I,e[$]?.type==="multi"?w?.getAll(I):w?.get(I)??null]))}A.useEffect(()=>{const{state:j,hasChanged:P}=g1(e,g,w,_,T.current,E.current);P&&(Gn("[nuq+ %s `%s`] State changed: %O",n,v,{state:j,initialSearchParams:w,queuedQueries:_,queryRef:T.current,stateRef:E.current}),E.current=j,C(j))},[Object.values(y).map(j=>`${j}=${w?.getAll(j)}`).join("&"),JSON.stringify(_)]),A.useEffect(()=>{const j=Object.keys(e).reduce((P,$)=>(P[$]=({state:I,query:L})=>{C(F=>{const{defaultValue:J}=e[$],ee=y[$],Z=I??J??null,H=F[$]??J??null;return Object.is(H,Z)?(Gn("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,v,ee,I,J,E.current),F):(E.current={...E.current,[$]:Z},T.current[ee]=L,Gn("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,v,ee,I,J,E.current),E.current)})},P),{});for(const P of Object.keys(e)){const $=y[P];Gn("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,$,v),m1.on($,j[P])}return()=>{for(const P of Object.keys(e)){const $=y[P];Gn("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,$,v),m1.off($,j[P])}}},[v,y]);const O=A.useCallback((j,P={})=>{const $=Object.fromEntries(Object.keys(e).map(H=>[H,null])),I=typeof j=="function"?j(IA(E.current,b))??$:j??$;Gn("[nuq+ %s `%s`] setState: %O",n,v,I);let L,F=0,J=!1;const ee=[];for(let[H,V]of Object.entries(I)){const oe=e[H],ne=y[H];if(!oe||V===void 0)continue;(P.clearOnDefault??oe.clearOnDefault??h)&&V!==null&&oe.defaultValue!==void 0&&(oe.eq??((U,N)=>U===N))(V,oe.defaultValue)&&(V=null);const D=V===null?null:(oe.serialize??String)(V);m1.emit(ne,{state:V,query:D});const q={key:ne,query:D,options:{history:P.history??oe.history??i,shallow:P.shallow??oe.shallow??c,scroll:P.scroll??oe.scroll??a,startTransition:P.startTransition??oe.startTransition??p}};if(P?.limitUrlUpdates?.method==="debounce"||f?.method==="debounce"||oe.limitUrlUpdates?.method==="debounce"){q.options.shallow===!0&&console.warn(Gh(422));const U=P?.limitUrlUpdates?.timeMs??f?.timeMs??oe.limitUrlUpdates?.timeMs??rh.timeMs,N=l1.push(q,U,x,o);F<U&&(L=N,F=U)}else{const U=P?.limitUrlUpdates?.timeMs??oe?.limitUrlUpdates?.timeMs??f?.timeMs??P.throttleMs??oe.throttleMs??u;ee.push(l1.abort(ne)),Jg.push(q,U),J=!0}}const Z=ee.reduce((H,V)=>V(H),J?Jg.flush(x,o):Jg.getPendingPromise(x));return L??Z},[v,i,c,a,u,f?.method,f?.timeMs,p,y,x.updateUrl,x.getSearchParamsSnapshot,x.rateLimitFactor,o,b]);return[A.useMemo(()=>IA(S,b),[S,b]),O]}function g1(e,t,n,r,o,i){let a=!1;const c=Object.entries(e).reduce((u,[f,h])=>{const p=t?.[f]??f,g=r[p],v=h.type==="multi"?[]:null,y=g===void 0?(h.type==="multi"?n?.getAll(p):n?.get(p))??v:g;return o&&i&&k3(o[p]??v,y)?(u[f]=i[f]??null,u):(a=!0,u[f]=(bU(y)?null:VN(h.parse,y,p))??null,o&&(o[p]=y),u)},{});if(!a){const u=Object.keys(e),f=Object.keys(i??{});a=u.length!==f.length||u.some(h=>!f.includes(h))}return{state:c,hasChanged:a}}function IA(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function eZ(e,t={}){const{parse:n,type:r,serialize:o,eq:i,defaultValue:a,...c}=t,[{[e]:u},f]=JG({[e]:{parse:n??(h=>h),type:r,serialize:o,eq:i,defaultValue:a}},c);return[u,A.useCallback((h,p={})=>f(g=>({[e]:typeof h=="function"?h(g[e]):h}),p),[e,f])]}function _E(){return eZ("tool",XG)}const tZ=Object.freeze({status:"aborted"});function ke(e,t,n){function r(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);const f=a.prototype,h=Object.keys(f);for(let p=0;p<h.length;p++){const g=h[p];g in c||(c[g]=f[g].bind(c))}}const o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function a(c){var u;const f=n?.Parent?new i:this;r(f,c),(u=f._zod).deferred??(u.deferred=[]);for(const h of f._zod.deferred)h();return f}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class Vu extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class qN extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const BN={};function Xa(e){return BN}function HN(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function bw(e,t){return typeof t=="bigint"?t.toString():t}function m0(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function CE(e){return e==null}function TE(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function nZ(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const u=r.match(/\d?e-(\d?)/);u?.[1]&&(o=Number.parseInt(u[1]))}const i=n>o?n:o,a=Number.parseInt(e.toFixed(i).replace(".","")),c=Number.parseInt(t.toFixed(i).replace(".",""));return a%c/10**i}const zA=Symbol("evaluating");function gn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==zA)return r===void 0&&(r=zA,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function _c(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ul(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function LA(e){return JSON.stringify(e)}function rZ(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const KN="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function _h(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const oZ=m0(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function nf(e){if(_h(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(_h(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function GN(e){return nf(e)?{...e}:Array.isArray(e)?[...e]:e}const sZ=new Set(["string","number","symbol"]);function rf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fl(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function st(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function iZ(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const aZ={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 lZ(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=ul(e._zod.def,{get shape(){const a={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(a[c]=n.shape[c])}return _c(this,"shape",a),a},checks:[]});return fl(e,i)}function cZ(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=ul(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete a[c]}return _c(this,"shape",a),a},checks:[]});return fl(e,i)}function uZ(e,t){if(!nf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=ul(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return _c(this,"shape",i),i}});return fl(e,o)}function fZ(e,t){if(!nf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ul(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return _c(this,"shape",r),r}});return fl(e,n)}function dZ(e,t){const n=ul(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return _c(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return fl(e,n)}function hZ(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=ul(t._zod.def,{get shape(){const c=t._zod.def.shape,u={...c};if(n)for(const f in n){if(!(f in c))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(u[f]=e?new e({type:"optional",innerType:c[f]}):c[f])}else for(const f in c)u[f]=e?new e({type:"optional",innerType:c[f]}):c[f];return _c(this,"shape",u),u},checks:[]});return fl(t,a)}function pZ(e,t,n){const r=ul(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(const a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return _c(this,"shape",i),i}});return fl(t,r)}function Mu(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ju(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Fm(e){return typeof e=="string"?e:e?.message}function Qa(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Fm(e.inst?._zod.def?.error?.(e))??Fm(t?.error?.(e))??Fm(n.customError?.(e))??Fm(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function RE(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ch(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const ZN=(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,bw,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},YN=ke("$ZodError",ZN),WN=ke("$ZodError",ZN,{Parent:Error});function mZ(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function gZ(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>r({issues:a}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let a=n,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(t(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return r(e),n}const OE=e=>(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Vu;if(a.issues.length){const c=new(o?.Err??e)(a.issues.map(u=>Qa(u,i,Xa())));throw KN(c,o?.callee),c}return a.value},AE=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const c=new(o?.Err??e)(a.issues.map(u=>Qa(u,i,Xa())));throw KN(c,o?.callee),c}return a.value},g0=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Vu;return i.issues.length?{success:!1,error:new(e??YN)(i.issues.map(a=>Qa(a,o,Xa())))}:{success:!0,data:i.value}},XN=g0(WN),y0=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>Qa(a,o,Xa())))}:{success:!0,data:i.value}},yZ=y0(WN),vZ=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return OE(e)(t,n,o)},bZ=e=>(t,n,r)=>OE(e)(t,n,r),SZ=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return AE(e)(t,n,o)},wZ=e=>async(t,n,r)=>AE(e)(t,n,r),xZ=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return g0(e)(t,n,o)},EZ=e=>(t,n,r)=>g0(e)(t,n,r),_Z=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return y0(e)(t,n,o)},CZ=e=>async(t,n,r)=>y0(e)(t,n,r),TZ=/^[cC][^\s-]{8,}$/,RZ=/^[0-9a-z]+$/,OZ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,AZ=/^[0-9a-vA-V]{20}$/,kZ=/^[A-Za-z0-9]{27}$/,MZ=/^[a-zA-Z0-9_-]{21}$/,jZ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,PZ=/^([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})$/,FA=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,NZ=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,DZ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function $Z(){return new RegExp(DZ,"u")}const IZ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zZ=/^(([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}|:))$/,LZ=/^((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])$/,FZ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,UZ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,QN=/^[A-Za-z0-9_-]*$/,VZ=/^\+[1-9]\d{6,14}$/,JN="(?:(?:\\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])))",qZ=new RegExp(`^${JN}$`);function e4(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 BZ(e){return new RegExp(`^${e4(e)}$`)}function HZ(e){const t=e4({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${JN}T(?:${r})$`)}const KZ=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},GZ=/^-?\d+$/,t4=/^-?\d+(?:\.\d+)?$/,ZZ=/^(?:true|false)$/i,YZ=/^null$/i,WZ=/^[^A-Z]*$/,XZ=/^[^a-z]*$/,To=ke("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),n4={number:"number",bigint:"bigint",object:"date"},r4=ke("$ZodCheckLessThan",(e,t)=>{To.init(e,t);const n=n4[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),o4=ke("$ZodCheckGreaterThan",(e,t)=>{To.init(e,t);const n=n4[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),QZ=ke("$ZodCheckMultipleOf",(e,t)=>{To.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):nZ(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),JZ=ke("$ZodCheckNumberFormat",(e,t)=>{To.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=aZ[t.format];e._zod.onattach.push(a=>{const c=a._zod.bag;c.format=t.format,c.minimum=o,c.maximum=i,n&&(c.pattern=GZ)}),e._zod.check=a=>{const c=a.value;if(n){if(!Number.isInteger(c)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>i&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),eY=ke("$ZodCheckMaxLength",(e,t)=>{var n;To.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!CE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const a=RE(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),tY=ke("$ZodCheckMinLength",(e,t)=>{var n;To.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!CE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const a=RE(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),nY=ke("$ZodCheckLengthEquals",(e,t)=>{var n;To.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!CE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===t.length)return;const a=RE(o),c=i>t.length;r.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),v0=ke("$ZodCheckStringFormat",(e,t)=>{var n,r;To.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),rY=ke("$ZodCheckRegex",(e,t)=>{v0.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),oY=ke("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=WZ),v0.init(e,t)}),sY=ke("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=XZ),v0.init(e,t)}),iY=ke("$ZodCheckIncludes",(e,t)=>{To.init(e,t);const n=rf(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),aY=ke("$ZodCheckStartsWith",(e,t)=>{To.init(e,t);const n=new RegExp(`^${rf(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),lY=ke("$ZodCheckEndsWith",(e,t)=>{To.init(e,t);const n=new RegExp(`.*${rf(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),cY=ke("$ZodCheckOverwrite",(e,t)=>{To.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class uY{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 r=t.split(`
|
|
11
|
+
`).filter(a=>a),o=Math.min(...r.map(a=>a.length-a.trimStart().length)),i=r.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(const a of i)this.content.push(a)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,o.join(`
|
|
12
|
+
`))}}const fY={major:4,minor:3,patch:5},qn=ke("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=fY;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const i of o._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(a,c,u)=>{let f=Mu(a),h;for(const p of c){if(p._zod.def.when){if(!p._zod.def.when(a))continue}else if(f)continue;const g=a.issues.length,v=p._zod.check(a);if(v instanceof Promise&&u?.async===!1)throw new Vu;if(h||v instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await v,a.issues.length!==g&&(f||(f=Mu(a,g)))});else{if(a.issues.length===g)continue;f||(f=Mu(a,g))}}return h?h.then(()=>a):a},i=(a,c,u)=>{if(Mu(a))return a.aborted=!0,a;const f=o(c,r,u);if(f instanceof Promise){if(u.async===!1)throw new Vu;return f.then(h=>e._zod.parse(h,u))}return e._zod.parse(f,u)};e._zod.run=(a,c)=>{if(c.skipChecks)return e._zod.parse(a,c);if(c.direction==="backward"){const f=e._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return f instanceof Promise?f.then(h=>i(h,a,c)):i(f,a,c)}const u=e._zod.parse(a,c);if(u instanceof Promise){if(c.async===!1)throw new Vu;return u.then(f=>o(f,r,c))}return o(u,r,c)}}gn(e,"~standard",()=>({validate:o=>{try{const i=XN(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return yZ(e,o).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),kE=ke("$ZodString",(e,t)=>{qn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??KZ(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Zn=ke("$ZodStringFormat",(e,t)=>{v0.init(e,t),kE.init(e,t)}),dY=ke("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=PZ),Zn.init(e,t)}),hY=ke("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=FA(r))}else t.pattern??(t.pattern=FA());Zn.init(e,t)}),pY=ke("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=NZ),Zn.init(e,t)}),mY=ke("$ZodURL",(e,t)=>{Zn.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),gY=ke("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=$Z()),Zn.init(e,t)}),yY=ke("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=MZ),Zn.init(e,t)}),vY=ke("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=TZ),Zn.init(e,t)}),bY=ke("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=RZ),Zn.init(e,t)}),SY=ke("$ZodULID",(e,t)=>{t.pattern??(t.pattern=OZ),Zn.init(e,t)}),wY=ke("$ZodXID",(e,t)=>{t.pattern??(t.pattern=AZ),Zn.init(e,t)}),xY=ke("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=kZ),Zn.init(e,t)}),EY=ke("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=HZ(t)),Zn.init(e,t)}),_Y=ke("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=qZ),Zn.init(e,t)}),CY=ke("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=BZ(t)),Zn.init(e,t)}),TY=ke("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=jZ),Zn.init(e,t)}),RY=ke("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=IZ),Zn.init(e,t),e._zod.bag.format="ipv4"}),OY=ke("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=zZ),Zn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),AY=ke("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=LZ),Zn.init(e,t)}),kY=ke("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=FZ),Zn.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,i]=r;if(!i)throw new Error;const a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function s4(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const MY=ke("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=UZ),Zn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{s4(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function jY(e){if(!QN.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return s4(n)}const PY=ke("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=QN),Zn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{jY(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),NY=ke("$ZodE164",(e,t)=>{t.pattern??(t.pattern=VZ),Zn.init(e,t)});function DY(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const $Y=ke("$ZodJWT",(e,t)=>{Zn.init(e,t),e._zod.check=n=>{DY(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),i4=ke("$ZodNumber",(e,t)=>{qn.init(e,t),e._zod.pattern=e._zod.bag.pattern??t4,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),IY=ke("$ZodNumberFormat",(e,t)=>{JZ.init(e,t),i4.init(e,t)}),zY=ke("$ZodBoolean",(e,t)=>{qn.init(e,t),e._zod.pattern=ZZ,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),LY=ke("$ZodNull",(e,t)=>{qn.init(e,t),e._zod.pattern=YZ,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),FY=ke("$ZodAny",(e,t)=>{qn.init(e,t),e._zod.parse=n=>n}),UY=ke("$ZodUnknown",(e,t)=>{qn.init(e,t),e._zod.parse=n=>n}),VY=ke("$ZodNever",(e,t)=>{qn.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function UA(e,t,n){e.issues.length&&t.issues.push(...ju(n,e.issues)),t.value[n]=e.value}const qY=ke("$ZodArray",(e,t)=>{qn.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let a=0;a<o.length;a++){const c=o[a],u=t.element._zod.run({value:c,issues:[]},r);u instanceof Promise?i.push(u.then(f=>UA(f,n,a))):UA(u,n,a)}return i.length?Promise.all(i).then(()=>n):n}});function Ty(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...ju(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function a4(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=iZ(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function l4(e,t,n,r,o,i){const a=[],c=o.keySet,u=o.catchall._zod,f=u.def.type,h=u.optout==="optional";for(const p in t){if(c.has(p))continue;if(f==="never"){a.push(p);continue}const g=u.run({value:t[p],issues:[]},r);g instanceof Promise?e.push(g.then(v=>Ty(v,n,p,t,h))):Ty(g,n,p,t,h)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const BY=ke("$ZodObject",(e,t)=>{if(qn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}const r=m0(()=>a4(t));gn(e._zod,"propValues",()=>{const c=t.shape,u={};for(const f in c){const h=c[f]._zod;if(h.values){u[f]??(u[f]=new Set);for(const p of h.values)u[f].add(p)}}return u});const o=_h,i=t.catchall;let a;e._zod.parse=(c,u)=>{a??(a=r.value);const f=c.value;if(!o(f))return c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c;c.value={};const h=[],p=a.shape;for(const g of a.keys){const v=p[g],y=v._zod.optout==="optional",x=v._zod.run({value:f[g],issues:[]},u);x instanceof Promise?h.push(x.then(w=>Ty(w,c,g,f,y))):Ty(x,c,g,f,y)}return i?l4(h,f,c,u,r.value,e):h.length?Promise.all(h).then(()=>c):c}}),HY=ke("$ZodObjectJIT",(e,t)=>{BY.init(e,t);const n=e._zod.parse,r=m0(()=>a4(t)),o=g=>{const v=new uY(["shape","payload","ctx"]),y=r.value,x=_=>{const S=LA(_);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};v.write("const input = payload.value;");const w=Object.create(null);let T=0;for(const _ of y.keys)w[_]=`key_${T++}`;v.write("const newResult = {};");for(const _ of y.keys){const S=w[_],C=LA(_),O=g[_]?._zod?.optout==="optional";v.write(`const ${S} = ${x(_)};`),O?v.write(`
|
|
13
|
+
if (${S}.issues.length) {
|
|
14
|
+
if (${C} in input) {
|
|
15
|
+
payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
|
|
16
|
+
...iss,
|
|
17
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
18
|
+
})));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (${S}.value === undefined) {
|
|
23
|
+
if (${C} in input) {
|
|
24
|
+
newResult[${C}] = undefined;
|
|
25
|
+
}
|
|
26
|
+
} else {
|
|
27
|
+
newResult[${C}] = ${S}.value;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
`):v.write(`
|
|
31
|
+
if (${S}.issues.length) {
|
|
32
|
+
payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
|
|
33
|
+
...iss,
|
|
34
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
35
|
+
})));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (${S}.value === undefined) {
|
|
39
|
+
if (${C} in input) {
|
|
40
|
+
newResult[${C}] = undefined;
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
newResult[${C}] = ${S}.value;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
`)}v.write("payload.value = newResult;"),v.write("return payload;");const b=v.compile();return(_,S)=>b(g,_,S)};let i;const a=_h,c=!BN.jitless,f=c&&oZ.value,h=t.catchall;let p;e._zod.parse=(g,v)=>{p??(p=r.value);const y=g.value;return a(y)?c&&f&&v?.async===!1&&v.jitless!==!0?(i||(i=o(t.shape)),g=i(g,v),h?l4([],y,g,v,p,e):g):n(g,v):(g.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),g)}});function VA(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!Mu(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(a=>Qa(a,r,Xa())))}),t)}const c4=ke("$ZodUnion",(e,t)=>{qn.init(e,t),gn(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),gn(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),gn(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),gn(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>TE(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let a=!1;const c=[];for(const u of t.options){const f=u._zod.run({value:o.value,issues:[]},i);if(f instanceof Promise)c.push(f),a=!0;else{if(f.issues.length===0)return f;c.push(f)}}return a?Promise.all(c).then(u=>VA(u,o,e,i)):VA(c,o,e,i)}}),KY=ke("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,c4.init(e,t);const n=e._zod.parse;gn(e._zod,"propValues",()=>{const o={};for(const i of t.options){const a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[c,u]of Object.entries(a)){o[c]||(o[c]=new Set);for(const f of u)o[c].add(f)}}return o});const r=m0(()=>{const o=t.options,i=new Map;for(const a of o){const c=a._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const u of c){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,a)}}return i});e._zod.parse=(o,i)=>{const a=o.value;if(!_h(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;const c=r.value.get(a?.[t.discriminator]);return c?c._zod.run(o,i):t.unionFallback?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),o)}}),GY=ke("$ZodIntersection",(e,t)=>{qn.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),a=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([u,f])=>qA(n,u,f)):qA(n,i,a)}});function Sw(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(nf(e)&&nf(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const a=Sw(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r],a=Sw(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function qA(e,t,n){const r=new Map;let o;for(const c of t.issues)if(c.code==="unrecognized_keys"){o??(o=c);for(const u of c.keys)r.has(u)||r.set(u,{}),r.get(u).l=!0}else e.issues.push(c);for(const c of n.issues)if(c.code==="unrecognized_keys")for(const u of c.keys)r.has(u)||r.set(u,{}),r.get(u).r=!0;else e.issues.push(c);const i=[...r].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(i.length&&o&&e.issues.push({...o,keys:i}),Mu(e))return e;const a=Sw(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const ZY=ke("$ZodRecord",(e,t)=>{qn.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!nf(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const i=[],a=t.keyType._zod.values;if(a){n.value={};const c=new Set;for(const f of a)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){c.add(typeof f=="number"?f.toString():f);const h=t.valueType._zod.run({value:o[f],issues:[]},r);h instanceof Promise?i.push(h.then(p=>{p.issues.length&&n.issues.push(...ju(f,p.issues)),n.value[f]=p.value})):(h.issues.length&&n.issues.push(...ju(f,h.issues)),n.value[f]=h.value)}let u;for(const f in o)c.has(f)||(u=u??[],u.push(f));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u})}else{n.value={};for(const c of Reflect.ownKeys(o)){if(c==="__proto__")continue;let u=t.keyType._zod.run({value:c,issues:[]},r);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&t4.test(c)&&u.issues.length&&u.issues.some(p=>p.code==="invalid_type"&&p.expected==="number")){const p=t.keyType._zod.run({value:Number(c),issues:[]},r);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(u=p)}if(u.issues.length){t.mode==="loose"?n.value[c]=o[c]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>Qa(p,r,Xa())),input:c,path:[c],inst:e});continue}const h=t.valueType._zod.run({value:o[c],issues:[]},r);h instanceof Promise?i.push(h.then(p=>{p.issues.length&&n.issues.push(...ju(c,p.issues)),n.value[u.value]=p.value})):(h.issues.length&&n.issues.push(...ju(c,h.issues)),n.value[u.value]=h.value)}}return i.length?Promise.all(i).then(()=>n):n}}),YY=ke("$ZodEnum",(e,t)=>{qn.init(e,t);const n=HN(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>sZ.has(typeof o)).map(o=>typeof o=="string"?rf(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const a=o.value;return r.has(a)||o.issues.push({code:"invalid_value",values:n,input:a,inst:e}),o}}),WY=ke("$ZodLiteral",(e,t)=>{if(qn.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?rf(r):r?rf(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),XY=ke("$ZodTransform",(e,t)=>{qn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new qN(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(n.value=a,n));if(o instanceof Promise)throw new Vu;return n.value=o,n}});function BA(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const u4=ke("$ZodOptional",(e,t)=>{qn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",gn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),gn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${TE(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>BA(i,n.value)):BA(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),QY=ke("$ZodExactOptional",(e,t)=>{u4.init(e,t),gn(e._zod,"values",()=>t.innerType._zod.values),gn(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),JY=ke("$ZodNullable",(e,t)=>{qn.init(e,t),gn(e._zod,"optin",()=>t.innerType._zod.optin),gn(e._zod,"optout",()=>t.innerType._zod.optout),gn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${TE(n.source)}|null)$`):void 0}),gn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),eW=ke("$ZodDefault",(e,t)=>{qn.init(e,t),e._zod.optin="optional",gn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>HA(i,t)):HA(o,t)}});function HA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const tW=ke("$ZodPrefault",(e,t)=>{qn.init(e,t),e._zod.optin="optional",gn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),nW=ke("$ZodNonOptional",(e,t)=>{qn.init(e,t),gn(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>KA(i,e)):KA(o,e)}});function KA(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 rW=ke("$ZodCatch",(e,t)=>{qn.init(e,t),gn(e._zod,"optin",()=>t.innerType._zod.optin),gn(e._zod,"optout",()=>t.innerType._zod.optout),gn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>Qa(a,r,Xa()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>Qa(i,r,Xa()))},input:n.value}),n.issues=[]),n)}}),oW=ke("$ZodPipe",(e,t)=>{qn.init(e,t),gn(e._zod,"values",()=>t.in._zod.values),gn(e._zod,"optin",()=>t.in._zod.optin),gn(e._zod,"optout",()=>t.out._zod.optout),gn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(a=>Um(a,t.in,r)):Um(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>Um(i,t.out,r)):Um(o,t.out,r)}});function Um(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const sW=ke("$ZodReadonly",(e,t)=>{qn.init(e,t),gn(e._zod,"propValues",()=>t.innerType._zod.propValues),gn(e._zod,"values",()=>t.innerType._zod.values),gn(e._zod,"optin",()=>t.innerType?._zod?.optin),gn(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(GA):GA(o)}});function GA(e){return e.value=Object.freeze(e.value),e}const iW=ke("$ZodCustom",(e,t)=>{To.init(e,t),qn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>ZA(i,n,r,e));ZA(o,n,r,e)}});function ZA(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Ch(o))}}var YA;class aW{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function lW(){return new aW}(YA=globalThis).__zod_globalRegistry??(YA.__zod_globalRegistry=lW());const Yd=globalThis.__zod_globalRegistry;function cW(e,t){return new e({type:"string",...st(t)})}function uW(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...st(t)})}function WA(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...st(t)})}function fW(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...st(t)})}function dW(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...st(t)})}function hW(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...st(t)})}function pW(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...st(t)})}function f4(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...st(t)})}function mW(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...st(t)})}function gW(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...st(t)})}function yW(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...st(t)})}function vW(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...st(t)})}function bW(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...st(t)})}function SW(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...st(t)})}function wW(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...st(t)})}function xW(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...st(t)})}function EW(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...st(t)})}function _W(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...st(t)})}function CW(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...st(t)})}function TW(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...st(t)})}function RW(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...st(t)})}function OW(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...st(t)})}function AW(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...st(t)})}function kW(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...st(t)})}function MW(e,t){return new e({type:"string",format:"date",check:"string_format",...st(t)})}function jW(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...st(t)})}function PW(e,t){return new e({type:"string",format:"duration",check:"string_format",...st(t)})}function NW(e,t){return new e({type:"number",checks:[],...st(t)})}function DW(e,t){return new e({type:"number",coerce:!0,checks:[],...st(t)})}function $W(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...st(t)})}function IW(e,t){return new e({type:"boolean",...st(t)})}function zW(e,t){return new e({type:"null",...st(t)})}function LW(e){return new e({type:"any"})}function FW(e){return new e({type:"unknown"})}function UW(e,t){return new e({type:"never",...st(t)})}function XA(e,t){return new r4({check:"less_than",...st(t),value:e,inclusive:!1})}function y1(e,t){return new r4({check:"less_than",...st(t),value:e,inclusive:!0})}function QA(e,t){return new o4({check:"greater_than",...st(t),value:e,inclusive:!1})}function v1(e,t){return new o4({check:"greater_than",...st(t),value:e,inclusive:!0})}function JA(e,t){return new QZ({check:"multiple_of",...st(t),value:e})}function d4(e,t){return new eY({check:"max_length",...st(t),maximum:e})}function Ry(e,t){return new tY({check:"min_length",...st(t),minimum:e})}function h4(e,t){return new nY({check:"length_equals",...st(t),length:e})}function VW(e,t){return new rY({check:"string_format",format:"regex",...st(t),pattern:e})}function qW(e){return new oY({check:"string_format",format:"lowercase",...st(e)})}function BW(e){return new sY({check:"string_format",format:"uppercase",...st(e)})}function HW(e,t){return new iY({check:"string_format",format:"includes",...st(t),includes:e})}function KW(e,t){return new aY({check:"string_format",format:"starts_with",...st(t),prefix:e})}function GW(e,t){return new lY({check:"string_format",format:"ends_with",...st(t),suffix:e})}function Tf(e){return new cY({check:"overwrite",tx:e})}function ZW(e){return Tf(t=>t.normalize(e))}function YW(){return Tf(e=>e.trim())}function WW(){return Tf(e=>e.toLowerCase())}function XW(){return Tf(e=>e.toUpperCase())}function QW(){return Tf(e=>rZ(e))}function JW(e,t,n){return new e({type:"array",element:t,...st(n)})}function eX(e,t,n){const r=st(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function tX(e,t,n){return new e({type:"custom",check:"custom",fn:t,...st(n)})}function nX(e){const t=rX(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Ch(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(Ch(o))}},e(n.value,n)));return t}function rX(e,t){const n=new To({check:"custom",...st(t)});return n._zod.check=e,n}function p4(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??Yd,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 Sr(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const c=e._zod.toJSONSchema?.();if(c)a.schema=c;else{const h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,h);else{const g=a.schema,v=t.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,t,g,h)}const p=e._zod.parent;p&&(a.ref||(a.ref=p),Sr(p,t,h),t.seen.get(p).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Object.assign(a.schema,u),t.io==="input"&&uo(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function m4(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const a of e.seen.entries()){const c=e.metadataRegistry.get(a[0])?.id;if(c){const u=r.get(c);if(u&&u!==a[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,a[0])}}const o=a=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(a[0])?.id,g=e.external.uri??(y=>y);if(p)return{ref:g(p)};const v=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=v,{defId:v,ref:`${g("__shared")}#/${c}/${v}`}}if(a[1]===n)return{ref:"#"};const f=`#/${c}/`,h=a[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:f+h}},i=a=>{if(a[1].schema.$ref)return;const c=a[1],{ref:u,defId:f}=o(a);c.def={...c.schema},f&&(c.defId=f);const h=c.schema;for(const p in h)delete h[p];h.$ref=u};if(e.cycles==="throw")for(const a of e.seen.entries()){const c=a[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
|
|
47
|
+
|
|
48
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const c=a[1];if(t===a[0]){i(a);continue}if(e.external){const f=e.external.registry.get(a[0])?.id;if(t!==a[0]&&f){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(c.cycle){i(a);continue}if(c.count>1&&e.reused==="ref"){i(a);continue}}}function g4(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=a=>{const c=e.seen.get(a);if(c.ref===null)return;const u=c.def??c.schema,f={...u},h=c.ref;if(c.ref=null,h){r(h);const g=e.seen.get(h),v=g.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(v)):Object.assign(u,v),Object.assign(u,f),a._zod.parent===h)for(const x in u)x==="$ref"||x==="allOf"||x in f||delete u[x];if(v.$ref)for(const x in u)x==="$ref"||x==="allOf"||x in g.def&&JSON.stringify(u[x])===JSON.stringify(g.def[x])&&delete u[x]}const p=a._zod.parent;if(p&&p!==h){r(p);const g=e.seen.get(p);if(g?.schema.$ref&&(u.$ref=g.schema.$ref,g.def))for(const v in u)v==="$ref"||v==="allOf"||v in g.def&&JSON.stringify(u[v])===JSON.stringify(g.def[v])&&delete u[v]}e.override({zodSchema:a,jsonSchema:u,path:c.path??[]})};for(const a of[...e.seen.entries()].reverse())r(a[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(a)}Object.assign(o,n.def??n.schema);const i=e.external?.defs??{};for(const a of e.seen.entries()){const c=a[1];c.def&&c.defId&&(i[c.defId]=c.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const a=JSON.parse(JSON.stringify(o));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Oy(t,"input",e.processors),output:Oy(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function uo(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return uo(r.element,n);if(r.type==="set")return uo(r.valueType,n);if(r.type==="lazy")return uo(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return uo(r.innerType,n);if(r.type==="intersection")return uo(r.left,n)||uo(r.right,n);if(r.type==="record"||r.type==="map")return uo(r.keyType,n)||uo(r.valueType,n);if(r.type==="pipe")return uo(r.in,n)||uo(r.out,n);if(r.type==="object"){for(const o in r.shape)if(uo(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(uo(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(uo(o,n))return!0;return!!(r.rest&&uo(r.rest,n))}return!1}const oX=(e,t={})=>n=>{const r=p4({...n,processors:t});return Sr(e,r),m4(r,e),g4(r,e)},Oy=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},a=p4({...o??{},target:i,io:t,processors:n});return Sr(e,a),m4(a,e),g4(a,e)},sX={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},iX=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:a,format:c,patterns:u,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),c&&(o.format=sX[c]??c,o.format===""&&delete o.format,c==="time"&&delete o.format),f&&(o.contentEncoding=f),u&&u.size>0){const h=[...u];h.length===1?o.pattern=h[0].source:h.length>1&&(o.allOf=[...h.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},aX=(e,t,n,r)=>{const o=n,{minimum:i,maximum:a,format:c,multipleOf:u,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof c=="string"&&c.includes("int")?o.type="integer":o.type="number",typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h),typeof i=="number"&&(o.minimum=i,typeof h=="number"&&t.target!=="draft-04"&&(h>=i?delete o.minimum:delete o.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f),typeof a=="number"&&(o.maximum=a,typeof f=="number"&&t.target!=="draft-04"&&(f<=a?delete o.maximum:delete o.exclusiveMaximum)),typeof u=="number"&&(o.multipleOf=u)},lX=(e,t,n,r)=>{n.type="boolean"},cX=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},uX=(e,t,n,r)=>{n.not={}},fX=(e,t,n,r)=>{},dX=(e,t,n,r)=>{},hX=(e,t,n,r)=>{const o=e._zod.def,i=HN(o.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},pX=(e,t,n,r)=>{const o=e._zod.def,i=[];for(const a of o.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){const a=i[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),i.every(a=>typeof a=="boolean")&&(n.type="boolean"),i.every(a=>a===null)&&(n.type="null"),n.enum=i},mX=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},gX=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},yX=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:a,maximum:c}=e._zod.bag;typeof a=="number"&&(o.minItems=a),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=Sr(i.element,t,{...r,path:[...r.path,"items"]})},vX=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const a=i.shape;for(const f in a)o.properties[f]=Sr(a[f],t,{...r,path:[...r.path,"properties",f]});const c=new Set(Object.keys(a)),u=new Set([...c].filter(f=>{const h=i.shape[f]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));u.size>0&&(o.required=Array.from(u)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Sr(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},bX=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,a=o.options.map((c,u)=>Sr(c,t,{...r,path:[...r.path,i?"oneOf":"anyOf",u]}));i?n.oneOf=a:n.anyOf=a},SX=(e,t,n,r)=>{const o=e._zod.def,i=Sr(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=Sr(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=f=>"allOf"in f&&Object.keys(f).length===1,u=[...c(i)?i.allOf:[i],...c(a)?a.allOf:[a]];n.allOf=u},wX=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object";const a=i.keyType,u=a._zod.bag?.patterns;if(i.mode==="loose"&&u&&u.size>0){const h=Sr(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const p of u)o.patternProperties[p.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Sr(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Sr(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=a._zod.values;if(f){const h=[...f].filter(p=>typeof p=="string"||typeof p=="number");h.length>0&&(o.required=h)}},xX=(e,t,n,r)=>{const o=e._zod.def,i=Sr(o.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},EX=(e,t,n,r)=>{const o=e._zod.def;Sr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},_X=(e,t,n,r)=>{const o=e._zod.def;Sr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},CX=(e,t,n,r)=>{const o=e._zod.def;Sr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},TX=(e,t,n,r)=>{const o=e._zod.def;Sr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},RX=(e,t,n,r)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Sr(i,t,r);const a=t.seen.get(e);a.ref=i},OX=(e,t,n,r)=>{const o=e._zod.def;Sr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},y4=(e,t,n,r)=>{const o=e._zod.def;Sr(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType};function b0(e){return!!e._zod}function Na(e,t){return b0(e)?XN(e,t):e.safeParse(t)}function v4(e){if(!e)return;let t;if(b0(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function AX(e){if(b0(e)){const i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}const n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}const r=e.value;if(r!==void 0)return r}const kX=ke("ZodISODateTime",(e,t)=>{EY.init(e,t),Jn.init(e,t)});function b4(e){return kW(kX,e)}const MX=ke("ZodISODate",(e,t)=>{_Y.init(e,t),Jn.init(e,t)});function jX(e){return MW(MX,e)}const PX=ke("ZodISOTime",(e,t)=>{CY.init(e,t),Jn.init(e,t)});function NX(e){return jW(PX,e)}const DX=ke("ZodISODuration",(e,t)=>{TY.init(e,t),Jn.init(e,t)});function $X(e){return PW(DX,e)}const IX=(e,t)=>{YN.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>gZ(e,n)},flatten:{value:n=>mZ(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,bw,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,bw,2)}},isEmpty:{get(){return e.issues.length===0}}})},vs=ke("ZodError",IX,{Parent:Error}),zX=OE(vs),LX=AE(vs),FX=g0(vs),UX=y0(vs),VX=vZ(vs),qX=bZ(vs),BX=SZ(vs),HX=wZ(vs),KX=xZ(vs),GX=EZ(vs),ZX=_Z(vs),YX=CZ(vs),Bn=ke("ZodType",(e,t)=>(qn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Oy(e,"input"),output:Oy(e,"output")}}),e.toJSONSchema=oX(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ul(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>fl(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>zX(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>FX(e,n,r),e.parseAsync=async(n,r)=>LX(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>UX(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>VX(e,n,r),e.decode=(n,r)=>qX(e,n,r),e.encodeAsync=async(n,r)=>BX(e,n,r),e.decodeAsync=async(n,r)=>HX(e,n,r),e.safeEncode=(n,r)=>KX(e,n,r),e.safeDecode=(n,r)=>GX(e,n,r),e.safeEncodeAsync=async(n,r)=>ZX(e,n,r),e.safeDecodeAsync=async(n,r)=>YX(e,n,r),e.refine=(n,r)=>e.check(VQ(n,r)),e.superRefine=n=>e.check(qQ(n)),e.overwrite=n=>e.check(Tf(n)),e.optional=()=>sr(e),e.exactOptional=()=>AQ(e),e.nullable=()=>nk(e),e.nullish=()=>sr(nk(e)),e.nonoptional=n=>DQ(e,n),e.array=()=>Ge(e),e.or=n=>Hn([e,n]),e.and=n=>jE(e,n),e.transform=n=>xw(e,T4(n)),e.default=n=>jQ(e,n),e.prefault=n=>NQ(e,n),e.catch=n=>IQ(e,n),e.pipe=n=>xw(e,n),e.readonly=()=>FQ(e),e.describe=n=>{const r=e.clone();return Yd.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Yd.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Yd.get(e);const r=e.clone();return Yd.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),S4=ke("_ZodString",(e,t)=>{kE.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>iX(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(VW(...r)),e.includes=(...r)=>e.check(HW(...r)),e.startsWith=(...r)=>e.check(KW(...r)),e.endsWith=(...r)=>e.check(GW(...r)),e.min=(...r)=>e.check(Ry(...r)),e.max=(...r)=>e.check(d4(...r)),e.length=(...r)=>e.check(h4(...r)),e.nonempty=(...r)=>e.check(Ry(1,...r)),e.lowercase=r=>e.check(qW(r)),e.uppercase=r=>e.check(BW(r)),e.trim=()=>e.check(YW()),e.normalize=(...r)=>e.check(ZW(...r)),e.toLowerCase=()=>e.check(WW()),e.toUpperCase=()=>e.check(XW()),e.slugify=()=>e.check(QW())}),WX=ke("ZodString",(e,t)=>{kE.init(e,t),S4.init(e,t),e.email=n=>e.check(uW(XX,n)),e.url=n=>e.check(f4(w4,n)),e.jwt=n=>e.check(AW(hQ,n)),e.emoji=n=>e.check(mW(JX,n)),e.guid=n=>e.check(WA(ek,n)),e.uuid=n=>e.check(fW(Vm,n)),e.uuidv4=n=>e.check(dW(Vm,n)),e.uuidv6=n=>e.check(hW(Vm,n)),e.uuidv7=n=>e.check(pW(Vm,n)),e.nanoid=n=>e.check(gW(eQ,n)),e.guid=n=>e.check(WA(ek,n)),e.cuid=n=>e.check(yW(tQ,n)),e.cuid2=n=>e.check(vW(nQ,n)),e.ulid=n=>e.check(bW(rQ,n)),e.base64=n=>e.check(TW(uQ,n)),e.base64url=n=>e.check(RW(fQ,n)),e.xid=n=>e.check(SW(oQ,n)),e.ksuid=n=>e.check(wW(sQ,n)),e.ipv4=n=>e.check(xW(iQ,n)),e.ipv6=n=>e.check(EW(aQ,n)),e.cidrv4=n=>e.check(_W(lQ,n)),e.cidrv6=n=>e.check(CW(cQ,n)),e.e164=n=>e.check(OW(dQ,n)),e.datetime=n=>e.check(b4(n)),e.date=n=>e.check(jX(n)),e.time=n=>e.check(NX(n)),e.duration=n=>e.check($X(n))});function ce(e){return cW(WX,e)}const Jn=ke("ZodStringFormat",(e,t)=>{Zn.init(e,t),S4.init(e,t)}),XX=ke("ZodEmail",(e,t)=>{pY.init(e,t),Jn.init(e,t)}),ek=ke("ZodGUID",(e,t)=>{dY.init(e,t),Jn.init(e,t)}),Vm=ke("ZodUUID",(e,t)=>{hY.init(e,t),Jn.init(e,t)}),w4=ke("ZodURL",(e,t)=>{mY.init(e,t),Jn.init(e,t)});function QX(e){return f4(w4,e)}const JX=ke("ZodEmoji",(e,t)=>{gY.init(e,t),Jn.init(e,t)}),eQ=ke("ZodNanoID",(e,t)=>{yY.init(e,t),Jn.init(e,t)}),tQ=ke("ZodCUID",(e,t)=>{vY.init(e,t),Jn.init(e,t)}),nQ=ke("ZodCUID2",(e,t)=>{bY.init(e,t),Jn.init(e,t)}),rQ=ke("ZodULID",(e,t)=>{SY.init(e,t),Jn.init(e,t)}),oQ=ke("ZodXID",(e,t)=>{wY.init(e,t),Jn.init(e,t)}),sQ=ke("ZodKSUID",(e,t)=>{xY.init(e,t),Jn.init(e,t)}),iQ=ke("ZodIPv4",(e,t)=>{RY.init(e,t),Jn.init(e,t)}),aQ=ke("ZodIPv6",(e,t)=>{OY.init(e,t),Jn.init(e,t)}),lQ=ke("ZodCIDRv4",(e,t)=>{AY.init(e,t),Jn.init(e,t)}),cQ=ke("ZodCIDRv6",(e,t)=>{kY.init(e,t),Jn.init(e,t)}),uQ=ke("ZodBase64",(e,t)=>{MY.init(e,t),Jn.init(e,t)}),fQ=ke("ZodBase64URL",(e,t)=>{PY.init(e,t),Jn.init(e,t)}),dQ=ke("ZodE164",(e,t)=>{NY.init(e,t),Jn.init(e,t)}),hQ=ke("ZodJWT",(e,t)=>{$Y.init(e,t),Jn.init(e,t)}),ME=ke("ZodNumber",(e,t)=>{i4.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>aX(e,r,o),e.gt=(r,o)=>e.check(QA(r,o)),e.gte=(r,o)=>e.check(v1(r,o)),e.min=(r,o)=>e.check(v1(r,o)),e.lt=(r,o)=>e.check(XA(r,o)),e.lte=(r,o)=>e.check(y1(r,o)),e.max=(r,o)=>e.check(y1(r,o)),e.int=r=>e.check(tk(r)),e.safe=r=>e.check(tk(r)),e.positive=r=>e.check(QA(0,r)),e.nonnegative=r=>e.check(v1(0,r)),e.negative=r=>e.check(XA(0,r)),e.nonpositive=r=>e.check(y1(0,r)),e.multipleOf=(r,o)=>e.check(JA(r,o)),e.step=(r,o)=>e.check(JA(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function yn(e){return NW(ME,e)}const pQ=ke("ZodNumberFormat",(e,t)=>{IY.init(e,t),ME.init(e,t)});function tk(e){return $W(pQ,e)}const mQ=ke("ZodBoolean",(e,t)=>{zY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lX(e,n,r)});function Fn(e){return IW(mQ,e)}const gQ=ke("ZodNull",(e,t)=>{LY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cX(e,n,r)});function x4(e){return zW(gQ,e)}const yQ=ke("ZodAny",(e,t)=>{FY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fX()});function vQ(){return LW(yQ)}const bQ=ke("ZodUnknown",(e,t)=>{UY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>dX()});function Xn(){return FW(bQ)}const SQ=ke("ZodNever",(e,t)=>{VY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>uX(e,n,r)});function wQ(e){return UW(SQ,e)}const xQ=ke("ZodArray",(e,t)=>{qY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yX(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Ry(n,r)),e.nonempty=n=>e.check(Ry(1,n)),e.max=(n,r)=>e.check(d4(n,r)),e.length=(n,r)=>e.check(h4(n,r)),e.unwrap=()=>e.element});function Ge(e,t){return JW(xQ,e,t)}const E4=ke("ZodObject",(e,t)=>{HY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vX(e,n,r,o),gn(e,"shape",()=>t.shape),e.keyof=()=>Ho(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Xn()}),e.loose=()=>e.clone({...e._zod.def,catchall:Xn()}),e.strict=()=>e.clone({...e._zod.def,catchall:wQ()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>uZ(e,n),e.safeExtend=n=>fZ(e,n),e.merge=n=>dZ(e,n),e.pick=n=>lZ(e,n),e.omit=n=>cZ(e,n),e.partial=(...n)=>hZ(R4,e,n[0]),e.required=(...n)=>pZ(O4,e,n[0])});function Ye(e,t){const n={type:"object",shape:e??{},...st(t)};return new E4(n)}function Yr(e,t){return new E4({type:"object",shape:e,catchall:Xn(),...st(t)})}const _4=ke("ZodUnion",(e,t)=>{c4.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bX(e,n,r,o),e.options=t.options});function Hn(e,t){return new _4({type:"union",options:e,...st(t)})}const EQ=ke("ZodDiscriminatedUnion",(e,t)=>{_4.init(e,t),KY.init(e,t)});function C4(e,t,n){return new EQ({type:"union",options:t,discriminator:e,...st(n)})}const _Q=ke("ZodIntersection",(e,t)=>{GY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>SX(e,n,r,o)});function jE(e,t){return new _Q({type:"intersection",left:e,right:t})}const CQ=ke("ZodRecord",(e,t)=>{ZY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wX(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Qn(e,t,n){return new CQ({type:"record",keyType:e,valueType:t,...st(n)})}const ww=ke("ZodEnum",(e,t)=>{YY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>hX(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const a of r)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ww({...t,checks:[],...st(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const a of r)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new ww({...t,checks:[],...st(o),entries:i})}});function Ho(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ww({type:"enum",entries:n,...st(t)})}const TQ=ke("ZodLiteral",(e,t)=>{WY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>pX(e,n,r),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 lt(e,t){return new TQ({type:"literal",values:Array.isArray(e)?e:[e],...st(t)})}const RQ=ke("ZodTransform",(e,t)=>{XY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gX(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new qN(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ch(i,n.value,t));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(Ch(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function T4(e){return new RQ({type:"transform",transform:e})}const R4=ke("ZodOptional",(e,t)=>{u4.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>y4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function sr(e){return new R4({type:"optional",innerType:e})}const OQ=ke("ZodExactOptional",(e,t)=>{QY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>y4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function AQ(e){return new OQ({type:"optional",innerType:e})}const kQ=ke("ZodNullable",(e,t)=>{JY.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xX(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function nk(e){return new kQ({type:"nullable",innerType:e})}const MQ=ke("ZodDefault",(e,t)=>{eW.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_X(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function jQ(e,t){return new MQ({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():GN(t)}})}const PQ=ke("ZodPrefault",(e,t)=>{tW.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>CX(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function NQ(e,t){return new PQ({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():GN(t)}})}const O4=ke("ZodNonOptional",(e,t)=>{nW.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>EX(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function DQ(e,t){return new O4({type:"nonoptional",innerType:e,...st(t)})}const $Q=ke("ZodCatch",(e,t)=>{rW.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>TX(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function IQ(e,t){return new $Q({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const zQ=ke("ZodPipe",(e,t)=>{oW.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>RX(e,n,r,o),e.in=t.in,e.out=t.out});function xw(e,t){return new zQ({type:"pipe",in:e,out:t})}const LQ=ke("ZodReadonly",(e,t)=>{sW.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>OX(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function FQ(e){return new LQ({type:"readonly",innerType:e})}const A4=ke("ZodCustom",(e,t)=>{iW.init(e,t),Bn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mX(e,n)});function UQ(e,t){return eX(A4,e??(()=>!0),t)}function VQ(e,t={}){return tX(A4,e,t)}function qQ(e){return nX(e)}function k4(e,t){return xw(T4(e),t)}const BQ={custom:"custom"};function HQ(e){return DW(ME,e)}const S0="2025-11-25",KQ=[S0,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Zl="io.modelcontextprotocol/related-task",w0="2.0",Wr=UQ(e=>e!==null&&(typeof e=="object"||typeof e=="function")),M4=Hn([ce(),yn().int()]),j4=ce();Yr({ttl:Hn([yn(),x4()]).optional(),pollInterval:yn().optional()});const GQ=Ye({ttl:yn().optional()}),ZQ=Ye({taskId:ce()}),PE=Yr({progressToken:M4.optional(),[Zl]:ZQ.optional()}),Ko=Ye({_meta:PE.optional()}),rp=Ko.extend({task:GQ.optional()}),YQ=e=>rp.safeParse(e).success,Qr=Ye({method:ce(),params:Ko.loose().optional()}),bs=Ye({_meta:PE.optional()}),Ss=Ye({method:ce(),params:bs.loose().optional()}),Jr=Yr({_meta:PE.optional()}),x0=Hn([ce(),yn().int()]),P4=Ye({jsonrpc:lt(w0),id:x0,...Qr.shape}).strict(),Ew=e=>P4.safeParse(e).success,N4=Ye({jsonrpc:lt(w0),...Ss.shape}).strict(),WQ=e=>N4.safeParse(e).success,NE=Ye({jsonrpc:lt(w0),id:x0,result:Jr}).strict(),Wd=e=>NE.safeParse(e).success;var _t;(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"})(_t||(_t={}));const DE=Ye({jsonrpc:lt(w0),id:x0.optional(),error:Ye({code:yn().int(),message:ce(),data:Xn().optional()})}).strict(),XQ=e=>DE.safeParse(e).success,b1=Hn([P4,N4,NE,DE]);Hn([NE,DE]);const Pu=Jr.strict(),QQ=bs.extend({requestId:x0.optional(),reason:ce().optional()}),$E=Ss.extend({method:lt("notifications/cancelled"),params:QQ}),JQ=Ye({src:ce(),mimeType:ce().optional(),sizes:Ge(ce()).optional(),theme:Ho(["light","dark"]).optional()}),op=Ye({icons:Ge(JQ).optional()}),of=Ye({name:ce(),title:ce().optional()}),D4=of.extend({...of.shape,...op.shape,version:ce(),websiteUrl:ce().optional(),description:ce().optional()}),eJ=jE(Ye({applyDefaults:Fn().optional()}),Qn(ce(),Xn())),tJ=k4(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,jE(Ye({form:eJ.optional(),url:Wr.optional()}),Qn(ce(),Xn()).optional())),nJ=Yr({list:Wr.optional(),cancel:Wr.optional(),requests:Yr({sampling:Yr({createMessage:Wr.optional()}).optional(),elicitation:Yr({create:Wr.optional()}).optional()}).optional()}),rJ=Yr({list:Wr.optional(),cancel:Wr.optional(),requests:Yr({tools:Yr({call:Wr.optional()}).optional()}).optional()}),oJ=Ye({experimental:Qn(ce(),Wr).optional(),sampling:Ye({context:Wr.optional(),tools:Wr.optional()}).optional(),elicitation:tJ.optional(),roots:Ye({listChanged:Fn().optional()}).optional(),tasks:nJ.optional()}),sJ=Ko.extend({protocolVersion:ce(),capabilities:oJ,clientInfo:D4}),iJ=Qr.extend({method:lt("initialize"),params:sJ}),aJ=Ye({experimental:Qn(ce(),Wr).optional(),logging:Wr.optional(),completions:Wr.optional(),prompts:Ye({listChanged:Fn().optional()}).optional(),resources:Ye({subscribe:Fn().optional(),listChanged:Fn().optional()}).optional(),tools:Ye({listChanged:Fn().optional()}).optional(),tasks:rJ.optional()}),$4=Jr.extend({protocolVersion:ce(),capabilities:aJ,serverInfo:D4,instructions:ce().optional()}),I4=Ss.extend({method:lt("notifications/initialized"),params:bs.optional()}),lJ=e=>I4.safeParse(e).success,IE=Qr.extend({method:lt("ping"),params:Ko.optional()}),cJ=Ye({progress:yn(),total:sr(yn()),message:sr(ce())}),uJ=Ye({...bs.shape,...cJ.shape,progressToken:M4}),zE=Ss.extend({method:lt("notifications/progress"),params:uJ}),fJ=Ko.extend({cursor:j4.optional()}),sp=Qr.extend({params:fJ.optional()}),ip=Jr.extend({nextCursor:j4.optional()}),dJ=Ho(["working","input_required","completed","failed","cancelled"]),ap=Ye({taskId:ce(),status:dJ,ttl:Hn([yn(),x4()]),createdAt:ce(),lastUpdatedAt:ce(),pollInterval:sr(yn()),statusMessage:sr(ce())}),Th=Jr.extend({task:ap}),hJ=bs.merge(ap),Ay=Ss.extend({method:lt("notifications/tasks/status"),params:hJ}),LE=Qr.extend({method:lt("tasks/get"),params:Ko.extend({taskId:ce()})}),FE=Jr.merge(ap),UE=Qr.extend({method:lt("tasks/result"),params:Ko.extend({taskId:ce()})});Jr.loose();const VE=sp.extend({method:lt("tasks/list")}),qE=ip.extend({tasks:Ge(ap)}),BE=Qr.extend({method:lt("tasks/cancel"),params:Ko.extend({taskId:ce()})}),pJ=Jr.merge(ap),z4=Ye({uri:ce(),mimeType:sr(ce()),_meta:Qn(ce(),Xn()).optional()}),L4=z4.extend({text:ce()}),HE=ce().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),F4=z4.extend({blob:HE}),lp=Ho(["user","assistant"]),Rf=Ye({audience:Ge(lp).optional(),priority:yn().min(0).max(1).optional(),lastModified:b4({offset:!0}).optional()}),U4=Ye({...of.shape,...op.shape,uri:ce(),description:sr(ce()),mimeType:sr(ce()),annotations:Rf.optional(),_meta:sr(Yr({}))}),mJ=Ye({...of.shape,...op.shape,uriTemplate:ce(),description:sr(ce()),mimeType:sr(ce()),annotations:Rf.optional(),_meta:sr(Yr({}))}),gJ=sp.extend({method:lt("resources/list")}),V4=ip.extend({resources:Ge(U4)}),yJ=sp.extend({method:lt("resources/templates/list")}),q4=ip.extend({resourceTemplates:Ge(mJ)}),KE=Ko.extend({uri:ce()}),vJ=KE,bJ=Qr.extend({method:lt("resources/read"),params:vJ}),B4=Jr.extend({contents:Ge(Hn([L4,F4]))}),H4=Ss.extend({method:lt("notifications/resources/list_changed"),params:bs.optional()}),SJ=KE,wJ=Qr.extend({method:lt("resources/subscribe"),params:SJ}),xJ=KE,EJ=Qr.extend({method:lt("resources/unsubscribe"),params:xJ}),_J=bs.extend({uri:ce()}),CJ=Ss.extend({method:lt("notifications/resources/updated"),params:_J}),TJ=Ye({name:ce(),description:sr(ce()),required:sr(Fn())}),RJ=Ye({...of.shape,...op.shape,description:sr(ce()),arguments:sr(Ge(TJ)),_meta:sr(Yr({}))}),OJ=sp.extend({method:lt("prompts/list")}),K4=ip.extend({prompts:Ge(RJ)}),AJ=Ko.extend({name:ce(),arguments:Qn(ce(),ce()).optional()}),kJ=Qr.extend({method:lt("prompts/get"),params:AJ}),GE=Ye({type:lt("text"),text:ce(),annotations:Rf.optional(),_meta:Qn(ce(),Xn()).optional()}),ZE=Ye({type:lt("image"),data:HE,mimeType:ce(),annotations:Rf.optional(),_meta:Qn(ce(),Xn()).optional()}),YE=Ye({type:lt("audio"),data:HE,mimeType:ce(),annotations:Rf.optional(),_meta:Qn(ce(),Xn()).optional()}),MJ=Ye({type:lt("tool_use"),name:ce(),id:ce(),input:Qn(ce(),Xn()),_meta:Qn(ce(),Xn()).optional()}),jJ=Ye({type:lt("resource"),resource:Hn([L4,F4]),annotations:Rf.optional(),_meta:Qn(ce(),Xn()).optional()}),PJ=U4.extend({type:lt("resource_link")}),WE=Hn([GE,ZE,YE,PJ,jJ]),NJ=Ye({role:lp,content:WE}),G4=Jr.extend({description:ce().optional(),messages:Ge(NJ)}),Z4=Ss.extend({method:lt("notifications/prompts/list_changed"),params:bs.optional()}),DJ=Ye({title:ce().optional(),readOnlyHint:Fn().optional(),destructiveHint:Fn().optional(),idempotentHint:Fn().optional(),openWorldHint:Fn().optional()}),$J=Ye({taskSupport:Ho(["required","optional","forbidden"]).optional()}),Y4=Ye({...of.shape,...op.shape,description:ce().optional(),inputSchema:Ye({type:lt("object"),properties:Qn(ce(),Wr).optional(),required:Ge(ce()).optional()}).catchall(Xn()),outputSchema:Ye({type:lt("object"),properties:Qn(ce(),Wr).optional(),required:Ge(ce()).optional()}).catchall(Xn()).optional(),annotations:DJ.optional(),execution:$J.optional(),_meta:Qn(ce(),Xn()).optional()}),IJ=sp.extend({method:lt("tools/list")}),W4=ip.extend({tools:Ge(Y4)}),E0=Jr.extend({content:Ge(WE).default([]),structuredContent:Qn(ce(),Xn()).optional(),isError:Fn().optional()});E0.or(Jr.extend({toolResult:Xn()}));const zJ=rp.extend({name:ce(),arguments:Qn(ce(),Xn()).optional()}),LJ=Qr.extend({method:lt("tools/call"),params:zJ}),X4=Ss.extend({method:lt("notifications/tools/list_changed"),params:bs.optional()}),FJ=Ye({autoRefresh:Fn().default(!0),debounceMs:yn().int().nonnegative().default(300)}),Q4=Ho(["debug","info","notice","warning","error","critical","alert","emergency"]),UJ=Ko.extend({level:Q4}),VJ=Qr.extend({method:lt("logging/setLevel"),params:UJ}),qJ=bs.extend({level:Q4,logger:ce().optional(),data:Xn()}),BJ=Ss.extend({method:lt("notifications/message"),params:qJ}),HJ=Ye({name:ce().optional()}),KJ=Ye({hints:Ge(HJ).optional(),costPriority:yn().min(0).max(1).optional(),speedPriority:yn().min(0).max(1).optional(),intelligencePriority:yn().min(0).max(1).optional()}),GJ=Ye({mode:Ho(["auto","required","none"]).optional()}),ZJ=Ye({type:lt("tool_result"),toolUseId:ce().describe("The unique identifier for the corresponding tool call."),content:Ge(WE).default([]),structuredContent:Ye({}).loose().optional(),isError:Fn().optional(),_meta:Qn(ce(),Xn()).optional()}),YJ=C4("type",[GE,ZE,YE]),ky=C4("type",[GE,ZE,YE,MJ,ZJ]),WJ=Ye({role:lp,content:Hn([ky,Ge(ky)]),_meta:Qn(ce(),Xn()).optional()}),XJ=rp.extend({messages:Ge(WJ),modelPreferences:KJ.optional(),systemPrompt:ce().optional(),includeContext:Ho(["none","thisServer","allServers"]).optional(),temperature:yn().optional(),maxTokens:yn().int(),stopSequences:Ge(ce()).optional(),metadata:Wr.optional(),tools:Ge(Y4).optional(),toolChoice:GJ.optional()}),J4=Qr.extend({method:lt("sampling/createMessage"),params:XJ}),eD=Jr.extend({model:ce(),stopReason:sr(Ho(["endTurn","stopSequence","maxTokens"]).or(ce())),role:lp,content:YJ}),QJ=Jr.extend({model:ce(),stopReason:sr(Ho(["endTurn","stopSequence","maxTokens","toolUse"]).or(ce())),role:lp,content:Hn([ky,Ge(ky)])}),JJ=Ye({type:lt("boolean"),title:ce().optional(),description:ce().optional(),default:Fn().optional()}),eee=Ye({type:lt("string"),title:ce().optional(),description:ce().optional(),minLength:yn().optional(),maxLength:yn().optional(),format:Ho(["email","uri","date","date-time"]).optional(),default:ce().optional()}),tee=Ye({type:Ho(["number","integer"]),title:ce().optional(),description:ce().optional(),minimum:yn().optional(),maximum:yn().optional(),default:yn().optional()}),nee=Ye({type:lt("string"),title:ce().optional(),description:ce().optional(),enum:Ge(ce()),default:ce().optional()}),ree=Ye({type:lt("string"),title:ce().optional(),description:ce().optional(),oneOf:Ge(Ye({const:ce(),title:ce()})),default:ce().optional()}),oee=Ye({type:lt("string"),title:ce().optional(),description:ce().optional(),enum:Ge(ce()),enumNames:Ge(ce()).optional(),default:ce().optional()}),see=Hn([nee,ree]),iee=Ye({type:lt("array"),title:ce().optional(),description:ce().optional(),minItems:yn().optional(),maxItems:yn().optional(),items:Ye({type:lt("string"),enum:Ge(ce())}),default:Ge(ce()).optional()}),aee=Ye({type:lt("array"),title:ce().optional(),description:ce().optional(),minItems:yn().optional(),maxItems:yn().optional(),items:Ye({anyOf:Ge(Ye({const:ce(),title:ce()}))}),default:Ge(ce()).optional()}),lee=Hn([iee,aee]),cee=Hn([oee,see,lee]),uee=Hn([cee,JJ,eee,tee]),fee=rp.extend({mode:lt("form").optional(),message:ce(),requestedSchema:Ye({type:lt("object"),properties:Qn(ce(),uee),required:Ge(ce()).optional()})}),dee=rp.extend({mode:lt("url"),message:ce(),elicitationId:ce(),url:ce().url()}),hee=Hn([fee,dee]),tD=Qr.extend({method:lt("elicitation/create"),params:hee}),pee=bs.extend({elicitationId:ce()}),mee=Ss.extend({method:lt("notifications/elicitation/complete"),params:pee}),nD=Jr.extend({action:Ho(["accept","decline","cancel"]),content:k4(e=>e===null?void 0:e,Qn(ce(),Hn([ce(),yn(),Fn(),Ge(ce())])).optional())}),gee=Ye({type:lt("ref/resource"),uri:ce()}),yee=Ye({type:lt("ref/prompt"),name:ce()}),vee=Ko.extend({ref:Hn([yee,gee]),argument:Ye({name:ce(),value:ce()}),context:Ye({arguments:Qn(ce(),ce()).optional()}).optional()}),bee=Qr.extend({method:lt("completion/complete"),params:vee}),rD=Jr.extend({completion:Yr({values:Ge(ce()).max(100),total:sr(yn().int()),hasMore:sr(Fn())})}),See=Ye({uri:ce().startsWith("file://"),name:ce().optional(),_meta:Qn(ce(),Xn()).optional()}),wee=Qr.extend({method:lt("roots/list"),params:Ko.optional()}),xee=Jr.extend({roots:Ge(See)}),Eee=Ss.extend({method:lt("notifications/roots/list_changed"),params:bs.optional()});Hn([IE,iJ,bee,VJ,kJ,OJ,gJ,yJ,bJ,wJ,EJ,LJ,IJ,LE,UE,VE,BE]);Hn([$E,zE,I4,Eee,Ay]);Hn([Pu,eD,QJ,nD,xee,FE,qE,Th]);Hn([IE,J4,tD,wee,LE,UE,VE,BE]);Hn([$E,zE,BJ,CJ,H4,X4,Z4,Ay,mee]);Hn([Pu,$4,rD,G4,K4,V4,q4,B4,E0,W4,FE,qE,Th]);class pt extends Error{constructor(t,n,r){super(`MCP error ${t}: ${n}`),this.code=t,this.data=r,this.name="McpError"}static fromError(t,n,r){if(t===_t.UrlElicitationRequired&&r){const o=r;if(o.elicitations)return new _ee(o.elicitations,n)}return new pt(t,n,r)}}class _ee extends pt{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(_t.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function Fl(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function rk(e){const n=v4(e)?.method;if(!n)throw new Error("Schema is missing a method literal");const r=AX(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function ok(e,t){const n=Na(e,t);if(!n.success)throw n.error;return n.data}const Cee=6e4;class Tee{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($E,n=>{this._oncancel(n)}),this.setNotificationHandler(zE,n=>{this._onprogress(n)}),this.setRequestHandler(IE,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(LE,async(n,r)=>{const o=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!o)throw new pt(_t.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(UE,async(n,r)=>{const o=async()=>{const i=n.params.taskId;if(this._taskMessageQueue){let c;for(;c=await this._taskMessageQueue.dequeue(i,r.sessionId);){if(c.type==="response"||c.type==="error"){const u=c.message,f=u.id,h=this._requestResolvers.get(f);if(h)if(this._requestResolvers.delete(f),c.type==="response")h(u);else{const p=u,g=new pt(p.error.code,p.error.message,p.error.data);h(g)}else{const p=c.type==="response"?"Response":"Error";this._onerror(new Error(`${p} handler missing for request ${f}`))}continue}await this._transport?.send(c.message,{relatedRequestId:r.requestId})}}const a=await this._taskStore.getTask(i,r.sessionId);if(!a)throw new pt(_t.InvalidParams,`Task not found: ${i}`);if(!Fl(a.status))return await this._waitForTaskUpdate(i,r.signal),await o();if(Fl(a.status)){const c=await this._taskStore.getTaskResult(i,r.sessionId);return this._clearTaskQueue(i),{...c,_meta:{...c._meta,[Zl]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(VE,async(n,r)=>{try{const{tasks:o,nextCursor:i}=await this._taskStore.listTasks(n.params?.cursor,r.sessionId);return{tasks:o,nextCursor:i,_meta:{}}}catch(o){throw new pt(_t.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(BE,async(n,r)=>{try{const o=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!o)throw new pt(_t.InvalidParams,`Task not found: ${n.params.taskId}`);if(Fl(o.status))throw new pt(_t.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(n.params.taskId);const i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new pt(_t.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...i}}catch(o){throw o instanceof pt?o:new pt(_t.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,r,o,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(o,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:i,onTimeout:o})}_resetTimeout(t){const n=this._timeoutInfo.get(t);if(!n)return!1;const r=Date.now()-n.startTime;if(n.maxTotalTimeout&&r>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),pt.fromError(_t.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:r});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){const n=this._timeoutInfo.get(t);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(t))}async connect(t){this._transport=t;const n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};const r=this.transport?.onerror;this._transport.onerror=i=>{r?.(i),this._onerror(i)};const o=this._transport?.onmessage;this._transport.onmessage=(i,a)=>{o?.(i,a),Wd(i)||XQ(i)?this._onresponse(i):Ew(i)?this._onrequest(i,a):WQ(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();const n=pt.fromError(_t.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const r of t.values())r(n)}_onerror(t){this.onerror?.(t)}_onnotification(t){const n=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(r=>this._onerror(new Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(t,n){const r=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,o=this._transport,i=t.params?._meta?.[Zl]?.taskId;if(r===void 0){const h={jsonrpc:"2.0",id:t.id,error:{code:_t.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:h,timestamp:Date.now()},o?.sessionId).catch(p=>this._onerror(new Error(`Failed to enqueue error response: ${p}`))):o?.send(h).catch(p=>this._onerror(new Error(`Failed to send an error response: ${p}`)));return}const a=new AbortController;this._requestHandlerAbortControllers.set(t.id,a);const c=YQ(t.params)?t.params.task:void 0,u=this._taskStore?this.requestTaskStore(t,o?.sessionId):void 0,f={signal:a.signal,sessionId:o?.sessionId,_meta:t.params?._meta,sendNotification:async h=>{const p={relatedRequestId:t.id};i&&(p.relatedTask={taskId:i}),await this.notification(h,p)},sendRequest:async(h,p,g)=>{const v={...g,relatedRequestId:t.id};i&&!v.relatedTask&&(v.relatedTask={taskId:i});const y=v.relatedTask?.taskId??i;return y&&u&&await u.updateTaskStatus(y,"input_required"),await this.request(h,p,v)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:i,taskStore:u,taskRequestedTtl:c?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};Promise.resolve().then(()=>{c&&this.assertTaskHandlerCapability(t.method)}).then(()=>r(t,f)).then(async h=>{if(a.signal.aborted)return;const p={result:h,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:p,timestamp:Date.now()},o?.sessionId):await o?.send(p)},async h=>{if(a.signal.aborted)return;const p={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(h.code)?h.code:_t.InternalError,message:h.message??"Internal error",...h.data!==void 0&&{data:h.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:p,timestamp:Date.now()},o?.sessionId):await o?.send(p)}).catch(h=>this._onerror(new Error(`Failed to send response: ${h}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:n,...r}=t.params,o=Number(n),i=this._progressHandlers.get(o);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const a=this._responseHandlers.get(o),c=this._timeoutInfo.get(o);if(c&&a&&c.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(u){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),a(u);return}i(r)}_onresponse(t){const n=Number(t.id),r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),Wd(t))r(t);else{const a=new pt(t.error.code,t.error.message,t.error.data);r(a)}return}const o=this._responseHandlers.get(n);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let i=!1;if(Wd(t)&&t.result&&typeof t.result=="object"){const a=t.result;if(a.task&&typeof a.task=="object"){const c=a.task;typeof c.taskId=="string"&&(i=!0,this._taskProgressTokens.set(c.taskId,n))}}if(i||this._progressHandlers.delete(n),Wd(t))o(t);else{const a=pt.fromError(t.error.code,t.error.message,t.error.data);o(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,r){const{task:o}=r??{};if(!o){try{yield{type:"result",result:await this.request(t,n,r)}}catch(a){yield{type:"error",error:a instanceof pt?a:new pt(_t.InternalError,String(a))}}return}let i;try{const a=await this.request(t,Th,r);if(a.task)i=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new pt(_t.InternalError,"Task creation did not return a task");for(;;){const c=await this.getTask({taskId:i},r);if(yield{type:"taskStatus",task:c},Fl(c.status)){c.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)}:c.status==="failed"?yield{type:"error",error:new pt(_t.InternalError,`Task ${i} failed`)}:c.status==="cancelled"&&(yield{type:"error",error:new pt(_t.InternalError,`Task ${i} was cancelled`)});return}if(c.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)};return}const u=c.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(f=>setTimeout(f,u)),r?.signal?.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof pt?a:new pt(_t.InternalError,String(a))}}}request(t,n,r){const{relatedRequestId:o,resumptionToken:i,onresumptiontoken:a,task:c,relatedTask:u}=r??{};return new Promise((f,h)=>{const p=b=>{h(b)};if(!this._transport){p(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),c&&this.assertTaskCapability(t.method)}catch(b){p(b);return}r?.signal?.throwIfAborted();const g=this._requestMessageId++,v={...t,jsonrpc:"2.0",id:g};r?.onprogress&&(this._progressHandlers.set(g,r.onprogress),v.params={...t.params,_meta:{...t.params?._meta||{},progressToken:g}}),c&&(v.params={...v.params,task:c}),u&&(v.params={...v.params,_meta:{...v.params?._meta||{},[Zl]:u}});const y=b=>{this._responseHandlers.delete(g),this._progressHandlers.delete(g),this._cleanupTimeout(g),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(b)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:a}).catch(S=>this._onerror(new Error(`Failed to send cancellation: ${S}`)));const _=b instanceof pt?b:new pt(_t.RequestTimeout,String(b));h(_)};this._responseHandlers.set(g,b=>{if(!r?.signal?.aborted){if(b instanceof Error)return h(b);try{const _=Na(n,b.result);_.success?f(_.data):h(_.error)}catch(_){h(_)}}}),r?.signal?.addEventListener("abort",()=>{y(r?.signal?.reason)});const x=r?.timeout??Cee,w=()=>y(pt.fromError(_t.RequestTimeout,"Request timed out",{timeout:x}));this._setupTimeout(g,x,r?.maxTotalTimeout,w,r?.resetTimeoutOnProgress??!1);const T=u?.taskId;if(T){const b=_=>{const S=this._responseHandlers.get(g);S?S(_):this._onerror(new Error(`Response handler missing for side-channeled request ${g}`))};this._requestResolvers.set(g,b),this._enqueueTaskMessage(T,{type:"request",message:v,timestamp:Date.now()}).catch(_=>{this._cleanupTimeout(g),h(_)})}else this._transport.send(v,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:a}).catch(b=>{this._cleanupTimeout(g),h(b)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},FE,n)}async getTaskResult(t,n,r){return this.request({method:"tasks/result",params:t},n,r)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},qE,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},pJ,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const r=n?.relatedTask?.taskId;if(r){const c={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Zl]:n.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:c,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.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 c={...t,jsonrpc:"2.0"};n?.relatedTask&&(c={...c,params:{...c.params,_meta:{...c.params?._meta||{},[Zl]:n.relatedTask}}}),this._transport?.send(c,n).catch(u=>this._onerror(u))});return}let a={...t,jsonrpc:"2.0"};n?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Zl]:n.relatedTask}}}),await this._transport.send(a,n)}setRequestHandler(t,n){const r=rk(t);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(o,i)=>{const a=ok(t,o);return Promise.resolve(n(a,i))})}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,n){const r=rk(t);this._notificationHandlers.set(r,o=>{const i=ok(t,o);return Promise.resolve(n(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,r){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,r,o)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){const r=await this._taskMessageQueue.dequeueAll(t,n);for(const o of r)if(o.type==="request"&&Ew(o.message)){const i=o.message.id,a=this._requestResolvers.get(i);a?(a(new pt(_t.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n){let r=this._options?.defaultTaskPollInterval??1e3;try{const o=await this._taskStore?.getTask(t);o?.pollInterval&&(r=o.pollInterval)}catch{}return new Promise((o,i)=>{if(n.aborted){i(new pt(_t.InvalidRequest,"Request cancelled"));return}const a=setTimeout(o,r);n.addEventListener("abort",()=>{clearTimeout(a),i(new pt(_t.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){const r=this._taskStore;if(!r)throw new Error("No task store configured");return{createTask:async o=>{if(!t)throw new Error("No request provided");return await r.createTask(o,t.id,{method:t.method,params:t.params},n)},getTask:async o=>{const i=await r.getTask(o,n);if(!i)throw new pt(_t.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(o,i,a)=>{await r.storeTaskResult(o,i,a,n);const c=await r.getTask(o,n);if(c){const u=Ay.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Fl(c.status)&&this._cleanupTaskProgressHandler(o)}},getTaskResult:o=>r.getTaskResult(o,n),updateTaskStatus:async(o,i,a)=>{const c=await r.getTask(o,n);if(!c)throw new pt(_t.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(Fl(c.status))throw new pt(_t.InvalidParams,`Cannot update task "${o}" from terminal status "${c.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(o,i,a,n);const u=await r.getTask(o,n);if(u){const f=Ay.parse({method:"notifications/tasks/status",params:u});await this.notification(f),Fl(u.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>r.listTasks(o,n)}}}function sk(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ree(e,t){const n={...e};for(const r in t){const o=r,i=t[o];if(i===void 0)continue;const a=n[o];sk(a)&&sk(i)?n[o]={...a,...i}:n[o]=i}return n}var qm={exports:{}},S1={},Mi={},Ul={},w1={},x1={},E1={},ik;function My(){return ik||(ik=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 n extends t{constructor(b){if(super(),!e.IDENTIFIER.test(b))throw new Error("CodeGen: name must be a valid identifier");this.str=b}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(b){super(),this._items=typeof b=="string"?[b]:b}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const b=this._items[0];return b===""||b==='""'}get str(){var b;return(b=this._str)!==null&&b!==void 0?b:this._str=this._items.reduce((_,S)=>`${_}${S}`,"")}get names(){var b;return(b=this._names)!==null&&b!==void 0?b:this._names=this._items.reduce((_,S)=>(S instanceof n&&(_[S.str]=(_[S.str]||0)+1),_),{})}}e._Code=r,e.nil=new r("");function o(T,...b){const _=[T[0]];let S=0;for(;S<b.length;)c(_,b[S]),_.push(T[++S]);return new r(_)}e._=o;const i=new r("+");function a(T,...b){const _=[v(T[0])];let S=0;for(;S<b.length;)_.push(i),c(_,b[S]),_.push(i,v(T[++S]));return u(_),new r(_)}e.str=a;function c(T,b){b instanceof r?T.push(...b._items):b instanceof n?T.push(b):T.push(p(b))}e.addCodeArg=c;function u(T){let b=1;for(;b<T.length-1;){if(T[b]===i){const _=f(T[b-1],T[b+1]);if(_!==void 0){T.splice(b-1,3,_);continue}T[b++]="+"}b++}}function f(T,b){if(b==='""')return T;if(T==='""')return b;if(typeof T=="string")return b instanceof n||T[T.length-1]!=='"'?void 0:typeof b!="string"?`${T.slice(0,-1)}${b}"`:b[0]==='"'?T.slice(0,-1)+b.slice(1):void 0;if(typeof b=="string"&&b[0]==='"'&&!(T instanceof n))return`"${T}${b.slice(1)}`}function h(T,b){return b.emptyStr()?T:T.emptyStr()?b:a`${T}${b}`}e.strConcat=h;function p(T){return typeof T=="number"||typeof T=="boolean"||T===null?T:v(Array.isArray(T)?T.join(","):T)}function g(T){return new r(v(T))}e.stringify=g;function v(T){return JSON.stringify(T).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function y(T){return typeof T=="string"&&e.IDENTIFIER.test(T)?new r(`.${T}`):o`[${T}]`}e.getProperty=y;function x(T){if(typeof T=="string"&&e.IDENTIFIER.test(T))return new r(`${T}`);throw new Error(`CodeGen: invalid export name: ${T}, use explicit $id name mapping`)}e.getEsmExportName=x;function w(T){return new r(T.toString())}e.regexpCode=w})(E1)),E1}var _1={},ak;function lk(){return ak||(ak=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=My();class n extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var r;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:f,parent:h}={}){this._names={},this._prefixes=f,this._parent=h}toName(f){return f instanceof t.Name?f:this.name(f)}name(f){return new t.Name(this._newName(f))}_newName(f){const h=this._names[f]||this._nameGroup(f);return`${f}${h.index++}`}_nameGroup(f){var h,p;if(!((p=(h=this._parent)===null||h===void 0?void 0:h._prefixes)===null||p===void 0)&&p.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}e.Scope=o;class i extends t.Name{constructor(f,h){super(h),this.prefix=f}setValue(f,{property:h,itemIndex:p}){this.value=f,this.scopePath=(0,t._)`.${new t.Name(h)}[${p}]`}}e.ValueScopeName=i;const a=(0,t._)`\n`;class c extends o{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?a:t.nil}}get(){return this._scope}name(f){return new i(f,this._newName(f))}value(f,h){var p;if(h.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(f),{prefix:v}=g,y=(p=h.key)!==null&&p!==void 0?p:h.ref;let x=this._values[v];if(x){const b=x.get(y);if(b)return b}else x=this._values[v]=new Map;x.set(y,g);const w=this._scope[v]||(this._scope[v]=[]),T=w.length;return w[T]=h.ref,g.setValue(h,{property:v,itemIndex:T}),g}getValue(f,h){const p=this._values[f];if(p)return p.get(h)}scopeRefs(f,h=this._values){return this._reduceValues(h,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${f}${p.scopePath}`})}scopeCode(f=this._values,h,p){return this._reduceValues(f,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},h,p)}_reduceValues(f,h,p={},g){let v=t.nil;for(const y in f){const x=f[y];if(!x)continue;const w=p[y]=p[y]||new Map;x.forEach(T=>{if(w.has(T))return;w.set(T,r.Started);let b=h(T);if(b){const _=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${_} ${T} = ${b};${this.opts._n}`}else if(b=g?.(T))v=(0,t._)`${v}${b}${this.opts._n}`;else throw new n(T);w.set(T,r.Completed)})}return v}}e.ValueScope=c})(_1)),_1}var ck;function Pt(){return ck||(ck=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=My(),n=lk();var r=My();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var o=lk();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.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 i{optimizeNodes(){return this}optimizeNames(N,G){return this}}class a extends i{constructor(N,G,te){super(),this.varKind=N,this.name=G,this.rhs=te}render({es5:N,_n:G}){const te=N?n.varKinds.var:this.varKind,re=this.rhs===void 0?"":` = ${this.rhs}`;return`${te} ${this.name}${re};`+G}optimizeNames(N,G){if(N[this.name.str])return this.rhs&&(this.rhs=J(this.rhs,N,G)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends i{constructor(N,G,te){super(),this.lhs=N,this.rhs=G,this.sideEffects=te}render({_n:N}){return`${this.lhs} = ${this.rhs};`+N}optimizeNames(N,G){if(!(this.lhs instanceof t.Name&&!N[this.lhs.str]&&!this.sideEffects))return this.rhs=J(this.rhs,N,G),this}get names(){const N=this.lhs instanceof t.Name?{}:{...this.lhs.names};return F(N,this.rhs)}}class u extends c{constructor(N,G,te,re){super(N,te,re),this.op=G}render({_n:N}){return`${this.lhs} ${this.op}= ${this.rhs};`+N}}class f extends i{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`${this.label}:`+N}}class h extends i{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`break${this.label?` ${this.label}`:""};`+N}}class p extends i{constructor(N){super(),this.error=N}render({_n:N}){return`throw ${this.error};`+N}get names(){return this.error.names}}class g extends i{constructor(N){super(),this.code=N}render({_n:N}){return`${this.code};`+N}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(N,G){return this.code=J(this.code,N,G),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends i{constructor(N=[]){super(),this.nodes=N}render(N){return this.nodes.reduce((G,te)=>G+te.render(N),"")}optimizeNodes(){const{nodes:N}=this;let G=N.length;for(;G--;){const te=N[G].optimizeNodes();Array.isArray(te)?N.splice(G,1,...te):te?N[G]=te:N.splice(G,1)}return N.length>0?this:void 0}optimizeNames(N,G){const{nodes:te}=this;let re=te.length;for(;re--;){const de=te[re];de.optimizeNames(N,G)||(ee(N,de.names),te.splice(re,1))}return te.length>0?this:void 0}get names(){return this.nodes.reduce((N,G)=>L(N,G.names),{})}}class y extends v{render(N){return"{"+N._n+super.render(N)+"}"+N._n}}class x extends v{}class w extends y{}w.kind="else";class T extends y{constructor(N,G){super(G),this.condition=N}render(N){let G=`if(${this.condition})`+super.render(N);return this.else&&(G+="else "+this.else.render(N)),G}optimizeNodes(){super.optimizeNodes();const N=this.condition;if(N===!0)return this.nodes;let G=this.else;if(G){const te=G.optimizeNodes();G=this.else=Array.isArray(te)?new w(te):te}if(G)return N===!1?G instanceof T?G:G.nodes:this.nodes.length?this:new T(Z(N),G instanceof T?[G]:G.nodes);if(!(N===!1||!this.nodes.length))return this}optimizeNames(N,G){var te;if(this.else=(te=this.else)===null||te===void 0?void 0:te.optimizeNames(N,G),!!(super.optimizeNames(N,G)||this.else))return this.condition=J(this.condition,N,G),this}get names(){const N=super.names;return F(N,this.condition),this.else&&L(N,this.else.names),N}}T.kind="if";class b extends y{}b.kind="for";class _ extends b{constructor(N){super(),this.iteration=N}render(N){return`for(${this.iteration})`+super.render(N)}optimizeNames(N,G){if(super.optimizeNames(N,G))return this.iteration=J(this.iteration,N,G),this}get names(){return L(super.names,this.iteration.names)}}class S extends b{constructor(N,G,te,re){super(),this.varKind=N,this.name=G,this.from=te,this.to=re}render(N){const G=N.es5?n.varKinds.var:this.varKind,{name:te,from:re,to:de}=this;return`for(${G} ${te}=${re}; ${te}<${de}; ${te}++)`+super.render(N)}get names(){const N=F(super.names,this.from);return F(N,this.to)}}class C extends b{constructor(N,G,te,re){super(),this.loop=N,this.varKind=G,this.name=te,this.iterable=re}render(N){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(N)}optimizeNames(N,G){if(super.optimizeNames(N,G))return this.iterable=J(this.iterable,N,G),this}get names(){return L(super.names,this.iterable.names)}}class E extends y{constructor(N,G,te){super(),this.name=N,this.args=G,this.async=te}render(N){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(N)}}E.kind="func";class O extends v{render(N){return"return "+super.render(N)}}O.kind="return";class j extends y{render(N){let G="try"+super.render(N);return this.catch&&(G+=this.catch.render(N)),this.finally&&(G+=this.finally.render(N)),G}optimizeNodes(){var N,G;return super.optimizeNodes(),(N=this.catch)===null||N===void 0||N.optimizeNodes(),(G=this.finally)===null||G===void 0||G.optimizeNodes(),this}optimizeNames(N,G){var te,re;return super.optimizeNames(N,G),(te=this.catch)===null||te===void 0||te.optimizeNames(N,G),(re=this.finally)===null||re===void 0||re.optimizeNames(N,G),this}get names(){const N=super.names;return this.catch&&L(N,this.catch.names),this.finally&&L(N,this.finally.names),N}}class P extends y{constructor(N){super(),this.error=N}render(N){return`catch(${this.error})`+super.render(N)}}P.kind="catch";class $ extends y{render(N){return"finally"+super.render(N)}}$.kind="finally";class I{constructor(N,G={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...G,_n:G.lines?`
|
|
49
|
+
`:""},this._extScope=N,this._scope=new n.Scope({parent:N}),this._nodes=[new x]}toString(){return this._root.render(this.opts)}name(N){return this._scope.name(N)}scopeName(N){return this._extScope.name(N)}scopeValue(N,G){const te=this._extScope.value(N,G);return(this._values[te.prefix]||(this._values[te.prefix]=new Set)).add(te),te}getScopeValue(N,G){return this._extScope.getValue(N,G)}scopeRefs(N){return this._extScope.scopeRefs(N,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(N,G,te,re){const de=this._scope.toName(G);return te!==void 0&&re&&(this._constants[de.str]=te),this._leafNode(new a(N,de,te)),de}const(N,G,te){return this._def(n.varKinds.const,N,G,te)}let(N,G,te){return this._def(n.varKinds.let,N,G,te)}var(N,G,te){return this._def(n.varKinds.var,N,G,te)}assign(N,G,te){return this._leafNode(new c(N,G,te))}add(N,G){return this._leafNode(new u(N,e.operators.ADD,G))}code(N){return typeof N=="function"?N():N!==t.nil&&this._leafNode(new g(N)),this}object(...N){const G=["{"];for(const[te,re]of N)G.length>1&&G.push(","),G.push(te),(te!==re||this.opts.es5)&&(G.push(":"),(0,t.addCodeArg)(G,re));return G.push("}"),new t._Code(G)}if(N,G,te){if(this._blockNode(new T(N)),G&&te)this.code(G).else().code(te).endIf();else if(G)this.code(G).endIf();else if(te)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(N){return this._elseNode(new T(N))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(T,w)}_for(N,G){return this._blockNode(N),G&&this.code(G).endFor(),this}for(N,G){return this._for(new _(N),G)}forRange(N,G,te,re,de=this.opts.es5?n.varKinds.var:n.varKinds.let){const we=this._scope.toName(N);return this._for(new S(de,we,G,te),()=>re(we))}forOf(N,G,te,re=n.varKinds.const){const de=this._scope.toName(N);if(this.opts.es5){const we=G instanceof t.Name?G:this.var("_arr",G);return this.forRange("_i",0,(0,t._)`${we}.length`,Ee=>{this.var(de,(0,t._)`${we}[${Ee}]`),te(de)})}return this._for(new C("of",re,de,G),()=>te(de))}forIn(N,G,te,re=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(N,(0,t._)`Object.keys(${G})`,te);const de=this._scope.toName(N);return this._for(new C("in",re,de,G),()=>te(de))}endFor(){return this._endBlockNode(b)}label(N){return this._leafNode(new f(N))}break(N){return this._leafNode(new h(N))}return(N){const G=new O;if(this._blockNode(G),this.code(N),G.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(N,G,te){if(!G&&!te)throw new Error('CodeGen: "try" without "catch" and "finally"');const re=new j;if(this._blockNode(re),this.code(N),G){const de=this.name("e");this._currNode=re.catch=new P(de),G(de)}return te&&(this._currNode=re.finally=new $,this.code(te)),this._endBlockNode(P,$)}throw(N){return this._leafNode(new p(N))}block(N,G){return this._blockStarts.push(this._nodes.length),N&&this.code(N).endBlock(G),this}endBlock(N){const G=this._blockStarts.pop();if(G===void 0)throw new Error("CodeGen: not in self-balancing block");const te=this._nodes.length-G;if(te<0||N!==void 0&&te!==N)throw new Error(`CodeGen: wrong number of nodes: ${te} vs ${N} expected`);return this._nodes.length=G,this}func(N,G=t.nil,te,re){return this._blockNode(new E(N,G,te)),re&&this.code(re).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(N=1){for(;N-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(N){return this._currNode.nodes.push(N),this}_blockNode(N){this._currNode.nodes.push(N),this._nodes.push(N)}_endBlockNode(N,G){const te=this._currNode;if(te instanceof N||G&&te instanceof G)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${G?`${N.kind}/${G.kind}`:N.kind}"`)}_elseNode(N){const G=this._currNode;if(!(G instanceof T))throw new Error('CodeGen: "else" without "if"');return this._currNode=G.else=N,this}get _root(){return this._nodes[0]}get _currNode(){const N=this._nodes;return N[N.length-1]}set _currNode(N){const G=this._nodes;G[G.length-1]=N}}e.CodeGen=I;function L(U,N){for(const G in N)U[G]=(U[G]||0)+(N[G]||0);return U}function F(U,N){return N instanceof t._CodeOrName?L(U,N.names):U}function J(U,N,G){if(U instanceof t.Name)return te(U);if(!re(U))return U;return new t._Code(U._items.reduce((de,we)=>(we instanceof t.Name&&(we=te(we)),we instanceof t._Code?de.push(...we._items):de.push(we),de),[]));function te(de){const we=G[de.str];return we===void 0||N[de.str]!==1?de:(delete N[de.str],we)}function re(de){return de instanceof t._Code&&de._items.some(we=>we instanceof t.Name&&N[we.str]===1&&G[we.str]!==void 0)}}function ee(U,N){for(const G in N)U[G]=(U[G]||0)-(N[G]||0)}function Z(U){return typeof U=="boolean"||typeof U=="number"||U===null?!U:(0,t._)`!${q(U)}`}e.not=Z;const H=D(e.operators.AND);function V(...U){return U.reduce(H)}e.and=V;const oe=D(e.operators.OR);function ne(...U){return U.reduce(oe)}e.or=ne;function D(U){return(N,G)=>N===t.nil?G:G===t.nil?N:(0,t._)`${q(N)} ${U} ${q(G)}`}function q(U){return U instanceof t.Name?U:(0,t._)`(${U})`}})(x1)),x1}var Ft={},uk;function fn(){if(uk)return Ft;uk=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.checkStrictMode=Ft.getErrorPath=Ft.Type=Ft.useFunc=Ft.setEvaluated=Ft.evaluatedPropsToName=Ft.mergeEvaluated=Ft.eachItem=Ft.unescapeJsonPointer=Ft.escapeJsonPointer=Ft.escapeFragment=Ft.unescapeFragment=Ft.schemaRefOrVal=Ft.schemaHasRulesButRef=Ft.schemaHasRules=Ft.checkUnknownRules=Ft.alwaysValidSchema=Ft.toHash=void 0;const e=Pt(),t=My();function n(C){const E={};for(const O of C)E[O]=!0;return E}Ft.toHash=n;function r(C,E){return typeof E=="boolean"?E:Object.keys(E).length===0?!0:(o(C,E),!i(E,C.self.RULES.all))}Ft.alwaysValidSchema=r;function o(C,E=C.schema){const{opts:O,self:j}=C;if(!O.strictSchema||typeof E=="boolean")return;const P=j.RULES.keywords;for(const $ in E)P[$]||S(C,`unknown keyword: "${$}"`)}Ft.checkUnknownRules=o;function i(C,E){if(typeof C=="boolean")return!C;for(const O in C)if(E[O])return!0;return!1}Ft.schemaHasRules=i;function a(C,E){if(typeof C=="boolean")return!C;for(const O in C)if(O!=="$ref"&&E.all[O])return!0;return!1}Ft.schemaHasRulesButRef=a;function c({topSchemaRef:C,schemaPath:E},O,j,P){if(!P){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${C}${E}${(0,e.getProperty)(j)}`}Ft.schemaRefOrVal=c;function u(C){return p(decodeURIComponent(C))}Ft.unescapeFragment=u;function f(C){return encodeURIComponent(h(C))}Ft.escapeFragment=f;function h(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}Ft.escapeJsonPointer=h;function p(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}Ft.unescapeJsonPointer=p;function g(C,E){if(Array.isArray(C))for(const O of C)E(O);else E(C)}Ft.eachItem=g;function v({mergeNames:C,mergeToName:E,mergeValues:O,resultToName:j}){return(P,$,I,L)=>{const F=I===void 0?$:I instanceof e.Name?($ instanceof e.Name?C(P,$,I):E(P,$,I),I):$ instanceof e.Name?(E(P,I,$),$):O($,I);return L===e.Name&&!(F instanceof e.Name)?j(P,F):F}}Ft.mergeEvaluated={props:v({mergeNames:(C,E,O)=>C.if((0,e._)`${O} !== true && ${E} !== undefined`,()=>{C.if((0,e._)`${E} === true`,()=>C.assign(O,!0),()=>C.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${E})`))}),mergeToName:(C,E,O)=>C.if((0,e._)`${O} !== true`,()=>{E===!0?C.assign(O,!0):(C.assign(O,(0,e._)`${O} || {}`),x(C,O,E))}),mergeValues:(C,E)=>C===!0?!0:{...C,...E},resultToName:y}),items:v({mergeNames:(C,E,O)=>C.if((0,e._)`${O} !== true && ${E} !== undefined`,()=>C.assign(O,(0,e._)`${E} === true ? true : ${O} > ${E} ? ${O} : ${E}`)),mergeToName:(C,E,O)=>C.if((0,e._)`${O} !== true`,()=>C.assign(O,E===!0?!0:(0,e._)`${O} > ${E} ? ${O} : ${E}`)),mergeValues:(C,E)=>C===!0?!0:Math.max(C,E),resultToName:(C,E)=>C.var("items",E)})};function y(C,E){if(E===!0)return C.var("props",!0);const O=C.var("props",(0,e._)`{}`);return E!==void 0&&x(C,O,E),O}Ft.evaluatedPropsToName=y;function x(C,E,O){Object.keys(O).forEach(j=>C.assign((0,e._)`${E}${(0,e.getProperty)(j)}`,!0))}Ft.setEvaluated=x;const w={};function T(C,E){return C.scopeValue("func",{ref:E,code:w[E.code]||(w[E.code]=new t._Code(E.code))})}Ft.useFunc=T;var b;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(b||(Ft.Type=b={}));function _(C,E,O){if(C instanceof e.Name){const j=E===b.Num;return O?j?(0,e._)`"[" + ${C} + "]"`:(0,e._)`"['" + ${C} + "']"`:j?(0,e._)`"/" + ${C}`:(0,e._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(C).toString():"/"+h(C)}Ft.getErrorPath=_;function S(C,E,O=C.opts.strictSchema){if(O){if(E=`strict mode: ${E}`,O===!0)throw new Error(E);C.self.logger.warn(E)}}return Ft.checkStrictMode=S,Ft}var Bm={},fk;function dl(){if(fk)return Bm;fk=1,Object.defineProperty(Bm,"__esModule",{value:!0});const e=Pt(),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 Bm.default=t,Bm}var dk;function _0(){return dk||(dk=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=Pt(),n=fn(),r=dl();e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:T})=>T?(0,t.str)`"${w}" keyword must be ${T} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function o(w,T=e.keywordError,b,_){const{it:S}=w,{gen:C,compositeRule:E,allErrors:O}=S,j=p(w,T,b);_??(E||O)?u(C,j):f(S,(0,t._)`[${j}]`)}e.reportError=o;function i(w,T=e.keywordError,b){const{it:_}=w,{gen:S,compositeRule:C,allErrors:E}=_,O=p(w,T,b);u(S,O),C||E||f(_,r.default.vErrors)}e.reportExtraError=i;function a(w,T){w.assign(r.default.errors,T),w.if((0,t._)`${r.default.vErrors} !== null`,()=>w.if(T,()=>w.assign((0,t._)`${r.default.vErrors}.length`,T),()=>w.assign(r.default.vErrors,null)))}e.resetErrorsCount=a;function c({gen:w,keyword:T,schemaValue:b,data:_,errsCount:S,it:C}){if(S===void 0)throw new Error("ajv implementation error");const E=w.name("err");w.forRange("i",S,r.default.errors,O=>{w.const(E,(0,t._)`${r.default.vErrors}[${O}]`),w.if((0,t._)`${E}.instancePath === undefined`,()=>w.assign((0,t._)`${E}.instancePath`,(0,t.strConcat)(r.default.instancePath,C.errorPath))),w.assign((0,t._)`${E}.schemaPath`,(0,t.str)`${C.errSchemaPath}/${T}`),C.opts.verbose&&(w.assign((0,t._)`${E}.schema`,b),w.assign((0,t._)`${E}.data`,_))})}e.extendErrors=c;function u(w,T){const b=w.const("err",T);w.if((0,t._)`${r.default.vErrors} === null`,()=>w.assign(r.default.vErrors,(0,t._)`[${b}]`),(0,t._)`${r.default.vErrors}.push(${b})`),w.code((0,t._)`${r.default.errors}++`)}function f(w,T){const{gen:b,validateName:_,schemaEnv:S}=w;S.$async?b.throw((0,t._)`new ${w.ValidationError}(${T})`):(b.assign((0,t._)`${_}.errors`,T),b.return(!1))}const h={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 p(w,T,b){const{createErrors:_}=w.it;return _===!1?(0,t._)`{}`:g(w,T,b)}function g(w,T,b={}){const{gen:_,it:S}=w,C=[v(S,b),y(w,b)];return x(w,T,C),_.object(...C)}function v({errorPath:w},{instancePath:T}){const b=T?(0,t.str)`${w}${(0,n.getErrorPath)(T,n.Type.Str)}`:w;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,b)]}function y({keyword:w,it:{errSchemaPath:T}},{schemaPath:b,parentSchema:_}){let S=_?T:(0,t.str)`${T}/${w}`;return b&&(S=(0,t.str)`${S}${(0,n.getErrorPath)(b,n.Type.Str)}`),[h.schemaPath,S]}function x(w,{params:T,message:b},_){const{keyword:S,data:C,schemaValue:E,it:O}=w,{opts:j,propertyName:P,topSchemaRef:$,schemaPath:I}=O;_.push([h.keyword,S],[h.params,typeof T=="function"?T(w):T||(0,t._)`{}`]),j.messages&&_.push([h.message,typeof b=="function"?b(w):b]),j.verbose&&_.push([h.schema,E],[h.parentSchema,(0,t._)`${$}${I}`],[r.default.data,C]),P&&_.push([h.propertyName,P])}})(w1)),w1}var hk;function Oee(){if(hk)return Ul;hk=1,Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.boolOrEmptySchema=Ul.topBoolOrEmptySchema=void 0;const e=_0(),t=Pt(),n=dl(),r={message:"boolean schema is false"};function o(c){const{gen:u,schema:f,validateName:h}=c;f===!1?a(c,!1):typeof f=="object"&&f.$async===!0?u.return(n.default.data):(u.assign((0,t._)`${h}.errors`,null),u.return(!0))}Ul.topBoolOrEmptySchema=o;function i(c,u){const{gen:f,schema:h}=c;h===!1?(f.var(u,!1),a(c)):f.var(u,!0)}Ul.boolOrEmptySchema=i;function a(c,u){const{gen:f,data:h}=c,p={gen:f,keyword:"false schema",data:h,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(p,r,void 0,u)}return Ul}var Br={},Vl={},pk;function oD(){if(pk)return Vl;pk=1,Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.getRules=Vl.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(o){return typeof o=="string"&&t.has(o)}Vl.isJSONType=n;function r(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}return Vl.getRules=r,Vl}var ji={},mk;function sD(){if(mk)return ji;mk=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.shouldUseRule=ji.shouldUseGroup=ji.schemaHasRulesForType=void 0;function e({schema:r,self:o},i){const a=o.RULES.types[i];return a&&a!==!0&&t(r,a)}ji.schemaHasRulesForType=e;function t(r,o){return o.rules.some(i=>n(r,i))}ji.shouldUseGroup=t;function n(r,o){var i;return r[o.keyword]!==void 0||((i=o.definition.implements)===null||i===void 0?void 0:i.some(a=>r[a]!==void 0))}return ji.shouldUseRule=n,ji}var gk;function jy(){if(gk)return Br;gk=1,Object.defineProperty(Br,"__esModule",{value:!0}),Br.reportTypeError=Br.checkDataTypes=Br.checkDataType=Br.coerceAndCheckDataType=Br.getJSONTypes=Br.getSchemaTypes=Br.DataType=void 0;const e=oD(),t=sD(),n=_0(),r=Pt(),o=fn();var i;(function(b){b[b.Correct=0]="Correct",b[b.Wrong=1]="Wrong"})(i||(Br.DataType=i={}));function a(b){const _=c(b.type);if(_.includes("null")){if(b.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!_.length&&b.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');b.nullable===!0&&_.push("null")}return _}Br.getSchemaTypes=a;function c(b){const _=Array.isArray(b)?b:b?[b]:[];if(_.every(e.isJSONType))return _;throw new Error("type must be JSONType or JSONType[]: "+_.join(","))}Br.getJSONTypes=c;function u(b,_){const{gen:S,data:C,opts:E}=b,O=h(_,E.coerceTypes),j=_.length>0&&!(O.length===0&&_.length===1&&(0,t.schemaHasRulesForType)(b,_[0]));if(j){const P=y(_,C,E.strictNumbers,i.Wrong);S.if(P,()=>{O.length?p(b,_,O):w(b)})}return j}Br.coerceAndCheckDataType=u;const f=new Set(["string","number","integer","boolean","null"]);function h(b,_){return _?b.filter(S=>f.has(S)||_==="array"&&S==="array"):[]}function p(b,_,S){const{gen:C,data:E,opts:O}=b,j=C.let("dataType",(0,r._)`typeof ${E}`),P=C.let("coerced",(0,r._)`undefined`);O.coerceTypes==="array"&&C.if((0,r._)`${j} == 'object' && Array.isArray(${E}) && ${E}.length == 1`,()=>C.assign(E,(0,r._)`${E}[0]`).assign(j,(0,r._)`typeof ${E}`).if(y(_,E,O.strictNumbers),()=>C.assign(P,E))),C.if((0,r._)`${P} !== undefined`);for(const I of S)(f.has(I)||I==="array"&&O.coerceTypes==="array")&&$(I);C.else(),w(b),C.endIf(),C.if((0,r._)`${P} !== undefined`,()=>{C.assign(E,P),g(b,P)});function $(I){switch(I){case"string":C.elseIf((0,r._)`${j} == "number" || ${j} == "boolean"`).assign(P,(0,r._)`"" + ${E}`).elseIf((0,r._)`${E} === null`).assign(P,(0,r._)`""`);return;case"number":C.elseIf((0,r._)`${j} == "boolean" || ${E} === null
|
|
50
|
+
|| (${j} == "string" && ${E} && ${E} == +${E})`).assign(P,(0,r._)`+${E}`);return;case"integer":C.elseIf((0,r._)`${j} === "boolean" || ${E} === null
|
|
51
|
+
|| (${j} === "string" && ${E} && ${E} == +${E} && !(${E} % 1))`).assign(P,(0,r._)`+${E}`);return;case"boolean":C.elseIf((0,r._)`${E} === "false" || ${E} === 0 || ${E} === null`).assign(P,!1).elseIf((0,r._)`${E} === "true" || ${E} === 1`).assign(P,!0);return;case"null":C.elseIf((0,r._)`${E} === "" || ${E} === 0 || ${E} === false`),C.assign(P,null);return;case"array":C.elseIf((0,r._)`${j} === "string" || ${j} === "number"
|
|
52
|
+
|| ${j} === "boolean" || ${E} === null`).assign(P,(0,r._)`[${E}]`)}}}function g({gen:b,parentData:_,parentDataProperty:S},C){b.if((0,r._)`${_} !== undefined`,()=>b.assign((0,r._)`${_}[${S}]`,C))}function v(b,_,S,C=i.Correct){const E=C===i.Correct?r.operators.EQ:r.operators.NEQ;let O;switch(b){case"null":return(0,r._)`${_} ${E} null`;case"array":O=(0,r._)`Array.isArray(${_})`;break;case"object":O=(0,r._)`${_} && typeof ${_} == "object" && !Array.isArray(${_})`;break;case"integer":O=j((0,r._)`!(${_} % 1) && !isNaN(${_})`);break;case"number":O=j();break;default:return(0,r._)`typeof ${_} ${E} ${b}`}return C===i.Correct?O:(0,r.not)(O);function j(P=r.nil){return(0,r.and)((0,r._)`typeof ${_} == "number"`,P,S?(0,r._)`isFinite(${_})`:r.nil)}}Br.checkDataType=v;function y(b,_,S,C){if(b.length===1)return v(b[0],_,S,C);let E;const O=(0,o.toHash)(b);if(O.array&&O.object){const j=(0,r._)`typeof ${_} != "object"`;E=O.null?j:(0,r._)`!${_} || ${j}`,delete O.null,delete O.array,delete O.object}else E=r.nil;O.number&&delete O.integer;for(const j in O)E=(0,r.and)(E,v(j,_,S,C));return E}Br.checkDataTypes=y;const x={message:({schema:b})=>`must be ${b}`,params:({schema:b,schemaValue:_})=>typeof b=="string"?(0,r._)`{type: ${b}}`:(0,r._)`{type: ${_}}`};function w(b){const _=T(b);(0,n.reportError)(_,x)}Br.reportTypeError=w;function T(b){const{gen:_,data:S,schema:C}=b,E=(0,o.schemaRefOrVal)(b,C,"type");return{gen:_,keyword:"type",data:S,schema:C.type,schemaCode:E,schemaValue:E,parentSchema:C,params:{},it:b}}return Br}var Ld={},yk;function Aee(){if(yk)return Ld;yk=1,Object.defineProperty(Ld,"__esModule",{value:!0}),Ld.assignDefaults=void 0;const e=Pt(),t=fn();function n(o,i){const{properties:a,items:c}=o.schema;if(i==="object"&&a)for(const u in a)r(o,u,a[u].default);else i==="array"&&Array.isArray(c)&&c.forEach((u,f)=>r(o,f,u.default))}Ld.assignDefaults=n;function r(o,i,a){const{gen:c,compositeRule:u,data:f,opts:h}=o;if(a===void 0)return;const p=(0,e._)`${f}${(0,e.getProperty)(i)}`;if(u){(0,t.checkStrictMode)(o,`default is ignored for: ${p}`);return}let g=(0,e._)`${p} === undefined`;h.useDefaults==="empty"&&(g=(0,e._)`${g} || ${p} === null || ${p} === ""`),c.if(g,(0,e._)`${p} = ${(0,e.stringify)(a)}`)}return Ld}var Cs={},wn={},vk;function Ps(){if(vk)return wn;vk=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.validateUnion=wn.validateArray=wn.usePattern=wn.callValidateCode=wn.schemaProperties=wn.allSchemaProperties=wn.noPropertyInData=wn.propertyInData=wn.isOwnProperty=wn.hasPropFunc=wn.reportMissingProp=wn.checkMissingProp=wn.checkReportMissingProp=void 0;const e=Pt(),t=fn(),n=dl(),r=fn();function o(b,_){const{gen:S,data:C,it:E}=b;S.if(h(S,C,_,E.opts.ownProperties),()=>{b.setParams({missingProperty:(0,e._)`${_}`},!0),b.error()})}wn.checkReportMissingProp=o;function i({gen:b,data:_,it:{opts:S}},C,E){return(0,e.or)(...C.map(O=>(0,e.and)(h(b,_,O,S.ownProperties),(0,e._)`${E} = ${O}`)))}wn.checkMissingProp=i;function a(b,_){b.setParams({missingProperty:_},!0),b.error()}wn.reportMissingProp=a;function c(b){return b.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}wn.hasPropFunc=c;function u(b,_,S){return(0,e._)`${c(b)}.call(${_}, ${S})`}wn.isOwnProperty=u;function f(b,_,S,C){const E=(0,e._)`${_}${(0,e.getProperty)(S)} !== undefined`;return C?(0,e._)`${E} && ${u(b,_,S)}`:E}wn.propertyInData=f;function h(b,_,S,C){const E=(0,e._)`${_}${(0,e.getProperty)(S)} === undefined`;return C?(0,e.or)(E,(0,e.not)(u(b,_,S))):E}wn.noPropertyInData=h;function p(b){return b?Object.keys(b).filter(_=>_!=="__proto__"):[]}wn.allSchemaProperties=p;function g(b,_){return p(_).filter(S=>!(0,t.alwaysValidSchema)(b,_[S]))}wn.schemaProperties=g;function v({schemaCode:b,data:_,it:{gen:S,topSchemaRef:C,schemaPath:E,errorPath:O},it:j},P,$,I){const L=I?(0,e._)`${b}, ${_}, ${C}${E}`:_,F=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,O)],[n.default.parentData,j.parentData],[n.default.parentDataProperty,j.parentDataProperty],[n.default.rootData,n.default.rootData]];j.opts.dynamicRef&&F.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const J=(0,e._)`${L}, ${S.object(...F)}`;return $!==e.nil?(0,e._)`${P}.call(${$}, ${J})`:(0,e._)`${P}(${J})`}wn.callValidateCode=v;const y=(0,e._)`new RegExp`;function x({gen:b,it:{opts:_}},S){const C=_.unicodeRegExp?"u":"",{regExp:E}=_.code,O=E(S,C);return b.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${E.code==="new RegExp"?y:(0,r.useFunc)(b,E)}(${S}, ${C})`})}wn.usePattern=x;function w(b){const{gen:_,data:S,keyword:C,it:E}=b,O=_.name("valid");if(E.allErrors){const P=_.let("valid",!0);return j(()=>_.assign(P,!1)),P}return _.var(O,!0),j(()=>_.break()),O;function j(P){const $=_.const("len",(0,e._)`${S}.length`);_.forRange("i",0,$,I=>{b.subschema({keyword:C,dataProp:I,dataPropType:t.Type.Num},O),_.if((0,e.not)(O),P)})}}wn.validateArray=w;function T(b){const{gen:_,schema:S,keyword:C,it:E}=b;if(!Array.isArray(S))throw new Error("ajv implementation error");if(S.some($=>(0,t.alwaysValidSchema)(E,$))&&!E.opts.unevaluated)return;const j=_.let("valid",!1),P=_.name("_valid");_.block(()=>S.forEach(($,I)=>{const L=b.subschema({keyword:C,schemaProp:I,compositeRule:!0},P);_.assign(j,(0,e._)`${j} || ${P}`),b.mergeValidEvaluated(L,P)||_.if((0,e.not)(j))})),b.result(j,()=>b.reset(),()=>b.error(!0))}return wn.validateUnion=T,wn}var bk;function kee(){if(bk)return Cs;bk=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.validateKeywordUsage=Cs.validSchemaType=Cs.funcKeywordCode=Cs.macroKeywordCode=void 0;const e=Pt(),t=dl(),n=Ps(),r=_0();function o(g,v){const{gen:y,keyword:x,schema:w,parentSchema:T,it:b}=g,_=v.macro.call(b.self,w,T,b),S=f(y,x,_);b.opts.validateSchema!==!1&&b.self.validateSchema(_,!0);const C=y.name("valid");g.subschema({schema:_,schemaPath:e.nil,errSchemaPath:`${b.errSchemaPath}/${x}`,topSchemaRef:S,compositeRule:!0},C),g.pass(C,()=>g.error(!0))}Cs.macroKeywordCode=o;function i(g,v){var y;const{gen:x,keyword:w,schema:T,parentSchema:b,$data:_,it:S}=g;u(S,v);const C=!_&&v.compile?v.compile.call(S.self,T,b,S):v.validate,E=f(x,w,C),O=x.let("valid");g.block$data(O,j),g.ok((y=v.valid)!==null&&y!==void 0?y:O);function j(){if(v.errors===!1)I(),v.modifying&&a(g),L(()=>g.error());else{const F=v.async?P():$();v.modifying&&a(g),L(()=>c(g,F))}}function P(){const F=x.let("ruleErrs",null);return x.try(()=>I((0,e._)`await `),J=>x.assign(O,!1).if((0,e._)`${J} instanceof ${S.ValidationError}`,()=>x.assign(F,(0,e._)`${J}.errors`),()=>x.throw(J))),F}function $(){const F=(0,e._)`${E}.errors`;return x.assign(F,null),I(e.nil),F}function I(F=v.async?(0,e._)`await `:e.nil){const J=S.opts.passContext?t.default.this:t.default.self,ee=!("compile"in v&&!_||v.schema===!1);x.assign(O,(0,e._)`${F}${(0,n.callValidateCode)(g,E,J,ee)}`,v.modifying)}function L(F){var J;x.if((0,e.not)((J=v.valid)!==null&&J!==void 0?J:O),F)}}Cs.funcKeywordCode=i;function a(g){const{gen:v,data:y,it:x}=g;v.if(x.parentData,()=>v.assign(y,(0,e._)`${x.parentData}[${x.parentDataProperty}]`))}function c(g,v){const{gen:y}=g;y.if((0,e._)`Array.isArray(${v})`,()=>{y.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(g)},()=>g.error())}function u({schemaEnv:g},v){if(v.async&&!g.$async)throw new Error("async keyword in sync schema")}function f(g,v,y){if(y===void 0)throw new Error(`keyword "${v}" failed to compile`);return g.scopeValue("keyword",typeof y=="function"?{ref:y}:{ref:y,code:(0,e.stringify)(y)})}function h(g,v,y=!1){return!v.length||v.some(x=>x==="array"?Array.isArray(g):x==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==x||y&&typeof g>"u")}Cs.validSchemaType=h;function p({schema:g,opts:v,self:y,errSchemaPath:x},w,T){if(Array.isArray(w.keyword)?!w.keyword.includes(T):w.keyword!==T)throw new Error("ajv implementation error");const b=w.dependencies;if(b?.some(_=>!Object.prototype.hasOwnProperty.call(g,_)))throw new Error(`parent schema must have dependencies of ${T}: ${b.join(",")}`);if(w.validateSchema&&!w.validateSchema(g[T])){const S=`keyword "${T}" value is invalid at path "${x}": `+y.errorsText(w.validateSchema.errors);if(v.validateSchema==="log")y.logger.error(S);else throw new Error(S)}}return Cs.validateKeywordUsage=p,Cs}var Pi={},Sk;function Mee(){if(Sk)return Pi;Sk=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.extendSubschemaMode=Pi.extendSubschemaData=Pi.getSubschema=void 0;const e=Pt(),t=fn();function n(i,{keyword:a,schemaProp:c,schema:u,schemaPath:f,errSchemaPath:h,topSchemaRef:p}){if(a!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const g=i.schema[a];return c===void 0?{schema:g,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${a}`}:{schema:g[c],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(c)}`,errSchemaPath:`${i.errSchemaPath}/${a}/${(0,t.escapeFragment)(c)}`}}if(u!==void 0){if(f===void 0||h===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:f,topSchemaRef:p,errSchemaPath:h}}throw new Error('either "keyword" or "schema" must be passed')}Pi.getSubschema=n;function r(i,a,{dataProp:c,dataPropType:u,data:f,dataTypes:h,propertyName:p}){if(f!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:g}=a;if(c!==void 0){const{errorPath:y,dataPathArr:x,opts:w}=a,T=g.let("data",(0,e._)`${a.data}${(0,e.getProperty)(c)}`,!0);v(T),i.errorPath=(0,e.str)`${y}${(0,t.getErrorPath)(c,u,w.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${c}`,i.dataPathArr=[...x,i.parentDataProperty]}if(f!==void 0){const y=f instanceof e.Name?f:g.let("data",f,!0);v(y),p!==void 0&&(i.propertyName=p)}h&&(i.dataTypes=h);function v(y){i.data=y,i.dataLevel=a.dataLevel+1,i.dataTypes=[],a.definedProperties=new Set,i.parentData=a.data,i.dataNames=[...a.dataNames,y]}}Pi.extendSubschemaData=r;function o(i,{jtdDiscriminator:a,jtdMetadata:c,compositeRule:u,createErrors:f,allErrors:h}){u!==void 0&&(i.compositeRule=u),f!==void 0&&(i.createErrors=f),h!==void 0&&(i.allErrors=h),i.jtdDiscriminator=a,i.jtdMetadata=c}return Pi.extendSubschemaMode=o,Pi}var co={},C1,wk;function iD(){return wk||(wk=1,C1=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}),C1}var T1={exports:{}},xk;function jee(){if(xk)return T1.exports;xk=1;var e=T1.exports=function(r,o,i){typeof o=="function"&&(i=o,o={}),i=o.cb||i;var a=typeof i=="function"?i:i.pre||function(){},c=i.post||function(){};t(o,a,c,r,"",r)};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(r,o,i,a,c,u,f,h,p,g){if(a&&typeof a=="object"&&!Array.isArray(a)){o(a,c,u,f,h,p,g);for(var v in a){var y=a[v];if(Array.isArray(y)){if(v in e.arrayKeywords)for(var x=0;x<y.length;x++)t(r,o,i,y[x],c+"/"+v+"/"+x,u,c,v,a,x)}else if(v in e.propsKeywords){if(y&&typeof y=="object")for(var w in y)t(r,o,i,y[w],c+"/"+v+"/"+n(w),u,c,v,a,w)}else(v in e.keywords||r.allKeys&&!(v in e.skipKeywords))&&t(r,o,i,y,c+"/"+v,u,c,v,a)}i(a,c,u,f,h,p,g)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return T1.exports}var Ek;function C0(){if(Ek)return co;Ek=1,Object.defineProperty(co,"__esModule",{value:!0}),co.getSchemaRefs=co.resolveUrl=co.normalizeId=co._getFullPath=co.getFullPath=co.inlineRef=void 0;const e=fn(),t=iD(),n=jee(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(x,w=!0){return typeof x=="boolean"?!0:w===!0?!a(x):w?c(x)<=w:!1}co.inlineRef=o;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(x){for(const w in x){if(i.has(w))return!0;const T=x[w];if(Array.isArray(T)&&T.some(a)||typeof T=="object"&&a(T))return!0}return!1}function c(x){let w=0;for(const T in x){if(T==="$ref")return 1/0;if(w++,!r.has(T)&&(typeof x[T]=="object"&&(0,e.eachItem)(x[T],b=>w+=c(b)),w===1/0))return 1/0}return w}function u(x,w="",T){T!==!1&&(w=p(w));const b=x.parse(w);return f(x,b)}co.getFullPath=u;function f(x,w){return x.serialize(w).split("#")[0]+"#"}co._getFullPath=f;const h=/#\/?$/;function p(x){return x?x.replace(h,""):""}co.normalizeId=p;function g(x,w,T){return T=p(T),x.resolve(w,T)}co.resolveUrl=g;const v=/^[a-z_][-a-z0-9._]*$/i;function y(x,w){if(typeof x=="boolean")return{};const{schemaId:T,uriResolver:b}=this.opts,_=p(x[T]||w),S={"":_},C=u(b,_,!1),E={},O=new Set;return n(x,{allKeys:!0},($,I,L,F)=>{if(F===void 0)return;const J=C+I;let ee=S[F];typeof $[T]=="string"&&(ee=Z.call(this,$[T])),H.call(this,$.$anchor),H.call(this,$.$dynamicAnchor),S[I]=ee;function Z(V){const oe=this.opts.uriResolver.resolve;if(V=p(ee?oe(ee,V):V),O.has(V))throw P(V);O.add(V);let ne=this.refs[V];return typeof ne=="string"&&(ne=this.refs[ne]),typeof ne=="object"?j($,ne.schema,V):V!==p(J)&&(V[0]==="#"?(j($,E[V],V),E[V]=$):this.refs[V]=J),V}function H(V){if(typeof V=="string"){if(!v.test(V))throw new Error(`invalid anchor "${V}"`);Z.call(this,`#${V}`)}}}),E;function j($,I,L){if(I!==void 0&&!t($,I))throw P(L)}function P($){return new Error(`reference "${$}" resolves to more than one schema`)}}return co.getSchemaRefs=y,co}var _k;function T0(){if(_k)return Mi;_k=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.getData=Mi.KeywordCxt=Mi.validateFunctionCode=void 0;const e=Oee(),t=jy(),n=sD(),r=jy(),o=Aee(),i=kee(),a=Mee(),c=Pt(),u=dl(),f=C0(),h=fn(),p=_0();function g(se){if(C(se)&&(O(se),S(se))){w(se);return}v(se,()=>(0,e.topBoolOrEmptySchema)(se))}Mi.validateFunctionCode=g;function v({gen:se,validateName:X,schema:fe,schemaEnv:he,opts:Pe},ye){Pe.code.es5?se.func(X,(0,c._)`${u.default.data}, ${u.default.valCxt}`,he.$async,()=>{se.code((0,c._)`"use strict"; ${b(fe,Pe)}`),x(se,Pe),se.code(ye)}):se.func(X,(0,c._)`${u.default.data}, ${y(Pe)}`,he.$async,()=>se.code(b(fe,Pe)).code(ye))}function y(se){return(0,c._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${se.dynamicRef?(0,c._)`, ${u.default.dynamicAnchors}={}`:c.nil}}={}`}function x(se,X){se.if(u.default.valCxt,()=>{se.var(u.default.instancePath,(0,c._)`${u.default.valCxt}.${u.default.instancePath}`),se.var(u.default.parentData,(0,c._)`${u.default.valCxt}.${u.default.parentData}`),se.var(u.default.parentDataProperty,(0,c._)`${u.default.valCxt}.${u.default.parentDataProperty}`),se.var(u.default.rootData,(0,c._)`${u.default.valCxt}.${u.default.rootData}`),X.dynamicRef&&se.var(u.default.dynamicAnchors,(0,c._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{se.var(u.default.instancePath,(0,c._)`""`),se.var(u.default.parentData,(0,c._)`undefined`),se.var(u.default.parentDataProperty,(0,c._)`undefined`),se.var(u.default.rootData,u.default.data),X.dynamicRef&&se.var(u.default.dynamicAnchors,(0,c._)`{}`)})}function w(se){const{schema:X,opts:fe,gen:he}=se;v(se,()=>{fe.$comment&&X.$comment&&F(se),$(se),he.let(u.default.vErrors,null),he.let(u.default.errors,0),fe.unevaluated&&T(se),j(se),J(se)})}function T(se){const{gen:X,validateName:fe}=se;se.evaluated=X.const("evaluated",(0,c._)`${fe}.evaluated`),X.if((0,c._)`${se.evaluated}.dynamicProps`,()=>X.assign((0,c._)`${se.evaluated}.props`,(0,c._)`undefined`)),X.if((0,c._)`${se.evaluated}.dynamicItems`,()=>X.assign((0,c._)`${se.evaluated}.items`,(0,c._)`undefined`))}function b(se,X){const fe=typeof se=="object"&&se[X.schemaId];return fe&&(X.code.source||X.code.process)?(0,c._)`/*# sourceURL=${fe} */`:c.nil}function _(se,X){if(C(se)&&(O(se),S(se))){E(se,X);return}(0,e.boolOrEmptySchema)(se,X)}function S({schema:se,self:X}){if(typeof se=="boolean")return!se;for(const fe in se)if(X.RULES.all[fe])return!0;return!1}function C(se){return typeof se.schema!="boolean"}function E(se,X){const{schema:fe,gen:he,opts:Pe}=se;Pe.$comment&&fe.$comment&&F(se),I(se),L(se);const ye=he.const("_errs",u.default.errors);j(se,ye),he.var(X,(0,c._)`${ye} === ${u.default.errors}`)}function O(se){(0,h.checkUnknownRules)(se),P(se)}function j(se,X){if(se.opts.jtd)return Z(se,[],!1,X);const fe=(0,t.getSchemaTypes)(se.schema),he=(0,t.coerceAndCheckDataType)(se,fe);Z(se,fe,!he,X)}function P(se){const{schema:X,errSchemaPath:fe,opts:he,self:Pe}=se;X.$ref&&he.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(X,Pe.RULES)&&Pe.logger.warn(`$ref: keywords ignored in schema at path "${fe}"`)}function $(se){const{schema:X,opts:fe}=se;X.default!==void 0&&fe.useDefaults&&fe.strictSchema&&(0,h.checkStrictMode)(se,"default is ignored in the schema root")}function I(se){const X=se.schema[se.opts.schemaId];X&&(se.baseId=(0,f.resolveUrl)(se.opts.uriResolver,se.baseId,X))}function L(se){if(se.schema.$async&&!se.schemaEnv.$async)throw new Error("async schema in sync schema")}function F({gen:se,schemaEnv:X,schema:fe,errSchemaPath:he,opts:Pe}){const ye=fe.$comment;if(Pe.$comment===!0)se.code((0,c._)`${u.default.self}.logger.log(${ye})`);else if(typeof Pe.$comment=="function"){const De=(0,c.str)`${he}/$comment`,Ue=se.scopeValue("root",{ref:X.root});se.code((0,c._)`${u.default.self}.opts.$comment(${ye}, ${De}, ${Ue}.schema)`)}}function J(se){const{gen:X,schemaEnv:fe,validateName:he,ValidationError:Pe,opts:ye}=se;fe.$async?X.if((0,c._)`${u.default.errors} === 0`,()=>X.return(u.default.data),()=>X.throw((0,c._)`new ${Pe}(${u.default.vErrors})`)):(X.assign((0,c._)`${he}.errors`,u.default.vErrors),ye.unevaluated&&ee(se),X.return((0,c._)`${u.default.errors} === 0`))}function ee({gen:se,evaluated:X,props:fe,items:he}){fe instanceof c.Name&&se.assign((0,c._)`${X}.props`,fe),he instanceof c.Name&&se.assign((0,c._)`${X}.items`,he)}function Z(se,X,fe,he){const{gen:Pe,schema:ye,data:De,allErrors:Ue,opts:ve,self:Fe}=se,{RULES:Le}=Fe;if(ye.$ref&&(ve.ignoreKeywordsWithRef||!(0,h.schemaHasRulesButRef)(ye,Le))){Pe.block(()=>re(se,"$ref",Le.all.$ref.definition));return}ve.jtd||V(se,X),Pe.block(()=>{for(const Oe of Le.rules)Ze(Oe);Ze(Le.post)});function Ze(Oe){(0,n.shouldUseGroup)(ye,Oe)&&(Oe.type?(Pe.if((0,r.checkDataType)(Oe.type,De,ve.strictNumbers)),H(se,Oe),X.length===1&&X[0]===Oe.type&&fe&&(Pe.else(),(0,r.reportTypeError)(se)),Pe.endIf()):H(se,Oe),Ue||Pe.if((0,c._)`${u.default.errors} === ${he||0}`))}}function H(se,X){const{gen:fe,schema:he,opts:{useDefaults:Pe}}=se;Pe&&(0,o.assignDefaults)(se,X.type),fe.block(()=>{for(const ye of X.rules)(0,n.shouldUseRule)(he,ye)&&re(se,ye.keyword,ye.definition,X.type)})}function V(se,X){se.schemaEnv.meta||!se.opts.strictTypes||(oe(se,X),se.opts.allowUnionTypes||ne(se,X),D(se,se.dataTypes))}function oe(se,X){if(X.length){if(!se.dataTypes.length){se.dataTypes=X;return}X.forEach(fe=>{U(se.dataTypes,fe)||G(se,`type "${fe}" not allowed by context "${se.dataTypes.join(",")}"`)}),N(se,X)}}function ne(se,X){X.length>1&&!(X.length===2&&X.includes("null"))&&G(se,"use allowUnionTypes to allow union type keyword")}function D(se,X){const fe=se.self.RULES.all;for(const he in fe){const Pe=fe[he];if(typeof Pe=="object"&&(0,n.shouldUseRule)(se.schema,Pe)){const{type:ye}=Pe.definition;ye.length&&!ye.some(De=>q(X,De))&&G(se,`missing type "${ye.join(",")}" for keyword "${he}"`)}}}function q(se,X){return se.includes(X)||X==="number"&&se.includes("integer")}function U(se,X){return se.includes(X)||X==="integer"&&se.includes("number")}function N(se,X){const fe=[];for(const he of se.dataTypes)U(X,he)?fe.push(he):X.includes("integer")&&he==="number"&&fe.push("integer");se.dataTypes=fe}function G(se,X){const fe=se.schemaEnv.baseId+se.errSchemaPath;X+=` at "${fe}" (strictTypes)`,(0,h.checkStrictMode)(se,X,se.opts.strictTypes)}class te{constructor(X,fe,he){if((0,i.validateKeywordUsage)(X,fe,he),this.gen=X.gen,this.allErrors=X.allErrors,this.keyword=he,this.data=X.data,this.schema=X.schema[he],this.$data=fe.$data&&X.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,h.schemaRefOrVal)(X,this.schema,he,this.$data),this.schemaType=fe.schemaType,this.parentSchema=X.schema,this.params={},this.it=X,this.def=fe,this.$data)this.schemaCode=X.gen.const("vSchema",Ee(this.$data,X));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,fe.schemaType,fe.allowUndefined))throw new Error(`${he} value must be ${JSON.stringify(fe.schemaType)}`);("code"in fe?fe.trackErrors:fe.errors!==!1)&&(this.errsCount=X.gen.const("_errs",u.default.errors))}result(X,fe,he){this.failResult((0,c.not)(X),fe,he)}failResult(X,fe,he){this.gen.if(X),he?he():this.error(),fe?(this.gen.else(),fe(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(X,fe){this.failResult((0,c.not)(X),void 0,fe)}fail(X){if(X===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(X),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(X){if(!this.$data)return this.fail(X);const{schemaCode:fe}=this;this.fail((0,c._)`${fe} !== undefined && (${(0,c.or)(this.invalid$data(),X)})`)}error(X,fe,he){if(fe){this.setParams(fe),this._error(X,he),this.setParams({});return}this._error(X,he)}_error(X,fe){(X?p.reportExtraError:p.reportError)(this,this.def.error,fe)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(X){this.allErrors||this.gen.if(X)}setParams(X,fe){fe?Object.assign(this.params,X):this.params=X}block$data(X,fe,he=c.nil){this.gen.block(()=>{this.check$data(X,he),fe()})}check$data(X=c.nil,fe=c.nil){if(!this.$data)return;const{gen:he,schemaCode:Pe,schemaType:ye,def:De}=this;he.if((0,c.or)((0,c._)`${Pe} === undefined`,fe)),X!==c.nil&&he.assign(X,!0),(ye.length||De.validateSchema)&&(he.elseIf(this.invalid$data()),this.$dataError(),X!==c.nil&&he.assign(X,!1)),he.else()}invalid$data(){const{gen:X,schemaCode:fe,schemaType:he,def:Pe,it:ye}=this;return(0,c.or)(De(),Ue());function De(){if(he.length){if(!(fe instanceof c.Name))throw new Error("ajv implementation error");const ve=Array.isArray(he)?he:[he];return(0,c._)`${(0,r.checkDataTypes)(ve,fe,ye.opts.strictNumbers,r.DataType.Wrong)}`}return c.nil}function Ue(){if(Pe.validateSchema){const ve=X.scopeValue("validate$data",{ref:Pe.validateSchema});return(0,c._)`!${ve}(${fe})`}return c.nil}}subschema(X,fe){const he=(0,a.getSubschema)(this.it,X);(0,a.extendSubschemaData)(he,this.it,X),(0,a.extendSubschemaMode)(he,X);const Pe={...this.it,...he,items:void 0,props:void 0};return _(Pe,fe),Pe}mergeEvaluated(X,fe){const{it:he,gen:Pe}=this;he.opts.unevaluated&&(he.props!==!0&&X.props!==void 0&&(he.props=h.mergeEvaluated.props(Pe,X.props,he.props,fe)),he.items!==!0&&X.items!==void 0&&(he.items=h.mergeEvaluated.items(Pe,X.items,he.items,fe)))}mergeValidEvaluated(X,fe){const{it:he,gen:Pe}=this;if(he.opts.unevaluated&&(he.props!==!0||he.items!==!0))return Pe.if(fe,()=>this.mergeEvaluated(X,c.Name)),!0}}Mi.KeywordCxt=te;function re(se,X,fe,he){const Pe=new te(se,fe,X);"code"in fe?fe.code(Pe,he):Pe.$data&&fe.validate?(0,i.funcKeywordCode)(Pe,fe):"macro"in fe?(0,i.macroKeywordCode)(Pe,fe):(fe.compile||fe.validate)&&(0,i.funcKeywordCode)(Pe,fe)}const de=/^\/(?:[^~]|~0|~1)*$/,we=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ee(se,{dataLevel:X,dataNames:fe,dataPathArr:he}){let Pe,ye;if(se==="")return u.default.rootData;if(se[0]==="/"){if(!de.test(se))throw new Error(`Invalid JSON-pointer: ${se}`);Pe=se,ye=u.default.rootData}else{const Fe=we.exec(se);if(!Fe)throw new Error(`Invalid JSON-pointer: ${se}`);const Le=+Fe[1];if(Pe=Fe[2],Pe==="#"){if(Le>=X)throw new Error(ve("property/index",Le));return he[X-Le]}if(Le>X)throw new Error(ve("data",Le));if(ye=fe[X-Le],!Pe)return ye}let De=ye;const Ue=Pe.split("/");for(const Fe of Ue)Fe&&(ye=(0,c._)`${ye}${(0,c.getProperty)((0,h.unescapeJsonPointer)(Fe))}`,De=(0,c._)`${De} && ${ye}`);return De;function ve(Fe,Le){return`Cannot access ${Fe} ${Le} levels up, current level is ${X}`}}return Mi.getData=Ee,Mi}var Hm={},Ck;function XE(){if(Ck)return Hm;Ck=1,Object.defineProperty(Hm,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return Hm.default=e,Hm}var Km={},Tk;function R0(){if(Tk)return Km;Tk=1,Object.defineProperty(Km,"__esModule",{value:!0});const e=C0();class t extends Error{constructor(r,o,i,a){super(a||`can't resolve reference ${i} from id ${o}`),this.missingRef=(0,e.resolveUrl)(r,o,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return Km.default=t,Km}var Io={},Rk;function QE(){if(Rk)return Io;Rk=1,Object.defineProperty(Io,"__esModule",{value:!0}),Io.resolveSchema=Io.getCompilingSchema=Io.resolveRef=Io.compileSchema=Io.SchemaEnv=void 0;const e=Pt(),t=XE(),n=dl(),r=C0(),o=fn(),i=T0();class a{constructor(T){var b;this.refs={},this.dynamicAnchors={};let _;typeof T.schema=="object"&&(_=T.schema),this.schema=T.schema,this.schemaId=T.schemaId,this.root=T.root||this,this.baseId=(b=T.baseId)!==null&&b!==void 0?b:(0,r.normalizeId)(_?.[T.schemaId||"$id"]),this.schemaPath=T.schemaPath,this.localRefs=T.localRefs,this.meta=T.meta,this.$async=_?.$async,this.refs={}}}Io.SchemaEnv=a;function c(w){const T=h.call(this,w);if(T)return T;const b=(0,r.getFullPath)(this.opts.uriResolver,w.root.baseId),{es5:_,lines:S}=this.opts.code,{ownProperties:C}=this.opts,E=new e.CodeGen(this.scope,{es5:_,lines:S,ownProperties:C});let O;w.$async&&(O=E.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=E.scopeName("validate");w.validateName=j;const P={gen:E,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:E.scopeValue("schema",this.opts.code.source===!0?{ref:w.schema,code:(0,e.stringify)(w.schema)}:{ref:w.schema}),validateName:j,ValidationError:O,schema:w.schema,schemaEnv:w,rootId:b,baseId:w.baseId||b,schemaPath:e.nil,errSchemaPath:w.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let $;try{this._compilations.add(w),(0,i.validateFunctionCode)(P),E.optimize(this.opts.code.optimize);const I=E.toString();$=`${E.scopeRefs(n.default.scope)}return ${I}`,this.opts.code.process&&($=this.opts.code.process($,w));const F=new Function(`${n.default.self}`,`${n.default.scope}`,$)(this,this.scope.get());if(this.scope.value(j,{ref:F}),F.errors=null,F.schema=w.schema,F.schemaEnv=w,w.$async&&(F.$async=!0),this.opts.code.source===!0&&(F.source={validateName:j,validateCode:I,scopeValues:E._values}),this.opts.unevaluated){const{props:J,items:ee}=P;F.evaluated={props:J instanceof e.Name?void 0:J,items:ee instanceof e.Name?void 0:ee,dynamicProps:J instanceof e.Name,dynamicItems:ee instanceof e.Name},F.source&&(F.source.evaluated=(0,e.stringify)(F.evaluated))}return w.validate=F,w}catch(I){throw delete w.validate,delete w.validateName,$&&this.logger.error("Error compiling schema, function code:",$),I}finally{this._compilations.delete(w)}}Io.compileSchema=c;function u(w,T,b){var _;b=(0,r.resolveUrl)(this.opts.uriResolver,T,b);const S=w.refs[b];if(S)return S;let C=g.call(this,w,b);if(C===void 0){const E=(_=w.localRefs)===null||_===void 0?void 0:_[b],{schemaId:O}=this.opts;E&&(C=new a({schema:E,schemaId:O,root:w,baseId:T}))}if(C!==void 0)return w.refs[b]=f.call(this,C)}Io.resolveRef=u;function f(w){return(0,r.inlineRef)(w.schema,this.opts.inlineRefs)?w.schema:w.validate?w:c.call(this,w)}function h(w){for(const T of this._compilations)if(p(T,w))return T}Io.getCompilingSchema=h;function p(w,T){return w.schema===T.schema&&w.root===T.root&&w.baseId===T.baseId}function g(w,T){let b;for(;typeof(b=this.refs[T])=="string";)T=b;return b||this.schemas[T]||v.call(this,w,T)}function v(w,T){const b=this.opts.uriResolver.parse(T),_=(0,r._getFullPath)(this.opts.uriResolver,b);let S=(0,r.getFullPath)(this.opts.uriResolver,w.baseId,void 0);if(Object.keys(w.schema).length>0&&_===S)return x.call(this,b,w);const C=(0,r.normalizeId)(_),E=this.refs[C]||this.schemas[C];if(typeof E=="string"){const O=v.call(this,w,E);return typeof O?.schema!="object"?void 0:x.call(this,b,O)}if(typeof E?.schema=="object"){if(E.validate||c.call(this,E),C===(0,r.normalizeId)(T)){const{schema:O}=E,{schemaId:j}=this.opts,P=O[j];return P&&(S=(0,r.resolveUrl)(this.opts.uriResolver,S,P)),new a({schema:O,schemaId:j,root:w,baseId:S})}return x.call(this,b,E)}}Io.resolveSchema=v;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function x(w,{baseId:T,schema:b,root:_}){var S;if(((S=w.fragment)===null||S===void 0?void 0:S[0])!=="/")return;for(const O of w.fragment.slice(1).split("/")){if(typeof b=="boolean")return;const j=b[(0,o.unescapeFragment)(O)];if(j===void 0)return;b=j;const P=typeof b=="object"&&b[this.opts.schemaId];!y.has(O)&&P&&(T=(0,r.resolveUrl)(this.opts.uriResolver,T,P))}let C;if(typeof b!="boolean"&&b.$ref&&!(0,o.schemaHasRulesButRef)(b,this.RULES)){const O=(0,r.resolveUrl)(this.opts.uriResolver,T,b.$ref);C=v.call(this,_,O)}const{schemaId:E}=this.opts;if(C=C||new a({schema:b,schemaId:E,root:_,baseId:T}),C.schema!==C.root.schema)return C}return Io}const Pee="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Nee="Meta-schema for $data reference (JSON AnySchema extension proposal)",Dee="object",$ee=["$data"],Iee={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},zee=!1,Lee={$id:Pee,description:Nee,type:Dee,required:$ee,properties:Iee,additionalProperties:zee};var Gm={},Fd={exports:{}},R1,Ok;function aD(){if(Ok)return R1;Ok=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 n(g){let v="",y=0,x=0;for(x=0;x<g.length;x++)if(y=g[x].charCodeAt(0),y!==48){if(!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";v+=g[x];break}for(x+=1;x<g.length;x++){if(y=g[x].charCodeAt(0),!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";v+=g[x]}return v}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(g){return g.length=0,!0}function i(g,v,y){if(g.length){const x=n(g);if(x!=="")v.push(x);else return y.error=!0,!1;g.length=0}return!0}function a(g){let v=0;const y={error:!1,address:"",zone:""},x=[],w=[];let T=!1,b=!1,_=i;for(let S=0;S<g.length;S++){const C=g[S];if(!(C==="["||C==="]"))if(C===":"){if(T===!0&&(b=!0),!_(w,x,y))break;if(++v>7){y.error=!0;break}S>0&&g[S-1]===":"&&(T=!0),x.push(":");continue}else if(C==="%"){if(!_(w,x,y))break;_=o}else{w.push(C);continue}}return w.length&&(_===o?y.zone=w.join(""):b?x.push(w.join("")):x.push(n(w))),y.address=x.join(""),y}function c(g){if(u(g,":")<2)return{host:g,isIPV6:!1};const v=a(g);if(v.error)return{host:g,isIPV6:!1};{let y=v.address,x=v.address;return v.zone&&(y+="%"+v.zone,x+="%25"+v.zone),{host:y,isIPV6:!0,escapedHost:x}}}function u(g,v){let y=0;for(let x=0;x<g.length;x++)g[x]===v&&y++;return y}function f(g){let v=g;const y=[];let x=-1,w=0;for(;w=v.length;){if(w===1){if(v===".")break;if(v==="/"){y.push("/");break}else{y.push(v);break}}else if(w===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){y.push("/");break}}else if(w===3&&v==="/.."){y.length!==0&&y.pop(),y.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),y.length!==0&&y.pop();continue}}if((x=v.indexOf("/",1))===-1){y.push(v);break}else y.push(v.slice(0,x)),v=v.slice(x)}return y.join("")}function h(g,v){const y=v!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=y(g.scheme)),g.userinfo!==void 0&&(g.userinfo=y(g.userinfo)),g.host!==void 0&&(g.host=y(g.host)),g.path!==void 0&&(g.path=y(g.path)),g.query!==void 0&&(g.query=y(g.query)),g.fragment!==void 0&&(g.fragment=y(g.fragment)),g}function p(g){const v=[];if(g.userinfo!==void 0&&(v.push(g.userinfo),v.push("@")),g.host!==void 0){let y=unescape(g.host);if(!t(y)){const x=c(y);x.isIPV6===!0?y=`[${x.escapedHost}]`:y=g.host}v.push(y)}return(typeof g.port=="number"||typeof g.port=="string")&&(v.push(":"),v.push(String(g.port))),v.length?v.join(""):void 0}return R1={nonSimpleDomain:r,recomposeAuthority:p,normalizeComponentEncoding:h,removeDotSegments:f,isIPv4:t,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:n},R1}var O1,Ak;function Fee(){if(Ak)return O1;Ak=1;const{isUUID:e}=aD(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(C){return n.indexOf(C)!==-1}function o(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 i(C){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C}function a(C){const E=String(C.scheme).toLowerCase()==="https";return(C.port===(E?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}function c(C){return C.secure=o(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C}function u(C){if((C.port===(o(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[E,O]=C.resourceName.split("?");C.path=E&&E!=="/"?E:void 0,C.query=O,C.resourceName=void 0}return C.fragment=void 0,C}function f(C,E){if(!C.path)return C.error="URN can not be parsed",C;const O=C.path.match(t);if(O){const j=E.scheme||C.scheme||"urn";C.nid=O[1].toLowerCase(),C.nss=O[2];const P=`${j}:${E.nid||C.nid}`,$=S(P);C.path=void 0,$&&(C=$.parse(C,E))}else C.error=C.error||"URN can not be parsed.";return C}function h(C,E){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=E.scheme||C.scheme||"urn",j=C.nid.toLowerCase(),P=`${O}:${E.nid||j}`,$=S(P);$&&(C=$.serialize(C,E));const I=C,L=C.nss;return I.path=`${j||E.nid}:${L}`,E.skipEscape=!0,I}function p(C,E){const O=C;return O.uuid=O.nss,O.nss=void 0,!E.tolerant&&(!O.uuid||!e(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function g(C){const E=C;return E.nss=(C.uuid||"").toLowerCase(),E}const v={scheme:"http",domainHost:!0,parse:i,serialize:a},y={scheme:"https",domainHost:v.domainHost,parse:i,serialize:a},x={scheme:"ws",domainHost:!0,parse:c,serialize:u},w={scheme:"wss",domainHost:x.domainHost,parse:x.parse,serialize:x.serialize},_={http:v,https:y,ws:x,wss:w,urn:{scheme:"urn",parse:f,serialize:h,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(_,null);function S(C){return C&&(_[C]||_[C.toLowerCase()])||void 0}return O1={wsIsSecure:o,SCHEMES:_,isValidSchemeName:r,getSchemeHandler:S},O1}var kk;function lD(){if(kk)return Fd.exports;kk=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:o,nonSimpleDomain:i}=aD(),{SCHEMES:a,getSchemeHandler:c}=Fee();function u(w,T){return typeof w=="string"?w=g(y(w,T),T):typeof w=="object"&&(w=y(g(w,T),T)),w}function f(w,T,b){const _=b?Object.assign({scheme:"null"},b):{scheme:"null"},S=h(y(w,_),y(T,_),_,!0);return _.skipEscape=!0,g(S,_)}function h(w,T,b,_){const S={};return _||(w=y(g(w,b),b),T=y(g(T,b),b)),b=b||{},!b.tolerant&&T.scheme?(S.scheme=T.scheme,S.userinfo=T.userinfo,S.host=T.host,S.port=T.port,S.path=t(T.path||""),S.query=T.query):(T.userinfo!==void 0||T.host!==void 0||T.port!==void 0?(S.userinfo=T.userinfo,S.host=T.host,S.port=T.port,S.path=t(T.path||""),S.query=T.query):(T.path?(T.path[0]==="/"?S.path=t(T.path):((w.userinfo!==void 0||w.host!==void 0||w.port!==void 0)&&!w.path?S.path="/"+T.path:w.path?S.path=w.path.slice(0,w.path.lastIndexOf("/")+1)+T.path:S.path=T.path,S.path=t(S.path)),S.query=T.query):(S.path=w.path,T.query!==void 0?S.query=T.query:S.query=w.query),S.userinfo=w.userinfo,S.host=w.host,S.port=w.port),S.scheme=w.scheme),S.fragment=T.fragment,S}function p(w,T,b){return typeof w=="string"?(w=unescape(w),w=g(r(y(w,b),!0),{...b,skipEscape:!0})):typeof w=="object"&&(w=g(r(w,!0),{...b,skipEscape:!0})),typeof T=="string"?(T=unescape(T),T=g(r(y(T,b),!0),{...b,skipEscape:!0})):typeof T=="object"&&(T=g(r(T,!0),{...b,skipEscape:!0})),w.toLowerCase()===T.toLowerCase()}function g(w,T){const b={host:w.host,scheme:w.scheme,userinfo:w.userinfo,port:w.port,path:w.path,query:w.query,nid:w.nid,nss:w.nss,uuid:w.uuid,fragment:w.fragment,reference:w.reference,resourceName:w.resourceName,secure:w.secure,error:""},_=Object.assign({},T),S=[],C=c(_.scheme||b.scheme);C&&C.serialize&&C.serialize(b,_),b.path!==void 0&&(_.skipEscape?b.path=unescape(b.path):(b.path=escape(b.path),b.scheme!==void 0&&(b.path=b.path.split("%3A").join(":")))),_.reference!=="suffix"&&b.scheme&&S.push(b.scheme,":");const E=n(b);if(E!==void 0&&(_.reference!=="suffix"&&S.push("//"),S.push(E),b.path&&b.path[0]!=="/"&&S.push("/")),b.path!==void 0){let O=b.path;!_.absolutePath&&(!C||!C.absolutePath)&&(O=t(O)),E===void 0&&O[0]==="/"&&O[1]==="/"&&(O="/%2F"+O.slice(2)),S.push(O)}return b.query!==void 0&&S.push("?",b.query),b.fragment!==void 0&&S.push("#",b.fragment),S.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(w,T){const b=Object.assign({},T),_={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let S=!1;b.reference==="suffix"&&(b.scheme?w=b.scheme+":"+w:w="//"+w);const C=w.match(v);if(C){if(_.scheme=C[1],_.userinfo=C[3],_.host=C[4],_.port=parseInt(C[5],10),_.path=C[6]||"",_.query=C[7],_.fragment=C[8],isNaN(_.port)&&(_.port=C[5]),_.host)if(o(_.host)===!1){const j=e(_.host);_.host=j.host.toLowerCase(),S=j.isIPV6}else S=!0;_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&_.query===void 0&&!_.path?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",b.reference&&b.reference!=="suffix"&&b.reference!==_.reference&&(_.error=_.error||"URI is not a "+b.reference+" reference.");const E=c(b.scheme||_.scheme);if(!b.unicodeSupport&&(!E||!E.unicodeSupport)&&_.host&&(b.domainHost||E&&E.domainHost)&&S===!1&&i(_.host))try{_.host=URL.domainToASCII(_.host.toLowerCase())}catch(O){_.error=_.error||"Host's domain name can not be converted to ASCII: "+O}(!E||E&&!E.skipNormalize)&&(w.indexOf("%")!==-1&&(_.scheme!==void 0&&(_.scheme=unescape(_.scheme)),_.host!==void 0&&(_.host=unescape(_.host))),_.path&&(_.path=escape(unescape(_.path))),_.fragment&&(_.fragment=encodeURI(decodeURIComponent(_.fragment)))),E&&E.parse&&E.parse(_,b)}else _.error=_.error||"URI can not be parsed.";return _}const x={SCHEMES:a,normalize:u,resolve:f,resolveComponent:h,equal:p,serialize:g,parse:y};return Fd.exports=x,Fd.exports.default=x,Fd.exports.fastUri=x,Fd.exports}var Mk;function Uee(){if(Mk)return Gm;Mk=1,Object.defineProperty(Gm,"__esModule",{value:!0});const e=lD();return e.code='require("ajv/dist/runtime/uri").default',Gm.default=e,Gm}var jk;function Vee(){return jk||(jk=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=T0();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Pt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=XE(),o=R0(),i=oD(),a=QE(),c=Pt(),u=C0(),f=jy(),h=fn(),p=Lee,g=Uee(),v=(ne,D)=>new RegExp(ne,D);v.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],x=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={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."},T={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},b=200;function _(ne){var D,q,U,N,G,te,re,de,we,Ee,se,X,fe,he,Pe,ye,De,Ue,ve,Fe,Le,Ze,Oe,ze,Be;const dt=ne.strict,Ce=(D=ne.code)===null||D===void 0?void 0:D.optimize,me=Ce===!0||Ce===void 0?1:Ce||0,Me=(U=(q=ne.code)===null||q===void 0?void 0:q.regExp)!==null&&U!==void 0?U:v,Ve=(N=ne.uriResolver)!==null&&N!==void 0?N:g.default;return{strictSchema:(te=(G=ne.strictSchema)!==null&&G!==void 0?G:dt)!==null&&te!==void 0?te:!0,strictNumbers:(de=(re=ne.strictNumbers)!==null&&re!==void 0?re:dt)!==null&&de!==void 0?de:!0,strictTypes:(Ee=(we=ne.strictTypes)!==null&&we!==void 0?we:dt)!==null&&Ee!==void 0?Ee:"log",strictTuples:(X=(se=ne.strictTuples)!==null&&se!==void 0?se:dt)!==null&&X!==void 0?X:"log",strictRequired:(he=(fe=ne.strictRequired)!==null&&fe!==void 0?fe:dt)!==null&&he!==void 0?he:!1,code:ne.code?{...ne.code,optimize:me,regExp:Me}:{optimize:me,regExp:Me},loopRequired:(Pe=ne.loopRequired)!==null&&Pe!==void 0?Pe:b,loopEnum:(ye=ne.loopEnum)!==null&&ye!==void 0?ye:b,meta:(De=ne.meta)!==null&&De!==void 0?De:!0,messages:(Ue=ne.messages)!==null&&Ue!==void 0?Ue:!0,inlineRefs:(ve=ne.inlineRefs)!==null&&ve!==void 0?ve:!0,schemaId:(Fe=ne.schemaId)!==null&&Fe!==void 0?Fe:"$id",addUsedSchema:(Le=ne.addUsedSchema)!==null&&Le!==void 0?Le:!0,validateSchema:(Ze=ne.validateSchema)!==null&&Ze!==void 0?Ze:!0,validateFormats:(Oe=ne.validateFormats)!==null&&Oe!==void 0?Oe:!0,unicodeRegExp:(ze=ne.unicodeRegExp)!==null&&ze!==void 0?ze:!0,int32range:(Be=ne.int32range)!==null&&Be!==void 0?Be:!0,uriResolver:Ve}}class S{constructor(D={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,D=this.opts={...D,..._(D)};const{es5:q,lines:U}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:x,es5:q,lines:U}),this.logger=L(D.logger);const N=D.validateFormats;D.validateFormats=!1,this.RULES=(0,i.getRules)(),C.call(this,w,D,"NOT SUPPORTED"),C.call(this,T,D,"DEPRECATED","warn"),this._metaOpts=$.call(this),D.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),D.keywords&&P.call(this,D.keywords),typeof D.meta=="object"&&this.addMetaSchema(D.meta),O.call(this),D.validateFormats=N}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:D,meta:q,schemaId:U}=this.opts;let N=p;U==="id"&&(N={...p},N.id=N.$id,delete N.$id),q&&D&&this.addMetaSchema(N,N[U],!1)}defaultMeta(){const{meta:D,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof D=="object"?D[q]||D:void 0}validate(D,q){let U;if(typeof D=="string"){if(U=this.getSchema(D),!U)throw new Error(`no schema with key or ref "${D}"`)}else U=this.compile(D);const N=U(q);return"$async"in U||(this.errors=U.errors),N}compile(D,q){const U=this._addSchema(D,q);return U.validate||this._compileSchemaEnv(U)}compileAsync(D,q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:U}=this.opts;return N.call(this,D,q);async function N(Ee,se){await G.call(this,Ee.$schema);const X=this._addSchema(Ee,se);return X.validate||te.call(this,X)}async function G(Ee){Ee&&!this.getSchema(Ee)&&await N.call(this,{$ref:Ee},!0)}async function te(Ee){try{return this._compileSchemaEnv(Ee)}catch(se){if(!(se instanceof o.default))throw se;return re.call(this,se),await de.call(this,se.missingSchema),te.call(this,Ee)}}function re({missingSchema:Ee,missingRef:se}){if(this.refs[Ee])throw new Error(`AnySchema ${Ee} is loaded but ${se} cannot be resolved`)}async function de(Ee){const se=await we.call(this,Ee);this.refs[Ee]||await G.call(this,se.$schema),this.refs[Ee]||this.addSchema(se,Ee,q)}async function we(Ee){const se=this._loading[Ee];if(se)return se;try{return await(this._loading[Ee]=U(Ee))}finally{delete this._loading[Ee]}}}addSchema(D,q,U,N=this.opts.validateSchema){if(Array.isArray(D)){for(const te of D)this.addSchema(te,void 0,U,N);return this}let G;if(typeof D=="object"){const{schemaId:te}=this.opts;if(G=D[te],G!==void 0&&typeof G!="string")throw new Error(`schema ${te} must be string`)}return q=(0,u.normalizeId)(q||G),this._checkUnique(q),this.schemas[q]=this._addSchema(D,U,q,N,!0),this}addMetaSchema(D,q,U=this.opts.validateSchema){return this.addSchema(D,q,!0,U),this}validateSchema(D,q){if(typeof D=="boolean")return!0;let U;if(U=D.$schema,U!==void 0&&typeof U!="string")throw new Error("$schema must be a string");if(U=U||this.opts.defaultMeta||this.defaultMeta(),!U)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const N=this.validate(U,D);if(!N&&q){const G="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(G);else throw new Error(G)}return N}getSchema(D){let q;for(;typeof(q=E.call(this,D))=="string";)D=q;if(q===void 0){const{schemaId:U}=this.opts,N=new a.SchemaEnv({schema:{},schemaId:U});if(q=a.resolveSchema.call(this,N,D),!q)return;this.refs[D]=q}return q.validate||this._compileSchemaEnv(q)}removeSchema(D){if(D instanceof RegExp)return this._removeAllSchemas(this.schemas,D),this._removeAllSchemas(this.refs,D),this;switch(typeof D){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const q=E.call(this,D);return typeof q=="object"&&this._cache.delete(q.schema),delete this.schemas[D],delete this.refs[D],this}case"object":{const q=D;this._cache.delete(q);let U=D[this.opts.schemaId];return U&&(U=(0,u.normalizeId)(U),delete this.schemas[U],delete this.refs[U]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(D){for(const q of D)this.addKeyword(q);return this}addKeyword(D,q){let U;if(typeof D=="string")U=D,typeof q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=U);else if(typeof D=="object"&&q===void 0){if(q=D,U=q.keyword,Array.isArray(U)&&!U.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(J.call(this,U,q),!q)return(0,h.eachItem)(U,G=>ee.call(this,G)),this;H.call(this,q);const N={...q,type:(0,f.getJSONTypes)(q.type),schemaType:(0,f.getJSONTypes)(q.schemaType)};return(0,h.eachItem)(U,N.type.length===0?G=>ee.call(this,G,N):G=>N.type.forEach(te=>ee.call(this,G,N,te))),this}getKeyword(D){const q=this.RULES.all[D];return typeof q=="object"?q.definition:!!q}removeKeyword(D){const{RULES:q}=this;delete q.keywords[D],delete q.all[D];for(const U of q.rules){const N=U.rules.findIndex(G=>G.keyword===D);N>=0&&U.rules.splice(N,1)}return this}addFormat(D,q){return typeof q=="string"&&(q=new RegExp(q)),this.formats[D]=q,this}errorsText(D=this.errors,{separator:q=", ",dataVar:U="data"}={}){return!D||D.length===0?"No errors":D.map(N=>`${U}${N.instancePath} ${N.message}`).reduce((N,G)=>N+q+G)}$dataMetaSchema(D,q){const U=this.RULES.all;D=JSON.parse(JSON.stringify(D));for(const N of q){const G=N.split("/").slice(1);let te=D;for(const re of G)te=te[re];for(const re in U){const de=U[re];if(typeof de!="object")continue;const{$data:we}=de.definition,Ee=te[re];we&&Ee&&(te[re]=oe(Ee))}}return D}_removeAllSchemas(D,q){for(const U in D){const N=D[U];(!q||q.test(U))&&(typeof N=="string"?delete D[U]:N&&!N.meta&&(this._cache.delete(N.schema),delete D[U]))}}_addSchema(D,q,U,N=this.opts.validateSchema,G=this.opts.addUsedSchema){let te;const{schemaId:re}=this.opts;if(typeof D=="object")te=D[re];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof D!="boolean")throw new Error("schema must be object or boolean")}let de=this._cache.get(D);if(de!==void 0)return de;U=(0,u.normalizeId)(te||U);const we=u.getSchemaRefs.call(this,D,U);return de=new a.SchemaEnv({schema:D,schemaId:re,meta:q,baseId:U,localRefs:we}),this._cache.set(de.schema,de),G&&!U.startsWith("#")&&(U&&this._checkUnique(U),this.refs[U]=de),N&&this.validateSchema(D,!0),de}_checkUnique(D){if(this.schemas[D]||this.refs[D])throw new Error(`schema with key or id "${D}" already exists`)}_compileSchemaEnv(D){if(D.meta?this._compileMetaSchema(D):a.compileSchema.call(this,D),!D.validate)throw new Error("ajv implementation error");return D.validate}_compileMetaSchema(D){const q=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,D)}finally{this.opts=q}}}S.ValidationError=r.default,S.MissingRefError=o.default,e.default=S;function C(ne,D,q,U="error"){for(const N in ne){const G=N;G in D&&this.logger[U](`${q}: option ${N}. ${ne[G]}`)}}function E(ne){return ne=(0,u.normalizeId)(ne),this.schemas[ne]||this.refs[ne]}function O(){const ne=this.opts.schemas;if(ne)if(Array.isArray(ne))this.addSchema(ne);else for(const D in ne)this.addSchema(ne[D],D)}function j(){for(const ne in this.opts.formats){const D=this.opts.formats[ne];D&&this.addFormat(ne,D)}}function P(ne){if(Array.isArray(ne)){this.addVocabulary(ne);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const D in ne){const q=ne[D];q.keyword||(q.keyword=D),this.addKeyword(q)}}function $(){const ne={...this.opts};for(const D of y)delete ne[D];return ne}const I={log(){},warn(){},error(){}};function L(ne){if(ne===!1)return I;if(ne===void 0)return console;if(ne.log&&ne.warn&&ne.error)return ne;throw new Error("logger must implement log, warn and error methods")}const F=/^[a-z_$][a-z0-9_$:-]*$/i;function J(ne,D){const{RULES:q}=this;if((0,h.eachItem)(ne,U=>{if(q.keywords[U])throw new Error(`Keyword ${U} is already defined`);if(!F.test(U))throw new Error(`Keyword ${U} has invalid name`)}),!!D&&D.$data&&!("code"in D||"validate"in D))throw new Error('$data keyword must have "code" or "validate" function')}function ee(ne,D,q){var U;const N=D?.post;if(q&&N)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:G}=this;let te=N?G.post:G.rules.find(({type:de})=>de===q);if(te||(te={type:q,rules:[]},G.rules.push(te)),G.keywords[ne]=!0,!D)return;const re={keyword:ne,definition:{...D,type:(0,f.getJSONTypes)(D.type),schemaType:(0,f.getJSONTypes)(D.schemaType)}};D.before?Z.call(this,te,re,D.before):te.rules.push(re),G.all[ne]=re,(U=D.implements)===null||U===void 0||U.forEach(de=>this.addKeyword(de))}function Z(ne,D,q){const U=ne.rules.findIndex(N=>N.keyword===q);U>=0?ne.rules.splice(U,0,D):(ne.rules.push(D),this.logger.warn(`rule ${q} is not defined`))}function H(ne){let{metaSchema:D}=ne;D!==void 0&&(ne.$data&&this.opts.$data&&(D=oe(D)),ne.validateSchema=this.compile(D,!0))}const V={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function oe(ne){return{anyOf:[ne,V]}}})(S1)),S1}var Zm={},Ym={},Wm={},Pk;function qee(){if(Pk)return Wm;Pk=1,Object.defineProperty(Wm,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Wm.default=e,Wm}var Ca={},Nk;function Bee(){if(Nk)return Ca;Nk=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.callRef=Ca.getValidate=void 0;const e=R0(),t=Ps(),n=Pt(),r=dl(),o=QE(),i=fn(),a={keyword:"$ref",schemaType:"string",code(f){const{gen:h,schema:p,it:g}=f,{baseId:v,schemaEnv:y,validateName:x,opts:w,self:T}=g,{root:b}=y;if((p==="#"||p==="#/")&&v===b.baseId)return S();const _=o.resolveRef.call(T,b,v,p);if(_===void 0)throw new e.default(g.opts.uriResolver,v,p);if(_ instanceof o.SchemaEnv)return C(_);return E(_);function S(){if(y===b)return u(f,x,y,y.$async);const O=h.scopeValue("root",{ref:b});return u(f,(0,n._)`${O}.validate`,b,b.$async)}function C(O){const j=c(f,O);u(f,j,O,O.$async)}function E(O){const j=h.scopeValue("schema",w.code.source===!0?{ref:O,code:(0,n.stringify)(O)}:{ref:O}),P=h.name("valid"),$=f.subschema({schema:O,dataTypes:[],schemaPath:n.nil,topSchemaRef:j,errSchemaPath:p},P);f.mergeEvaluated($),f.ok(P)}}};function c(f,h){const{gen:p}=f;return h.validate?p.scopeValue("validate",{ref:h.validate}):(0,n._)`${p.scopeValue("wrapper",{ref:h})}.validate`}Ca.getValidate=c;function u(f,h,p,g){const{gen:v,it:y}=f,{allErrors:x,schemaEnv:w,opts:T}=y,b=T.passContext?r.default.this:n.nil;g?_():S();function _(){if(!w.$async)throw new Error("async schema referenced by sync schema");const O=v.let("valid");v.try(()=>{v.code((0,n._)`await ${(0,t.callValidateCode)(f,h,b)}`),E(h),x||v.assign(O,!0)},j=>{v.if((0,n._)`!(${j} instanceof ${y.ValidationError})`,()=>v.throw(j)),C(j),x||v.assign(O,!1)}),f.ok(O)}function S(){f.result((0,t.callValidateCode)(f,h,b),()=>E(h),()=>C(h))}function C(O){const j=(0,n._)`${O}.errors`;v.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${j} : ${r.default.vErrors}.concat(${j})`),v.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function E(O){var j;if(!y.opts.unevaluated)return;const P=(j=p?.validate)===null||j===void 0?void 0:j.evaluated;if(y.props!==!0)if(P&&!P.dynamicProps)P.props!==void 0&&(y.props=i.mergeEvaluated.props(v,P.props,y.props));else{const $=v.var("props",(0,n._)`${O}.evaluated.props`);y.props=i.mergeEvaluated.props(v,$,y.props,n.Name)}if(y.items!==!0)if(P&&!P.dynamicItems)P.items!==void 0&&(y.items=i.mergeEvaluated.items(v,P.items,y.items));else{const $=v.var("items",(0,n._)`${O}.evaluated.items`);y.items=i.mergeEvaluated.items(v,$,y.items,n.Name)}}}return Ca.callRef=u,Ca.default=a,Ca}var Dk;function Hee(){if(Dk)return Ym;Dk=1,Object.defineProperty(Ym,"__esModule",{value:!0});const e=qee(),t=Bee(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Ym.default=n,Ym}var Xm={},Qm={},$k;function Kee(){if($k)return Qm;$k=1,Object.defineProperty(Qm,"__esModule",{value:!0});const e=Pt(),t=e.operators,n={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}},r={message:({keyword:i,schemaCode:a})=>(0,e.str)`must be ${n[i].okStr} ${a}`,params:({keyword:i,schemaCode:a})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${a}}`},o={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(i){const{keyword:a,data:c,schemaCode:u}=i;i.fail$data((0,e._)`${c} ${n[a].fail} ${u} || isNaN(${c})`)}};return Qm.default=o,Qm}var Jm={},Ik;function Gee(){if(Ik)return Jm;Ik=1,Object.defineProperty(Jm,"__esModule",{value:!0});const e=Pt(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,e._)`{multipleOf: ${r}}`},code(r){const{gen:o,data:i,schemaCode:a,it:c}=r,u=c.opts.multipleOfPrecision,f=o.let("res"),h=u?(0,e._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${u}`:(0,e._)`${f} !== parseInt(${f})`;r.fail$data((0,e._)`(${a} === 0 || (${f} = ${i}/${a}, ${h}))`)}};return Jm.default=n,Jm}var eg={},tg={},zk;function Zee(){if(zk)return tg;zk=1,Object.defineProperty(tg,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,o=0,i;for(;o<n;)r++,i=t.charCodeAt(o++),i>=55296&&i<=56319&&o<n&&(i=t.charCodeAt(o),(i&64512)===56320&&o++);return r}return tg.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',tg}var Lk;function Yee(){if(Lk)return eg;Lk=1,Object.defineProperty(eg,"__esModule",{value:!0});const e=Pt(),t=fn(),n=Zee(),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:a}){const c=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${c} than ${a} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:a,data:c,schemaCode:u,it:f}=i,h=a==="maxLength"?e.operators.GT:e.operators.LT,p=f.opts.unicode===!1?(0,e._)`${c}.length`:(0,e._)`${(0,t.useFunc)(i.gen,n.default)}(${c})`;i.fail$data((0,e._)`${p} ${h} ${u}`)}};return eg.default=o,eg}var ng={},Fk;function Wee(){if(Fk)return ng;Fk=1,Object.defineProperty(ng,"__esModule",{value:!0});const e=Ps(),t=Pt(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,t.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,t._)`{pattern: ${o}}`},code(o){const{data:i,$data:a,schema:c,schemaCode:u,it:f}=o,h=f.opts.unicodeRegExp?"u":"",p=a?(0,t._)`(new RegExp(${u}, ${h}))`:(0,e.usePattern)(o,c);o.fail$data((0,t._)`!${p}.test(${i})`)}};return ng.default=r,ng}var rg={},Uk;function Xee(){if(Uk)return rg;Uk=1,Object.defineProperty(rg,"__esModule",{value:!0});const e=Pt(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:o}){const i=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${o} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:o,data:i,schemaCode:a}=r,c=o==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${i}).length ${c} ${a}`)}};return rg.default=n,rg}var og={},Vk;function Qee(){if(Vk)return og;Vk=1,Object.defineProperty(og,"__esModule",{value:!0});const e=Ps(),t=Pt(),n=fn(),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,t.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,t._)`{missingProperty: ${i}}`},code(i){const{gen:a,schema:c,schemaCode:u,data:f,$data:h,it:p}=i,{opts:g}=p;if(!h&&c.length===0)return;const v=c.length>=g.loopRequired;if(p.allErrors?y():x(),g.strictRequired){const b=i.parentSchema.properties,{definedProperties:_}=i.it;for(const S of c)if(b?.[S]===void 0&&!_.has(S)){const C=p.schemaEnv.baseId+p.errSchemaPath,E=`required property "${S}" is not defined at "${C}" (strictRequired)`;(0,n.checkStrictMode)(p,E,p.opts.strictRequired)}}function y(){if(v||h)i.block$data(t.nil,w);else for(const b of c)(0,e.checkReportMissingProp)(i,b)}function x(){const b=a.let("missing");if(v||h){const _=a.let("valid",!0);i.block$data(_,()=>T(b,_)),i.ok(_)}else a.if((0,e.checkMissingProp)(i,c,b)),(0,e.reportMissingProp)(i,b),a.else()}function w(){a.forOf("prop",u,b=>{i.setParams({missingProperty:b}),a.if((0,e.noPropertyInData)(a,f,b,g.ownProperties),()=>i.error())})}function T(b,_){i.setParams({missingProperty:b}),a.forOf(b,u,()=>{a.assign(_,(0,e.propertyInData)(a,f,b,g.ownProperties)),a.if((0,t.not)(_),()=>{i.error(),a.break()})},t.nil)}}};return og.default=o,og}var sg={},qk;function Jee(){if(qk)return sg;qk=1,Object.defineProperty(sg,"__esModule",{value:!0});const e=Pt(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:o}){const i=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${o} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:o,data:i,schemaCode:a}=r,c=o==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${i}.length ${c} ${a}`)}};return sg.default=n,sg}var ig={},ag={},Bk;function JE(){if(Bk)return ag;Bk=1,Object.defineProperty(ag,"__esModule",{value:!0});const e=iD();return e.code='require("ajv/dist/runtime/equal").default',ag.default=e,ag}var Hk;function ete(){if(Hk)return ig;Hk=1,Object.defineProperty(ig,"__esModule",{value:!0});const e=jy(),t=Pt(),n=fn(),r=JE(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:c}})=>(0,t.str)`must NOT have duplicate items (items ## ${c} and ${a} are identical)`,params:({params:{i:a,j:c}})=>(0,t._)`{i: ${a}, j: ${c}}`},code(a){const{gen:c,data:u,$data:f,schema:h,parentSchema:p,schemaCode:g,it:v}=a;if(!f&&!h)return;const y=c.let("valid"),x=p.items?(0,e.getSchemaTypes)(p.items):[];a.block$data(y,w,(0,t._)`${g} === false`),a.ok(y);function w(){const S=c.let("i",(0,t._)`${u}.length`),C=c.let("j");a.setParams({i:S,j:C}),c.assign(y,!0),c.if((0,t._)`${S} > 1`,()=>(T()?b:_)(S,C))}function T(){return x.length>0&&!x.some(S=>S==="object"||S==="array")}function b(S,C){const E=c.name("item"),O=(0,e.checkDataTypes)(x,E,v.opts.strictNumbers,e.DataType.Wrong),j=c.const("indices",(0,t._)`{}`);c.for((0,t._)`;${S}--;`,()=>{c.let(E,(0,t._)`${u}[${S}]`),c.if(O,(0,t._)`continue`),x.length>1&&c.if((0,t._)`typeof ${E} == "string"`,(0,t._)`${E} += "_"`),c.if((0,t._)`typeof ${j}[${E}] == "number"`,()=>{c.assign(C,(0,t._)`${j}[${E}]`),a.error(),c.assign(y,!1).break()}).code((0,t._)`${j}[${E}] = ${S}`)})}function _(S,C){const E=(0,n.useFunc)(c,r.default),O=c.name("outer");c.label(O).for((0,t._)`;${S}--;`,()=>c.for((0,t._)`${C} = ${S}; ${C}--;`,()=>c.if((0,t._)`${E}(${u}[${S}], ${u}[${C}])`,()=>{a.error(),c.assign(y,!1).break(O)})))}}};return ig.default=i,ig}var lg={},Kk;function tte(){if(Kk)return lg;Kk=1,Object.defineProperty(lg,"__esModule",{value:!0});const e=Pt(),t=fn(),n=JE(),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},code(i){const{gen:a,data:c,$data:u,schemaCode:f,schema:h}=i;u||h&&typeof h=="object"?i.fail$data((0,e._)`!${(0,t.useFunc)(a,n.default)}(${c}, ${f})`):i.fail((0,e._)`${h} !== ${c}`)}};return lg.default=o,lg}var cg={},Gk;function nte(){if(Gk)return cg;Gk=1,Object.defineProperty(cg,"__esModule",{value:!0});const e=Pt(),t=fn(),n=JE(),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},code(i){const{gen:a,data:c,$data:u,schema:f,schemaCode:h,it:p}=i;if(!u&&f.length===0)throw new Error("enum must have non-empty array");const g=f.length>=p.opts.loopEnum;let v;const y=()=>v??(v=(0,t.useFunc)(a,n.default));let x;if(g||u)x=a.let("valid"),i.block$data(x,w);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const b=a.const("vSchema",h);x=(0,e.or)(...f.map((_,S)=>T(b,S)))}i.pass(x);function w(){a.assign(x,!1),a.forOf("v",h,b=>a.if((0,e._)`${y()}(${c}, ${b})`,()=>a.assign(x,!0).break()))}function T(b,_){const S=f[_];return typeof S=="object"&&S!==null?(0,e._)`${y()}(${c}, ${b}[${_}])`:(0,e._)`${c} === ${S}`}}};return cg.default=o,cg}var Zk;function rte(){if(Zk)return Xm;Zk=1,Object.defineProperty(Xm,"__esModule",{value:!0});const e=Kee(),t=Gee(),n=Yee(),r=Wee(),o=Xee(),i=Qee(),a=Jee(),c=ete(),u=tte(),f=nte(),h=[e.default,t.default,n.default,r.default,o.default,i.default,a.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,f.default];return Xm.default=h,Xm}var ug={},hu={},Yk;function cD(){if(Yk)return hu;Yk=1,Object.defineProperty(hu,"__esModule",{value:!0}),hu.validateAdditionalItems=void 0;const e=Pt(),t=fn(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{parentSchema:a,it:c}=i,{items:u}=a;if(!Array.isArray(u)){(0,t.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(i,u)}};function o(i,a){const{gen:c,schema:u,data:f,keyword:h,it:p}=i;p.items=!0;const g=c.const("len",(0,e._)`${f}.length`);if(u===!1)i.setParams({len:a.length}),i.pass((0,e._)`${g} <= ${a.length}`);else if(typeof u=="object"&&!(0,t.alwaysValidSchema)(p,u)){const y=c.var("valid",(0,e._)`${g} <= ${a.length}`);c.if((0,e.not)(y),()=>v(y)),i.ok(y)}function v(y){c.forRange("i",a.length,g,x=>{i.subschema({keyword:h,dataProp:x,dataPropType:t.Type.Num},y),p.allErrors||c.if((0,e.not)(y),()=>c.break())})}}return hu.validateAdditionalItems=o,hu.default=r,hu}var fg={},pu={},Wk;function uD(){if(Wk)return pu;Wk=1,Object.defineProperty(pu,"__esModule",{value:!0}),pu.validateTuple=void 0;const e=Pt(),t=fn(),n=Ps(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:a,it:c}=i;if(Array.isArray(a))return o(i,"additionalItems",a);c.items=!0,!(0,t.alwaysValidSchema)(c,a)&&i.ok((0,n.validateArray)(i))}};function o(i,a,c=i.schema){const{gen:u,parentSchema:f,data:h,keyword:p,it:g}=i;x(f),g.opts.unevaluated&&c.length&&g.items!==!0&&(g.items=t.mergeEvaluated.items(u,c.length,g.items));const v=u.name("valid"),y=u.const("len",(0,e._)`${h}.length`);c.forEach((w,T)=>{(0,t.alwaysValidSchema)(g,w)||(u.if((0,e._)`${y} > ${T}`,()=>i.subschema({keyword:p,schemaProp:T,dataProp:T},v)),i.ok(v))});function x(w){const{opts:T,errSchemaPath:b}=g,_=c.length,S=_===w.minItems&&(_===w.maxItems||w[a]===!1);if(T.strictTuples&&!S){const C=`"${p}" is ${_}-tuple, but minItems or maxItems/${a} are not specified or different at path "${b}"`;(0,t.checkStrictMode)(g,C,T.strictTuples)}}}return pu.validateTuple=o,pu.default=r,pu}var Xk;function ote(){if(Xk)return fg;Xk=1,Object.defineProperty(fg,"__esModule",{value:!0});const e=uD(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return fg.default=t,fg}var dg={},Qk;function ste(){if(Qk)return dg;Qk=1,Object.defineProperty(dg,"__esModule",{value:!0});const e=Pt(),t=fn(),n=Ps(),r=cD(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{schema:c,parentSchema:u,it:f}=a,{prefixItems:h}=u;f.items=!0,!(0,t.alwaysValidSchema)(f,c)&&(h?(0,r.validateAdditionalItems)(a,h):a.ok((0,n.validateArray)(a)))}};return dg.default=i,dg}var hg={},Jk;function ite(){if(Jk)return hg;Jk=1,Object.defineProperty(hg,"__esModule",{value:!0});const e=Pt(),t=fn(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:o,max:i}})=>i===void 0?(0,e.str)`must contain at least ${o} valid item(s)`:(0,e.str)`must contain at least ${o} and no more than ${i} valid item(s)`,params:({params:{min:o,max:i}})=>i===void 0?(0,e._)`{minContains: ${o}}`:(0,e._)`{minContains: ${o}, maxContains: ${i}}`},code(o){const{gen:i,schema:a,parentSchema:c,data:u,it:f}=o;let h,p;const{minContains:g,maxContains:v}=c;f.opts.next?(h=g===void 0?1:g,p=v):h=1;const y=i.const("len",(0,e._)`${u}.length`);if(o.setParams({min:h,max:p}),p===void 0&&h===0){(0,t.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&h>p){(0,t.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,t.alwaysValidSchema)(f,a)){let _=(0,e._)`${y} >= ${h}`;p!==void 0&&(_=(0,e._)`${_} && ${y} <= ${p}`),o.pass(_);return}f.items=!0;const x=i.name("valid");p===void 0&&h===1?T(x,()=>i.if(x,()=>i.break())):h===0?(i.let(x,!0),p!==void 0&&i.if((0,e._)`${u}.length > 0`,w)):(i.let(x,!1),w()),o.result(x,()=>o.reset());function w(){const _=i.name("_valid"),S=i.let("count",0);T(_,()=>i.if(_,()=>b(S)))}function T(_,S){i.forRange("i",0,y,C=>{o.subschema({keyword:"contains",dataProp:C,dataPropType:t.Type.Num,compositeRule:!0},_),S()})}function b(_){i.code((0,e._)`${_}++`),p===void 0?i.if((0,e._)`${_} >= ${h}`,()=>i.assign(x,!0).break()):(i.if((0,e._)`${_} > ${p}`,()=>i.assign(x,!1).break()),h===1?i.assign(x,!0):i.if((0,e._)`${_} >= ${h}`,()=>i.assign(x,!0)))}}};return hg.default=r,hg}var A1={},eM;function ate(){return eM||(eM=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Pt(),n=fn(),r=Ps();e.error={message:({params:{property:u,depsCount:f,deps:h}})=>{const p=f===1?"property":"properties";return(0,t.str)`must have ${p} ${h} when property ${u} is present`},params:({params:{property:u,depsCount:f,deps:h,missingProperty:p}})=>(0,t._)`{property: ${u},
|
|
53
|
+
missingProperty: ${p},
|
|
54
|
+
depsCount: ${f},
|
|
55
|
+
deps: ${h}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[f,h]=i(u);a(u,f),c(u,h)}};function i({schema:u}){const f={},h={};for(const p in u){if(p==="__proto__")continue;const g=Array.isArray(u[p])?f:h;g[p]=u[p]}return[f,h]}function a(u,f=u.schema){const{gen:h,data:p,it:g}=u;if(Object.keys(f).length===0)return;const v=h.let("missing");for(const y in f){const x=f[y];if(x.length===0)continue;const w=(0,r.propertyInData)(h,p,y,g.opts.ownProperties);u.setParams({property:y,depsCount:x.length,deps:x.join(", ")}),g.allErrors?h.if(w,()=>{for(const T of x)(0,r.checkReportMissingProp)(u,T)}):(h.if((0,t._)`${w} && (${(0,r.checkMissingProp)(u,x,v)})`),(0,r.reportMissingProp)(u,v),h.else())}}e.validatePropertyDeps=a;function c(u,f=u.schema){const{gen:h,data:p,keyword:g,it:v}=u,y=h.name("valid");for(const x in f)(0,n.alwaysValidSchema)(v,f[x])||(h.if((0,r.propertyInData)(h,p,x,v.opts.ownProperties),()=>{const w=u.subschema({keyword:g,schemaProp:x},y);u.mergeValidEvaluated(w,y)},()=>h.var(y,!0)),u.ok(y))}e.validateSchemaDeps=c,e.default=o})(A1)),A1}var pg={},tM;function lte(){if(tM)return pg;tM=1,Object.defineProperty(pg,"__esModule",{value:!0});const e=Pt(),t=fn(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},code(o){const{gen:i,schema:a,data:c,it:u}=o;if((0,t.alwaysValidSchema)(u,a))return;const f=i.name("valid");i.forIn("key",c,h=>{o.setParams({propertyName:h}),o.subschema({keyword:"propertyNames",data:h,dataTypes:["string"],propertyName:h,compositeRule:!0},f),i.if((0,e.not)(f),()=>{o.error(!0),u.allErrors||i.break()})}),o.ok(f)}};return pg.default=r,pg}var mg={},nM;function fD(){if(nM)return mg;nM=1,Object.defineProperty(mg,"__esModule",{value:!0});const e=Ps(),t=Pt(),n=dl(),r=fn(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,t._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:c,schema:u,parentSchema:f,data:h,errsCount:p,it:g}=a;if(!p)throw new Error("ajv implementation error");const{allErrors:v,opts:y}=g;if(g.props=!0,y.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(g,u))return;const x=(0,e.allSchemaProperties)(f.properties),w=(0,e.allSchemaProperties)(f.patternProperties);T(),a.ok((0,t._)`${p} === ${n.default.errors}`);function T(){c.forIn("key",h,E=>{!x.length&&!w.length?S(E):c.if(b(E),()=>S(E))})}function b(E){let O;if(x.length>8){const j=(0,r.schemaRefOrVal)(g,f.properties,"properties");O=(0,e.isOwnProperty)(c,j,E)}else x.length?O=(0,t.or)(...x.map(j=>(0,t._)`${E} === ${j}`)):O=t.nil;return w.length&&(O=(0,t.or)(O,...w.map(j=>(0,t._)`${(0,e.usePattern)(a,j)}.test(${E})`))),(0,t.not)(O)}function _(E){c.code((0,t._)`delete ${h}[${E}]`)}function S(E){if(y.removeAdditional==="all"||y.removeAdditional&&u===!1){_(E);return}if(u===!1){a.setParams({additionalProperty:E}),a.error(),v||c.break();return}if(typeof u=="object"&&!(0,r.alwaysValidSchema)(g,u)){const O=c.name("valid");y.removeAdditional==="failing"?(C(E,O,!1),c.if((0,t.not)(O),()=>{a.reset(),_(E)})):(C(E,O),v||c.if((0,t.not)(O),()=>c.break()))}}function C(E,O,j){const P={keyword:"additionalProperties",dataProp:E,dataPropType:r.Type.Str};j===!1&&Object.assign(P,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(P,O)}}};return mg.default=i,mg}var gg={},rM;function cte(){if(rM)return gg;rM=1,Object.defineProperty(gg,"__esModule",{value:!0});const e=T0(),t=Ps(),n=fn(),r=fD(),o={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:a,schema:c,parentSchema:u,data:f,it:h}=i;h.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(h,r.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(c);for(const w of p)h.definedProperties.add(w);h.opts.unevaluated&&p.length&&h.props!==!0&&(h.props=n.mergeEvaluated.props(a,(0,n.toHash)(p),h.props));const g=p.filter(w=>!(0,n.alwaysValidSchema)(h,c[w]));if(g.length===0)return;const v=a.name("valid");for(const w of g)y(w)?x(w):(a.if((0,t.propertyInData)(a,f,w,h.opts.ownProperties)),x(w),h.allErrors||a.else().var(v,!0),a.endIf()),i.it.definedProperties.add(w),i.ok(v);function y(w){return h.opts.useDefaults&&!h.compositeRule&&c[w].default!==void 0}function x(w){i.subschema({keyword:"properties",schemaProp:w,dataProp:w},v)}}};return gg.default=o,gg}var yg={},oM;function ute(){if(oM)return yg;oM=1,Object.defineProperty(yg,"__esModule",{value:!0});const e=Ps(),t=Pt(),n=fn(),r=fn(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:a,schema:c,data:u,parentSchema:f,it:h}=i,{opts:p}=h,g=(0,e.allSchemaProperties)(c),v=g.filter(S=>(0,n.alwaysValidSchema)(h,c[S]));if(g.length===0||v.length===g.length&&(!h.opts.unevaluated||h.props===!0))return;const y=p.strictSchema&&!p.allowMatchingProperties&&f.properties,x=a.name("valid");h.props!==!0&&!(h.props instanceof t.Name)&&(h.props=(0,r.evaluatedPropsToName)(a,h.props));const{props:w}=h;T();function T(){for(const S of g)y&&b(S),h.allErrors?_(S):(a.var(x,!0),_(S),a.if(x))}function b(S){for(const C in y)new RegExp(S).test(C)&&(0,n.checkStrictMode)(h,`property ${C} matches pattern ${S} (use allowMatchingProperties)`)}function _(S){a.forIn("key",u,C=>{a.if((0,t._)`${(0,e.usePattern)(i,S)}.test(${C})`,()=>{const E=v.includes(S);E||i.subschema({keyword:"patternProperties",schemaProp:S,dataProp:C,dataPropType:r.Type.Str},x),h.opts.unevaluated&&w!==!0?a.assign((0,t._)`${w}[${C}]`,!0):!E&&!h.allErrors&&a.if((0,t.not)(x),()=>a.break())})})}}};return yg.default=o,yg}var vg={},sM;function fte(){if(sM)return vg;sM=1,Object.defineProperty(vg,"__esModule",{value:!0});const e=fn(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:o,it:i}=n;if((0,e.alwaysValidSchema)(i,o)){n.fail();return}const a=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),n.failResult(a,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return vg.default=t,vg}var bg={},iM;function dte(){if(iM)return bg;iM=1,Object.defineProperty(bg,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ps().validateUnion,error:{message:"must match a schema in anyOf"}};return bg.default=t,bg}var Sg={},aM;function hte(){if(aM)return Sg;aM=1,Object.defineProperty(Sg,"__esModule",{value:!0});const e=Pt(),t=fn(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},code(o){const{gen:i,schema:a,parentSchema:c,it:u}=o;if(!Array.isArray(a))throw new Error("ajv implementation error");if(u.opts.discriminator&&c.discriminator)return;const f=a,h=i.let("valid",!1),p=i.let("passing",null),g=i.name("_valid");o.setParams({passing:p}),i.block(v),o.result(h,()=>o.reset(),()=>o.error(!0));function v(){f.forEach((y,x)=>{let w;(0,t.alwaysValidSchema)(u,y)?i.var(g,!0):w=o.subschema({keyword:"oneOf",schemaProp:x,compositeRule:!0},g),x>0&&i.if((0,e._)`${g} && ${h}`).assign(h,!1).assign(p,(0,e._)`[${p}, ${x}]`).else(),i.if(g,()=>{i.assign(h,!0),i.assign(p,x),w&&o.mergeEvaluated(w,e.Name)})})}}};return Sg.default=r,Sg}var wg={},lM;function pte(){if(lM)return wg;lM=1,Object.defineProperty(wg,"__esModule",{value:!0});const e=fn(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:o,it:i}=n;if(!Array.isArray(o))throw new Error("ajv implementation error");const a=r.name("valid");o.forEach((c,u)=>{if((0,e.alwaysValidSchema)(i,c))return;const f=n.subschema({keyword:"allOf",schemaProp:u},a);n.ok(a),n.mergeEvaluated(f)})}};return wg.default=t,wg}var xg={},cM;function mte(){if(cM)return xg;cM=1,Object.defineProperty(xg,"__esModule",{value:!0});const e=Pt(),t=fn(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:a,parentSchema:c,it:u}=i;c.then===void 0&&c.else===void 0&&(0,t.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const f=o(u,"then"),h=o(u,"else");if(!f&&!h)return;const p=a.let("valid",!0),g=a.name("_valid");if(v(),i.reset(),f&&h){const x=a.let("ifClause");i.setParams({ifClause:x}),a.if(g,y("then",x),y("else",x))}else f?a.if(g,y("then")):a.if((0,e.not)(g),y("else"));i.pass(p,()=>i.error(!0));function v(){const x=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);i.mergeEvaluated(x)}function y(x,w){return()=>{const T=i.subschema({keyword:x},g);a.assign(p,g),i.mergeValidEvaluated(T,p),w?a.assign(w,(0,e._)`${x}`):i.setParams({ifClause:x})}}}};function o(i,a){const c=i.schema[a];return c!==void 0&&!(0,t.alwaysValidSchema)(i,c)}return xg.default=r,xg}var Eg={},uM;function gte(){if(uM)return Eg;uM=1,Object.defineProperty(Eg,"__esModule",{value:!0});const e=fn(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:o}){r.if===void 0&&(0,e.checkStrictMode)(o,`"${n}" without "if" is ignored`)}};return Eg.default=t,Eg}var fM;function yte(){if(fM)return ug;fM=1,Object.defineProperty(ug,"__esModule",{value:!0});const e=cD(),t=ote(),n=uD(),r=ste(),o=ite(),i=ate(),a=lte(),c=fD(),u=cte(),f=ute(),h=fte(),p=dte(),g=hte(),v=pte(),y=mte(),x=gte();function w(T=!1){const b=[h.default,p.default,g.default,v.default,y.default,x.default,a.default,c.default,i.default,u.default,f.default];return T?b.push(t.default,r.default):b.push(e.default,n.default),b.push(o.default),b}return ug.default=w,ug}var _g={},Cg={},dM;function vte(){if(dM)return Cg;dM=1,Object.defineProperty(Cg,"__esModule",{value:!0});const e=Pt(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,o){const{gen:i,data:a,$data:c,schema:u,schemaCode:f,it:h}=r,{opts:p,errSchemaPath:g,schemaEnv:v,self:y}=h;if(!p.validateFormats)return;c?x():w();function x(){const T=i.scopeValue("formats",{ref:y.formats,code:p.code.formats}),b=i.const("fDef",(0,e._)`${T}[${f}]`),_=i.let("fType"),S=i.let("format");i.if((0,e._)`typeof ${b} == "object" && !(${b} instanceof RegExp)`,()=>i.assign(_,(0,e._)`${b}.type || "string"`).assign(S,(0,e._)`${b}.validate`),()=>i.assign(_,(0,e._)`"string"`).assign(S,b)),r.fail$data((0,e.or)(C(),E()));function C(){return p.strictSchema===!1?e.nil:(0,e._)`${f} && !${S}`}function E(){const O=v.$async?(0,e._)`(${b}.async ? await ${S}(${a}) : ${S}(${a}))`:(0,e._)`${S}(${a})`,j=(0,e._)`(typeof ${S} == "function" ? ${O} : ${S}.test(${a}))`;return(0,e._)`${S} && ${S} !== true && ${_} === ${o} && !${j}`}}function w(){const T=y.formats[u];if(!T){C();return}if(T===!0)return;const[b,_,S]=E(T);b===o&&r.pass(O());function C(){if(p.strictSchema===!1){y.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${u}" ignored in schema at path "${g}"`}}function E(j){const P=j instanceof RegExp?(0,e.regexpCode)(j):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(u)}`:void 0,$=i.scopeValue("formats",{key:u,ref:j,code:P});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${$}.validate`]:["string",j,$]}function O(){if(typeof T=="object"&&!(T instanceof RegExp)&&T.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${S}(${a})`}return typeof _=="function"?(0,e._)`${S}(${a})`:(0,e._)`${S}.test(${a})`}}}};return Cg.default=n,Cg}var hM;function bte(){if(hM)return _g;hM=1,Object.defineProperty(_g,"__esModule",{value:!0});const t=[vte().default];return _g.default=t,_g}var ql={},pM;function Ste(){return pM||(pM=1,Object.defineProperty(ql,"__esModule",{value:!0}),ql.contentVocabulary=ql.metadataVocabulary=void 0,ql.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ql.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ql}var mM;function wte(){if(mM)return Zm;mM=1,Object.defineProperty(Zm,"__esModule",{value:!0});const e=Hee(),t=rte(),n=yte(),r=bte(),o=Ste(),i=[e.default,t.default,(0,n.default)(),r.default,o.metadataVocabulary,o.contentVocabulary];return Zm.default=i,Zm}var Tg={},Ud={},gM;function xte(){if(gM)return Ud;gM=1,Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Ud.DiscrError=e={})),Ud}var yM;function Ete(){if(yM)return Tg;yM=1,Object.defineProperty(Tg,"__esModule",{value:!0});const e=Pt(),t=xte(),n=QE(),r=R0(),o=fn(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:u}})=>c===t.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:c,tag:u,tagName:f}})=>(0,e._)`{error: ${c}, tag: ${f}, tagValue: ${u}}`},code(c){const{gen:u,data:f,schema:h,parentSchema:p,it:g}=c,{oneOf:v}=p;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const y=h.propertyName;if(typeof y!="string")throw new Error("discriminator: requires propertyName");if(h.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const x=u.let("valid",!1),w=u.const("tag",(0,e._)`${f}${(0,e.getProperty)(y)}`);u.if((0,e._)`typeof ${w} == "string"`,()=>T(),()=>c.error(!1,{discrError:t.DiscrError.Tag,tag:w,tagName:y})),c.ok(x);function T(){const S=_();u.if(!1);for(const C in S)u.elseIf((0,e._)`${w} === ${C}`),u.assign(x,b(S[C]));u.else(),c.error(!1,{discrError:t.DiscrError.Mapping,tag:w,tagName:y}),u.endIf()}function b(S){const C=u.name("valid"),E=c.subschema({keyword:"oneOf",schemaProp:S},C);return c.mergeEvaluated(E,e.Name),C}function _(){var S;const C={},E=j(p);let O=!0;for(let I=0;I<v.length;I++){let L=v[I];if(L?.$ref&&!(0,o.schemaHasRulesButRef)(L,g.self.RULES)){const J=L.$ref;if(L=n.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,J),L instanceof n.SchemaEnv&&(L=L.schema),L===void 0)throw new r.default(g.opts.uriResolver,g.baseId,J)}const F=(S=L?.properties)===null||S===void 0?void 0:S[y];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${y}"`);O=O&&(E||j(L)),P(F,I)}if(!O)throw new Error(`discriminator: "${y}" must be required`);return C;function j({required:I}){return Array.isArray(I)&&I.includes(y)}function P(I,L){if(I.const)$(I.const,L);else if(I.enum)for(const F of I.enum)$(F,L);else throw new Error(`discriminator: "properties/${y}" must have "const" or "enum"`)}function $(I,L){if(typeof I!="string"||I in C)throw new Error(`discriminator: "${y}" values must be unique strings`);C[I]=L}}}};return Tg.default=a,Tg}const _te="http://json-schema.org/draft-07/schema#",Cte="http://json-schema.org/draft-07/schema#",Tte="Core schema meta-schema",Rte={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:[]}},Ote=["object","boolean"],Ate={$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:"#"}},kte={$schema:_te,$id:Cte,title:Tte,definitions:Rte,type:Ote,properties:Ate,default:!0};var vM;function e_(){return vM||(vM=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 n=Vee(),r=wte(),o=Ete(),i=kte,a=["/properties"],c="http://json-schema.org/draft-07/schema";class u extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const y=this.opts.$data?this.$dataMetaSchema(i,a):i;this.addMetaSchema(y,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var f=T0();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var h=Pt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var p=XE();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var g=R0();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(qm,qm.exports)),qm.exports}var Mte=e_();const dD=ii(Mte);var Rg={exports:{}},k1={},bM;function jte(){return bM||(bM=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(I,L){return{validate:I,compare:L}}e.fullFormats={date:t(i,a),time:t(u(!0),f),"date-time":t(g(!0),v),"iso-time":t(u(),h),"iso-date-time":t(g(),y),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:T,"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:$,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:E},int64:{type:"number",validate:O},float:{type:"number",validate:j},double:{type:"number",validate:j},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),"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,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,h),"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,y),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 n(I){return I%4===0&&(I%100!==0||I%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(I){const L=r.exec(I);if(!L)return!1;const F=+L[1],J=+L[2],ee=+L[3];return J>=1&&J<=12&&ee>=1&&ee<=(J===2&&n(F)?29:o[J])}function a(I,L){if(I&&L)return I>L?1:I<L?-1:0}const c=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function u(I){return function(F){const J=c.exec(F);if(!J)return!1;const ee=+J[1],Z=+J[2],H=+J[3],V=J[4],oe=J[5]==="-"?-1:1,ne=+(J[6]||0),D=+(J[7]||0);if(ne>23||D>59||I&&!V)return!1;if(ee<=23&&Z<=59&&H<60)return!0;const q=Z-D*oe,U=ee-ne*oe-(q<0?1:0);return(U===23||U===-1)&&(q===59||q===-1)&&H<61}}function f(I,L){if(!(I&&L))return;const F=new Date("2020-01-01T"+I).valueOf(),J=new Date("2020-01-01T"+L).valueOf();if(F&&J)return F-J}function h(I,L){if(!(I&&L))return;const F=c.exec(I),J=c.exec(L);if(F&&J)return I=F[1]+F[2]+F[3],L=J[1]+J[2]+J[3],I>L?1:I<L?-1:0}const p=/t|\s/i;function g(I){const L=u(I);return function(J){const ee=J.split(p);return ee.length===2&&i(ee[0])&&L(ee[1])}}function v(I,L){if(!(I&&L))return;const F=new Date(I).valueOf(),J=new Date(L).valueOf();if(F&&J)return F-J}function y(I,L){if(!(I&&L))return;const[F,J]=I.split(p),[ee,Z]=L.split(p),H=a(F,ee);if(H!==void 0)return H||f(J,Z)}const x=/\/|:/,w=/^(?:[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 T(I){return x.test(I)&&w.test(I)}const b=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function _(I){return b.lastIndex=0,b.test(I)}const S=-2147483648,C=2**31-1;function E(I){return Number.isInteger(I)&&I<=C&&I>=S}function O(I){return Number.isInteger(I)}function j(){return!0}const P=/[^\\]\\Z/;function $(I){if(P.test(I))return!1;try{return new RegExp(I),!0}catch{return!1}}})(k1)),k1}var M1={},SM;function Pte(){return SM||(SM=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=e_(),n=Pt(),r=n.operators,o={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},i={message:({keyword:c,schemaCode:u})=>(0,n.str)`should be ${o[c].okStr} ${u}`,params:({keyword:c,schemaCode:u})=>(0,n._)`{comparison: ${o[c].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:i,code(c){const{gen:u,data:f,schemaCode:h,keyword:p,it:g}=c,{opts:v,self:y}=g;if(!v.validateFormats)return;const x=new t.KeywordCxt(g,y.RULES.all.format.definition,"format");x.$data?w():T();function w(){const _=u.scopeValue("formats",{ref:y.formats,code:v.code.formats}),S=u.const("fmt",(0,n._)`${_}[${x.schemaCode}]`);c.fail$data((0,n.or)((0,n._)`typeof ${S} != "object"`,(0,n._)`${S} instanceof RegExp`,(0,n._)`typeof ${S}.compare != "function"`,b(S)))}function T(){const _=x.schema,S=y.formats[_];if(!S||S===!0)return;if(typeof S!="object"||S instanceof RegExp||typeof S.compare!="function")throw new Error(`"${p}": format "${_}" does not define "compare" function`);const C=u.scopeValue("formats",{key:_,ref:S,code:v.code.formats?(0,n._)`${v.code.formats}${(0,n.getProperty)(_)}`:void 0});c.fail$data(b(C))}function b(_){return(0,n._)`${_}.compare(${f}, ${h}) ${o[p].fail} 0`}},dependencies:["format"]};const a=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=a})(M1)),M1}var wM;function Nte(){return wM||(wM=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=jte(),r=Pte(),o=Pt(),i=new o.Name("fullFormats"),a=new o.Name("fastFormats"),c=(f,h={keywords:!0})=>{if(Array.isArray(h))return u(f,h,n.fullFormats,i),f;const[p,g]=h.mode==="fast"?[n.fastFormats,a]:[n.fullFormats,i],v=h.formats||n.formatNames;return u(f,v,p,g),h.keywords&&(0,r.default)(f),f};c.get=(f,h="full")=>{const g=(h==="fast"?n.fastFormats:n.fullFormats)[f];if(!g)throw new Error(`Unknown format "${f}"`);return g};function u(f,h,p,g){var v,y;(v=(y=f.opts.code).formats)!==null&&v!==void 0||(y.formats=(0,o._)`require("ajv-formats/dist/formats").${g}`);for(const x of h)f.addFormat(x,p[x])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(Rg,Rg.exports)),Rg.exports}var Dte=Nte();const $te=ii(Dte);function Ite(){const e=new dD({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return $te(e),e}class zte{constructor(t){this._ajv=t??Ite()}getValidator(t){const n="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return r=>n(r)?{valid:!0,data:r,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}}class Lte{constructor(t){this._client=t}async*callToolStream(t,n=E0,r){const o=this._client,i={...r,task:r?.task??(o.isToolTask(t.name)?{}:void 0)},a=o.requestStream({method:"tools/call",params:t},n,i),c=o.getToolOutputValidator(t.name);for await(const u of a){if(u.type==="result"&&c){const f=u.result;if(!f.structuredContent&&!f.isError){yield{type:"error",error:new pt(_t.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`)};return}if(f.structuredContent)try{const h=c(f.structuredContent);if(!h.valid){yield{type:"error",error:new pt(_t.InvalidParams,`Structured content does not match the tool's output schema: ${h.errorMessage}`)};return}}catch(h){if(h instanceof pt){yield{type:"error",error:h};return}yield{type:"error",error:new pt(_t.InvalidParams,`Failed to validate structured content: ${h instanceof Error?h.message:String(h)}`)};return}}yield u}}async getTask(t,n){return this._client.getTask({taskId:t},n)}async getTaskResult(t,n,r){return this._client.getTaskResult({taskId:t},n,r)}async listTasks(t,n){return this._client.listTasks(t?{cursor:t}:void 0,n)}async cancelTask(t,n){return this._client.cancelTask({taskId:t},n)}requestStream(t,n,r){return this._client.requestStream(t,n,r)}}function Fte(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${n} does not support task creation for tools/call (required for ${t})`);break}}function Ute(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break}}function ny(e,t){if(!(!e||t===null||typeof t!="object")){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){const n=t,r=e.properties;for(const o of Object.keys(r)){const i=r[o];n[o]===void 0&&Object.prototype.hasOwnProperty.call(i,"default")&&(n[o]=i.default),n[o]!==void 0&&ny(i,n[o])}}if(Array.isArray(e.anyOf))for(const n of e.anyOf)typeof n!="boolean"&&ny(n,t);if(Array.isArray(e.oneOf))for(const n of e.oneOf)typeof n!="boolean"&&ny(n,t)}}function Vte(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};const t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}class qte extends Tee{constructor(t,n){super(n),this._clientInfo=t,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=n?.capabilities??{},this._jsonSchemaValidator=n?.jsonSchemaValidator??new zte,n?.listChanged&&(this._pendingListChangedConfig=n.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",X4,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",Z4,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",H4,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new Lte(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Ree(this._capabilities,t)}setRequestHandler(t,n){const o=v4(t)?.method;if(!o)throw new Error("Schema is missing a method literal");let i;if(b0(o)){const c=o;i=c._zod?.def?.value??c.value}else{const c=o;i=c._def?.value??c.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");const a=i;if(a==="elicitation/create"){const c=async(u,f)=>{const h=Na(tD,u);if(!h.success){const b=h.error instanceof Error?h.error.message:String(h.error);throw new pt(_t.InvalidParams,`Invalid elicitation request: ${b}`)}const{params:p}=h.data;p.mode=p.mode??"form";const{supportsFormMode:g,supportsUrlMode:v}=Vte(this._capabilities.elicitation);if(p.mode==="form"&&!g)throw new pt(_t.InvalidParams,"Client does not support form-mode elicitation requests");if(p.mode==="url"&&!v)throw new pt(_t.InvalidParams,"Client does not support URL-mode elicitation requests");const y=await Promise.resolve(n(u,f));if(p.task){const b=Na(Th,y);if(!b.success){const _=b.error instanceof Error?b.error.message:String(b.error);throw new pt(_t.InvalidParams,`Invalid task creation result: ${_}`)}return b.data}const x=Na(nD,y);if(!x.success){const b=x.error instanceof Error?x.error.message:String(x.error);throw new pt(_t.InvalidParams,`Invalid elicitation result: ${b}`)}const w=x.data,T=p.mode==="form"?p.requestedSchema:void 0;if(p.mode==="form"&&w.action==="accept"&&w.content&&T&&this._capabilities.elicitation?.form?.applyDefaults)try{ny(T,w.content)}catch{}return w};return super.setRequestHandler(t,c)}if(a==="sampling/createMessage"){const c=async(u,f)=>{const h=Na(J4,u);if(!h.success){const y=h.error instanceof Error?h.error.message:String(h.error);throw new pt(_t.InvalidParams,`Invalid sampling request: ${y}`)}const{params:p}=h.data,g=await Promise.resolve(n(u,f));if(p.task){const y=Na(Th,g);if(!y.success){const x=y.error instanceof Error?y.error.message:String(y.error);throw new pt(_t.InvalidParams,`Invalid task creation result: ${x}`)}return y.data}const v=Na(eD,g);if(!v.success){const y=v.error instanceof Error?v.error.message:String(v.error);throw new pt(_t.InvalidParams,`Invalid sampling result: ${y}`)}return v.data};return super.setRequestHandler(t,c)}return super.setRequestHandler(t,n)}assertCapability(t,n){if(!this._serverCapabilities?.[t])throw new Error(`Server does not support ${t} (required for ${n})`)}async connect(t,n){if(await super.connect(t),t.sessionId===void 0)try{const r=await this.request({method:"initialize",params:{protocolVersion:S0,capabilities:this._capabilities,clientInfo:this._clientInfo}},$4,n);if(r===void 0)throw new Error(`Server sent invalid initialize result: ${r}`);if(!KQ.includes(r.protocolVersion))throw new Error(`Server's protocol version is not supported: ${r.protocolVersion}`);this._serverCapabilities=r.capabilities,this._serverVersion=r.serverInfo,t.setProtocolVersion&&t.setProtocolVersion(r.protocolVersion),this._instructions=r.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(r){throw this.close(),r}}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){Fte(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&Ute(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},Pu,t)}async complete(t,n){return this.request({method:"completion/complete",params:t},rD,n)}async setLoggingLevel(t,n){return this.request({method:"logging/setLevel",params:{level:t}},Pu,n)}async getPrompt(t,n){return this.request({method:"prompts/get",params:t},G4,n)}async listPrompts(t,n){return this.request({method:"prompts/list",params:t},K4,n)}async listResources(t,n){return this.request({method:"resources/list",params:t},V4,n)}async listResourceTemplates(t,n){return this.request({method:"resources/templates/list",params:t},q4,n)}async readResource(t,n){return this.request({method:"resources/read",params:t},B4,n)}async subscribeResource(t,n){return this.request({method:"resources/subscribe",params:t},Pu,n)}async unsubscribeResource(t,n){return this.request({method:"resources/unsubscribe",params:t},Pu,n)}async callTool(t,n=E0,r){if(this.isToolTaskRequired(t.name))throw new pt(_t.InvalidRequest,`Tool "${t.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const o=await this.request({method:"tools/call",params:t},n,r),i=this.getToolOutputValidator(t.name);if(i){if(!o.structuredContent&&!o.isError)throw new pt(_t.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(o.structuredContent)try{const a=i(o.structuredContent);if(!a.valid)throw new pt(_t.InvalidParams,`Structured content does not match the tool's output schema: ${a.errorMessage}`)}catch(a){throw a instanceof pt?a:new pt(_t.InvalidParams,`Failed to validate structured content: ${a instanceof Error?a.message:String(a)}`)}}return o}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 n of t){if(n.outputSchema){const o=this._jsonSchemaValidator.getValidator(n.outputSchema);this._cachedToolOutputValidators.set(n.name,o)}const r=n.execution?.taskSupport;(r==="required"||r==="optional")&&this._cachedKnownTaskTools.add(n.name),r==="required"&&this._cachedRequiredTaskTools.add(n.name)}}getToolOutputValidator(t){return this._cachedToolOutputValidators.get(t)}async listTools(t,n){const r=await this.request({method:"tools/list",params:t},W4,n);return this.cacheToolMetadata(r.tools),r}_setupListChangedHandler(t,n,r,o){const i=FJ.safeParse(r);if(!i.success)throw new Error(`Invalid ${t} listChanged options: ${i.error.message}`);if(typeof r.onChanged!="function")throw new Error(`Invalid ${t} listChanged options: onChanged must be a function`);const{autoRefresh:a,debounceMs:c}=i.data,{onChanged:u}=r,f=async()=>{if(!a){u(null,null);return}try{const p=await o();u(null,p)}catch(p){const g=p instanceof Error?p:new Error(String(p));u(g,null)}},h=()=>{if(c){const p=this._listChangedDebounceTimers.get(t);p&&clearTimeout(p);const g=setTimeout(f,c);this._listChangedDebounceTimers.set(t,g)}else f()};this.setNotificationHandler(n,h)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}function _w(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function Bte(e=fetch,t){return t?async(n,r)=>{const o={...t,...r,headers:r?.headers?{..._w(t.headers),..._w(r.headers)}:t.headers};return e(n,o)}:e}let t_;t_=globalThis.crypto;async function Hte(e){return(await t_).getRandomValues(new Uint8Array(e))}async function Kte(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const o=await Hte(e-r.length);for(const i of o)i<n&&(r+=t[i%t.length])}return r}async function Gte(e){return await Kte(e)}async function Zte(e){const t=await(await t_).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Yte(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await Gte(e),n=await Zte(t);return{code_verifier:t,code_challenge:n}}const Gr=QX().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:BQ.custom,message:"URL must be parseable",fatal:!0}),tZ}).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"}),Wte=Yr({resource:ce().url(),authorization_servers:Ge(Gr).optional(),jwks_uri:ce().url().optional(),scopes_supported:Ge(ce()).optional(),bearer_methods_supported:Ge(ce()).optional(),resource_signing_alg_values_supported:Ge(ce()).optional(),resource_name:ce().optional(),resource_documentation:ce().optional(),resource_policy_uri:ce().url().optional(),resource_tos_uri:ce().url().optional(),tls_client_certificate_bound_access_tokens:Fn().optional(),authorization_details_types_supported:Ge(ce()).optional(),dpop_signing_alg_values_supported:Ge(ce()).optional(),dpop_bound_access_tokens_required:Fn().optional()}),hD=Yr({issuer:ce(),authorization_endpoint:Gr,token_endpoint:Gr,registration_endpoint:Gr.optional(),scopes_supported:Ge(ce()).optional(),response_types_supported:Ge(ce()),response_modes_supported:Ge(ce()).optional(),grant_types_supported:Ge(ce()).optional(),token_endpoint_auth_methods_supported:Ge(ce()).optional(),token_endpoint_auth_signing_alg_values_supported:Ge(ce()).optional(),service_documentation:Gr.optional(),revocation_endpoint:Gr.optional(),revocation_endpoint_auth_methods_supported:Ge(ce()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ge(ce()).optional(),introspection_endpoint:ce().optional(),introspection_endpoint_auth_methods_supported:Ge(ce()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ge(ce()).optional(),code_challenge_methods_supported:Ge(ce()).optional(),client_id_metadata_document_supported:Fn().optional()}),Xte=Yr({issuer:ce(),authorization_endpoint:Gr,token_endpoint:Gr,userinfo_endpoint:Gr.optional(),jwks_uri:Gr,registration_endpoint:Gr.optional(),scopes_supported:Ge(ce()).optional(),response_types_supported:Ge(ce()),response_modes_supported:Ge(ce()).optional(),grant_types_supported:Ge(ce()).optional(),acr_values_supported:Ge(ce()).optional(),subject_types_supported:Ge(ce()),id_token_signing_alg_values_supported:Ge(ce()),id_token_encryption_alg_values_supported:Ge(ce()).optional(),id_token_encryption_enc_values_supported:Ge(ce()).optional(),userinfo_signing_alg_values_supported:Ge(ce()).optional(),userinfo_encryption_alg_values_supported:Ge(ce()).optional(),userinfo_encryption_enc_values_supported:Ge(ce()).optional(),request_object_signing_alg_values_supported:Ge(ce()).optional(),request_object_encryption_alg_values_supported:Ge(ce()).optional(),request_object_encryption_enc_values_supported:Ge(ce()).optional(),token_endpoint_auth_methods_supported:Ge(ce()).optional(),token_endpoint_auth_signing_alg_values_supported:Ge(ce()).optional(),display_values_supported:Ge(ce()).optional(),claim_types_supported:Ge(ce()).optional(),claims_supported:Ge(ce()).optional(),service_documentation:ce().optional(),claims_locales_supported:Ge(ce()).optional(),ui_locales_supported:Ge(ce()).optional(),claims_parameter_supported:Fn().optional(),request_parameter_supported:Fn().optional(),request_uri_parameter_supported:Fn().optional(),require_request_uri_registration:Fn().optional(),op_policy_uri:Gr.optional(),op_tos_uri:Gr.optional(),client_id_metadata_document_supported:Fn().optional()}),Qte=Ye({...Xte.shape,...hD.pick({code_challenge_methods_supported:!0}).shape}),Jte=Ye({access_token:ce(),id_token:ce().optional(),token_type:ce(),expires_in:HQ().optional(),scope:ce().optional(),refresh_token:ce().optional()}).strip(),ene=Ye({error:ce(),error_description:ce().optional(),error_uri:ce().optional()}),xM=Gr.optional().or(lt("").transform(()=>{})),tne=Ye({redirect_uris:Ge(Gr),token_endpoint_auth_method:ce().optional(),grant_types:Ge(ce()).optional(),response_types:Ge(ce()).optional(),client_name:ce().optional(),client_uri:Gr.optional(),logo_uri:xM,scope:ce().optional(),contacts:Ge(ce()).optional(),tos_uri:xM,policy_uri:ce().optional(),jwks_uri:Gr.optional(),jwks:vQ().optional(),software_id:ce().optional(),software_version:ce().optional(),software_statement:ce().optional()}).strip(),nne=Ye({client_id:ce(),client_secret:ce().optional(),client_id_issued_at:yn().optional(),client_secret_expires_at:yn().optional()}).strip(),rne=tne.merge(nne);Ye({error:ce(),error_description:ce().optional()}).strip();Ye({token:ce(),token_type_hint:ce().optional()}).strip();function one(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function sne({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const o=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return o.startsWith(i)}class Ir extends Error{constructor(t,n){super(t),this.errorUri=n,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 Cw extends Ir{}Cw.errorCode="invalid_request";class Py extends Ir{}Py.errorCode="invalid_client";class Ny extends Ir{}Ny.errorCode="invalid_grant";class Dy extends Ir{}Dy.errorCode="unauthorized_client";class Tw extends Ir{}Tw.errorCode="unsupported_grant_type";class Rw extends Ir{}Rw.errorCode="invalid_scope";class Ow extends Ir{}Ow.errorCode="access_denied";class sf extends Ir{}sf.errorCode="server_error";class Aw extends Ir{}Aw.errorCode="temporarily_unavailable";class kw extends Ir{}kw.errorCode="unsupported_response_type";class Mw extends Ir{}Mw.errorCode="unsupported_token_type";class jw extends Ir{}jw.errorCode="invalid_token";class Pw extends Ir{}Pw.errorCode="method_not_allowed";class Nw extends Ir{}Nw.errorCode="too_many_requests";class $y extends Ir{}$y.errorCode="invalid_client_metadata";class Dw extends Ir{}Dw.errorCode="insufficient_scope";class $w extends Ir{}$w.errorCode="invalid_target";const ine={[Cw.errorCode]:Cw,[Py.errorCode]:Py,[Ny.errorCode]:Ny,[Dy.errorCode]:Dy,[Tw.errorCode]:Tw,[Rw.errorCode]:Rw,[Ow.errorCode]:Ow,[sf.errorCode]:sf,[Aw.errorCode]:Aw,[kw.errorCode]:kw,[Mw.errorCode]:Mw,[jw.errorCode]:jw,[Pw.errorCode]:Pw,[Nw.errorCode]:Nw,[$y.errorCode]:$y,[Dw.errorCode]:Dw,[$w.errorCode]:$w};class mu extends Error{constructor(t){super(t??"Unauthorized")}}function ane(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const j1="code",P1="S256";function lne(e,t){const n=e.client_secret!==void 0;return t.length===0?n?"client_secret_post":"none":"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&ane(e.token_endpoint_auth_method)&&t.includes(e.token_endpoint_auth_method)?e.token_endpoint_auth_method:n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function cne(e,t,n,r){const{client_id:o,client_secret:i}=t;switch(e){case"client_secret_basic":une(o,i,n);return;case"client_secret_post":fne(o,i,r);return;case"none":dne(o,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function une(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function fne(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function dne(e,t){t.set("client_id",e)}async function pD(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=ene.parse(JSON.parse(n)),{error:o,error_description:i,error_uri:a}=r,c=ine[o]||sf;return new c(i||"",a)}catch(r){const o=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new sf(o)}}async function Og(e,t){try{return await N1(e,t)}catch(n){if(n instanceof Py||n instanceof Dy)return await e.invalidateCredentials?.("all"),await N1(e,t);if(n instanceof Ny)return await e.invalidateCredentials?.("tokens"),await N1(e,t);throw n}}async function N1(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:o,fetchFn:i}){let a,c;try{a=await mne(t,{resourceMetadataUrl:o},i),a.authorization_servers&&a.authorization_servers.length>0&&(c=a.authorization_servers[0])}catch{}c||(c=new URL("/",t));const u=await pne(t,e,a),f=await Sne(c,{fetchFn:i});let h=await Promise.resolve(e.clientInformation());if(!h){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const w=f?.client_id_metadata_document_supported===!0,T=e.clientMetadataUrl;if(T&&!hne(T))throw new $y(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${T}`);if(w&&T)h={client_id:T},await e.saveClientInformation?.(h);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const _=await Cne(c,{metadata:f,clientMetadata:e.clientMetadata,fetchFn:i});await e.saveClientInformation(_),h=_}}const p=!e.redirectUrl;if(n!==void 0||p){const w=await _ne(e,c,{metadata:f,resource:u,authorizationCode:n,fetchFn:i});return await e.saveTokens(w),"AUTHORIZED"}const g=await e.tokens();if(g?.refresh_token)try{const w=await Ene(c,{metadata:f,clientInformation:h,refreshToken:g.refresh_token,resource:u,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(w),"AUTHORIZED"}catch(w){if(!(!(w instanceof Ir)||w instanceof sf))throw w}const v=e.state?await e.state():void 0,{authorizationUrl:y,codeVerifier:x}=await wne(c,{metadata:f,clientInformation:h,state:v,redirectUrl:e.redirectUrl,scope:r||a?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:u});return await e.saveCodeVerifier(x),await e.redirectToAuthorization(y),"REDIRECT"}function hne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function pne(e,t,n){const r=one(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!sne({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function EM(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const o=D1(e,"resource_metadata")||void 0;let i;if(o)try{i=new URL(o)}catch{}const a=D1(e,"scope")||void 0,c=D1(e,"error")||void 0;return{resourceMetadataUrl:i,scope:a,error:c}}function D1(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),o=n.match(r);return o?o[1]||o[2]:null}async function mne(e,t,n=fetch){const r=await vne(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return Wte.parse(await r.json())}async function n_(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?n_(e,void 0,n):void 0;throw r}}function gne(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function _M(e,t,n=fetch){return await n_(e,{"MCP-Protocol-Version":t},n)}function yne(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function vne(e,t,n,r){const o=new URL(e),i=r?.protocolVersion??S0;let a;if(r?.metadataUrl)a=new URL(r.metadataUrl);else{const u=gne(t,o.pathname);a=new URL(u,r?.metadataServerUrl??o),a.search=o.search}let c=await _M(a,i,n);if(!r?.metadataUrl&&yne(c,o.pathname)){const u=new URL(`/.well-known/${t}`,o);c=await _M(u,i,n)}return c}function bne(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let o=t.pathname;return o.endsWith("/")&&(o=o.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${o}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${o}`,t.origin),type:"oidc"}),r.push({url:new URL(`${o}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function Sne(e,{fetchFn:t=fetch,protocolVersion:n=S0}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},o=bne(e);for(const{url:i,type:a}of o){const c=await n_(i,r,t);if(c){if(!c.ok){if(await c.body?.cancel(),c.status>=400&&c.status<500)continue;throw new Error(`HTTP ${c.status} trying to load ${a==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return a==="oauth"?hD.parse(await c.json()):Qte.parse(await c.json())}}}async function wne(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:o,state:i,resource:a}){let c;if(t){if(c=new URL(t.authorization_endpoint),!t.response_types_supported.includes(j1))throw new Error(`Incompatible auth server: does not support response type ${j1}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(P1))throw new Error(`Incompatible auth server: does not support code challenge method ${P1}`)}else c=new URL("/authorize",e);const u=await Yte(),f=u.code_verifier,h=u.code_challenge;return c.searchParams.set("response_type",j1),c.searchParams.set("client_id",n.client_id),c.searchParams.set("code_challenge",h),c.searchParams.set("code_challenge_method",P1),c.searchParams.set("redirect_uri",String(r)),i&&c.searchParams.set("state",i),o&&c.searchParams.set("scope",o),o?.includes("offline_access")&&c.searchParams.append("prompt","consent"),a&&c.searchParams.set("resource",a.href),{authorizationUrl:c,codeVerifier:f}}function xne(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function mD(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:o,resource:i,fetchFn:a}){const c=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),u=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),o)await o(u,n,c,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],p=lne(r,h);cne(p,r,u,n)}const f=await(a??fetch)(c,{method:"POST",headers:u,body:n});if(!f.ok)throw await pD(f);return Jte.parse(await f.json())}async function Ene(e,{metadata:t,clientInformation:n,refreshToken:r,resource:o,addClientAuthentication:i,fetchFn:a}){const c=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),u=await mD(e,{metadata:t,tokenRequestParams:c,clientInformation:n,addClientAuthentication:i,resource:o,fetchFn:a});return{refresh_token:r,...u}}async function _ne(e,t,{metadata:n,resource:r,authorizationCode:o,fetchFn:i}={}){const a=e.clientMetadata.scope;let c;if(e.prepareTokenRequest&&(c=await e.prepareTokenRequest(a)),!c){if(!o)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const f=await e.codeVerifier();c=xne(o,f,e.redirectUrl)}const u=await e.clientInformation();return mD(t,{metadata:n,tokenRequestParams:c,clientInformation:u??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function Cne(e,{metadata:t,clientMetadata:n,fetchFn:r}){let o;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");o=new URL(t.registration_endpoint)}else o=new URL("/register",e);const i=await(r??fetch)(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw await pD(i);return rne.parse(await i.json())}class CM extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}}function $1(e){}function Tne(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=$1,onError:n=$1,onRetry:r=$1,onComment:o}=e;let i="",a=!0,c,u="",f="";function h(x){const w=a?x.replace(/^\xEF\xBB\xBF/,""):x,[T,b]=Rne(`${i}${w}`);for(const _ of T)p(_);i=b,a=!1}function p(x){if(x===""){v();return}if(x.startsWith(":")){o&&o(x.slice(x.startsWith(": ")?2:1));return}const w=x.indexOf(":");if(w!==-1){const T=x.slice(0,w),b=x[w+1]===" "?2:1,_=x.slice(w+b);g(T,_,x);return}g(x,"",x)}function g(x,w,T){switch(x){case"event":f=w;break;case"data":u=`${u}${w}
|
|
56
|
+
`;break;case"id":c=w.includes("\0")?void 0:w;break;case"retry":/^\d+$/.test(w)?r(parseInt(w,10)):n(new CM(`Invalid \`retry\` value: "${w}"`,{type:"invalid-retry",value:w,line:T}));break;default:n(new CM(`Unknown field "${x.length>20?`${x.slice(0,20)}…`:x}"`,{type:"unknown-field",field:x,value:w,line:T}));break}}function v(){u.length>0&&t({id:c,event:f||void 0,data:u.endsWith(`
|
|
57
|
+
`)?u.slice(0,-1):u}),c=void 0,u="",f=""}function y(x={}){i&&x.consume&&p(i),a=!0,c=void 0,u="",f="",i=""}return{feed:h,reset:y}}function Rne(e){const t=[];let n="",r=0;for(;r<e.length;){const o=e.indexOf("\r",r),i=e.indexOf(`
|
|
58
|
+
`,r);let a=-1;if(o!==-1&&i!==-1?a=Math.min(o,i):o!==-1?o===e.length-1?a=-1:a=o:i!==-1&&(a=i),a===-1){n=e.slice(r);break}else{const c=e.slice(r,a);t.push(c),r=a+1,e[r-1]==="\r"&&e[r]===`
|
|
59
|
+
`&&r++}}return[t,n]}class One extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let o;super({start(i){o=Tne({onEvent:a=>{i.enqueue(a)},onError(a){t==="terminate"?i.error(a):typeof t=="function"&&t(a)},onRetry:n,onComment:r})},transform(i){o.feed(i)}})}}const Ane={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class gu extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}class kne{constructor(t,n){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=Bte(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??Ane}async _authThenStart(){if(!this._authProvider)throw new mu("No auth provider");let t;try{t=await Og(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new mu;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=_w(this._requestInit?.headers);return new Headers({...t,...n})}async _startOrAuthSse(t){const{resumptionToken:n}=t;try{const r=await this._commonHeaders();r.set("Accept","text/event-stream"),n&&r.set("last-event-id",n);const o=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,signal:this._abortController?.signal});if(!o.ok){if(await o.body?.cancel(),o.status===401&&this._authProvider)return await this._authThenStart();if(o.status===405)return;throw new gu(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,t,!0)}catch(r){throw this.onerror?.(r),r}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const n=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),o)}_scheduleReconnection(t,n=0){const r=this._reconnectionOptions.maxRetries;if(n>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const o=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(i=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${i instanceof Error?i.message:String(i)}`)),this._scheduleReconnection(t,n+1)})},o)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:o,replayMessageId:i}=n;let a,c=!1,u=!1;(async()=>{try{const h=t.pipeThrough(new TextDecoderStream).pipeThrough(new One({onRetry:v=>{this._serverRetryMs=v}})).getReader();for(;;){const{value:v,done:y}=await h.read();if(y)break;if(v.id&&(a=v.id,c=!0,o?.(v.id)),!!v.data&&(!v.event||v.event==="message"))try{const x=b1.parse(JSON.parse(v.data));Wd(x)&&(u=!0,i!==void 0&&(x.id=i)),this.onmessage?.(x)}catch(x){this.onerror?.(x)}}(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:a,onresumptiontoken:o,replayMessageId:i},0)}catch(h){if(this.onerror?.(new Error(`SSE stream disconnected: ${h}`)),(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:a,onresumptiontoken:o,replayMessageId:i},0)}catch(v){this.onerror?.(new Error(`Failed to reconnect: ${v instanceof Error?v.message:String(v)}`))}}})()}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 mu("No auth provider");if(await Og(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new mu("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,n){try{const{resumptionToken:r,onresumptiontoken:o}=n||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:Ew(t)?t.id:void 0}).catch(g=>this.onerror?.(g));return}const i=await this._commonHeaders();i.set("content-type","application/json"),i.set("accept","application/json, text/event-stream");const a={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(t),signal:this._abortController?.signal},c=await(this._fetch??fetch)(this._url,a),u=c.headers.get("mcp-session-id");if(u&&(this._sessionId=u),!c.ok){const g=await c.text().catch(()=>null);if(c.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new gu(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:v,scope:y}=EM(c);if(this._resourceMetadataUrl=v,this._scope=y,await Og(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new mu;return this._hasCompletedAuthFlow=!0,this.send(t)}if(c.status===403&&this._authProvider){const{resourceMetadataUrl:v,scope:y,error:x}=EM(c);if(x==="insufficient_scope"){const w=c.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===w)throw new gu(403,"Server returned 403 after trying upscoping");if(y&&(this._scope=y),v&&(this._resourceMetadataUrl=v),this._lastUpscopingHeader=w??void 0,await Og(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new mu;return this.send(t)}}throw new gu(c.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,c.status===202){await c.body?.cancel(),lJ(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(g=>this.onerror?.(g));return}const h=(Array.isArray(t)?t:[t]).filter(g=>"method"in g&&"id"in g&&g.id!==void 0).length>0,p=c.headers.get("content-type");if(h)if(p?.includes("text/event-stream"))this._handleSseStream(c.body,{onresumptiontoken:o},!1);else if(p?.includes("application/json")){const g=await c.json(),v=Array.isArray(g)?g.map(y=>b1.parse(y)):[b1.parse(g)];for(const y of v)this.onmessage?.(y)}else throw await c.body?.cancel(),new gu(-1,`Unexpected content type: ${p}`);else await c.body?.cancel()}catch(r){throw this.onerror?.(r),r}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),n={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},r=await(this._fetch??fetch)(this._url,n);if(await r.body?.cancel(),!r.ok&&r.status!==405)throw new gu(r.status,`Failed to terminate session: ${r.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,n){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:n?.onresumptiontoken})}}class Mne{client=null;transport=null;async connect(t){const n=typeof t=="string"?new URL(t):t;this.transport=new kne(n),this.client=new qte({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,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");const r=await this.client.callTool({name:t,arguments:n??{}}),{_meta:o,...i}=r;return{...i,meta:o}}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,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...n&&{arguments:n}})}getServerInfo(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return this.client._serverVersion}async close(){this.client&&(await this.client.close(),this.client=null),this.transport&&(this.transport=null)}}const Of=new Mne;Of.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const jne={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:void 0,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:"inline"},widgetState:null},gD=()=>{const{data:e}=O3({queryKey:["list-tools"],queryFn:()=>Of.listTools()});return e},Pne=()=>Of.getServerInfo(),Nne=()=>{const{setToolData:e}=_f();return iU({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null,openInAppUrl:null});const r=await Of.callTool(t,n);return e(t,{input:n??{},response:r,openaiRef:null,openaiLogs:[],openaiObject:{...jne,toolInput:n??{},toolOutput:r.structuredContent,toolResponseMetadata:r.meta??null,widgetState:null},openInAppUrl:null}),r}})},r_=()=>{const[e]=_E();return gD().find(n=>n.name===e)??null},hl=()=>{const e=r_();if(!e)throw new Error("No tool is currently selected");return e},yD=e=>O3({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await Of.readResource(e)}});const Dne=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$ne=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),TM=e=>{const t=$ne(e);return t.charAt(0).toUpperCase()+t.slice(1)},vD=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Ine=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var zne={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 Lne=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...c},u)=>A.createElement("svg",{ref:u,...zne,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:vD("lucide",o),...!i&&!Ine(c)&&{"aria-hidden":"true"},...c},[...a.map(([f,h])=>A.createElement(f,h)),...Array.isArray(i)?i:[i]]));const Ro=(e,t)=>{const n=A.forwardRef(({className:r,...o},i)=>A.createElement(Lne,{ref:i,iconNode:t,className:vD(`lucide-${Dne(TM(e))}`,`lucide-${e}`,r),...o}));return n.displayName=TM(e),n};const Fne=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],o_=Ro("check",Fne);const Une=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],bD=Ro("chevron-down",Une);const Vne=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],qne=Ro("chevron-up",Vne);const Bne=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Hne=Ro("chevrons-up-down",Bne);const Kne=[["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"}]],Gne=Ro("circle-alert",Kne);const Zne=[["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"}]],Yne=Ro("external-link",Zne);const Wne=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Xne=Ro("info",Wne);const Qne=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Jne=Ro("loader-circle",Qne);const ere=[["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"}]],tre=Ro("moon",ere);const nre=[["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"}]],rre=Ro("play",nre);const ore=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],sre=Ro("search",ore);const ire=[["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"}]],are=Ro("sun",ire);const lre=[["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"}]],cre=Ro("trash",lre);const ure=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],fre=Ro("x",ure);function O0(){return typeof window<"u"}function pl(e){return s_(e)?(e.nodeName||"").toLowerCase():"#document"}function wr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function li(e){var t;return(t=(s_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function s_(e){return O0()?e instanceof Node||e instanceof wr(e).Node:!1}function Cn(e){return O0()?e instanceof Element||e instanceof wr(e).Element:!1}function Yn(e){return O0()?e instanceof HTMLElement||e instanceof wr(e).HTMLElement:!1}function Iw(e){return!O0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wr(e).ShadowRoot}const dre=new Set(["inline","contents"]);function Cc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Bo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!dre.has(o)}const hre=new Set(["table","td","th"]);function pre(e){return hre.has(pl(e))}const mre=[":popover-open",":modal"];function A0(e){return mre.some(t=>{try{return e.matches(t)}catch{return!1}})}const gre=["transform","translate","scale","rotate","perspective"],yre=["transform","translate","scale","rotate","perspective","filter"],vre=["paint","layout","strict","content"];function i_(e){const t=k0(),n=Cn(e)?Bo(e):e;return gre.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||yre.some(r=>(n.willChange||"").includes(r))||vre.some(r=>(n.contain||"").includes(r))}function bre(e){let t=Ui(e);for(;Yn(t)&&!zi(t);){if(i_(t))return t;if(A0(t))return null;t=Ui(t)}return null}function k0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Sre=new Set(["html","body","#document"]);function zi(e){return Sre.has(pl(e))}function Bo(e){return wr(e).getComputedStyle(e)}function M0(e){return Cn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ui(e){if(pl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Iw(e)&&e.host||li(e);return Iw(t)?t.host:t}function SD(e){const t=Ui(e);return zi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yn(t)&&Cc(t)?t:SD(t)}function Fa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=SD(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=wr(o);if(i){const c=zw(a);return t.concat(a,a.visualViewport||[],Cc(o)?o:[],c&&n?Fa(c):[])}return t.concat(o,Fa(o,[],n))}function zw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const RM={};function Co(e,t){const n=A.useRef(RM);return n.current===RM&&(n.current=e(t)),n}const I1=Kh[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],wre=I1&&I1!==A.useLayoutEffect?I1:e=>e();function We(e){const t=Co(xre).current;return t.next=e,wre(t.effect),t.trampoline}function xre(){const e={next:void 0,callback:Ere,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Ere(){}const _re=()=>{},Je=typeof document<"u"?A.useLayoutEffect:_re;function Lw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const ah={};function cp(e,t,n,r,o){let i={...Fw(e,ah)};return t&&(i=Xd(i,t)),n&&(i=Xd(i,n)),r&&(i=Xd(i,r)),o&&(i=Xd(i,o)),i}function Cre(e){if(e.length===0)return ah;if(e.length===1)return Fw(e[0],ah);let t={...Fw(e[0],ah)};for(let n=1;n<e.length;n+=1)t=Xd(t,e[n]);return t}function Xd(e,t){return wD(t)?t(e):Tre(e,t)}function Tre(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Lw(e.style,r);break}case"className":{e[n]=xD(e.className,r);break}default:Rre(n,r)?e[n]=Ore(e[n],r):e[n]=r}}return e}function Rre(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function wD(e){return typeof e=="function"}function Fw(e,t){return wD(e)?e(t):e??ah}function Ore(e,t){return t?e?n=>{if(Are(n)){const o=n;Uw(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function Uw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function xD(e,t){return t?e?t+" "+e:t:e}function Are(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function eo(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const ED=A.createContext(void 0);function _D(e=!1){const t=A.useContext(ED);if(t===void 0&&!e)throw new Error(eo(16));return t}function kre(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,a=r&&t!==!1,c=r&&t===!1;return{props:A.useMemo(()=>{const f={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(f.tabIndex=o,!i&&n&&(f.tabIndex=t?o:-1)),(i&&(t||a)||!i&&n)&&(f["aria-disabled"]=n),i&&(!t||c)&&(f.disabled=n),f},[r,n,t,a,c,i,o])}}function Tc(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=A.useRef(null),a=_D(!0)!==void 0,c=We(()=>{const g=i.current;return!!(g?.tagName==="A"&&g?.href)}),{props:u}=kre({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o}),f=A.useCallback(()=>{const g=i.current;Mre(g)&&a&&t&&u.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,u.disabled,a]);Je(f,[f]);const h=A.useCallback((g={})=>{const{onClick:v,onMouseDown:y,onKeyUp:x,onKeyDown:w,onPointerDown:T,...b}=g;return cp({type:o?"button":void 0,onClick(S){if(t){S.preventDefault();return}v?.(S)},onMouseDown(S){t||y?.(S)},onKeyDown(S){if(t||(Uw(S),w?.(S)),S.baseUIHandlerPrevented)return;const C=S.target===S.currentTarget&&!o&&!c()&&!t,E=S.key==="Enter",O=S.key===" ";C&&((O||E)&&S.preventDefault(),E&&v?.(S))},onKeyUp(S){t||(Uw(S),x?.(S)),!S.baseUIHandlerPrevented&&S.target===S.currentTarget&&!o&&!t&&S.key===" "&&v?.(S)},onPointerDown(S){if(t){S.preventDefault();return}T?.(S)}},o?void 0:{role:"button"},u,b)},[t,u,o,c]),p=We(g=>{i.current=g,f()});return{getButtonProps:h,buttonRef:p}}function Mre(e){return Yn(e)&&e.tagName==="BUTTON"}function Vi(e,t,n,r){const o=Co(CD).current;return Pre(o,e,t,n,r)&&TD(o,[e,t,n,r]),o.callback}function jre(e){const t=Co(CD).current;return Nre(t,e)&&TD(t,e),t.callback}function CD(){return{callback:null,cleanup:null,refs:[]}}function Pre(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function Nre(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function TD(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(r[o]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=r[o];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const Dre=parseInt(A.version,10);function a_(e){return Dre>=e}function OM(e){if(!A.isValidElement(e))return null;const t=e,n=t.props;return(a_(19)?n?.ref:t.ref)??null}function $re(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function Ire(e,t){return typeof e=="function"?e(t):e}function zre(e,t){return typeof e=="function"?e(t):e}function Uo(){}const af=Object.freeze([]),Mr=Object.freeze({}),Lre=500,Fre={style:{transition:"none"}},RD="data-base-ui-click-trigger",Ure={fallbackAxisSide:"none"},Vre={fallbackAxisSide:"end"},qre={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Mn(e,t,n={}){const r=t.render,o=Bre(t,n);if(n.enabled===!1)return null;const i=n.state??Mr;return Hre(e,r,o,i)}function Bre(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Mr,ref:a,props:c,stateAttributesMapping:u,enabled:f=!0}=t,h=f?Ire(n,i):void 0,p=f?zre(r,i):void 0,g=f?$re(i,u):Mr,v=f?Lw(g,Array.isArray(c)?Cre(c):c)??Mr:Mr;return typeof document<"u"&&(f?Array.isArray(a)?v.ref=jre([v.ref,OM(o),...a]):v.ref=Vi(v.ref,OM(o),a):Vi(null,null)),f?(h!==void 0&&(v.className=xD(v.className,h)),p!==void 0&&(v.style=Lw(v.style,p)),v):Mr}function Hre(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=cp(n,t.props);return o.ref=n.ref,A.cloneElement(t,o)}if(e&&typeof e=="string")return Kre(e,n);throw new Error(eo(8))}function Kre(e,t){return e==="button"?A.createElement("button",{type:"button",...t,key:t.key}):e==="img"?A.createElement("img",{alt:"",...t,key:t.key}):A.createElement(e,t)}const Gre=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:c=!0,...u}=t,{getButtonProps:f,buttonRef:h}=Tc({disabled:i,focusableWhenDisabled:a,native:c}),p=A.useMemo(()=>({disabled:i}),[i]);return Mn("button",t,{state:p,ref:[n,h],props:[u,f]})});function OD(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=OD(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function l_(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=OD(e))&&(r&&(r+=" "),r+=t);return r}const AM=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,kM=l_,Wi=(e,t)=>n=>{var r;if(t?.variants==null)return kM(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(f=>{const h=n?.[f],p=i?.[f];if(h===null)return null;const g=AM(h)||AM(p);return o[f][g]}),c=n&&Object.entries(n).reduce((f,h)=>{let[p,g]=h;return g===void 0||(f[p]=g),f},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,h)=>{let{class:p,className:g,...v}=h;return Object.entries(v).every(y=>{let[x,w]=y;return Array.isArray(w)?w.includes({...i,...c}[x]):{...i,...c}[x]===w})?[...f,p,g]:f},[]);return kM(e,a,u,n?.class,n?.className)},Zre=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Yre=(e,t)=>({classGroupId:e,validator:t}),AD=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Iy="-",MM=[],Wre="arbitrary..",Xre=e=>{const t=Jre(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Qre(a);const c=a.split(Iy),u=c[0]===""&&c.length>1?1:0;return kD(c,u,t)},getConflictingClassGroupIds:(a,c)=>{if(c){const u=r[a],f=n[a];return u?f?Zre(f,u):u:f||MM}return n[a]||MM}}},kD=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const f=kD(e,t+1,i);if(f)return f}const a=n.validators;if(a===null)return;const c=t===0?e.join(Iy):e.slice(t).join(Iy),u=a.length;for(let f=0;f<u;f++){const h=a[f];if(h.validator(c))return h.classGroupId}},Qre=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Wre+r:void 0})(),Jre=e=>{const{theme:t,classGroups:n}=e;return eoe(n,t)},eoe=(e,t)=>{const n=AD();for(const r in e){const o=e[r];c_(o,n,r,t)}return n},c_=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];toe(a,t,n,r)}},toe=(e,t,n,r)=>{if(typeof e=="string"){noe(e,t,n);return}if(typeof e=="function"){roe(e,t,n,r);return}ooe(e,t,n,r)},noe=(e,t,n)=>{const r=e===""?t:MD(t,e);r.classGroupId=n},roe=(e,t,n,r)=>{if(soe(e)){c_(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Yre(n,e))},ooe=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[c,u]=o[a];c_(u,MD(t,c),n,r)}},MD=(e,t)=>{let n=e;const r=t.split(Iy),o=r.length;for(let i=0;i<o;i++){const a=r[i];let c=n.nextPart.get(a);c||(c=AD(),n.nextPart.set(a,c)),n=c}return n},soe=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ioe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},Vw="!",jM=":",aoe=[],PM=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),loe=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,c=0,u=0,f;const h=o.length;for(let x=0;x<h;x++){const w=o[x];if(a===0&&c===0){if(w===jM){i.push(o.slice(u,x)),u=x+1;continue}if(w==="/"){f=x;continue}}w==="["?a++:w==="]"?a--:w==="("?c++:w===")"&&c--}const p=i.length===0?o:o.slice(u);let g=p,v=!1;p.endsWith(Vw)?(g=p.slice(0,-1),v=!0):p.startsWith(Vw)&&(g=p.slice(1),v=!0);const y=f&&f>u?f-u:void 0;return PM(i,v,g,y)};if(t){const o=t+jM,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):PM(aoe,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},coe=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const a=n[i],c=a[0]==="[",u=t.has(a);c||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},uoe=e=>({cache:ioe(e.cacheSize),parseClassName:loe(e),sortModifiers:coe(e),...Xre(e)}),foe=/\s+/,doe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],c=e.trim().split(foe);let u="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{isExternal:p,modifiers:g,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:x}=n(h);if(p){u=h+(u.length>0?" "+u:u);continue}let w=!!x,T=r(w?y.substring(0,x):y);if(!T){if(!w){u=h+(u.length>0?" "+u:u);continue}if(T=r(y),!T){u=h+(u.length>0?" "+u:u);continue}w=!1}const b=g.length===0?"":g.length===1?g[0]:i(g).join(":"),_=v?b+Vw:b,S=_+T;if(a.indexOf(S)>-1)continue;a.push(S);const C=o(T,w);for(let E=0;E<C.length;++E){const O=C[E];a.push(_+O)}u=h+(u.length>0?" "+u:u)}return u},hoe=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=jD(n))&&(o&&(o+=" "),o+=r);return o},jD=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=jD(e[r]))&&(n&&(n+=" "),n+=t);return n},poe=(e,...t)=>{let n,r,o,i;const a=u=>{const f=t.reduce((h,p)=>p(h),e());return n=uoe(f),r=n.cache.get,o=n.cache.set,i=c,c(u)},c=u=>{const f=r(u);if(f)return f;const h=doe(u,n);return o(u,h),h};return i=a,(...u)=>i(hoe(...u))},moe=[],Rr=e=>{const t=n=>n[e]||moe;return t.isThemeGetter=!0,t},PD=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ND=/^\((?:(\w[\w-]*):)?(.+)\)$/i,goe=/^\d+\/\d+$/,yoe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,voe=/\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$/,boe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Soe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,woe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yu=e=>goe.test(e),Ut=e=>!!e&&!Number.isNaN(Number(e)),Ta=e=>!!e&&Number.isInteger(Number(e)),z1=e=>e.endsWith("%")&&Ut(e.slice(0,-1)),Ni=e=>yoe.test(e),xoe=()=>!0,Eoe=e=>voe.test(e)&&!boe.test(e),DD=()=>!1,_oe=e=>Soe.test(e),Coe=e=>woe.test(e),Toe=e=>!tt(e)&&!nt(e),Roe=e=>Af(e,zD,DD),tt=e=>PD.test(e),Bl=e=>Af(e,LD,Eoe),L1=e=>Af(e,joe,Ut),NM=e=>Af(e,$D,DD),Ooe=e=>Af(e,ID,Coe),Ag=e=>Af(e,FD,_oe),nt=e=>ND.test(e),Vd=e=>kf(e,LD),Aoe=e=>kf(e,Poe),DM=e=>kf(e,$D),koe=e=>kf(e,zD),Moe=e=>kf(e,ID),kg=e=>kf(e,FD,!0),Af=(e,t,n)=>{const r=PD.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},kf=(e,t,n=!1)=>{const r=ND.exec(e);return r?r[1]?t(r[1]):n:!1},$D=e=>e==="position"||e==="percentage",ID=e=>e==="image"||e==="url",zD=e=>e==="length"||e==="size"||e==="bg-size",LD=e=>e==="length",joe=e=>e==="number",Poe=e=>e==="family-name",FD=e=>e==="shadow",Noe=()=>{const e=Rr("color"),t=Rr("font"),n=Rr("text"),r=Rr("font-weight"),o=Rr("tracking"),i=Rr("leading"),a=Rr("breakpoint"),c=Rr("container"),u=Rr("spacing"),f=Rr("radius"),h=Rr("shadow"),p=Rr("inset-shadow"),g=Rr("text-shadow"),v=Rr("drop-shadow"),y=Rr("blur"),x=Rr("perspective"),w=Rr("aspect"),T=Rr("ease"),b=Rr("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),nt,tt],E=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],j=()=>[nt,tt,u],P=()=>[yu,"full","auto",...j()],$=()=>[Ta,"none","subgrid",nt,tt],I=()=>["auto",{span:["full",Ta,nt,tt]},Ta,nt,tt],L=()=>[Ta,"auto",nt,tt],F=()=>["auto","min","max","fr",nt,tt],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...j()],H=()=>[yu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],V=()=>[e,nt,tt],oe=()=>[...S(),DM,NM,{position:[nt,tt]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",koe,Roe,{size:[nt,tt]}],q=()=>[z1,Vd,Bl],U=()=>["","none","full",f,nt,tt],N=()=>["",Ut,Vd,Bl],G=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[Ut,z1,DM,NM],de=()=>["","none",y,nt,tt],we=()=>["none",Ut,nt,tt],Ee=()=>["none",Ut,nt,tt],se=()=>[Ut,nt,tt],X=()=>[yu,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ni],breakpoint:[Ni],color:[xoe],container:[Ni],"drop-shadow":[Ni],ease:["in","out","in-out"],font:[Toe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ni],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ni],shadow:[Ni],spacing:["px",Ut],text:[Ni],"text-shadow":[Ni],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yu,tt,nt,w]}],container:["container"],columns:[{columns:[Ut,tt,nt,c]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[Ta,"auto",nt,tt]}],basis:[{basis:[yu,"full","auto",c,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ut,yu,"auto","initial","none",tt]}],grow:[{grow:["",Ut,nt,tt]}],shrink:[{shrink:["",Ut,nt,tt]}],order:[{order:[Ta,"first","last","none",nt,tt]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[c,"screen",...H()]}],"min-w":[{"min-w":[c,"screen","none",...H()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[a]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",n,Vd,Bl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,nt,L1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",z1,tt]}],"font-family":[{font:[Aoe,tt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,nt,tt]}],"line-clamp":[{"line-clamp":[Ut,"none",nt,L1]}],leading:[{leading:[i,...j()]}],"list-image":[{"list-image":["none",nt,tt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",nt,tt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ut,"from-font","auto",nt,Bl]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[Ut,"auto",nt,tt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",nt,tt]}],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",nt,tt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ta,nt,tt],radial:["",nt,tt],conic:[Ta,nt,tt]},Moe,Ooe]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:N()}],"border-w-x":[{"border-x":N()}],"border-w-y":[{"border-y":N()}],"border-w-s":[{"border-s":N()}],"border-w-e":[{"border-e":N()}],"border-w-t":[{"border-t":N()}],"border-w-r":[{"border-r":N()}],"border-w-b":[{"border-b":N()}],"border-w-l":[{"border-l":N()}],"divide-x":[{"divide-x":N()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":N()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ut,nt,tt]}],"outline-w":[{outline:["",Ut,Vd,Bl]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",h,kg,Ag]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",p,kg,Ag]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:N()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[Ut,Bl]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":N()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",g,kg,Ag]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[Ut,nt,tt]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"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":[Ut]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[nt,tt]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[Ut]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",nt,tt]}],filter:[{filter:["","none",nt,tt]}],blur:[{blur:de()}],brightness:[{brightness:[Ut,nt,tt]}],contrast:[{contrast:[Ut,nt,tt]}],"drop-shadow":[{"drop-shadow":["","none",v,kg,Ag]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",Ut,nt,tt]}],"hue-rotate":[{"hue-rotate":[Ut,nt,tt]}],invert:[{invert:["",Ut,nt,tt]}],saturate:[{saturate:[Ut,nt,tt]}],sepia:[{sepia:["",Ut,nt,tt]}],"backdrop-filter":[{"backdrop-filter":["","none",nt,tt]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[Ut,nt,tt]}],"backdrop-contrast":[{"backdrop-contrast":[Ut,nt,tt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ut,nt,tt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ut,nt,tt]}],"backdrop-invert":[{"backdrop-invert":["",Ut,nt,tt]}],"backdrop-opacity":[{"backdrop-opacity":[Ut,nt,tt]}],"backdrop-saturate":[{"backdrop-saturate":[Ut,nt,tt]}],"backdrop-sepia":[{"backdrop-sepia":["",Ut,nt,tt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",nt,tt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ut,"initial",nt,tt]}],ease:[{ease:["linear","initial",T,nt,tt]}],delay:[{delay:[Ut,nt,tt]}],animate:[{animate:["none",b,nt,tt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,nt,tt]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[nt,tt,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:X()}],"translate-x":[{"translate-x":X()}],"translate-y":[{"translate-y":X()}],"translate-z":[{"translate-z":X()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"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",nt,tt]}],"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":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",nt,tt]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[Ut,Vd,Bl,L1]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},UD=poe(Noe);function St(...e){return UD(l_(e))}const Doe=Wi("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 Ja({className:e,variant:t="default",size:n="default",...r}){return M.jsx(Gre,{"data-slot":"button",className:St(Doe({variant:t,size:n,className:e})),...r})}const $oe=()=>{const e=Pne(),t=e?.name,n=e?.version,[,r]=_E();return M.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:M.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[M.jsxs("div",{className:"flex items-center gap-4",children:[M.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{r(null)},children:"Skybridge"}),M.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),M.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[M.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),M.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",n]})]}),M.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-semibold text-green-800",children:[M.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),M.jsx("div",{className:"flex items-center gap-2",children:M.jsx(Ja,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:M.jsxs("a",{href:"https://docs.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",M.jsx(Yne,{className:"h-3.5 w-3.5"})]})})})]})})},VD=A.createContext({});function Ioe(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const qD=typeof window<"u",zoe=qD?A.useLayoutEffect:A.useEffect,u_=A.createContext(null);function f_(e,t){e.indexOf(t)===-1&&e.push(t)}function d_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ri=(e,t,n)=>n>t?t:n<e?e:n;let h_=()=>{};const qi={},BD=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function HD(e){return typeof e=="object"&&e!==null}const KD=e=>/^0[^.\s]+$/u.test(e);function p_(e){let t;return()=>(t===void 0&&(t=e()),t)}const fs=e=>e,Loe=(e,t)=>n=>t(e(n)),up=(...e)=>e.reduce(Loe),Rh=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class m_{constructor(){this.subscriptions=[]}add(t){return f_(this.subscriptions,t),()=>d_(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Li=e=>e*1e3,ls=e=>e/1e3;function GD(e,t){return t?e*(1e3/t):0}const ZD=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Foe=1e-7,Uoe=12;function Voe(e,t,n,r,o){let i,a,c=0;do a=t+(n-t)/2,i=ZD(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>Foe&&++c<Uoe);return a}function fp(e,t,n,r){if(e===t&&n===r)return fs;const o=i=>Voe(i,0,1,e,n);return i=>i===0||i===1?i:ZD(o(i),t,r)}const YD=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,WD=e=>t=>1-e(1-t),XD=fp(.33,1.53,.69,.99),g_=WD(XD),QD=YD(g_),JD=e=>(e*=2)<1?.5*g_(e):.5*(2-Math.pow(2,-10*(e-1))),y_=e=>1-Math.sin(Math.acos(e)),e$=WD(y_),t$=YD(y_),qoe=fp(.42,0,1,1),Boe=fp(0,0,.58,1),n$=fp(.42,0,.58,1),Hoe=e=>Array.isArray(e)&&typeof e[0]!="number",r$=e=>Array.isArray(e)&&typeof e[0]=="number",Koe={linear:fs,easeIn:qoe,easeInOut:n$,easeOut:Boe,circIn:y_,circInOut:t$,circOut:e$,backIn:g_,backInOut:QD,backOut:XD,anticipate:JD},Goe=e=>typeof e=="string",$M=e=>{if(r$(e)){h_(e.length===4);const[t,n,r,o]=e;return fp(t,n,r,o)}else if(Goe(e))return Koe[e];return e},Mg=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Zoe(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function u(h){a.has(h)&&(f.schedule(h),e()),h(c)}const f={schedule:(h,p=!1,g=!1)=>{const y=g&&o?n:r;return p&&a.add(h),y.has(h)||y.add(h),h},cancel:h=>{r.delete(h),a.delete(h)},process:h=>{if(c=h,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),n.clear(),o=!1,i&&(i=!1,f.process(h))}};return f}const Yoe=40;function o$(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Mg.reduce((_,S)=>(_[S]=Zoe(i),_),{}),{setup:c,read:u,resolveKeyframes:f,preUpdate:h,update:p,preRender:g,render:v,postRender:y}=a,x=()=>{const _=qi.useManualTiming?o.timestamp:performance.now();n=!1,qi.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(_-o.timestamp,Yoe),1)),o.timestamp=_,o.isProcessing=!0,c.process(o),u.process(o),f.process(o),h.process(o),p.process(o),g.process(o),v.process(o),y.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(x))},w=()=>{n=!0,r=!0,o.isProcessing||e(x)};return{schedule:Mg.reduce((_,S)=>{const C=a[S];return _[S]=(E,O=!1,j=!1)=>(n||w(),C.schedule(E,O,j)),_},{}),cancel:_=>{for(let S=0;S<Mg.length;S++)a[Mg[S]].cancel(_)},state:o,steps:a}}const{schedule:Un,cancel:el,state:Hr,steps:F1}=o$(typeof requestAnimationFrame<"u"?requestAnimationFrame:fs,!0);let ry;function Woe(){ry=void 0}const po={now:()=>(ry===void 0&&po.set(Hr.isProcessing||qi.useManualTiming?Hr.timestamp:performance.now()),ry),set:e=>{ry=e,queueMicrotask(Woe)}},s$=e=>t=>typeof t=="string"&&t.startsWith(e),i$=s$("--"),Xoe=s$("var(--"),v_=e=>Xoe(e)?Qoe.test(e.split("/*")[0].trim()):!1,Qoe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function IM(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Mf={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Oh={...Mf,transform:e=>ri(0,1,e)},jg={...Mf,default:1},lh=e=>Math.round(e*1e5)/1e5,b_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Joe(e){return e==null}const ese=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,S_=(e,t)=>n=>!!(typeof n=="string"&&ese.test(n)&&n.startsWith(e)||t&&!Joe(n)&&Object.prototype.hasOwnProperty.call(n,t)),a$=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,c]=r.match(b_);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},tse=e=>ri(0,255,e),U1={...Mf,transform:e=>Math.round(tse(e))},Ql={test:S_("rgb","red"),parse:a$("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+U1.transform(e)+", "+U1.transform(t)+", "+U1.transform(n)+", "+lh(Oh.transform(r))+")"};function nse(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const qw={test:S_("#"),parse:nse,transform:Ql.transform},dp=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ka=dp("deg"),ei=dp("%"),Qe=dp("px"),rse=dp("vh"),ose=dp("vw"),zM={...ei,parse:e=>ei.parse(e)/100,transform:e=>ei.transform(e*100)},Nu={test:S_("hsl","hue"),parse:a$("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ei.transform(lh(t))+", "+ei.transform(lh(n))+", "+lh(Oh.transform(r))+")"},vr={test:e=>Ql.test(e)||qw.test(e)||Nu.test(e),parse:e=>Ql.test(e)?Ql.parse(e):Nu.test(e)?Nu.parse(e):qw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ql.transform(e):Nu.transform(e),getAnimatableNone:e=>{const t=vr.parse(e);return t.alpha=0,vr.transform(t)}},sse=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ise(e){return isNaN(e)&&typeof e=="string"&&(e.match(b_)?.length||0)+(e.match(sse)?.length||0)>0}const l$="number",c$="color",ase="var",lse="var(",LM="${}",cse=/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 Ah(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const c=t.replace(cse,u=>(vr.test(u)?(r.color.push(i),o.push(c$),n.push(vr.parse(u))):u.startsWith(lse)?(r.var.push(i),o.push(ase),n.push(u)):(r.number.push(i),o.push(l$),n.push(parseFloat(u))),++i,LM)).split(LM);return{values:n,split:c,indexes:r,types:o}}function u$(e){return Ah(e).values}function f$(e){const{split:t,types:n}=Ah(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const c=n[a];c===l$?i+=lh(o[a]):c===c$?i+=vr.transform(o[a]):i+=o[a]}return i}}const use=e=>typeof e=="number"?0:vr.test(e)?vr.getAnimatableNone(e):e;function fse(e){const t=u$(e);return f$(e)(t.map(use))}const tl={test:ise,parse:u$,createTransformer:f$,getAnimatableNone:fse};function V1(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function dse({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;o=V1(u,c,e+1/3),i=V1(u,c,e),a=V1(u,c,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function zy(e,t){return n=>n>0?t:e}const Wn=(e,t,n)=>e+(t-e)*n,q1=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},hse=[qw,Ql,Nu],pse=e=>hse.find(t=>t.test(e));function FM(e){const t=pse(e);if(!t)return!1;let n=t.parse(e);return t===Nu&&(n=dse(n)),n}const UM=(e,t)=>{const n=FM(e),r=FM(t);if(!n||!r)return zy(e,t);const o={...n};return i=>(o.red=q1(n.red,r.red,i),o.green=q1(n.green,r.green,i),o.blue=q1(n.blue,r.blue,i),o.alpha=Wn(n.alpha,r.alpha,i),Ql.transform(o))},Bw=new Set(["none","hidden"]);function mse(e,t){return Bw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function gse(e,t){return n=>Wn(e,t,n)}function w_(e){return typeof e=="number"?gse:typeof e=="string"?v_(e)?zy:vr.test(e)?UM:bse:Array.isArray(e)?d$:typeof e=="object"?vr.test(e)?UM:yse:zy}function d$(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>w_(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function yse(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=w_(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function vse(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],c=e.values[a]??0;n[o]=c,r[i]++}return n}const bse=(e,t)=>{const n=tl.createTransformer(t),r=Ah(e),o=Ah(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Bw.has(e)&&!o.values.length||Bw.has(t)&&!r.values.length?mse(e,t):up(d$(vse(r,o),o.values),n):zy(e,t)};function h$(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Wn(e,t,n):w_(e)(e,t)}const Sse=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Un.update(t,n),stop:()=>el(t),now:()=>Hr.isProcessing?Hr.timestamp:po.now()}},p$=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Ly=2e4;function x_(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ly;)t+=n,r=e.next(t);return t>=Ly?1/0:t}function wse(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(x_(r),Ly);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:ls(o)}}const xse=5;function m$(e,t,n){const r=Math.max(t-xse,0);return GD(n-e(r),t-r)}const or={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},B1=.001;function Ese({duration:e=or.duration,bounce:t=or.bounce,velocity:n=or.velocity,mass:r=or.mass}){let o,i,a=1-t;a=ri(or.minDamping,or.maxDamping,a),e=ri(or.minDuration,or.maxDuration,ls(e)),a<1?(o=f=>{const h=f*a,p=h*e,g=h-n,v=Hw(f,a),y=Math.exp(-p);return B1-g/v*y},i=f=>{const p=f*a*e,g=p*n+n,v=Math.pow(a,2)*Math.pow(f,2)*e,y=Math.exp(-p),x=Hw(Math.pow(f,2),a);return(-o(f)+B1>0?-1:1)*((g-v)*y)/x}):(o=f=>{const h=Math.exp(-f*e),p=(f-n)*e+1;return-B1+h*p},i=f=>{const h=Math.exp(-f*e),p=(n-f)*(e*e);return h*p});const c=5/e,u=Cse(o,i,c);if(e=Li(e),isNaN(u))return{stiffness:or.stiffness,damping:or.damping,duration:e};{const f=Math.pow(u,2)*r;return{stiffness:f,damping:a*2*Math.sqrt(r*f),duration:e}}}const _se=12;function Cse(e,t,n){let r=n;for(let o=1;o<_se;o++)r=r-e(r)/t(r);return r}function Hw(e,t){return e*Math.sqrt(1-t*t)}const Tse=["duration","bounce"],Rse=["stiffness","damping","mass"];function VM(e,t){return t.some(n=>e[n]!==void 0)}function Ose(e){let t={velocity:or.velocity,stiffness:or.stiffness,damping:or.damping,mass:or.mass,isResolvedFromDuration:!1,...e};if(!VM(e,Rse)&&VM(e,Tse))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*ri(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:or.mass,stiffness:o,damping:i}}else{const n=Ese(e);t={...t,...n,mass:or.mass},t.isResolvedFromDuration=!0}return t}function Fy(e=or.visualDuration,t=or.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:i},{stiffness:u,damping:f,mass:h,duration:p,velocity:g,isResolvedFromDuration:v}=Ose({...n,velocity:-ls(n.velocity||0)}),y=g||0,x=f/(2*Math.sqrt(u*h)),w=a-i,T=ls(Math.sqrt(u/h)),b=Math.abs(w)<5;r||(r=b?or.restSpeed.granular:or.restSpeed.default),o||(o=b?or.restDelta.granular:or.restDelta.default);let _;if(x<1){const C=Hw(T,x);_=E=>{const O=Math.exp(-x*T*E);return a-O*((y+x*T*w)/C*Math.sin(C*E)+w*Math.cos(C*E))}}else if(x===1)_=C=>a-Math.exp(-T*C)*(w+(y+T*w)*C);else{const C=T*Math.sqrt(x*x-1);_=E=>{const O=Math.exp(-x*T*E),j=Math.min(C*E,300);return a-O*((y+x*T*w)*Math.sinh(j)+C*w*Math.cosh(j))/C}}const S={calculatedDuration:v&&p||null,next:C=>{const E=_(C);if(v)c.done=C>=p;else{let O=C===0?y:0;x<1&&(O=C===0?Li(y):m$(_,C,E));const j=Math.abs(O)<=r,P=Math.abs(a-E)<=o;c.done=j&&P}return c.value=c.done?a:E,c},toString:()=>{const C=Math.min(x_(S),Ly),E=p$(O=>S.next(C*O).value,C,30);return C+"ms "+E},toTransition:()=>{}};return S}Fy.applyToOptions=e=>{const t=wse(e,100,Fy);return e.ease=t.ease,e.duration=Li(t.duration),e.type="keyframes",e};function Kw({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:c,max:u,restDelta:f=.5,restSpeed:h}){const p=e[0],g={done:!1,value:p},v=j=>c!==void 0&&j<c||u!==void 0&&j>u,y=j=>c===void 0?u:u===void 0||Math.abs(c-j)<Math.abs(u-j)?c:u;let x=n*t;const w=p+x,T=a===void 0?w:a(w);T!==w&&(x=T-p);const b=j=>-x*Math.exp(-j/r),_=j=>T+b(j),S=j=>{const P=b(j),$=_(j);g.done=Math.abs(P)<=f,g.value=g.done?T:$};let C,E;const O=j=>{v(g.value)&&(C=j,E=Fy({keyframes:[g.value,y(g.value)],velocity:m$(_,j,g.value),damping:o,stiffness:i,restDelta:f,restSpeed:h}))};return O(0),{calculatedDuration:null,next:j=>{let P=!1;return!E&&C===void 0&&(P=!0,S(j),O(j)),C!==void 0&&j>=C?E.next(j-C):(!P&&S(j),g)}}}function Ase(e,t,n){const r=[],o=n||qi.mix||h$,i=e.length-1;for(let a=0;a<i;a++){let c=o(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||fs:t;c=up(u,c)}r.push(c)}return r}function kse(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(h_(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=Ase(t,r,o),u=c.length,f=h=>{if(a&&h<e[0])return t[0];let p=0;if(u>1)for(;p<e.length-2&&!(h<e[p+1]);p++);const g=Rh(e[p],e[p+1],h);return c[p](g)};return n?h=>f(ri(e[0],e[i-1],h)):f}function Mse(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Rh(0,t,r);e.push(Wn(n,1,o))}}function jse(e){const t=[0];return Mse(t,e.length-1),t}function Pse(e,t){return e.map(n=>n*t)}function Nse(e,t){return e.map(()=>t||n$).splice(0,e.length-1)}function ch({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Hoe(r)?r.map($M):$M(r),i={done:!1,value:t[0]},a=Pse(n&&n.length===t.length?n:jse(t),e),c=kse(a,t,{ease:Array.isArray(o)?o:Nse(t,o)});return{calculatedDuration:e,next:u=>(i.value=c(u),i.done=u>=e,i)}}const Dse=e=>e!==null;function E_(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(Dse),c=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!c||r===void 0?i[c]:r}const $se={decay:Kw,inertia:Kw,tween:ch,keyframes:ch,spring:Fy};function g$(e){typeof e.type=="string"&&(e.type=$se[e.type])}class __{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Ise=e=>e/100;class C_ extends __{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:n}=this.options;n&&n.updatedAt!==po.now()&&this.tick(po.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;g$(t);const{type:n=ch,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:c}=t;const u=n||ch;u!==ch&&typeof c[0]!="number"&&(this.mixKeyframes=up(Ise,h$(c[0],c[1])),c=[0,100]);const f=u({...t,keyframes:c});i==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...c].reverse(),velocity:-a})),f.calculatedDuration===null&&(f.calculatedDuration=x_(f));const{calculatedDuration:h}=f;this.calculatedDuration=h,this.resolvedDuration=h+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:c,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:h,repeat:p,repeatType:g,repeatDelay:v,type:y,onUpdate:x,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const T=this.currentTime-f*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?T<0:T>o;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let _=this.currentTime,S=r;if(p){const j=Math.min(this.currentTime,o)/c;let P=Math.floor(j),$=j%1;!$&&j>=1&&($=1),$===1&&P--,P=Math.min(P,p+1),P%2&&(g==="reverse"?($=1-$,v&&($-=v/c)):g==="mirror"&&(S=a)),_=ri(0,1,$)*c}const C=b?{done:!1,value:h[0]}:S.next(_);i&&(C.value=i(C.value));let{done:E}=C;!b&&u!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return O&&y!==Kw&&(C.value=E_(h,this.options,w,this.speed)),x&&x(C.value),O&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return ls(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ls(t)}get time(){return ls(this.currentTime)}set time(t){t=Li(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(po.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ls(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Sse,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(po.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 zse(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Jl=e=>e*180/Math.PI,Gw=e=>{const t=Jl(Math.atan2(e[1],e[0]));return Zw(t)},Lse={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gw,rotateZ:Gw,skewX:e=>Jl(Math.atan(e[1])),skewY:e=>Jl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Zw=e=>(e=e%360,e<0&&(e+=360),e),qM=Gw,BM=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),HM=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Fse={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:BM,scaleY:HM,scale:e=>(BM(e)+HM(e))/2,rotateX:e=>Zw(Jl(Math.atan2(e[6],e[5]))),rotateY:e=>Zw(Jl(Math.atan2(-e[2],e[0]))),rotateZ:qM,rotate:qM,skewX:e=>Jl(Math.atan(e[4])),skewY:e=>Jl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Yw(e){return e.includes("scale")?1:0}function Ww(e,t){if(!e||e==="none")return Yw(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Fse,o=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Lse,o=c}if(!o)return Yw(t);const i=r[t],a=o[1].split(",").map(Vse);return typeof i=="function"?i(a):a[i]}const Use=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ww(n,t)};function Vse(e){return parseFloat(e.trim())}const jf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pf=new Set(jf),KM=e=>e===Mf||e===Qe,qse=new Set(["x","y","z"]),Bse=jf.filter(e=>!qse.has(e));function Hse(e){const t=[];return Bse.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Da={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),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})=>Ww(t,"x"),y:(e,{transform:t})=>Ww(t,"y")};Da.translateX=Da.x;Da.translateY=Da.y;const rc=new Set;let Xw=!1,Qw=!1,Jw=!1;function y$(){if(Qw){const e=Array.from(rc).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Hse(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{r.getValue(i)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Qw=!1,Xw=!1,rc.forEach(e=>e.complete(Jw)),rc.clear()}function v$(){rc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qw=!0)})}function Kse(){Jw=!0,v$(),y$(),Jw=!1}class T_{constructor(t,n,r,o,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(rc.add(this),Xw||(Xw=!0,Un.read(v$),Un.resolveKeyframes(y$))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const c=r.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}zse(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),rc.delete(this)}cancel(){this.state==="scheduled"&&(rc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Gse=e=>e.startsWith("--");function Zse(e,t,n){Gse(t)?e.style.setProperty(t,n):e.style[t]=n}const Yse=p_(()=>window.ScrollTimeline!==void 0),Wse={};function Xse(e,t){const n=p_(e);return()=>Wse[t]??n()}const b$=Xse(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Qd=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,GM={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qd([0,.65,.55,1]),circOut:Qd([.55,0,1,.45]),backIn:Qd([.31,.01,.66,-.59]),backOut:Qd([.33,1.53,.69,.99])};function S$(e,t){if(e)return typeof e=="function"?b$()?p$(e,t):"ease-out":r$(e)?Qd(e):Array.isArray(e)?e.map(n=>S$(n,t)||GM.easeOut):GM[e]}function Qse(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:c="easeOut",times:u}={},f=void 0){const h={[t]:n};u&&(h.offset=u);const p=S$(c,o);Array.isArray(p)&&(h.easing=p);const g={delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return f&&(g.pseudoElement=f),e.animate(h,g)}function w$(e){return typeof e=="function"&&"applyToOptions"in e}function Jse({type:e,...t}){return w$(e)&&b$()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class eie extends __{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:c,onComplete:u}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,h_(typeof t.type!="string");const f=Jse(t);this.animation=Qse(n,r,o,f,i),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const h=E_(o,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(h):Zse(n,r,h),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ls(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ls(t)}get time(){return ls(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Li(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Yse()?(this.animation.timeline=t,fs):n(this)}}const x$={anticipate:JD,backInOut:QD,circInOut:t$};function tie(e){return e in x$}function nie(e){typeof e.ease=="string"&&tie(e.ease)&&(e.ease=x$[e.ease])}const H1=10;class rie extends eie{constructor(t){nie(t),g$(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new C_({...a,autoplay:!1}),u=Math.max(H1,po.now()-this.startTime),f=ri(0,H1,u-H1);n.setWithVelocity(c.sample(Math.max(0,u-f)).value,c.sample(u).value,f),c.stop()}}const ZM=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(tl.test(e)||e==="0")&&!e.startsWith("url("));function oie(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function sie(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=ZM(o,t),c=ZM(i,t);return!a||!c?!1:oie(e)||(n==="spring"||w$(n))&&r}function ex(e){e.duration=0,e.type="keyframes"}const iie=new Set(["opacity","clipPath","filter","transform"]),aie=p_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function lie(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:f}=t.owner.getProps();return aie()&&n&&iie.has(n)&&(n!=="transform"||!f)&&!u&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const cie=40;class uie extends __{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:c,name:u,motionValue:f,element:h,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=po.now();const g={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:u,motionValue:f,element:h,...p},v=h?.KeyframeResolver||T_;this.keyframeResolver=new v(c,(y,x,w)=>this.onKeyframesResolved(y,x,g,!w),u,f,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:c,delay:u,isHandoff:f,onUpdate:h}=r;this.resolvedAt=po.now(),sie(t,i,a,c)||((qi.instantAnimations||!u)&&h?.(E_(t,r,n)),t[0]=t[t.length-1],ex(r),r.repeat=0);const g={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>cie?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=!f&&lie(g),y=g.motionValue?.owner?.current,x=v?new rie({...g,element:y}):new C_(g);x.finished.then(()=>{this.notifyFinished()}).catch(fs),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Kse()),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 E$(e,t,n,r=0,o=1){const i=Array.from(e).sort((f,h)=>f.sortNodePosition(h)).indexOf(t),a=e.size,c=(a-1)*r;return typeof n=="function"?n(i,a):o===1?i*r:c-i*r}const fie=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function die(e){const t=fie.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function _$(e,t,n=1){const[r,o]=die(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return BD(a)?parseFloat(a):a}return v_(o)?_$(o,t,n+1):o}const hie={type:"spring",stiffness:500,damping:25,restSpeed:10},pie=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),mie={type:"keyframes",duration:.8},gie={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},yie=(e,{keyframes:t})=>t.length>2?mie:Pf.has(e)?e.startsWith("scale")?pie(t[1]):hie:gie,vie=e=>e!==null;function bie(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(vie),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function R_(e,t){return e?.[t]??e?.default??e}function Sie({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:c,from:u,elapsed:f,...h}){return!!Object.keys(h).length}const O_=(e,t,n,r={},o,i)=>a=>{const c=R_(r,e)||{},u=c.delay||r.delay||0;let{elapsed:f=0}=r;f=f-Li(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-f,onUpdate:g=>{t.set(g),c.onUpdate&&c.onUpdate(g)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:i?void 0:o};Sie(c)||Object.assign(h,yie(e,h)),h.duration&&(h.duration=Li(h.duration)),h.repeatDelay&&(h.repeatDelay=Li(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(ex(h),h.delay===0&&(p=!0)),(qi.instantAnimations||qi.skipAnimations)&&(p=!0,ex(h),h.delay=0),h.allowFlatten=!c.type&&!c.ease,p&&!i&&t.get()!==void 0){const g=bie(h.keyframes,c);if(g!==void 0){Un.update(()=>{h.onUpdate(g),h.onComplete()});return}}return c.isSync?new C_(h):new uie(h)};function YM(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function A_(e,t,n,r){if(typeof t=="function"){const[o,i]=YM(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=YM(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function qu(e,t,n){const r=e.getProps();return A_(r,t,n!==void 0?n:r.custom,e)}const C$=new Set(["width","height","top","left","right","bottom",...jf]),WM=30,wie=e=>!isNaN(parseFloat(e));class xie{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=po.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=po.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=wie(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new m_);const r=this.events[t].add(n);return t==="change"?()=>{r(),Un.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&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=po.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>WM)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,WM);return GD(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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 lf(e,t){return new xie(e,t)}const tx=e=>Array.isArray(e);function Eie(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,lf(n))}function _ie(e){return tx(e)?e[e.length-1]||0:e}function Cie(e,t){const n=qu(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const c=_ie(i[a]);Eie(e,a,c)}}const ro=e=>!!(e&&e.getVelocity);function Tie(e){return!!(ro(e)&&e.add)}function nx(e,t){const n=e.getValue("willChange");if(Tie(n))return n.add(t);if(!n&&qi.WillChange){const r=new qi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function k_(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Rie="framerAppearId",T$="data-"+k_(Rie);function R$(e){return e.props[T$]}function Oie({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function O$(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...c}=t;r&&(i=r);const u=[],f=o&&e.animationState&&e.animationState.getState()[o];for(const h in c){const p=e.getValue(h,e.latestValues[h]??null),g=c[h];if(g===void 0||f&&Oie(f,h))continue;const v={delay:n,...R_(i||{},h)},y=p.get();if(y!==void 0&&!p.isAnimating&&!Array.isArray(g)&&g===y&&!v.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const T=R$(e);if(T){const b=window.MotionHandoffAnimation(T,h,Un);b!==null&&(v.startTime=b,x=!0)}}nx(e,h),p.start(O_(h,p,g,e.shouldReduceMotion&&C$.has(h)?{type:!1}:v,e,x));const w=p.animation;w&&u.push(w)}return a&&Promise.all(u).then(()=>{Un.update(()=>{a&&Cie(e,a)})}),u}function rx(e,t,n={}){const r=qu(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(O$(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:h,staggerDirection:p}=o;return Aie(e,t,u,f,h,p,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,f]=c==="beforeChildren"?[i,a]:[a,i];return u().then(()=>f())}else return Promise.all([i(),a(n.delay)])}function Aie(e,t,n=0,r=0,o=0,i=1,a){const c=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),c.push(rx(u,t,{...a,delay:n+(typeof r=="function"?0:r)+E$(e.variantChildren,u,r,o,i)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(c)}function kie(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>rx(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=rx(e,t,n);else{const o=typeof t=="function"?qu(e,t,n.custom):t;r=Promise.all(O$(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Mie={test:e=>e==="auto",parse:e=>e},A$=e=>t=>t.test(e),k$=[Mf,Qe,ei,ka,ose,rse,Mie],XM=e=>k$.find(A$(e));function jie(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||KD(e):!0}const Pie=new Set(["brightness","contrast","saturate","opacity"]);function Nie(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(b_)||[];if(!r)return e;const o=n.replace(r,"");let i=Pie.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Die=/\b([a-z-]*)\(.*?\)/gu,ox={...tl,getAnimatableNone:e=>{const t=e.match(Die);return t?t.map(Nie).join(" "):e}},QM={...Mf,transform:Math.round},$ie={rotate:ka,rotateX:ka,rotateY:ka,rotateZ:ka,scale:jg,scaleX:jg,scaleY:jg,scaleZ:jg,skew:ka,skewX:ka,skewY:ka,distance:Qe,translateX:Qe,translateY:Qe,translateZ:Qe,x:Qe,y:Qe,z:Qe,perspective:Qe,transformPerspective:Qe,opacity:Oh,originX:zM,originY:zM,originZ:Qe},M_={borderWidth:Qe,borderTopWidth:Qe,borderRightWidth:Qe,borderBottomWidth:Qe,borderLeftWidth:Qe,borderRadius:Qe,radius:Qe,borderTopLeftRadius:Qe,borderTopRightRadius:Qe,borderBottomRightRadius:Qe,borderBottomLeftRadius:Qe,width:Qe,maxWidth:Qe,height:Qe,maxHeight:Qe,top:Qe,right:Qe,bottom:Qe,left:Qe,inset:Qe,insetBlock:Qe,insetBlockStart:Qe,insetBlockEnd:Qe,insetInline:Qe,insetInlineStart:Qe,insetInlineEnd:Qe,padding:Qe,paddingTop:Qe,paddingRight:Qe,paddingBottom:Qe,paddingLeft:Qe,paddingBlock:Qe,paddingBlockStart:Qe,paddingBlockEnd:Qe,paddingInline:Qe,paddingInlineStart:Qe,paddingInlineEnd:Qe,margin:Qe,marginTop:Qe,marginRight:Qe,marginBottom:Qe,marginLeft:Qe,marginBlock:Qe,marginBlockStart:Qe,marginBlockEnd:Qe,marginInline:Qe,marginInlineStart:Qe,marginInlineEnd:Qe,backgroundPositionX:Qe,backgroundPositionY:Qe,...$ie,zIndex:QM,fillOpacity:Oh,strokeOpacity:Oh,numOctaves:QM},Iie={...M_,color:vr,backgroundColor:vr,outlineColor:vr,fill:vr,stroke:vr,borderColor:vr,borderTopColor:vr,borderRightColor:vr,borderBottomColor:vr,borderLeftColor:vr,filter:ox,WebkitFilter:ox},M$=e=>Iie[e];function j$(e,t){let n=M$(e);return n!==ox&&(n=tl),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const zie=new Set(["auto","none","0"]);function Lie(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!zie.has(i)&&Ah(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=j$(n,o)}class Fie extends T_{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let h=0;h<t.length;h++){let p=t[h];if(typeof p=="string"&&(p=p.trim(),v_(p))){const g=_$(p,n.current);g!==void 0&&(t[h]=g),h===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!C$.has(r)||t.length!==2)return;const[o,i]=t,a=XM(o),c=XM(i),u=IM(o),f=IM(i);if(u!==f&&Da[r]){this.needsMeasurement=!0;return}if(a!==c)if(KM(a)&&KM(c))for(let h=0;h<t.length;h++){const p=t[h];typeof p=="string"&&(t[h]=parseFloat(p))}else Da[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||jie(t[o]))&&r.push(o);r.length&&Lie(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Da[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=Da[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Uie(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const P$=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Vie(e){return HD(e)&&"offsetHeight"in e}const{schedule:j_}=o$(queueMicrotask,!1),Os={x:!1,y:!1};function N$(){return Os.x||Os.y}function qie(e){return e==="x"||e==="y"?Os[e]?null:(Os[e]=!0,()=>{Os[e]=!1}):Os.x||Os.y?null:(Os.x=Os.y=!0,()=>{Os.x=Os.y=!1})}function D$(e,t){const n=Uie(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function JM(e){return!(e.pointerType==="touch"||N$())}function Bie(e,t,n={}){const[r,o,i]=D$(e,n),a=c=>{if(!JM(c))return;const{target:u}=c,f=t(u,c);if(typeof f!="function"||!u)return;const h=p=>{JM(p)&&(f(p),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,o)};return r.forEach(c=>{c.addEventListener("pointerenter",a,o)}),i}const $$=(e,t)=>t?e===t?!0:$$(e,t.parentElement):!1,P_=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Hie=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function I$(e){return Hie.has(e.tagName)||e.isContentEditable===!0}const oy=new WeakSet;function e5(e){return t=>{t.key==="Enter"&&e(t)}}function K1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Kie=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=e5(()=>{if(oy.has(n))return;K1(n,"down");const o=e5(()=>{K1(n,"up")}),i=()=>K1(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function t5(e){return P_(e)&&!N$()}function Gie(e,t,n={}){const[r,o,i]=D$(e,n),a=c=>{const u=c.currentTarget;if(!t5(c))return;oy.add(u);const f=t(u,c),h=(v,y)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),oy.has(u)&&oy.delete(u),t5(v)&&typeof f=="function"&&f(v,{success:y})},p=v=>{h(v,u===window||u===document||n.useGlobalTarget||$$(u,v.target))},g=v=>{h(v,!1)};window.addEventListener("pointerup",p,o),window.addEventListener("pointercancel",g,o)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,o),Vie(c)&&(c.addEventListener("focus",f=>Kie(f,o)),!I$(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),i}function z$(e){return HD(e)&&"ownerSVGElement"in e}function Zie(e){return z$(e)&&e.tagName==="svg"}const Yie=[...k$,vr,tl],Wie=e=>Yie.find(A$(e)),n5=()=>({translate:0,scale:1,origin:0,originPoint:0}),Du=()=>({x:n5(),y:n5()}),r5=()=>({min:0,max:0}),Or=()=>({x:r5(),y:r5()}),sx={current:null},L$={current:!1},Xie=typeof window<"u";function Qie(){if(L$.current=!0,!!Xie)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>sx.current=e.matches;e.addEventListener("change",t),t()}else sx.current=!1}const Jie=new WeakMap;function j0(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function kh(e){return typeof e=="string"||Array.isArray(e)}const N_=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],D_=["initial",...N_];function P0(e){return j0(e.animate)||D_.some(t=>kh(e[t]))}function F$(e){return!!(P0(e)||e.variants)}function eae(e,t,n){for(const r in t){const o=t[r],i=n[r];if(ro(o))e.addValue(r,o);else if(ro(i))e.addValue(r,lf(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,lf(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const o5=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Uy={};function U$(e){Uy=e}function tae(){return Uy}class nae{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=T_,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=po.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Un.render(this.render,!1,!0))};const{latestValues:u,renderState:f}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=f,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=c,this.blockInitialAnimation=!!i,this.isControllingVariants=P0(n),this.isVariantNode=F$(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in p){const v=p[g];u[g]!==void 0&&ro(v)&&v.set(u[g])}}mount(t){this.current=t,Jie.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((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(L$.current||Qie(),this.shouldReduceMotion=sx.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),el(this.notifyUpdate),el(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 n=this.features[t];n&&(n.unmount(),n.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,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Pf.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Un.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.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 Uy){const n=Uy[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Or()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<o5.length;r++){const o=o5[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=eae(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=lf(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(BD(r)||KD(r))?r=parseFloat(r):!Wie(r)&&tl.test(n)&&(r=j$(t,n)),this.setBaseTarget(t,ro(r)?r.get():r)),ro(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=A_(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ro(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new m_),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){j_.render(this.render)}}class V$ extends nae{constructor(){super(...arguments),this.KeyframeResolver=Fie}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ro(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ml{constructor(t){this.isMounted=!1,this.node=t}update(){}}function q$({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function rae({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function oae(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function G1(e){return e===void 0||e===1}function ix({scale:e,scaleX:t,scaleY:n}){return!G1(e)||!G1(t)||!G1(n)}function Yl(e){return ix(e)||B$(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function B$(e){return s5(e.x)||s5(e.y)}function s5(e){return e&&e!=="0%"}function Vy(e,t,n){const r=e-n,o=t*r;return n+o}function i5(e,t,n,r,o){return o!==void 0&&(e=Vy(e,o,r)),Vy(e,n,r)+t}function ax(e,t=0,n=1,r,o){e.min=i5(e.min,t,n,r,o),e.max=i5(e.max,t,n,r,o)}function H$(e,{x:t,y:n}){ax(e.x,t.translate,t.scale,t.originPoint),ax(e.y,n.translate,n.scale,n.originPoint)}const a5=.999999999999,l5=1.0000000000001;function sae(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let c=0;c<o;c++){i=n[c],a=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Iu(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,H$(e,a)),r&&Yl(i.latestValues)&&Iu(e,i.latestValues))}t.x<l5&&t.x>a5&&(t.x=1),t.y<l5&&t.y>a5&&(t.y=1)}function $u(e,t){e.min=e.min+t,e.max=e.max+t}function c5(e,t,n,r,o=.5){const i=Wn(e.min,e.max,o);ax(e,t,n,i,r)}function Iu(e,t){c5(e.x,t.x,t.scaleX,t.scale,t.originX),c5(e.y,t.y,t.scaleY,t.scale,t.originY)}function K$(e,t){return q$(oae(e.getBoundingClientRect(),t))}function iae(e,t,n){const r=K$(e,n),{scroll:o}=t;return o&&($u(r.x,o.offset.x),$u(r.y,o.offset.y)),r}const aae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lae=jf.length;function cae(e,t,n){let r="",o=!0;for(let i=0;i<lae;i++){const a=jf[i],c=e[a];if(c===void 0)continue;let u=!0;if(typeof c=="number"?u=c===(a.startsWith("scale")?1:0):u=parseFloat(c)===0,!u||n){const f=P$(c,M_[a]);if(!u){o=!1;const h=aae[a]||a;r+=`${h}(${f}) `}n&&(t[a]=f)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function $_(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,c=!1;for(const u in t){const f=t[u];if(Pf.has(u)){a=!0;continue}else if(i$(u)){o[u]=f;continue}else{const h=P$(f,M_[u]);u.startsWith("origin")?(c=!0,i[u]=h):r[u]=h}}if(t.transform||(a||n?r.transform=cae(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:f="50%",originZ:h=0}=i;r.transformOrigin=`${u} ${f} ${h}`}}function G$(e,{style:t,vars:n},r,o){const i=e.style;let a;for(a in t)i[a]=t[a];o?.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function u5(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qd={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Qe.test(e))e=parseFloat(e);else return e;const n=u5(e,t.target.x),r=u5(e,t.target.y);return`${n}% ${r}%`}},uae={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=tl.parse(e);if(o.length>5)return r;const i=tl.createTransformer(e),a=typeof o[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;o[0+a]/=c,o[1+a]/=u;const f=Wn(c,u,.5);return typeof o[2+a]=="number"&&(o[2+a]/=f),typeof o[3+a]=="number"&&(o[3+a]/=f),i(o)}},lx={borderRadius:{...qd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qd,borderTopRightRadius:qd,borderBottomLeftRadius:qd,borderBottomRightRadius:qd,boxShadow:uae};function Z$(e,{layout:t,layoutId:n}){return Pf.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!lx[e]||e==="opacity")}function I_(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const a in r)(ro(r[a])||o&&ro(o[a])||Z$(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function fae(e){return window.getComputedStyle(e)}class dae extends V${constructor(){super(...arguments),this.type="html",this.renderInstance=G$}readValueFromInstance(t,n){if(Pf.has(n))return this.projection?.isProjecting?Yw(n):Use(t,n);{const r=fae(t),o=(i$(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return K$(t,n)}build(t,n,r){$_(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return I_(t,n,r)}}const hae={offset:"stroke-dashoffset",array:"stroke-dasharray"},pae={offset:"strokeDashoffset",array:"strokeDasharray"};function mae(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?hae:pae;e[i.offset]=Qe.transform(-r);const a=Qe.transform(t),c=Qe.transform(n);e[i.array]=`${a} ${c}`}const gae=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Y$(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...c},u,f,h){if($_(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g}=e;p.transform&&(g.transform=p.transform,delete p.transform),(g.transform||p.transformOrigin)&&(g.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),g.transform&&(g.transformBox=h?.transformBox??"fill-box",delete p.transformBox);for(const v of gae)p[v]!==void 0&&(g[v]=p[v],delete p[v]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&mae(p,o,i,a,!1)}const W$=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"]),X$=e=>typeof e=="string"&&e.toLowerCase()==="svg";function yae(e,t,n,r){G$(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(W$.has(o)?o:k_(o),t.attrs[o])}function Q$(e,t,n){const r=I_(e,t,n);for(const o in e)if(ro(e[o])||ro(t[o])){const i=jf.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class vae extends V${constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Or}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Pf.has(n)){const r=M$(n);return r&&r.default||0}return n=W$.has(n)?n:k_(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Q$(t,n,r)}build(t,n,r){Y$(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){yae(t,n,r,o)}mount(t){this.isSVGTag=X$(t.tagName),super.mount(t)}}const bae=D_.length;function J$(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?J$(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<bae;n++){const r=D_[n],o=e.props[r];(kh(o)||o===!1)&&(t[r]=o)}return t}function eI(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Sae=[...N_].reverse(),wae=N_.length;function xae(e){return t=>Promise.all(t.map(({animation:n,options:r})=>kie(e,n,r)))}function Eae(e){let t=xae(e),n=f5(),r=!0;const o=u=>(f,h)=>{const p=qu(e,h,u==="exit"?e.presenceContext?.custom:void 0);if(p){const{transition:g,transitionEnd:v,...y}=p;f={...f,...y,...v}}return f};function i(u){t=u(e)}function a(u){const{props:f}=e,h=J$(e.parent)||{},p=[],g=new Set;let v={},y=1/0;for(let w=0;w<wae;w++){const T=Sae[w],b=n[T],_=f[T]!==void 0?f[T]:h[T],S=kh(_),C=T===u?b.isActive:null;C===!1&&(y=w);let E=_===h[T]&&_!==f[T]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...v},!b.isActive&&C===null||!_&&!b.prevProp||j0(_)||typeof _=="boolean")continue;const O=_ae(b.prevProp,_);let j=O||T===u&&b.isActive&&!E&&S||w>y&&S,P=!1;const $=Array.isArray(_)?_:[_];let I=$.reduce(o(T),{});C===!1&&(I={});const{prevResolvedValues:L={}}=b,F={...L,...I},J=H=>{j=!0,g.has(H)&&(P=!0,g.delete(H)),b.needsAnimating[H]=!0;const V=e.getValue(H);V&&(V.liveStyle=!1)};for(const H in F){const V=I[H],oe=L[H];if(v.hasOwnProperty(H))continue;let ne=!1;tx(V)&&tx(oe)?ne=!eI(V,oe):ne=V!==oe,ne?V!=null?J(H):g.add(H):V!==void 0&&g.has(H)?J(H):b.protectedKeys[H]=!0}b.prevProp=_,b.prevResolvedValues=I,b.isActive&&(v={...v,...I}),r&&e.blockInitialAnimation&&(j=!1);const ee=E&&O;j&&(!ee||P)&&p.push(...$.map(H=>{const V={type:T};if(typeof H=="string"&&r&&!ee&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,ne=qu(oe,H);if(oe.enteringChildren&&ne){const{delayChildren:D}=ne.transition||{};V.delay=E$(oe.enteringChildren,e,D)}}return{animation:H,options:V}}))}if(g.size){const w={};if(typeof f.initial!="boolean"){const T=qu(e,Array.isArray(f.initial)?f.initial[0]:f.initial);T&&T.transition&&(w.transition=T.transition)}g.forEach(T=>{const b=e.getBaseTarget(T),_=e.getValue(T);_&&(_.liveStyle=!0),w[T]=b??null}),p.push({animation:w})}let x=!!p.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(p):Promise.resolve()}function c(u,f){if(n[u].isActive===f)return Promise.resolve();e.variantChildren?.forEach(p=>p.animationState?.setActive(u,f)),n[u].isActive=f;const h=a(u);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:a,setActive:c,setAnimateFunction:i,getState:()=>n,reset:()=>{n=f5()}}}function _ae(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!eI(t,e):!1}function Hl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function f5(){return{animate:Hl(!0),whileInView:Hl(),whileHover:Hl(),whileTap:Hl(),whileDrag:Hl(),whileFocus:Hl(),exit:Hl()}}function d5(e,t){e.min=t.min,e.max=t.max}function Ts(e,t){d5(e.x,t.x),d5(e.y,t.y)}function h5(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const tI=1e-4,Cae=1-tI,Tae=1+tI,nI=.01,Rae=0-nI,Oae=0+nI;function mo(e){return e.max-e.min}function Aae(e,t,n){return Math.abs(e-t)<=n}function p5(e,t,n,r=.5){e.origin=r,e.originPoint=Wn(t.min,t.max,e.origin),e.scale=mo(n)/mo(t),e.translate=Wn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Cae&&e.scale<=Tae||isNaN(e.scale))&&(e.scale=1),(e.translate>=Rae&&e.translate<=Oae||isNaN(e.translate))&&(e.translate=0)}function uh(e,t,n,r){p5(e.x,t.x,n.x,r?r.originX:void 0),p5(e.y,t.y,n.y,r?r.originY:void 0)}function m5(e,t,n){e.min=n.min+t.min,e.max=e.min+mo(t)}function kae(e,t,n){m5(e.x,t.x,n.x),m5(e.y,t.y,n.y)}function g5(e,t,n){e.min=t.min-n.min,e.max=e.min+mo(t)}function qy(e,t,n){g5(e.x,t.x,n.x),g5(e.y,t.y,n.y)}function y5(e,t,n,r,o){return e-=t,e=Vy(e,1/n,r),o!==void 0&&(e=Vy(e,1/o,r)),e}function Mae(e,t=0,n=1,r=.5,o,i=e,a=e){if(ei.test(t)&&(t=parseFloat(t),t=Wn(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=Wn(i.min,i.max,r);e===i&&(c-=t),e.min=y5(e.min,t,n,c,o),e.max=y5(e.max,t,n,c,o)}function v5(e,t,[n,r,o],i,a){Mae(e,t[n],t[r],t[o],t.scale,i,a)}const jae=["x","scaleX","originX"],Pae=["y","scaleY","originY"];function b5(e,t,n,r){v5(e.x,t,jae,n?n.x:void 0,r?r.x:void 0),v5(e.y,t,Pae,n?n.y:void 0,r?r.y:void 0)}function S5(e){return e.translate===0&&e.scale===1}function rI(e){return S5(e.x)&&S5(e.y)}function w5(e,t){return e.min===t.min&&e.max===t.max}function Nae(e,t){return w5(e.x,t.x)&&w5(e.y,t.y)}function x5(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function oI(e,t){return x5(e.x,t.x)&&x5(e.y,t.y)}function E5(e){return mo(e.x)/mo(e.y)}function _5(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function os(e){return[e("x"),e("y")]}function Dae(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:h,rotateX:p,rotateY:g,skewX:v,skewY:y}=n;f&&(r=`perspective(${f}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotateX(${p}deg) `),g&&(r+=`rotateY(${g}deg) `),v&&(r+=`skewX(${v}deg) `),y&&(r+=`skewY(${y}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(r+=`scale(${c}, ${u})`),r||"none"}const sI=["TopLeft","TopRight","BottomLeft","BottomRight"],$ae=sI.length,C5=e=>typeof e=="string"?parseFloat(e):e,T5=e=>typeof e=="number"||Qe.test(e);function Iae(e,t,n,r,o,i){o?(e.opacity=Wn(0,n.opacity??1,zae(r)),e.opacityExit=Wn(t.opacity??1,0,Lae(r))):i&&(e.opacity=Wn(t.opacity??1,n.opacity??1,r));for(let a=0;a<$ae;a++){const c=`border${sI[a]}Radius`;let u=R5(t,c),f=R5(n,c);if(u===void 0&&f===void 0)continue;u||(u=0),f||(f=0),u===0||f===0||T5(u)===T5(f)?(e[c]=Math.max(Wn(C5(u),C5(f),r),0),(ei.test(f)||ei.test(u))&&(e[c]+="%")):e[c]=f}(t.rotate||n.rotate)&&(e.rotate=Wn(t.rotate||0,n.rotate||0,r))}function R5(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const zae=iI(0,.5,e$),Lae=iI(.5,.95,fs);function iI(e,t,n){return r=>r<e?0:r>t?1:n(Rh(e,t,r))}function Fae(e,t,n){const r=ro(e)?e:lf(e);return r.start(O_("",r,t,n)),r.animation}function Mh(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Uae=(e,t)=>e.depth-t.depth;class Vae{constructor(){this.children=[],this.isDirty=!1}add(t){f_(this.children,t),this.isDirty=!0}remove(t){d_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Uae),this.isDirty=!1,this.children.forEach(t)}}function qae(e,t){const n=po.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(el(r),e(i-t))};return Un.setup(r,!0),()=>el(r)}function sy(e){return ro(e)?e.get():e}class Bae{constructor(){this.members=[]}add(t){f_(this.members,t),t.scheduleRender()}remove(t){if(d_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const iy={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Z1=["","X","Y","Z"],Hae=1e3;let Kae=0;function Y1(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function aI(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=R$(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Un,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&aI(r)}function lI({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},c=t?.()){this.id=Kae++,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(Yae),this.nodes.forEach(Jae),this.nodes.forEach(ele),this.nodes.forEach(Wae)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vae)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new m_),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const u=this.eventHandlers.get(a);u&&u.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=z$(a)&&!Zie(a),this.instance=a;const{layoutId:c,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||c)&&(this.isLayoutDirty=!0),e){let h,p=0;const g=()=>this.root.updateBlockedByResize=!1;Un.read(()=>{p=window.innerWidth}),e(a,()=>{const v=window.innerWidth;v!==p&&(p=v,this.root.updateBlockedByResize=!0,h&&h(),h=qae(g,250),iy.hasAnimatedSinceResize&&(iy.hasAnimatedSinceResize=!1,this.nodes.forEach(k5)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||f.getDefaultTransition()||sle,{onLayoutAnimationStart:x,onLayoutAnimationComplete:w}=f.getProps(),T=!this.targetLayout||!oI(this.targetLayout,v),b=!p&&g;if(this.options.layoutRoot||this.resumeFrom||b||p&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const _={...R_(y,"layout"),onPlay:x,onComplete:w};(f.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(h,b)}else p||k5(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),el(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(tle),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&aI(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const p=this.path[h];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(O5);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(A5);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Qae),this.nodes.forEach(Gae),this.nodes.forEach(Zae)):this.nodes.forEach(A5),this.clearAllSnapshots();const c=po.now();Hr.delta=ri(0,1e3/60,c-Hr.timestamp),Hr.timestamp=c,Hr.isProcessing=!0,F1.update.process(Hr),F1.preRender.process(Hr),F1.render.process(Hr),Hr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,j_.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xae),this.sharedNodes.forEach(nle)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Un.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Un.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!mo(this.snapshot.measuredBox.x)&&!mo(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Or(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!rI(this.projectionDelta),u=this.getTransformTemplate(),f=u?u(this.latestValues,""):void 0,h=f!==this.prevTransformTemplateValue;a&&this.instance&&(c||Yl(this.latestValues)||h)&&(o(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return a&&(u=this.removeTransform(u)),ile(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Or();const c=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ale))){const{scroll:f}=this.root;f&&($u(c.x,f.offset.x),$u(c.y,f.offset.y))}return c}removeElementScroll(a){const c=Or();if(Ts(c,a),this.scroll?.wasRoot)return c;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:h,options:p}=f;f!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&Ts(c,a),$u(c.x,h.offset.x),$u(c.y,h.offset.y))}return c}applyTransform(a,c=!1){const u=Or();Ts(u,a);for(let f=0;f<this.path.length;f++){const h=this.path[f];!c&&h.options.layoutScroll&&h.scroll&&h!==h.root&&Iu(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Yl(h.latestValues)&&Iu(u,h.latestValues)}return Yl(this.latestValues)&&Iu(u,this.latestValues),u}removeTransform(a){const c=Or();Ts(c,a);for(let u=0;u<this.path.length;u++){const f=this.path[u];if(!f.instance||!Yl(f.latestValues))continue;ix(f.latestValues)&&f.updateSnapshot();const h=Or(),p=f.measurePageBox();Ts(h,p),b5(c,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,h)}return Yl(this.latestValues)&&b5(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Hr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:p}=this.options;if(!this.layout||!(h||p))return;this.resolvedRelativeTargetAt=Hr.timestamp;const g=this.getClosestProjectingParent();g&&this.linkedParentVersion!==g.layoutVersion&&!g.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(g&&g.layout?this.createRelativeTarget(g,this.layout.layoutBox,g.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Or(),this.targetWithTransforms=Or()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kae(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ts(this.target,this.layout.layoutBox),H$(this.target,this.targetDelta)):Ts(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?this.createRelativeTarget(g,this.target,g.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ix(this.parent.latestValues)||B$(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,c,u){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Or(),this.relativeTargetOrigin=Or(),qy(this.relativeTargetOrigin,c,u),Ts(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),c=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Hr.timestamp&&(u=!1),u)return;const{layout:f,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||h))return;Ts(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;sae(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Or());const{target:v}=a;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(h5(this.prevProjectionDelta.x,this.projectionDelta.x),h5(this.prevProjectionDelta.y,this.projectionDelta.y)),uh(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!_5(this.projectionDelta.x,this.prevProjectionDelta.x)||!_5(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Du(),this.projectionDelta=Du(),this.projectionDeltaWithTransform=Du()}setAnimationOrigin(a,c=!1){const u=this.snapshot,f=u?u.latestValues:{},h={...this.latestValues},p=Du();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const g=Or(),v=u?u.source:void 0,y=this.layout?this.layout.source:void 0,x=v!==y,w=this.getStack(),T=!w||w.members.length<=1,b=!!(x&&!T&&this.options.crossfade===!0&&!this.path.some(ole));this.animationProgress=0;let _;this.mixTargetDelta=S=>{const C=S/1e3;M5(p.x,a.x,C),M5(p.y,a.y,C),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qy(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),rle(this.relativeTarget,this.relativeTargetOrigin,g,C),_&&Nae(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=Or()),Ts(_,this.relativeTarget)),x&&(this.animationValues=h,Iae(h,f,this.latestValues,C,b,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(el(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Un.update(()=>{iy.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=lf(0)),this.currentAnimation=Fae(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Hae),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:u,layout:f,latestValues:h}=a;if(!(!c||!u||!f)){if(this!==a&&this.layout&&f&&cI(this.options.animationType,this.layout.layoutBox,f.layoutBox)){u=this.target||Or();const p=mo(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+p;const g=mo(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+g}Ts(c,u),Iu(c,h),uh(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Bae),this.sharedNodes.get(a).add(c);const f=c.options.initialPromotionConfig;c.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:u}={}){const f=this.getStack();f&&f.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const f={};u.z&&Y1("z",a,f,this.animationValues);for(let h=0;h<Z1.length;h++)Y1(`rotate${Z1[h]}`,a,f,this.animationValues),Y1(`skew${Z1[h]}`,a,f,this.animationValues);a.render();for(const h in f)a.setStaticValue(h,f[h]),this.animationValues&&(this.animationValues[h]=f[h]);a.scheduleRender()}applyProjectionStyles(a,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=sy(c?.pointerEvents)||"",a.transform=u?u(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=sy(c?.pointerEvents)||""),this.hasProjected&&!Yl(this.latestValues)&&(a.transform=u?u({},""):"none",this.hasProjected=!1);return}a.visibility="";const h=f.animationValues||f.latestValues;this.applyTransformsToTarget();let p=Dae(this.projectionDeltaWithTransform,this.treeScale,h);u&&(p=u(h,p)),a.transform=p;const{x:g,y:v}=this.projectionDelta;a.transformOrigin=`${g.origin*100}% ${v.origin*100}% 0`,f.animationValues?a.opacity=f===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:a.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const y in lx){if(h[y]===void 0)continue;const{correct:x,applyTo:w,isCSSVariable:T}=lx[y],b=p==="none"?h[y]:x(h[y],f);if(w){const _=w.length;for(let S=0;S<_;S++)a[w[S]]=b}else T?this.options.visualElement.renderState.vars[y]=b:a[y]=b}this.options.layoutId&&(a.pointerEvents=f===this?sy(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(O5),this.root.sharedNodes.clear()}}}function Gae(e){e.updateLayout()}function Zae(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?os(h=>{const p=i?t.measuredBox[h]:t.layoutBox[h],g=mo(p);p.min=n[h].min,p.max=p.min+g}):cI(o,t.layoutBox,n)&&os(h=>{const p=i?t.measuredBox[h]:t.layoutBox[h],g=mo(n[h]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+g)});const a=Du();uh(a,n,t.layoutBox);const c=Du();i?uh(c,e.applyTransform(r,!0),t.measuredBox):uh(c,n,t.layoutBox);const u=!rI(a);let f=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:g}=h;if(p&&g){const v=Or();qy(v,t.layoutBox,p.layoutBox);const y=Or();qy(y,n,g.layoutBox),oI(v,y)||(f=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=v,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Yae(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 Wae(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Xae(e){e.clearSnapshot()}function O5(e){e.clearMeasurements()}function A5(e){e.isLayoutDirty=!1}function Qae(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function k5(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Jae(e){e.resolveTargetDelta()}function ele(e){e.calcProjection()}function tle(e){e.resetSkewAndRotation()}function nle(e){e.removeLeadSnapshot()}function M5(e,t,n){e.translate=Wn(t.translate,0,n),e.scale=Wn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function j5(e,t,n,r){e.min=Wn(t.min,n.min,r),e.max=Wn(t.max,n.max,r)}function rle(e,t,n,r){j5(e.x,t.x,n.x,r),j5(e.y,t.y,n.y,r)}function ole(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const sle={duration:.45,ease:[.4,0,.1,1]},P5=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),N5=P5("applewebkit/")&&!P5("chrome/")?Math.round:fs;function D5(e){e.min=N5(e.min),e.max=N5(e.max)}function ile(e){D5(e.x),D5(e.y)}function cI(e,t,n){return e==="position"||e==="preserve-aspect"&&!Aae(E5(t),E5(n),.2)}function ale(e){return e!==e.root&&e.scroll?.wasRoot}const lle=lI({attachResizeListener:(e,t)=>Mh(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),W1={current:void 0},uI=lI({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!W1.current){const e=new lle({});e.mount(window),e.setOptions({layoutScroll:!0}),W1.current=e}return W1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fI=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function cle(e=!0){const t=A.useContext(u_);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=A.useId();A.useEffect(()=>{if(e)return o(i)},[e]);const a=A.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const dI=A.createContext({strict:!1}),$5={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 I5=!1;function ule(){if(I5)return;const e={};for(const t in $5)e[t]={isEnabled:n=>$5[t].some(r=>!!n[r])};U$(e),I5=!0}function hI(){return ule(),tae()}function fle(e){const t=hI();for(const n in e)t[n]={...t[n],...e[n]};U$(t)}const dle=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function By(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||dle.has(e)}let pI=e=>!By(e);function hle(e){typeof e=="function"&&(pI=t=>t.startsWith("on")?!By(t):e(t))}try{hle(require("@emotion/is-prop-valid").default)}catch{}function ple(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(pI(o)||n===!0&&By(o)||!t&&!By(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const N0=A.createContext({});function mle(e,t){if(P0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||kh(n)?n:void 0,animate:kh(r)?r:void 0}}return e.inherit!==!1?t:{}}function gle(e){const{initial:t,animate:n}=mle(e,A.useContext(N0));return A.useMemo(()=>({initial:t,animate:n}),[z5(t),z5(n)])}function z5(e){return Array.isArray(e)?e.join(" "):e}const z_=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mI(e,t,n){for(const r in t)!ro(t[r])&&!Z$(r,n)&&(e[r]=t[r])}function yle({transformTemplate:e},t){return A.useMemo(()=>{const n=z_();return $_(n,t,e),Object.assign({},n.vars,n.style)},[t])}function vle(e,t){const n=e.style||{},r={};return mI(r,n,e),Object.assign(r,yle(e,t)),r}function ble(e,t){const n={},r=vle(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const gI=()=>({...z_(),attrs:{}});function Sle(e,t,n,r){const o=A.useMemo(()=>{const i=gI();return Y$(i,t,X$(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};mI(i,e.style,e),o.style={...i,...o.style}}return o}const wle=["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 L_(e){return typeof e!="string"||e.includes("-")?!1:!!(wle.indexOf(e)>-1||/[A-Z]/u.test(e))}function xle(e,t,n,{latestValues:r},o,i=!1,a){const u=(a??L_(e)?Sle:ble)(t,r,o,e),f=ple(t,typeof e=="string",i),h=e!==A.Fragment?{...f,...u,ref:n}:{},{children:p}=t,g=A.useMemo(()=>ro(p)?p.get():p,[p]);return A.createElement(e,{...h,children:g})}function Ele({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:_le(n,r,o,e),renderState:t()}}function _le(e,t,n,r){const o={},i=r(e,{});for(const g in i)o[g]=sy(i[g]);let{initial:a,animate:c}=e;const u=P0(e),f=F$(e);t&&f&&!u&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?c:a;if(p&&typeof p!="boolean"&&!j0(p)){const g=Array.isArray(p)?p:[p];for(let v=0;v<g.length;v++){const y=A_(e,g[v]);if(y){const{transitionEnd:x,transition:w,...T}=y;for(const b in T){let _=T[b];if(Array.isArray(_)){const S=h?_.length-1:0;_=_[S]}_!==null&&(o[b]=_)}for(const b in x)o[b]=x[b]}}}return o}const yI=e=>(t,n)=>{const r=A.useContext(N0),o=A.useContext(u_),i=()=>Ele(e,t,r,o);return n?i():Ioe(i)},Cle=yI({scrapeMotionValuesFromProps:I_,createRenderState:z_}),Tle=yI({scrapeMotionValuesFromProps:Q$,createRenderState:gI}),Rle=Symbol.for("motionComponentSymbol");function Ole(e,t,n){const r=A.useRef(n);A.useInsertionEffect(()=>{r.current=n});const o=A.useRef(null);return A.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const c=a(i);typeof c=="function"&&(o.current=c)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const vI=A.createContext({});function Jd(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ale(e,t,n,r,o,i){const{visualElement:a}=A.useContext(N0),c=A.useContext(dI),u=A.useContext(u_),f=A.useContext(fI).reducedMotion,h=A.useRef(null);r=r||c.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:f,isSVG:i}));const p=h.current,g=A.useContext(vI);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&kle(h.current,n,o,g);const v=A.useRef(!1);A.useInsertionEffect(()=>{p&&v.current&&p.update(n,u)});const y=n[T$],x=A.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return zoe(()=>{p&&(v.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),x.current&&p.animationState&&p.animationState.animateChanges())}),A.useEffect(()=>{p&&(!x.current&&p.animationState&&p.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),x.current=!1),p.enteringChildren=void 0)}),p}function kle(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:c,layoutScroll:u,layoutRoot:f,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bI(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||c&&Jd(c),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:f})}function bI(e){if(e)return e.options.allowProjection!==!1?e.projection:bI(e.parent)}function X1(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&fle(r);const i=n?n==="svg":L_(e),a=i?Tle:Cle;function c(f,h){let p;const g={...A.useContext(fI),...f,layoutId:Mle(f)},{isStatic:v}=g,y=gle(f),x=a(f,v);if(!v&&qD){jle();const w=Ple(g);p=w.MeasureLayout,y.visualElement=Ale(e,x,g,o,w.ProjectionNode,i)}return M.jsxs(N0.Provider,{value:y,children:[p&&y.visualElement?M.jsx(p,{visualElement:y.visualElement,...g}):null,xle(e,f,Ole(x,y.visualElement,h),x,v,t,i)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=A.forwardRef(c);return u[Rle]=e,u}function Mle({layoutId:e}){const t=A.useContext(VD).id;return t&&e!==void 0?t+"-"+e:e}function jle(e,t){A.useContext(dI).strict}function Ple(e){const t=hI(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Nle(e,t){if(typeof Proxy>"u")return X1;const n=new Map,r=(i,a)=>X1(i,a,e,t),o=(i,a)=>r(i,a);return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,X1(a,void 0,e,t)),n.get(a))})}const Dle=(e,t)=>t.isSVG??L_(e)?new vae(t):new dae(t,{allowProjection:e!==A.Fragment});class $le extends ml{constructor(t){super(t),t.animationState||(t.animationState=Eae(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();j0(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Ile=0;class zle extends ml{constructor(){super(...arguments),this.id=Ile++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Lle={animation:{Feature:$le},exit:{Feature:zle}};function hp(e){return{point:{x:e.pageX,y:e.pageY}}}const Fle=e=>t=>P_(t)&&e(t,hp(t));function fh(e,t,n,r){return Mh(e,t,Fle(n),r)}const SI=({current:e})=>e?e.ownerDocument.defaultView:null,L5=(e,t)=>Math.abs(e-t);function Ule(e,t){const n=L5(e.x,t.x),r=L5(e.y,t.y);return Math.sqrt(n**2+r**2)}const F5=new Set(["auto","scroll"]);class wI{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=v=>{this.handleScroll(v.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=J1(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,x=Ule(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!x)return;const{point:w}=v,{timestamp:T}=Hr;this.history.push({...w,timestamp:T});const{onStart:b,onMove:_}=this.handlers;y||(b&&b(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,v)},this.handlePointerMove=(v,y)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=Q1(y,this.transformPagePoint),Un.update(this.updatePoint,!0)},this.handlePointerUp=(v,y)=>{this.end();const{onEnd:x,onSessionEnd:w,resumeAnimation:T}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&T&&T(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=J1(v.type==="pointercancel"?this.lastMoveEventInfo:Q1(y,this.transformPagePoint),this.history);this.startEvent&&x&&x(v,b),w&&w(v,b)},!P_(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const u=hp(t),f=Q1(u,this.transformPagePoint),{point:h}=f,{timestamp:p}=Hr;this.history=[{...h,timestamp:p}];const{onSessionStart:g}=n;g&&g(t,J1(f,this.history)),this.removeListeners=up(fh(this.contextWindow,"pointermove",this.handlePointerMove),fh(this.contextWindow,"pointerup",this.handlePointerUp),fh(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(F5.has(r.overflowX)||F5.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),Un.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),el(this.updatePoint)}}function Q1(e,t){return t?{point:t(e.point)}:e}function U5(e,t){return{x:e.x-t.x,y:e.y-t.y}}function J1({point:e},t){return{point:e,delta:U5(e,xI(t)),offset:U5(e,Vle(t)),velocity:qle(t,.1)}}function Vle(e){return e[0]}function xI(e){return e[e.length-1]}function qle(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=xI(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Li(t)));)n--;if(!r)return{x:0,y:0};const i=ls(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Ble(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Wn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Wn(n,e,r.max):Math.min(e,n)),e}function V5(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Hle(e,{top:t,left:n,bottom:r,right:o}){return{x:V5(e.x,n,o),y:V5(e.y,t,r)}}function q5(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Kle(e,t){return{x:q5(e.x,t.x),y:q5(e.y,t.y)}}function Gle(e,t){let n=.5;const r=mo(e),o=mo(t);return o>r?n=Rh(t.min,t.max-r,e.min):r>o&&(n=Rh(e.min,e.max-o,t.min)),ri(0,1,n)}function Zle(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const cx=.35;function Yle(e=cx){return e===!1?e=0:e===!0&&(e=cx),{x:B5(e,"left","right"),y:B5(e,"top","bottom")}}function B5(e,t,n){return{min:H5(e,t),max:H5(e,n)}}function H5(e,t){return typeof e=="number"?e:e[t]||0}const Wle=new WeakMap;class Xle{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=Or(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=p=>{n?(this.stopAnimation(),this.snapToCursor(hp(p).point)):this.pauseAnimation()},a=(p,g)=>{this.stopAnimation();const{drag:v,dragPropagation:y,onDragStart:x}=this.getProps();if(v&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=qie(v),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=g,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),os(T=>{let b=this.getAxisMotionValue(T).get()||0;if(ei.test(b)){const{projection:_}=this.visualElement;if(_&&_.layout){const S=_.layout.layoutBox[T];S&&(b=mo(S)*(parseFloat(b)/100))}}this.originPoint[T]=b}),x&&Un.postRender(()=>x(p,g)),nx(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},c=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g;const{dragPropagation:v,dragDirectionLock:y,onDirectionLock:x,onDrag:w}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:T}=g;if(y&&this.currentDirection===null){this.currentDirection=Qle(T),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",g.point,T),this.updateAxis("y",g.point,T),this.visualElement.render(),w&&w(p,g)},u=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g,this.stop(p,g),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>os(p=>this.getAnimationState(p)==="paused"&&this.getAxisMotionValue(p).animation?.play()),{dragSnapToOrigin:h}=this.getProps();this.panSession=new wI(t,{onSessionStart:i,onStart:a,onMove:c,onSessionEnd:u,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:SI(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:c}=this.getProps();c&&Un.postRender(()=>c(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Pg(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Ble(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Jd(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Hle(r.layoutBox,t):this.constraints=!1,this.elastic=Yle(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&os(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Zle(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Jd(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=iae(r,o.root,this.visualElement.getTransformPagePoint());let a=Kle(o.layout.layoutBox,i);if(n){const c=n(rae(a));this.hasMutatedConstraints=!!c,c&&(a=q$(c))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},f=os(h=>{if(!Pg(h,n,this.currentDirection))return;let p=u&&u[h]||{};a&&(p={min:0,max:0});const g=o?200:1e6,v=o?40:1e7,y={type:"inertia",velocity:r?t[h]:0,bounceStiffness:g,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...i,...p};return this.startAxisValueAnimation(h,y)});return Promise.all(f).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return nx(this.visualElement,t),r.start(O_(t,r,0,n,this.visualElement,!1))}stopAnimation(){os(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){os(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){os(n=>{const{drag:r}=this.getProps();if(!Pg(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:c}=o.layout.layoutBox[n],u=i.get()||0;i.set(t[n]-Wn(a,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Jd(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};os(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const u=c.get();o[a]=Gle({min:u,max:u},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),os(a=>{if(!Pg(a,t,null))return;const c=this.getAxisMotionValue(a),{min:u,max:f}=this.constraints[a];c.set(Wn(u,f,o[a]))})}addListeners(){if(!this.visualElement.current)return;Wle.set(this.visualElement,this);const t=this.visualElement.current,n=fh(t,"pointerdown",u=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&!I$(u.target)&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();Jd(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Un.read(r);const a=Mh(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&(os(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=u[h].translate,p.set(p.get()+u[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=cx,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:c}}}function Pg(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Qle(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Jle extends ml{constructor(t){super(t),this.removeGroupControls=fs,this.removeListeners=fs,this.controls=new Xle(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fs}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const K5=e=>(t,n)=>{e&&Un.postRender(()=>e(t,n))};class ece extends ml{constructor(){super(...arguments),this.removePointerDownListener=fs}onPointerDown(t){this.session=new wI(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:SI(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:K5(t),onStart:K5(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Un.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=fh(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 eS=!1;class tce extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),eS&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),iy.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,eS=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Un.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),j_.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;eS=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function EI(e){const[t,n]=cle(),r=A.useContext(VD);return M.jsx(tce,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(vI),isPresent:t,safeToRemove:n})}const nce={pan:{Feature:ece},drag:{Feature:Jle,ProjectionNode:uI,MeasureLayout:EI}};function G5(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&Un.postRender(()=>i(t,hp(t)))}class rce extends ml{mount(){const{current:t}=this.node;t&&(this.unmount=Bie(t,(n,r)=>(G5(this.node,r,"Start"),o=>G5(this.node,o,"End"))))}unmount(){}}class oce extends ml{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=up(Mh(this.node.current,"focus",()=>this.onFocus()),Mh(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Z5(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&Un.postRender(()=>i(t,hp(t)))}class sce extends ml{mount(){const{current:t}=this.node;t&&(this.unmount=Gie(t,(n,r)=>(Z5(this.node,r,"Start"),(o,{success:i})=>Z5(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ux=new WeakMap,tS=new WeakMap,ice=e=>{const t=ux.get(e.target);t&&t(e)},ace=e=>{e.forEach(ice)};function lce({root:e,...t}){const n=e||document;tS.has(n)||tS.set(n,{});const r=tS.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(ace,{root:e,...t})),r[o]}function cce(e,t,n){const r=lce(t);return ux.set(e,n),r.observe(e),()=>{ux.delete(e),r.unobserve(e)}}const uce={some:0,all:1};class fce extends ml{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:uce[o]},c=u=>{const{isIntersecting:f}=u;if(this.isInView===f||(this.isInView=f,i&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),g=f?h:p;g&&g(u)};return cce(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(dce(t,n))&&this.startObserver()}unmount(){}}function dce({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const hce={inView:{Feature:fce},tap:{Feature:sce},focus:{Feature:oce},hover:{Feature:rce}},pce={layout:{ProjectionNode:uI,MeasureLayout:EI}},mce={...Lle,...hce,...nce,...pce},Y5=Nle(mce,Dle),_I=zo.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 M.jsx("div",{className:St("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:M.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:[M.jsx("title",{children:"Background Beams"}),M.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((n,r)=>M.jsx(Y5.path,{d:n,stroke:`url(#linearGradient-${r})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${r}`)),M.jsxs("defs",{children:[t.map((n,r)=>M.jsxs(Y5.linearGradient,{id:`linearGradient-${r}`,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:[M.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),M.jsx("stop",{stopColor:"#111111"}),M.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),M.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${r}`)),M.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:[M.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),M.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),M.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});_I.displayName="BackgroundBeams";const gce=()=>M.jsxs(M.Fragment,{children:[M.jsx(_I,{className:"absolute inset-0"}),M.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:M.jsxs("div",{className:"text-center",children:[M.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge"}),M.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function Kt(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 yce(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Kt(e.additionalItems)}function W5(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 Fi="__additional_property",Hy="additionalProperties",nl="allOf",en="anyOf",ps="const",D0="default",F_="dependencies",vce="enum",Zr="__errors",Tn="$id",U_="if",cf="items",bce="_$junk_option_schema_id$_",ay="$name",Dt="oneOf",fx="patternProperties",un="properties",nS="readonly",CI="required",Ky="submitButtonOptions",Nn="$ref",eh="$schema",TI="root",RI="_",Sce=["discriminator","propertyName"],X5="formContext",wce="layoutGridLookupMap",V_="__rjsf_additionalProperties",OI="__rjsf_rootSchema",xce="ui:field",q_="ui:widget",Ua="ui:options",dx="ui:globalOptions",Ece="https://json-schema.org/draft/2019-09/schema",ly="https://json-schema.org/draft/2020-12/schema";function ft(e={},t={}){return e?Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const o=e[r];return r===q_&&Kt(o)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===Ua&&Kt(o)?{...n,...o}:{...n,[r.substring(3)]:o}},{...t}):{...t}}function AI(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:r=!0}=ft(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function hx(e){const t={[Zr]:[],addError(n){this[Zr].push(n)}};if(Array.isArray(e))return e.reduce((n,r,o)=>({...n,[o]:hx(r)}),t);if(Ya(e)){const n=e;return Object.keys(n).reduce((r,o)=>({...r,[o]:hx(n[o])}),t)}return t}function Pn(e,t){return EG(e,t,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}const _ce=Object.prototype;function th(e){for(const t in e)if(_ce.hasOwnProperty.call(e,t))return!1;return!0}const Cce=["array","boolean","integer","null","number","object","string"];new Set(Cce);const Tce=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Tce);const Rce=["items","allOf","oneOf","anyOf"];new Set(Rce);const Oce=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Oce);function cy(e){return typeof e=="object"}function Ks(e){return cy(e)?th(e):e===!0}function zu(e,t){return e<t?-1:e>t?1:0}function rS(e,t){const n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){const i=e;e=t,t=i,r=n}const o=new Set(e);for(let i=0;i<r;i++)o.add(t[i]);return Array.from(o)}function Ace(e,t){const n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){const o=e;e=t,t=o}const r=new Set(t);for(let o=0;o<e.length&&r.size>0;o++){const i=e[o];r.delete(i)&&n.push(i)}return n}function Q5(e){return e.length===0}function oS(e){return(t,n)=>{const r=t.length-n.length;if(r!==0)return r;for(let o=0;o<t.length;o++)if(t[o]!==n[o]){const i=e(t[o],n[o]);if(i!==0)return i}return 0}}function kI(e,{threshold:t=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=t){const a=[];let c=0;e:for(let u=0;u<r;u++){const f=n[u];for(let h=0;h<c;h++)if(e(f,a[h])===0)continue e;c=a.push(f)}return a}const o=n.slice().sort(e);let i=0;for(let a=1;a<r;a++)e(o[i],o[a])!==0&&++i!==a&&(o[i]=o[a]);return o.length=i+1,o}}function kce(e){return(t,n)=>{const r=[];let o=t.length,i=n.length;if(o===0||i===0)return r;if(o>i){const h=t;t=n,n=h;const p=o;o=i,i=p}const a=[...t].sort(e),c=[...n].sort(e);let u=0,f=0;for(;u<o&&f<i;){const h=e(a[u],c[f]);h===0?((r.length===0||e(r[r.length-1],a[u])!==0)&&r.push(a[u]),u++,f++):h<0?u++:f++}return r}}function Mce(e,t){return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}const J5=Mce,MI=()=>0,jce=e=>e===void 0,Pce=e=>typeof e!="object",ej={boolean:0,number:1,string:2};function Nce(e,t){const n=typeof e,r=typeof t;return n===r?zu(e,t):ej[n]-ej[r]}function Dce(e,t){const n=e.length;if(n===0)return t;const r=t.length;if(r===0)return e;if(r>n){const a=e;e=t,t=a}const o=new Set(e),i=t.length;for(let a=0;a<i;a++){const c=t[a];o.has(c)||e.push(c)}return e}function $0(e,t,n=MI){return(r,o)=>e(r)?e(o)?n(r,o):-1:e(o)?1:t(r,o)}function _u(e){return $0(jce,e)}function Ma(e,t){return $0(n=>n===void 0||e(n),t)}function sS(e,t){return $0(Array.isArray,e,t)}const yr=_u(zu),iS=Ma(e=>e===0,(e,t)=>e-t);function $ce({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=J5(t,x=>Object.keys(x).sort());function r(x){return(w,T)=>{const b=n(w),_=n(T),S=Math.min(b.length,_.length);for(let C=0;C<S;C++){const E=zu(b[C],_[C]);if(E!==0)return E}if(b.length!==_.length)return b.length-_.length;for(let C=0;C<S;C++){const E=b[C],O=x(w[E],T[E]);if(O!==0)return O}return 0}}function o(x){const w=oS(x),T=J5(e,kI(x,{threshold:0}));return(b,_)=>w(T(b),T(_))}const i=o(zu);function a(x,w){if(cy(x)){if(cy(w)){const T=Object.keys(x),b=Object.keys(w),_=Dce(T,b),S=_.length;for(let C=0;C<S;C++){const E=_[C];if(x[E]===w[E])continue;const j=(y[E]??c)(x[E],w[E]);if(j!==0)return j}return 0}return w===!0&&th(x)?0:1}return cy(w)?x===!0&&th(w)?0:-1:zu(x,w)}const c=_u(f),u=$0(Pce,sS(r(c),oS(f)),Nce);function f(x,w){return x===null?-1:w===null?1:u(x,w)}const h=_u(a),p=Ma(th,r(h)),g=_u(o(a)),v=Ma(Ks,a),y={$id:yr,$comment:yr,$defs:p,$ref:yr,$schema:yr,const:c,contains:h,contentEncoding:yr,contentMediaType:yr,default:c,definitions:p,description:yr,else:h,examples:c,exclusiveMaximum:yr,exclusiveMinimum:yr,format:yr,if:h,maximum:yr,maxItems:yr,maxLength:yr,maxProperties:yr,minimum:yr,multipleOf:yr,not:h,pattern:yr,propertyNames:h,readOnly:yr,then:h,title:yr,writeOnly:yr,uniqueItems:Ma(x=>x===!1,MI),minLength:iS,minItems:iS,minProperties:iS,required:Ma(Q5,i),enum:Ma(Q5,o(f)),type:_u((x,w)=>{const T=Array.isArray(x),b=Array.isArray(w);return!T&&!b?zu(x,w):i(T?x:[x],b?w:[w])}),items:Ma(x=>!Array.isArray(x)&&Ks(x),sS(a,oS(a))),anyOf:g,allOf:g,oneOf:g,properties:p,patternProperties:p,additionalProperties:v,additionalItems:v,dependencies:Ma(th,r(_u(sS(a,i))))};return{compareSchemaValues:f,compareSchemaDefinitions:a}}function tj(e){return e}const jI=(e,t)=>e?jI(t%e,e):t,Ice=(e,t)=>Math.abs(e*t)/jI(e,t);function zce(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*aS(e,t,n){const r=e.length,o=t.length;if(r>0&&o>0)for(let i=0;i<r;i++){const a=e[i];for(let c=0;c<o;c++)yield n(a,t[c])}}function lS(e,t){return e||t}function nj(e){return(t,n)=>{const r={...t},o=Object.keys(n),i=o.length;for(let a=0;a<i;a++){const c=o[a];r[c]=t[c]===void 0?n[c]:e(t[c],n[c])}return r}}function Lce(e){const t=new Map;for(const n of e)for(const r of n[0])t.set(r,n[1]);return t}function Kl(e,t,n){n===void 0||Ks(n)?delete e[t]:e[t]=n}const Fce=["properties","patternProperties","additionalProperties"];function rj(e){const t=Object.keys(e),n=t.length,r=[];for(let o=0;o<n;o++){const i=t[o];r.push({regExp:new RegExp(i),schema:e[i]})}return[r,t]}const oj=[[],[]];function sj(e,t,n){const r=n.length;for(let o=0;o<r;o++){const i=n[o];if(!i.regExp.test(t))continue;const a=i.schema;if(a===!1)return!0;e.push(a)}return!1}const Uce=["items","additionalItems"],Vce=["if","then","else"];function ij(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 cS(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 Gl(e,t,n){return[e,t,n]}function qce(e){const t=new Map;for(const[n,r,o]of e){const i=a=>{if(!o(a))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(a[n])}, ${r}: ${JSON.stringify(a[r])})`)};for(const a of[[n,r],[r,n]]){let c=t.get(a[0]);c===void 0&&(c=[],t.set(a[0],c)),c.push({oppositeKey:a[1],check:i})}}return t}const Bce=[Gl("minimum","maximum",e=>e.maximum>=e.minimum),Gl("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),Gl("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),Gl("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),Gl("minLength","maxLength",e=>e.maxLength>=e.minLength),Gl("minItems","maxItems",e=>e.maxItems>=e.minItems),Gl("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function Hce({mergePatterns:e=zce,isSubRegExp:t=Object.is,intersectJson:n=Ace,deduplicateJsonSchemaDef:r=tj,defaultMerger:o=tj,assigners:i=[],checks:a=Bce,mergers:c}={}){function u(S){const C=S.length;let E=S[0];for(let O=1;O<C;O++){const j=T(E,S[O]);if(j===!1)return!1;Ks(j)||(E=j)}return E}function f(S,C,E,O,j,P,$){if(S.length=0,E===!1)return!1;if(S.push(E),j!==void 0){if(j===!1)return!1;S.push(j)}if(sj(S,C,P))return!1;const L=S.length<2;if($===!1){if(L)return;if(sj(S,C,O))return!1}else L&&$!==void 0&&S.push($);return S.length===1?S[0]:u(S)}function h(S,C,E,O,j,P){const $=E.length;if($>0&&j!==!1)if(P)Object.assign(S,C);else for(let I=0;I<$;I++){const L=E[I];O.has(L)||(S[L]=T(C[L],j))}return S}const p=(S,{properties:C={},patternProperties:E,additionalProperties:O=!0},{properties:j={},patternProperties:P,additionalProperties:$=!0})=>{const I=Ks(O),L=Ks($);if(I&&L)return Kl(S,"properties",b(C,j)),Kl(S,"patternProperties",E&&P?b(E,P):E??P),delete S.additionalProperties,S;const F=T(O,$);Kl(S,"additionalProperties",F);const J={},ee=Object.keys(C),Z=ee.length,[H,V]=E?rj(E):oj,[oe,ne]=P?rj(P):oj,D=[],q=new Set,U=L?void 0:$;for(let we=0;we<Z;we++){const Ee=ee[we];q.add(Ee);const se=f(D,Ee,C[Ee],H,j[Ee],oe,U);se!==void 0&&(J[Ee]=se)}const N=Object.keys(j),G=N.length,te=I?void 0:O;for(let we=0;we<G;we++){const Ee=N[we];if(q.has(Ee))continue;const se=f(D,Ee,j[Ee],oe,void 0,H,te);se!==void 0&&(J[Ee]=se)}Kl(S,"properties",J);let re={};const de=new Set;if(V.length>0&&ne.length>0){const we=aS(V,ne,(Ee,se)=>{t(Ee,se)&&de.add(Ee),t(se,Ee)&&de.add(se),re[e(Ee,se)]=T(E[Ee],P[se])});for(;!we.next().done;);}return re=h(re,E,V,de,$,L),re=h(re,P,ne,de,O,I),Kl(S,"patternProperties",re),S},g=(S,{items:C=[],additionalItems:E},{items:O=[],additionalItems:j})=>{const P=Array.isArray(C),$=Array.isArray(O),I=[];if(S.items=I,P&&$){const[L,F,J]=C.length<O.length?[C.length,E,O]:[O.length,j,C];let ee=0;for(;ee<L;ee++)I.push(T(C[ee],O[ee]));if(F===!1)S.additionalItems=!1;else{const Z=F===void 0||Ks(F);for(;ee<J.length;ee++)I.push(Z?J[ee]:T(J[ee],F));Kl(S,"additionalItems",E!==void 0&&j!==void 0?T(E,j):E??j)}}else if(P||$){const[L,F,J]=P?[C,O,E]:[O,C,j];Kl(S,"additionalItems",J&&T(J,F));for(let ee=0;ee<L.length;ee++)I.push(T(L[ee],F))}else delete S.additionalItems,S.items=T(C,O);return S},v=(S,C,E)=>{ij(S,C);const O=ij({},E);return S.allOf===void 0?S.allOf=[O]:S.allOf=S.allOf.concat(O),S};function y(S,C){return r(Array.from(aS(S,C,T)))}const x=Lce([[Fce,p],[Uce,g],[Vce,v],...i]),w=qce(a);function T(S,C){if(S===!1||C===!1)return!1;if(Ks(S))return Ks(C)?!0:C;if(Ks(C))return S;let E={...S};const O=new Set,j=new Set,P=Object.keys(C),$=P.length;for(let I=0;I<$;I++){const L=P[I],F=C[L];if(F===void 0)continue;const J=w.get(L);if(J!==void 0){const V=J.length;for(let oe=0;oe<V;oe++){const ne=J[oe];S[ne.oppositeKey]!==void 0&&j.add(ne.check)}}const ee=S[L];if(ee===void 0){E[L]=F;continue}const Z=x.get(L);if(Z){O.add(Z);continue}const H=_[L]??o;E[L]=H(ee,F)}for(const I of O)E=I(E,S,C);for(const I of j)I(E);return E}const b=nj(T),_={$id:o,$ref:o,$schema:o,$comment:o,$defs:b,definitions:b,type:(S,C)=>{if(S===C)return S;const E=Array.isArray(S),O=Array.isArray(C);if(!E&&!O){const j=cS(S,C);if(j!==void 0)return j}else if(E||O){const j=new Set;if(E&&O)for(const $ of aS(S,C,cS))$!==void 0&&j.add($);else{const $=E?S:C,I=E?C:S,L=$.length;for(let F=0;F<L;F++){const J=cS(I,$[F]);J!==void 0&&j.add(J)}}const P=j.size;if(P===1)return j.values().next().value;if(P>1)return Array.from(j)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${S.toString()}, ${C.toString()}`)},default:o,description:o,title:o,const:o,format:o,contentEncoding:o,contentMediaType:o,not:(S,C)=>{const E=r([S,C]);return E.length===1?E[0]:{anyOf:E}},pattern:e,readOnly:lS,writeOnly:lS,enum:(S,C)=>{const E=n(S,C);if(E.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(S)}", "${JSON.stringify(C)}"`);return E},anyOf:y,oneOf:y,allOf:(S,C)=>r(S.concat(C)),propertyNames:T,contains:T,dependencies:nj((S,C)=>Array.isArray(S)?Array.isArray(C)?rS(S,C):T(C,{required:S}):Array.isArray(C)?T(S,{required:C}):T(S,C)),examples:(S,C)=>{if(!Array.isArray(S)||!Array.isArray(C))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(S)}" and "${JSON.stringify(C)}"`);return rS(S,C)},multipleOf:(S,C)=>{let E=1;for(;!Number.isInteger(S)||!Number.isInteger(C);)E*=10,S*=10,C*=10;return Ice(S,C)/E},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:lS,required:rS,...c};return{mergeSchemaDefinitions:T,mergeArrayOfSchemaDefinitions:u}}function Kce(e){const t=[],n=[e];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){t.push(r);continue}const{allOf:o,...i}=r;t.push(i);for(let a=o.length-1;a>=0;a--)n.push(o[a])}return t}function Gce(e){return t=>e(Kce(t))}var Bd={},aj;function Zce(){if(aj)return Bd;aj=1;var e=/~/,t=/~[01]/g;function n(f){switch(f){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+f)}function r(f){return e.test(f)?f.replace(t,n):f}function o(f,h,p){for(var g,v,y=1,x=h.length;y<x;){if(h[y]==="constructor"||h[y]==="prototype"||h[y]==="__proto__")return f;if(g=r(h[y++]),v=x>y,typeof f[g]>"u"&&(Array.isArray(f)&&g==="-"&&(g=f.length),v&&(h[y]!==""&&h[y]<1/0||h[y]==="-"?f[g]=[]:f[g]={})),!v)break;f=f[g]}var w=f[g];return p===void 0?delete f[g]:f[g]=p,w}function i(f){if(typeof f=="string"){if(f=f.split("/"),f[0]==="")return f;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(f)){for(const h of f)if(typeof h!="string"&&typeof h!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return f}throw new Error("Invalid JSON pointer.")}function a(f,h){if(typeof f!="object")throw new Error("Invalid input object.");h=i(h);var p=h.length;if(p===1)return f;for(var g=1;g<p;){if(f=f[r(h[g++])],p===g)return f;if(typeof f!="object"||f===null)return}}function c(f,h,p){if(typeof f!="object")throw new Error("Invalid input object.");if(h=i(h),h.length===0)throw new Error("Invalid JSON pointer for set.");return o(f,h,p)}function u(f){var h=i(f);return{get:function(p){return a(p,h)},set:function(p,g){return c(p,h,g)}}}return Bd.get=a,Bd.set=c,Bd.compile=u,Bd}var Yce=Zce();const uS=ii(Yce);var Wce=lD();const B_=ii(Wce);function Gy(e,t){if(Tn in e&&B_.equal(e[Tn],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const r of n)if(nn(r)){const o=Gy(r,t);if(o!==void 0)return o}}else if(nn(n)){const r=Gy(n,t);if(r!==void 0)return r}}function px(e,t){const n=Ie(e,Tn,t);Nn in e&&(e={...e,[Nn]:B_.resolve(n,e[Nn])});for(const[r,o]of Object.entries(e))Array.isArray(o)?e={...e,[r]:o.map(i=>nn(i)?px(i,n):i)}:nn(o)&&(e={...e,[r]:px(o,n)});return e}function H_(e,t){const n=t[e];return[Eh(t,[e]),n]}function PI(e,t={},n=[],r=Ie(t,[Tn])){const o=e||"";let i;if(o.startsWith("#")){const c=decodeURIComponent(o.substring(1));r===void 0||Tn in t&&t[Tn]===r?i=uS.get(t,c):t[eh]===ly&&(i=Gy(t,r.replace(/\/$/,"")),i!==void 0&&(i=uS.get(i,c)))}else if(t[eh]===ly){const c=r?B_.resolve(r,o):o,[u,...f]=c.replace(/#\/?$/,"").split("#");i=Gy(t,u.replace(/\/$/,"")),i!==void 0&&(r=i[Tn],ur(f)||(i=uS.get(i,decodeURIComponent(f.join("#")))))}if(i===void 0)throw new Error(`Could not find a definition for ${e}.`);const a=i[Nn];if(a){if(n.includes(a)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[h,...p]=n,g=[...p,o,h].join(" -> ");throw new Error(`Definition for ${h} contains a circular reference through ${g}`)}const[c,u]=H_(Nn,i),f=PI(u,t,[...n,o],r);return Object.keys(c).length>0?t[eh]===Ece||t[eh]===ly?{[nl]:[c,f]}:{...c,...f}:f}return i}function NI(e,t={},n=Ie(t,[Tn])){return PI(e,t,[],n)}function oi(e){let t;const n=Ie(e,Sce);return Wa(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function jh(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 js(e){let{type:t}=e;return!t&&e.const?jh(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(n=>n!=="null"):t=t[0]),t)}function Bi(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((r,o)=>{const i=e?e[o]:{},a=t[o];return e&&o in e&&Kt(a)?r[o]=Bi(i,a):e&&t&&(js(e)==="object"||js(t)==="object")&&o===CI&&Array.isArray(i)&&Array.isArray(a)?r[o]=qG(i,a):r[o]=a,r},n)}function DI(e,t,n){var r;if(e&&n){const o=Ie(e,n);if(o===void 0)return;for(let i=0;i<t.length;i++){const a=t[i],c=Ie(a,[un,n],{});if(!(c.type==="object"||c.type==="array")&&(c.const===o||!((r=c.enum)===null||r===void 0)&&r.includes(o)))return i}}}function K_(e,t,n,r,o){if(t===void 0)return 0;const i=DI(t,n,o);if(PN(i))return i;for(let a=0;a<n.length;a++){const c=n[a];if(o&&Wt(c,[un,o])){const u=Ie(t,o),f=Ie(c,[un,o],{});if(e.isValid(f,u,r))return a}else if(c[un]){const u={anyOf:Object.keys(c[un]).map(h=>({required:[h]}))};let f;if(c.anyOf){const{...h}=c;h.allOf?h.allOf=h.allOf.slice():h.allOf=[],h.allOf.push(u),f=h}else f=Object.assign({},c,u);if(delete f.required,e.isValid(f,t,r))return a}else if(e.isValid(c,t,r))return a}return 0}function Xr(e,t,n={},r,o,i=!1){return Ws(e,t,n,r,void 0,void 0,o,i)[0]}function Xce(e,t,n,r,o,i,a){const{if:c,then:u,else:f,...h}=t,p=e.isValid(c,i||{},n);let g=[h],v=[];if(r)u&&typeof u!="boolean"&&(v=v.concat(Ws(e,u,n,i,r,o,a))),f&&typeof f!="boolean"&&(v=v.concat(Ws(e,f,n,i,r,o,a)));else{const y=p?u:f;y&&typeof y!="boolean"&&(v=v.concat(Ws(e,y,n,i,r,o,a)))}return v.length&&(g=v.map(y=>Bi(h,y))),g.flatMap(y=>Ws(e,y,n,i,r,o,a))}function $I(e){return e.reduce((n,r)=>r.length>1?r.flatMap(o=>IN(n.length,i=>[...n[i]].concat(o))):(n.forEach(o=>o.push(r[0])),n),[[]])}function II(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,r)=>(mn(n,[r],e.patternProperties[r]),n),{})}function Qce(e,t,n,r,o,i,a,c){const u=zI(e,t,n,r,o,i,a,c);if(u.length>1||u[0]!==t)return u;if(F_ in t)return LI(e,t,n,r,o,i,a).flatMap(h=>Ws(e,h,n,i,r,o,a));if(nl in t&&Array.isArray(t[nl])){const f=t.allOf.map(p=>Ws(e,p,n,i,r,o,a));return $I(f).map(p=>({...t,allOf:p}))}return[t]}function zI(e,t,n,r,o,i,a,c){const u=Bu(t,n,o,void 0,c);return u!==t?Ws(e,u,n,i,r,o,a,c):[t]}function Bu(e,t,n,r,o){if(!Kt(e))return e;let i=e;if(Nn in i){const{$ref:a,...c}=i;if(n.includes(a))return i;n.push(a),i={...NI(a,t,r),...c},Tn in i&&(r=i[Tn])}if(un in i){const a=[],c=LG(i[un],(u,f,h)=>{const p=[...n];u[h]=Bu(f,t,p,r,o),a.push(p)},{});CG(n,FN(iG(a))),i={...i,[un]:c}}if(cf in i&&!Array.isArray(i.items)&&typeof i.items!="boolean"&&(i={...i,items:Bu(i.items,t,n,r,o)}),o){let a,c;en in e&&Array.isArray(e[en])?(a=en,c=i[en]):Dt in e&&Array.isArray(e[Dt])&&(a=Dt,c=i[Dt]),a&&c&&(i={...i,[a]:c.map(u=>Bu(u,t,n,r,o))})}return Pn(e,i)?e:i}function Jce(e,t,n,r,o){const i={...t,properties:{...t.properties}},a=r&&Kt(r)?r:{};return Object.keys(a).forEach(c=>{if(!(c in i.properties)){if(fx in i){const u=II(i,c);if(!ur(u)){i.properties[c]=Xr(e,{[nl]:Object.values(u)},n,Ie(a,[c]),o),mn(i.properties,[c,Fi],!0);return}}if(Hy in i&&i.additionalProperties!==!1){let u;typeof i.additionalProperties!="boolean"?Nn in i.additionalProperties?u=Xr(e,{[Nn]:Ie(i.additionalProperties,[Nn])},n,a,o):"type"in i.additionalProperties?u={...i.additionalProperties}:en in i.additionalProperties||Dt in i.additionalProperties?u={type:"object",...i.additionalProperties}:u={type:jh(Ie(a,[c]))}:u={type:jh(Ie(a,[c]))},i.properties[c]=u,mn(i.properties,[c,Fi],!0)}else i.properties[c]={type:"null"},mn(i.properties,[c,Fi],!0)}}),i}const{compareSchemaDefinitions:eue,compareSchemaValues:tue}=$ce(),{mergeArrayOfSchemaDefinitions:nue}=Hce({intersectJson:kce(tue),deduplicateJsonSchemaDef:kI(eue)}),rue=Gce(nue);function oue(e){return rue(e)}function Ws(e,t,n,r,o=!1,i=[],a,c){return Kt(t)?Qce(e,t,n,o,i,r,a,c).flatMap(f=>{var h;let p=f;if(U_ in p)return Xce(e,p,n,o,i,r,a);if(nl in p){if(o){const{allOf:v,...y}=p;return[...v,y]}try{const v=[],y=[];(h=p.allOf)===null||h===void 0||h.forEach(x=>{typeof x=="object"&&x.contains?v.push(x):y.push(x)}),v.length&&(p={...p,allOf:y}),p=a?a(p):oue(p),v.length&&(p.allOf=v)}catch(v){console.warn(`could not merge subschemas in allOf:
|
|
60
|
+
`,v);const{allOf:y,...x}=p;return x}}return un in p&&fx in p&&(p=Object.keys(p.properties).reduce((v,y)=>{const x=II(v,y);return ur(x)||(v.properties[y]=Xr(e,{allOf:[v.properties[y],...Object.values(x)]},n,Ie(r,[y]),a)),v},{...p,properties:{...p.properties}})),fx in p||Hy in p&&p.additionalProperties!==!1?Jce(e,p,n,r,a):p}):[{}]}function sue(e,t,n,r,o){let i;const{oneOf:a,anyOf:c,...u}=t;if(Array.isArray(a)?i=a:Array.isArray(c)&&(i=c),i){const f=o===void 0&&r?{}:o,h=oi(t);i=i.map(g=>Bu(g,n,[]));const p=K_(e,f,i,n,h);if(r)return i.map(g=>Bi(u,g));t=Bi(u,i[p])}return[t]}function LI(e,t,n,r,o,i,a){const{dependencies:c,...u}=t;return sue(e,u,n,r,i).flatMap(h=>FI(e,c,h,n,r,o,i,a))}function FI(e,t,n,r,o,i,a,c){let u=[n];for(const f in t){if(!o&&Ie(a,[f])===void 0||n.properties&&!(f in n.properties))continue;const[h,p]=H_(f,t);return Array.isArray(p)?u[0]=iue(n,p):Kt(p)&&(u=aue(e,n,r,f,p,o,i,a,c)),u.flatMap(g=>FI(e,h,g,r,o,i,a,c))}return u}function iue(e,t){if(!t)return e;const n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function aue(e,t,n,r,o,i,a,c,u){return Ws(e,o,n,c,i,a,u).flatMap(h=>{const{oneOf:p,...g}=h;if(t=Bi(t,g),p===void 0)return t;const v=p.map(x=>typeof x=="boolean"||!(Nn in x)?[x]:zI(e,x,n,i,a,c));return $I(v).flatMap(x=>lue(e,t,n,r,x,i,a,c,u))})}function lue(e,t,n,r,o,i,a,c,u){const f=o.filter(h=>{if(typeof h=="boolean"||!h||!h.properties)return!1;const{[r]:p}=h.properties;if(p){const g={type:"object",properties:{[r]:p}};return e.isValid(g,c,n)||i}return!1});return!i&&f.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):f.flatMap(h=>{const p=h,[g]=H_(r,p.properties),v={...p,properties:g};return Ws(e,v,n,c,i,a,u).map(x=>Bi(t,x))})}function nh(e,t,n,r,o,i={},a){if(Array.isArray(n[o])){const u=oi(n)||r,f=n[o].map(p=>Xr(e,p,t,i,a)),h=Ie(i,u);if(h!==void 0)return f.find(p=>La(Ie(p,[un,u,D0],Ie(p,[un,u,ps])),h))}}function UI(e,t,n,r,o){let i=n;if(Wt(n,Nn)&&(i=Xr(e,n,t,void 0,o)),ur(r))return i;const a=Array.isArray(r)?r:r.split("."),[c,...u]=a;if(c&&Wt(i,c))return i=Ie(i,c),UI(e,t,i,u,o)}function uy(e,t,n,r,o,i){const a=UI(e,t,n,r,i);return a===void 0?o:a}const lj={title:"!@#$_UNKNOWN_$#@!"};function cue(e,t,n,r,o={},i){const a=Array.isArray(r)?[...r]:r.split(".");let c=n;const u=a.pop();a.length&&a.forEach(g=>{c=uy(e,t,c,[un,g],{},i),Wt(c,Dt)?c=nh(e,t,c,u,Dt,Ie(o,g),i):Wt(c,en)&&(c=nh(e,t,c,u,en,Ie(o,g),i))}),Wt(c,Dt)?c=nh(e,t,c,u,Dt,o,i):Wt(c,en)&&(c=nh(e,t,c,u,en,o,i));let f=uy(e,t,c,[un,u],lj,i);f===lj&&(f=void 0);const h=uy(e,t,c,CI,[],i);let p;return f&&Array.isArray(h)&&(p=h.includes(u)),{field:f,isRequired:p}}const uue={type:"object",$id:bce,properties:{__not_really_there__:{type:"number"}}};function mx(e,t,n,r,o){let i=0;return n&&(nn(n.properties)?i+=DG(n.properties,(a,c,u)=>{const f=Ie(r,u);if(typeof c=="boolean")return a;if(Wt(c,Nn)){const h=Xr(e,c,t,f,o);return a+mx(e,t,h,f||{},o)}if((Wt(c,Dt)||Wt(c,en))&&f){const h=Wt(c,Dt)?Dt:en,p=oi(c);return a+Ph(e,t,f,Ie(c,h),-1,p,o)}if(c.type==="object")return nn(f)&&(a+=1),a+mx(e,t,c,f,o);if(c.type===jh(f)){let h=a+1;return c.default?h+=f===c.default?1:-1:c.const&&(h+=f===c.const?1:-1),h}return a},0):Wa(n.type)&&n.type===jh(r)&&(i+=1)),i}function Ph(e,t,n,r,o=-1,i,a){const c=r.map(g=>Bu(g,t,[])),u=DI(n,r,i);if(PN(u))return u;const f=c.reduce((g,v,y)=>(K_(e,n,[uue,v],t,i)===1&&g.push(y),g),[]);if(f.length===1)return f[0];f.length||IN(c.length,g=>f.push(g));const h=new Set,{bestIndex:p}=f.reduce((g,v)=>{const{bestScore:y}=g,x=c[v],w=mx(e,t,x,n,a);return h.add(w),w>y?{bestIndex:v,bestScore:w}:g},{bestIndex:o,bestScore:0});return h.size===1&&o>=0?o:p}function G_(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>Kt(t))}function Nh(e,t,n=!1,r=!1,o=!1){if(Array.isArray(t)){const i=Array.isArray(e)?e:[],a=o?i:t,c=o?t:i,u=a.map((f,h)=>c[h]!==void 0?Nh(i[h],t[h],n,r,o):f);return(n||o)&&u.length<c.length&&u.push(...c.slice(u.length)),u}if(Kt(t)){const i=Object.assign({},e);return Object.keys(t).reduce((a,c)=>{var u;const f=Ie(t,c),h=Kt(e)&&c in e,p=c in t,g=(u=Ie(e,c))!==null&&u!==void 0?u:{},v=h&&Object.entries(g).some(([,w])=>Kt(w)),y=h&&Kt(Ie(e,c)),x=p&&Kt(f);return y&&x&&!v?(a[c]={...Ie(e,c),...f},a):(a[c]=Nh(Ie(e,c),f,n,r,o&&(h||!p)),a)},i)}return r&&(e!==void 0&&Cy(t)||typeof t=="number"&&isNaN(t))||o&&!Cy(t)?e:t}function Dh(e,t,n=!1){return Object.keys(t).reduce((r,o)=>{const i=e?e[o]:{},a=t[o];if(e&&o in e&&Kt(a))r[o]=Dh(i,a,n);else if(n&&Array.isArray(i)&&Array.isArray(a)){let c=a;n==="preventDuplicates"&&(c=a.reduce((u,f)=>(i.includes(f)||u.push(f),u),[])),r[o]=i.concat(c)}else r[o]=a;return r},Object.assign({},e))}function VI(e){return Array.isArray(e.enum)&&e.enum.length===1||ps in e}function Z_(e,t,n={},r){const o=Xr(e,t,n,void 0,r),i=o.oneOf||o.anyOf;return Array.isArray(o.enum)?!0:Array.isArray(i)?i.every(a=>typeof a!="boolean"&&VI(a)):!1}function Y_(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:Z_(e,t.items,n,r)}function qI(e){const t=e[ps],n=js(e);return Kt(t)&&Wa(t?.$data)&&n!=="object"&&n!=="array"}function fue(e){if(vce in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(ps in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function uf(e,t){if(e.enum){let i;if(t){const{enumNames:a}=ft(t);i=a}return e.enum.map((a,c)=>({label:i?.[c]||String(a),value:a}))}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let o=oi(e);if(t){const{optionsSchemaSelector:i=o}=ft(t);o=i}return n&&n.map((i,a)=>{const{title:c}=ft(r?.[a]),u=i;let f,h=c;if(o){const p=Ie(u,[un,o],{});f=Ie(p,D0,Ie(p,ps)),h=h||p?.title||u.title||String(f)}else f=fue(u),h=h||u.title||String(f);return{schema:u,label:h,value:f}})}const due=["string","number","integer","boolean","null"];var ff;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(ff||(ff={}));function fS(e,t=ff.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){const r=e.items[n];if(typeof r!="boolean")return r}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==ff.Ignore&&Kt(e.additionalItems)?e.additionalItems:{}}function BI(e,t){const{default:n,type:r}=e;return Array.isArray(r)&&r.includes("null")&&ur(t)&&n===null?null:t}function cj(e,t,n,r,o,i=[],a={},c=!1,u=!1){const{emptyObjectFields:f="populateAllDefaults"}=a;if(r===!0||c)e[t]=n;else if(r==="excludeObjectChildren")(u&&n!==void 0||!Kt(n)||!ur(n))&&(e[t]=n);else if(f!=="skipDefaults"){const h=o===void 0?i.includes(t):o;Kt(n)?f==="skipEmptyDefaults"?ur(n)||(e[t]=n):(!ur(n)||i.includes(t))&&(h||f!=="populateRequiredDefaults")&&(e[t]=n):n!==void 0&&(f==="populateAllDefaults"||f==="skipEmptyDefaults"||h&&i.includes(t))&&(e[t]=n)}}function Va(e,t,n={}){const{parentDefaults:r,rawFormData:o,rootSchema:i={},includeUndefinedValues:a=!1,_recurseList:c=[],experimental_defaultFormStateBehavior:u=void 0,experimental_customMergeAllOf:f=void 0,required:h,shouldMergeDefaultsIntoFormData:p=!1,initialDefaultsGenerated:g}=n;let v=Kt(o)?o:{};const y=Kt(t)?t:{};let x=r,w=null,T=u,b=c;if(y[ps]!==void 0&&u?.constAsDefaults!=="never"&&!qI(y))x=y[ps];else if(Kt(x)&&Kt(y.default)&&!y[en]&&!y[Dt]&&!y[Nn])x=Dh(x,y.default);else if(D0 in y&&!y[en]&&!y[Dt]&&!y[Nn])x=y.default;else if(Nn in y){const C=y[Nn];c.includes(C)||(b=c.concat(C),w=NI(C,i));const E=o===void 0||Kt(o)&&ur(o);w&&!x&&E&&(x=y.default),p&&w&&!Kt(o)&&(v=o)}else if(F_ in y){const C={...uj(e,y,n,x),...v};w=LI(e,y,i,!1,[],C,f)[0]}else if(G_(y))x=y.items.map((C,E)=>Va(e,C,{rootSchema:i,includeUndefinedValues:a,_recurseList:c,experimental_defaultFormStateBehavior:u,experimental_customMergeAllOf:f,parentDefaults:Array.isArray(r)?r[E]:void 0,rawFormData:v,required:h,shouldMergeDefaultsIntoFormData:p}));else if(Dt in y){const{oneOf:C,...E}=y;if(C.length===0)return;const O=oi(y),{type:j="null"}=E;!Array.isArray(j)&&due.includes(j)&&T?.constAsDefaults==="skipOneOf"&&(T={...T,constAsDefaults:"never"}),w=C[Ph(e,i,o??y.default,C,0,O,f)],w=Bi(E,w)}else if(en in y){const{anyOf:C,...E}=y;if(C.length===0)return;const O=oi(y);w=C[Ph(e,i,o??y.default,C,0,O,f)],w=Bi(E,w)}if(w)return Va(e,w,{rootSchema:i,includeUndefinedValues:a,_recurseList:b,experimental_defaultFormStateBehavior:T,experimental_customMergeAllOf:f,parentDefaults:x,rawFormData:o??v,required:h,shouldMergeDefaultsIntoFormData:p,initialDefaultsGenerated:g});x===void 0&&(x=y.default);const _=uj(e,y,n,x);let S=_??x;if(p){const{arrayMinItems:C={}}=u||{},{mergeExtraDefaults:E}=C,O=hue(e,y,i,o,u,f);(!Kt(o)||nl in y)&&(S=Nh(S,O,E,!0))}return S}function hue(e,t,n,r,o,i){const a=!VI(t)&&Z_(e,t,n,i);let c=r;if(a){const f=uf(t);c=f?.some(p=>Pn(p.value,r))?r:void 0}return t[ps]&&o?.constAsDefaults==="always"&&(c=t.const),c}function pue(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:o=!1,_recurseList:i=[],experimental_defaultFormStateBehavior:a=void 0,experimental_customMergeAllOf:c=void 0,required:u,shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h}={},p){{const g=Kt(n)?n:{},v=t,x=a?.allOf==="populateDefaults"&&nl in v||a?.emptyObjectFields!=="skipEmptyDefaults"&&U_ in v?Xr(e,v,r,g,c):v,w=x[ps],T=Object.keys(x.properties||{}).reduce((b,_)=>{var S;const C=Ie(x,[un,_],{}),E=Kt(w)&&w[_]!==void 0,O=(Kt(C)&&ps in C||E)&&a?.constAsDefaults!=="never"&&!qI(C),j=Va(e,C,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:c,includeUndefinedValues:o===!0,parentDefaults:Ie(p,[_]),rawFormData:Ie(g,[_]),required:(S=x.required)===null||S===void 0?void 0:S.includes(_),shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h});return cj(b,_,j,o,u,x.required,a,O,C?.type==="null"),b},{});if(x.additionalProperties&&!h){const b=Kt(x.additionalProperties)?x.additionalProperties:{},_=new Set;Kt(p)&&Object.keys(p).filter(C=>!x.properties||!x.properties[C]).forEach(C=>_.add(C));const S=[];Object.keys(g).filter(C=>!x.properties||!x.properties[C]).forEach(C=>{_.add(C),S.push(C)}),_.forEach(C=>{var E;const O=Va(e,b,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:c,includeUndefinedValues:o===!0,parentDefaults:Ie(p,[C]),rawFormData:Ie(g,[C]),required:(E=x.required)===null||E===void 0?void 0:E.includes(C),shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h});cj(T,C,O,o,u,S)})}return BI(t,T)}}function mue(e,t,{rawFormData:n,rootSchema:r={},_recurseList:o=[],experimental_defaultFormStateBehavior:i=void 0,experimental_customMergeAllOf:a=void 0,required:c,requiredAsRoot:u=!1,shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h}={},p){var g,v;const y=t,x=(g=i?.arrayMinItems)!==null&&g!==void 0?g:{},{populate:w,mergeExtraDefaults:T}=x,b=w==="never",_=w==="requiredOnly",S=w==="all"||!b&&!_,C=(v=x?.computeSkipPopulate)!==null&&v!==void 0?v:(()=>!1),O=i?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(p)&&(p=p.map((I,L)=>{const F=fS(y,ff.Fallback,L),J=Array.isArray(n)?n[L]:void 0;return Va(e,F,{rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:i,experimental_customMergeAllOf:a,parentDefaults:I,rawFormData:J,required:c,shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h})})),Array.isArray(n)){const I=fS(y);if(b)p=n;else{const L=n.map((J,ee)=>Va(e,I,{rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:i,experimental_customMergeAllOf:a,rawFormData:J,parentDefaults:Ie(p,[ee]),required:c,shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h}));p=Nh(p,L,(_&&c||S)&&T)}}if((Kt(y)&&ps in y&&i?.constAsDefaults!=="never")===!1){if(b)return p??O;if(_&&!c)return p||void 0}let P;const $=Array.isArray(p)?p.length:0;if(!y.minItems||Y_(e,y,r,a)||C(e,y,r)||y.minItems<=$)P=p||!c&&!u?p:O;else{const I=p||[],L=fS(y,ff.Invert),F=L.default,J=Array.from({length:y.minItems-$},()=>Va(e,L,{parentDefaults:F,rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:i,experimental_customMergeAllOf:a,required:c,shouldMergeDefaultsIntoFormData:f}));P=I.concat(J)}return BI(t,P)}function uj(e,t,n={},r){switch(js(t)){case"object":return pue(e,t,n,r);case"array":return mue(e,t,n,r)}}function HI(e,t,n,r,o=!1,i,a,c){if(!Kt(t))throw new Error("Invalid schema: "+t);const u=Xr(e,t,r,n,a),f=Va(e,u,{rootSchema:r,includeUndefinedValues:o,experimental_defaultFormStateBehavior:i,experimental_customMergeAllOf:a,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:c,requiredAsRoot:!0});if(u.type!=="object"&&Kt(u.default))return{...f,...n};if(Kt(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:h}=i||{};return Nh(f,n,!0,h==="useDefaultIfFormDataUndefined",!0)}return f}function KI(e={}){return"widget"in ft(e)&&ft(e).widget!=="hidden"}function GI(e,t,n={},r,o){if(n[q_]==="files")return!0;if(t.items){const i=Xr(e,t.items,r,void 0,o);return i.type==="string"&&i.format==="data-url"}return!1}function gue(e,t,n={},r,o,i){const a=ft(n,o),{label:c=!0}=a;let u=!!c;if(u){const f=js(t),h=Ie(t,Fi,!1);f==="array"&&(u=h||Y_(e,t,r,i)||GI(e,t,n,r,i)||KI(n)),f==="object"&&(u=h),f==="boolean"&&n&&!n[q_]&&(u=!1),n&&n[xce]&&(u=!1)}return u}function Wl(e,t,n,r,o,i=[],a){if(Nn in t||F_ in t||nl in t||U_ in t){const u=Xr(e,t,r,o,a);if(i.findIndex(h=>Pn(h,u))===-1)return Wl(e,u,n,r,o,i.concat(u),a)}let c={[ay]:n.replace(/^\./,"")};if(Dt in t||en in t){const u=Dt in t?t.oneOf:t.anyOf,f=oi(t),h=Ph(e,r,o,u,0,f,a),p=u[h];c={...c,...Wl(e,p,n,r,o,i,a)}}if(Hy in t&&t[Hy]!==!1&&mn(c,V_,!0),cf in t&&Array.isArray(o)){const{items:u,additionalItems:f}=t;Array.isArray(u)?o.forEach((h,p)=>{u[p]?c[p]=Wl(e,u[p],`${n}.${p}`,r,h,i,a):f?c[p]=Wl(e,f,`${n}.${p}`,r,h,i,a):console.warn(`Unable to generate path schema for "${n}.${p}". No schema defined for it`)}):o.forEach((h,p)=>{c[p]=Wl(e,u,`${n}.${p}`,r,h,i,a)})}else if(un in t)for(const u in t.properties){const f=Ie(t,[un,u],{});c[u]=Wl(e,f,`${n}.${u}`,r,Ie(o,[u]),i,a)}return c}function ZI(e,t,n="",r,o,i){return Wl(e,t,n,r,o,void 0,i)}function YI(e,t){if(t.length===0&&typeof e!="object")return e;const n=xE(e,t);return Array.isArray(e)?Object.keys(n).map(r=>n[r]):n}function WI(e,t){const n=(o,i)=>typeof o!="object"||ur(o)||i&&!ur(o),r=(o,i=[],a=[[]])=>{const c=Object.keys(o);return c.forEach(u=>{const f=o[u];if(typeof f=="object"){const h=a.map(p=>[...p,u]);f[V_]&&f[ay]!==""?i.push(f[ay]):r(f,i,h)}else u===ay&&f!==""&&a.forEach(h=>{const p=Ie(t,h),g=c.length===1;(n(p,g)||Array.isArray(p)&&p.every(v=>n(v,g)))&&i.push(h)})}),i};return r(e)}function yue(e,t,n={},r){const o=Xr(e,t,n,r),i=ZI(e,o,"",n,r),c=WI(i,r).map(u=>Array.isArray(u)?u.join("."):u);return YI(r,c)}const vu=Symbol("no Value");function gx(e,t,n,r,o={},i){let a;if(Wt(n,un)){const c={};if(Wt(r,un)){const h=Ie(r,un,{});Object.keys(h).forEach(p=>{Wt(o,p)&&(c[p]=void 0)})}const u=Object.keys(Ie(n,un,{})),f={};u.forEach(h=>{const p=Ie(o,h);let g=Ie(r,[un,h],{}),v=Ie(n,[un,h],{});Wt(g,Nn)&&(g=Xr(e,g,t,p,i)),Wt(v,Nn)&&(v=Xr(e,v,t,p,i));const y=Ie(g,"type"),x=Ie(v,"type");if(!y||y===x)if(Wt(c,h)&&delete c[h],x==="object"||x==="array"&&Array.isArray(p)){const w=gx(e,t,v,g,p,i);(w!==void 0||x==="array")&&(f[h]=w)}else{const w=Ie(v,"default",vu),T=Ie(g,"default",vu);w!==vu&&w!==p&&(T===p?c[h]=w:Ie(v,"readOnly")===!0&&(c[h]=void 0));const b=Ie(v,"const",vu),_=Ie(g,"const",vu);b!==vu&&b!==p&&(c[h]=_===p?b:void 0)}}),a={...typeof o=="string"||Array.isArray(o)?void 0:o,...c,...f}}else if(Ie(r,"type")==="array"&&Ie(n,"type")==="array"&&Array.isArray(o)){let c=Ie(r,"items"),u=Ie(n,"items");if(typeof c=="object"&&typeof u=="object"&&!Array.isArray(c)&&!Array.isArray(u)){Wt(c,Nn)&&(c=Xr(e,c,t,o,i)),Wt(u,Nn)&&(u=Xr(e,u,t,o,i));const f=Ie(c,"type"),h=Ie(u,"type");if(!f||f===h){const p=Ie(n,"maxItems",-1);h==="object"?a=o.reduce((g,v)=>{const y=gx(e,t,u,c,v,i);return y!==void 0&&(p<0||g.length<p)&&g.push(y),g},[]):a=p>0&&o.length>p?o.slice(0,p):o}}else typeof c=="boolean"&&typeof u=="boolean"&&c===u&&(a=o)}return a}class vue{constructor(t,n,r,o){n&&n[eh]===ly?this.rootSchema=px(n,Ie(n,Tn,"#")):this.rootSchema=n,this.validator=t,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=o}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,n,r={},o){return!t||!n?!1:this.validator!==t||!Pn(this.rootSchema,n)||!Pn(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==o}findFieldInSchema(t,n,r){return cue(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,n,r,o){return nh(this.validator,this.rootSchema,t,n,r,o,this.experimental_customMergeAllOf)}getDefaultFormState(t,n,r=!1,o){return HI(this.validator,t,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,o)}getDisplayLabel(t,n,r){return gue(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,n,r,o){return Ph(this.validator,this.rootSchema,t,n,r,o,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,n,r){return K_(this.validator,t,n,this.rootSchema,r)}getFromSchema(t,n,r){return uy(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}isFilesArray(t,n){return GI(this.validator,t,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return Y_(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return Z_(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(t,n){return yue(this.validator,t,this.rootSchema,n)}retrieveSchema(t,n,r){return Xr(this.validator,t,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(t,n,r){return gx(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}toPathSchema(t,n,r){return ZI(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function bue(e,t,n={},r){return new vue(e,t,n,r)}function Sue(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const r=e.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[o,i]=r,[a,...c]=o.split(";"),u=a||"",f=decodeURI(((t=c.map(h=>h.split("=")).find(([h])=>h==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const h=atob(i),p=new Array(h.length);for(let v=0;v<h.length;v++)p[v]=h.charCodeAt(v);return{blob:new window.Blob([new Uint8Array(p)],{type:u}),name:f}}catch(h){throw new Error("File is invalid: "+h.message)}}function ja(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n}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 n=[];for(let r=e;r<=t;r++)n.push({value:r,label:ja(r,2)});return n}function fj(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){const i=n[o];if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1}return!0}function wue(e,t){let n=e;if(Array.isArray(t)){const r=n.split(/(%\d)/);t.forEach((o,i)=>{const a=r.findIndex(c=>c===`%${i+1}`);a>=0&&(r[a]=o)}),n=r.join("")}return n}function xue(e,t){return wue(e,t)}function jr(e,t=[],n){if(Array.isArray(e))return e.map(i=>jr(i,t)).filter(i=>i!==n);const r=e===""||e===null?-1:Number(e),o=t[r];return o?o.value:n}function QI(e,t,n=[]){const r=jr(e,n);return Array.isArray(t)?t.filter(o=>!Pn(o,r)):Pn(r,t)?void 0:t}function pp(e,t){return Array.isArray(t)?t.some(n=>Pn(n,e)):Pn(t,e)}function JI(e,t=[],n=!1){const r=t.map((o,i)=>pp(o.value,e)?String(i):void 0).filter(o=>typeof o<"u");return n?r:r[0]}function e9(e,t,n=[]){const r=jr(e,n);if(!Cy(r)){const o=n.findIndex(c=>r===c.value),i=n.map(({value:c})=>c);return t.slice(0,o).concat(r,t.slice(o)).sort((c,u)=>+(i.indexOf(c)>i.indexOf(u)))}return t}class t9{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let r=Array.isArray(t)&&t.length>0||typeof t=="string"?Ie(this.errorSchema,t):this.errorSchema;return!r&&t&&(r={},$G(this.errorSchema,t,r,Object)),r}resetAllErrors(t){return this.errorSchema=t?tp(t):{},this}addErrors(t,n){const r=this.getOrCreateErrorBlock(n);let o=Ie(r,Zr);return Array.isArray(o)||(o=[],r[Zr]=o),Array.isArray(t)?mn(r,Zr,[...new Set([...o,...t])]):mn(r,Zr,[...new Set([...o,t])]),this}setErrors(t,n){const r=this.getOrCreateErrorBlock(n),o=Array.isArray(t)?[...new Set([...t])]:[t];return mn(r,Zr,o),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return mn(n,Zr,[]),this}}function dj(e,t){const n=Ya(e),r=Ya(t);if(e===t||!n&&!r)return[];if(n&&!r)return as(e);if(!n&&r)return as(t);{const o=as(jG(e,(a,c)=>!Pn(a,Ie(t,c)))),i=rG(as(t),as(e));return[...o,...i]}}function Eue(e,t,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:o,month:i,year:a,hour:c,minute:u,second:f}=e,h={type:"day",range:[1,31],value:o},p={type:"month",range:[1,12],value:i},g={type:"year",range:n,value:a},v=[];switch(r){case"MDY":v.push(p,h,g);break;case"DMY":v.push(h,p,g);break;default:v.push(g,p,h)}return t&&v.push({type:"hour",range:[0,23],value:c},{type:"minute",range:[0,59],value:u},{type:"second",range:[0,59],value:f}),v}function n9(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 r9(e,t,n={},r=!0){const o={type:t||"text",...n9(e)};return n.inputType?o.type=n.inputType:t||(e.type==="number"?(o.type="number",r&&o.step===void 0&&(o.step="any")):e.type==="integer"&&(o.type="number",o.step===void 0&&(o.step=1))),n.autocomplete&&(o.autoComplete=n.autocomplete),n.accept&&(o.accept=n.accept),o}const hj={props:{disabled:!1},submitText:"Submit",norender:!1};function o9(e={}){const t=ft(e);if(t&&t[Ky]){const n=t[Ky];return{...hj,...n}}return hj}function gt(e,t,n={}){const{templates:r}=t;if(e==="ButtonTemplates")return r[e];if(Object.hasOwn(n,e)&&typeof n[e]=="string"&&Object.hasOwn(r,n[e])){const o=n[e];return r[o]}return n[e]||r[e]}function W_(){if(typeof process>"u"||Ie(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,UN("test-id-")),e.get(n)}})}var dS={exports:{}},pn={};var pj;function _ue(){if(pj)return pn;pj=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function x(w){if(typeof w=="object"&&w!==null){var T=w.$$typeof;switch(T){case e:switch(w=w.type,w){case n:case o:case r:case f:case h:return w;default:switch(w=w&&w.$$typeof,w){case c:case a:case u:case g:case p:case i:return w;default:return T}}case t:return T}}}return pn.ContextConsumer=a,pn.ContextProvider=i,pn.Element=e,pn.ForwardRef=u,pn.Fragment=n,pn.Lazy=g,pn.Memo=p,pn.Portal=t,pn.Profiler=o,pn.StrictMode=r,pn.Suspense=f,pn.SuspenseList=h,pn.isAsyncMode=function(){return!1},pn.isConcurrentMode=function(){return!1},pn.isContextConsumer=function(w){return x(w)===a},pn.isContextProvider=function(w){return x(w)===i},pn.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},pn.isForwardRef=function(w){return x(w)===u},pn.isFragment=function(w){return x(w)===n},pn.isLazy=function(w){return x(w)===g},pn.isMemo=function(w){return x(w)===p},pn.isPortal=function(w){return x(w)===t},pn.isProfiler=function(w){return x(w)===o},pn.isStrictMode=function(w){return x(w)===r},pn.isSuspense=function(w){return x(w)===f},pn.isSuspenseList=function(w){return x(w)===h},pn.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===o||w===r||w===f||w===h||w===v||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===i||w.$$typeof===a||w.$$typeof===u||w.$$typeof===y||w.getModuleId!==void 0)},pn.typeOf=x,pn}var mj;function Cue(){return mj||(mj=1,dS.exports=_ue()),dS.exports}var Tue=Cue();const gj=ii(Tue),hS={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 Rue(e){let t=Ie(e,"MergedWidget");if(!t){const n=e.defaultProps&&e.defaultProps.options||{};t=({options:r,...o})=>M.jsx(e,{options:{...n,...r},...o}),mn(e,"MergedWidget",t)}return t}function si(e,t,n={}){const r=js(e);if(typeof t=="function"||t&&gj.isForwardRef(A.createElement(t))||gj.isMemo(t))return Rue(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){const o=n[t];return si(e,o,n)}if(typeof r=="string"){if(!(r in hS))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in hS[r]){const o=n[hS[r][t]];return si(e,o,n)}}throw new Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function Oue(e){let t=0;for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return t.toString(16)}function Aue(e){const t=new Set;return JSON.stringify(e,(n,r)=>(t.add(n),r)),JSON.stringify(e,Array.from(t).sort())}function Xs(e){return Oue(Aue(e))}function kue(e){return Xs(e)}function Mue(e,t,n={}){try{return si(e,t,n),!0}catch(r){const o=r;if(o.message&&(o.message.startsWith("No widget")||o.message.startsWith("Unsupported widget")))return!1;throw r}}function Rc(e,t){return`${Wa(e)?e:e[Tn]}__${t}`}function Oc(e){return Rc(e,"description")}function X_(e){return Rc(e,"error")}function $h(e){return Rc(e,"examples")}function Q_(e){return Rc(e,"help")}function I0(e){return Rc(e,"title")}function Oo(e,t=!1){const n=t?` ${$h(e)}`:"";return`${X_(e)} ${Oc(e)} ${Q_(e)}${n}`}function oc(e,t){return`${e}-${t}`}function Qs(e,t){return Rc(e,t)}function pS(e,t){return Rc(e,`optional${t}`)}function Nf(e){return!Cy(e)&&(!nn(e)||Array.isArray(e)||!ur(e))}function jue(e,t){const{rootSchema:n,schemaUtils:r}=e;if(La(t,n))return!0;if(Nn in n){const o=r.retrieveSchema(n);return La(t,o)}return!1}function s9(e,t,n){return t?n:e}function Pue(e){return e?new Date(e).toJSON():void 0}function J_(e,t,n){const r=[wce];return Wt(e,X5)&&r.unshift(X5),Ie(e,[...r,t],n)}function Nue(e,t){if(!Array.isArray(t))return e;const n=h=>h.reduce((p,g)=>(p[g]=!0,p),{}),r=h=>h.length>1?`properties '${h.join("', '")}'`:`property '${h[0]}'`,o=n(e),i=t.filter(h=>h==="*"||o[h]),a=n(i),c=e.filter(h=>!a[h]),u=i.indexOf("*");if(u===-1){if(c.length)throw new Error(`uiSchema order list does not contain ${r(c)}`);return i}if(u!==i.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const f=[...i];return f.splice(u,1,...c),f}function mS(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 n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function dh(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return dh(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return dh(e.oneOf[0]);if(e.allOf){const t=n=>dh(n);return e.allOf.some(t)}return!1}function i9(e,t,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:a,state:c}=e;return!fj(a,t)||!fj(c,n)}const{props:o,state:i}=e;return!Pn(o,t)||!Pn(i,n)}function yj(e){const t=FN(e.map(n=>nn(n)?js(n):void 0).flat().filter(n=>n!==void 0));return t.length===1?t[0]:t}function mp(e,t,n,r){const{enableOptionalDataFieldForType:o=[]}=ft(r,e.globalUiOptions);let i;return en in t&&Array.isArray(t[en])?i=yj(t[en]):Dt in t&&Array.isArray(t[Dt])?i=yj(t[Dt]):i=js(t),!jue(e,t)&&!n&&!!i&&!Array.isArray(i)&&!!o.find(a=>a===i)}function vj(e,t=!0){const{year:n,month:r,day:o,hour:i=0,minute:a=0,second:c=0}=e,u=Date.UTC(n,r-1,o,i,a,c),f=new Date(u).toJSON();return t?f:f.slice(0,10)}function e2(e,t=[]){if(!e)return[];let n=[];return Zr in e&&(n=n.concat(e[Zr].map(r=>{const o=`.${t.join(".")}`;return{property:o,message:r,stack:`${o} ${r}`}}))),Object.keys(e).reduce((r,o)=>{if(o!==Zr){const i=e[o];Ya(i)&&(r=r.concat(e2(i,[...t,o])))}return r},n)}function Due(e){const t=new t9;return e.length&&e.forEach(n=>{const{property:r,message:o}=n,i=r==="."?[]:zN(r);i.length>0&&i[0]===""&&i.splice(0,1),o&&t.addErrors(o,i)}),t.ErrorSchema}function ms(e,t,n,r){const o=Array.isArray(n)?n:n?.path,i=e===""?[]:[e],a=o?o.concat(...i):i,c=[t.idPrefix,...a].join(t.idSeparator);let u;return t.nameGenerator&&a.length>0&&(u=t.nameGenerator(a,t.idPrefix,r)),{path:a,[Tn]:c,...u!==void 0&&{name:u}}}function a9(e){return Object.keys(e).reduce((t,n)=>{if(n==="addError")return t;{const r=e[n];return Ya(r)?{...t,[n]:a9(r)}:{...t,[n]:r}}},{})}function $ue(e){return Object.values(e).every(t=>t!==-1)}function Iue(e){const{className:t="form-control",type:n,range:r,value:o,select:i,rootId:a,name:c,disabled:u,readonly:f,autofocus:h,registry:p,onBlur:g,onFocus:v}=e,y=`${a}_${n}`,{SelectWidget:x}=p.widgets,w=A.useCallback(T=>i(n,T),[i,n]);return M.jsx(x,{schema:{type:"integer"},id:y,name:c,className:t,options:{enumOptions:XI(r[0],r[1])},placeholder:n,value:o,disabled:u,readonly:f,autofocus:h,onChange:w,onBlur:g,onFocus:v,registry:p,label:"","aria-describedby":Oo(a)})}function zue(e){const{time:t=!1,disabled:n=!1,readonly:r=!1,options:o,onChange:i,value:a}=e,[c,u]=A.useState(mS(a,t));A.useEffect(()=>{u(mS(a,t))},[t,a]);const f=A.useCallback((v,y)=>{const x={...c,[v]:typeof y>"u"?-1:y};$ue(x)?i(vj(x,t)):u(x)},[c,i,t]),h=A.useCallback(v=>{v.preventDefault(),!(n||r)&&i(void 0)},[n,r,i]),p=A.useCallback(v=>{if(v.preventDefault(),n||r)return;const y=mS(new Date().toJSON(),t);i(vj(y,t))},[n,r,t,i]);return{elements:A.useMemo(()=>Eue(c,t,o.yearsRange,o.format),[c,t,o.yearsRange,o.format]),handleChange:f,handleClear:h,handleSetNow:p}}function Ac(e){const t=A.useRef(e);return La(e,t.current)||(t.current=e),t.current}function Lue(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function Fue(e){const{name:t,size:n,type:r}=e;return new Promise((o,i)=>{const a=new window.FileReader;a.onerror=i,a.onload=c=>{var u;typeof((u=c.target)===null||u===void 0?void 0:u.result)=="string"?o({dataURL:Lue(c.target.result,t),name:t,size:n,type:r}):o({dataURL:null,name:t,size:n,type:r})},a.readAsDataURL(e)})}function Uue(e){return Promise.all(Array.from(e).map(Fue))}function bj(e){return e.reduce((t,n)=>{if(!n)return t;try{const{blob:r,name:o}=Sue(n);return[...t,{dataURL:n,name:o,size:r.size,type:r.type}]}catch{return t}},[])}function Vue(e,t,n=!1){const r=A.useMemo(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]),o=A.useMemo(()=>Array.isArray(e)?bj(e):bj([e||""]),[e]),i=A.useCallback(c=>{Uue(c).then(u=>{const f=u.map(h=>h.dataURL||null);t(n?r.concat(...f):f[0])})},[r,n,t]),a=A.useCallback(c=>{if(n){const u=r.filter((f,h)=>h!==c);t(u)}else t(void 0)},[r,n,t]);return{filesInfo:o,handleChange:i,handleRemove:a}}function que(e){if(!e)return"";const t=new Date(e),n=ja(t.getFullYear(),4),r=ja(t.getMonth()+1,2),o=ja(t.getDate(),2),i=ja(t.getHours(),2),a=ja(t.getMinutes(),2),c=ja(t.getSeconds(),2),u=ja(t.getMilliseconds(),3);return`${n}-${r}-${o}T${i}:${a}:${c}.${u}`}function fy(e,t,n=!1){if(!t)return e;const{errors:r,errorSchema:o}=e;let i=e2(t),a=t;return ur(o)||(a=Dh(o,t,n?"preventDuplicates":!0),i=[...r].concat(i)),{errorSchema:a,errors:i}}function Bue(e){for(const t in e){const n=e,r=n[t];t===Nn&&typeof r=="string"&&r.startsWith("#")?n[t]=OI+r:n[t]=t2(r)}return e}function Hue(e){for(let t=0;t<e.length;t++)e[t]=t2(e[t]);return e}function t2(e){return Array.isArray(e)?Hue([...e]):nn(e)?Bue({...e}):e}var It;(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)"})(It||(It={}));function yx(){return UN("rjsf-array-item-")}function Sj(e){return Array.isArray(e)?e.map(t=>({key:yx(),item:t})):[]}function l9(e){return Array.isArray(e)?e.map(t=>t.item):[]}function Kue(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function c9(e,t,n,r){let{addable:o}=ft(r,e.globalUiOptions);return o!==!1&&(t.maxItems!==void 0?o=n.length<t.maxItems:o=!0),o}function u9(e,t,n,r){if(typeof e.items=="function")try{return e.items(t,n,r)}catch(o){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,o);return}else return e.items}function Gue(e,t){const{schemaUtils:n,globalFormOptions:r}=e;let o=t.items;return r.useFallbackUiForUnsupportedType&&!o?o={}:G_(t)&&yce(t)&&(o=t.additionalItems),n.getDefaultFormState(o)}function Zue(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:o=[],disabled:i=!1,readonly:a=!1,autofocus:c=!1,required:u=!1,placeholder:f,onBlur:h,onFocus:p,registry:g,rawErrors:v,name:y,onSelectChange:x}=e,{widgets:w,schemaUtils:T,globalFormOptions:b,globalUiOptions:_}=g,S=T.retrieveSchema(t.items,o),C=uf(S,r),{widget:E="select",title:O,...j}=ft(r,_),P=si(t,E,w),$=O??t.title??y,I=T.getDisplayLabel(t,r,_),L=Ac(ms("",b,n,!0));return M.jsx(P,{id:L[Tn],name:y,multiple:!0,onChange:x,onBlur:h,onFocus:p,options:{...j,enumOptions:C},schema:t,uiSchema:r,registry:g,value:o,disabled:i,readonly:a,required:u,label:$,hideLabel:!I,placeholder:f,autofocus:c,rawErrors:v,htmlName:L.name})}function Yue(e){const{schema:t,fieldPathId:n,uiSchema:r,disabled:o=!1,readonly:i=!1,autofocus:a=!1,required:c=!1,hideError:u,placeholder:f,onBlur:h,onFocus:p,formData:g=[],registry:v,rawErrors:y,name:x,onSelectChange:w}=e,{widgets:T,schemaUtils:b,globalFormOptions:_,globalUiOptions:S}=v,{widget:C,title:E,...O}=ft(r,S),j=si(t,C,T),P=E??t.title??x,$=b.getDisplayLabel(t,r,S),I=Ac(ms("",_,n,!0));return M.jsx(j,{id:I[Tn],name:x,multiple:!0,onChange:w,onBlur:h,onFocus:p,options:O,schema:t,uiSchema:r,registry:v,value:g,disabled:o,readonly:i,hideError:u,required:c,label:P,hideLabel:!$,placeholder:f,autofocus:a,rawErrors:y,htmlName:I.name})}function Wue(e){const{schema:t,uiSchema:n,fieldPathId:r,name:o,disabled:i=!1,readonly:a=!1,autofocus:c=!1,required:u=!1,onBlur:f,onFocus:h,registry:p,formData:g=[],rawErrors:v,onSelectChange:y}=e,{widgets:x,schemaUtils:w,globalFormOptions:T,globalUiOptions:b}=p,{widget:_="files",title:S,...C}=ft(n,b),E=si(t,_,x),O=S??t.title??o,j=w.getDisplayLabel(t,n,b),P=Ac(ms("",T,r,!0));return M.jsx(E,{options:C,id:P[Tn],name:o,multiple:!0,onChange:y,onBlur:f,onFocus:h,schema:t,uiSchema:n,value:g,disabled:i,readonly:a,required:u,registry:p,autofocus:c,rawErrors:v,label:O,hideLabel:!j,htmlName:P.name})}function f9(e){const{itemKey:t,index:n,name:r,disabled:o,hideError:i,readonly:a,registry:c,uiOptions:u,parentUiSchema:f,canAdd:h,canRemove:p=!0,canMoveUp:g,canMoveDown:v,itemSchema:y,itemData:x,itemUiSchema:w,itemFieldPathId:T,itemErrorSchema:b,autofocus:_,onBlur:S,onFocus:C,onChange:E,rawErrors:O,totalItems:j,title:P,handleAddItem:$,handleCopyItem:I,handleRemoveItem:L,handleReorderItems:F}=e,{schemaUtils:J,fields:{ArraySchemaField:ee,SchemaField:Z},globalUiOptions:H}=c,V=Ac(T),oe=ee||Z,ne=gt("ArrayFieldItemTemplate",c,u),D=J.getDisplayLabel(y,w,H),{description:q}=ft(w),U=!!q||!!y.description,{orderable:N=!0,removable:G=!0,copyable:te=!1}=u,re={moveUp:N&&g,moveDown:N&&v,copy:te&&h,remove:G&&p,toolbar:!1};re.toolbar=Object.keys(re).some(he=>re[he]);const de=A.useCallback(he=>{$(he,n+1)},[$,n]),we=A.useCallback(he=>{I(he,n)},[I,n]),Ee=A.useCallback(he=>{L(he,n)},[L,n]),se=A.useCallback(he=>{F(he,n,n-1)},[F,n]),X=A.useCallback(he=>{F(he,n,n+1)},[F,n]),fe={children:M.jsx(oe,{name:r,title:P,index:n,schema:y,uiSchema:w,formData:x,errorSchema:b,fieldPathId:V,required:Kue(y),onChange:E,onBlur:S,onFocus:C,registry:c,disabled:o,readonly:a,hideError:i,autofocus:_,rawErrors:O}),buttonsProps:{fieldPathId:V,disabled:o,readonly:a,canAdd:h,hasCopy:re.copy,hasMoveUp:re.moveUp,hasMoveDown:re.moveDown,hasRemove:re.remove,index:n,totalItems:j,onAddItem:de,onCopyItem:we,onRemoveItem:Ee,onMoveUpItem:se,onMoveDownItem:X,registry:c,schema:y,uiSchema:w},itemKey:t,className:"rjsf-array-item",disabled:o,hasToolbar:re.toolbar,index:n,totalItems:j,readonly:a,registry:c,schema:y,uiSchema:w,parentUiSchema:f,displayLabel:D,hasDescription:U};return M.jsx(ne,{...fe})}function Xue(e){const{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:o,formData:i,name:a,title:c,disabled:u=!1,readonly:f=!1,autofocus:h=!1,required:p=!1,hideError:g=!1,registry:v,onBlur:y,onFocus:x,rawErrors:w,onChange:T,keyedFormData:b,handleAddItem:_,handleCopyItem:S,handleRemoveItem:C,handleReorderItems:E}=e,O=t.title||c||a,{schemaUtils:j,fields:P,formContext:$,globalFormOptions:I,globalUiOptions:L}=v,{OptionalDataControlsField:F}=P,J=ft(n,L),ee=nn(t.items)?t.items:{},Z=j.retrieveSchema(ee),H=l9(b),V=mp(v,t,p,n),oe=Nf(i),ne=c9(v,t,H,n)&&(!V||oe),D=oe?b:[],q=V?" rjsf-optional-array-field":"",U=e.childFieldPathId??o,N=V?M.jsx(F,{...e,fieldPathId:U}):void 0,G={canAdd:ne,items:D.map((re,de)=>{const{key:we,item:Ee}=re,se=Ee,X=j.retrieveSchema(ee,se),fe=r?r[de]:void 0,he=ms(de,I,U),Pe=u9(n,Ee,de,$),ye={itemKey:we,index:de,name:a&&`${a}-${de}`,registry:v,uiOptions:J,hideError:g,readonly:f,disabled:u,required:p,title:O?`${O}-${de+1}`:void 0,canAdd:ne,canMoveUp:de>0,canMoveDown:de<H.length-1,itemSchema:X,itemFieldPathId:he,itemErrorSchema:fe,itemData:se,itemUiSchema:Pe,autofocus:h&&de===0,onBlur:y,onFocus:x,rawErrors:w,totalItems:b.length,handleAddItem:_,handleCopyItem:S,handleRemoveItem:C,handleReorderItems:E,onChange:T};return M.jsx(f9,{...ye},we)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${Z.type}${q}`,disabled:u,fieldPathId:o,uiSchema:n,onAddClick:_,readonly:f,required:p,schema:t,title:O,formData:H,rawErrors:w,registry:v,optionalDataControl:N},te=gt("ArrayFieldTemplate",v,J);return M.jsx(te,{...G})}function Que(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:o,fieldPathId:i,name:a,title:c,disabled:u=!1,readonly:f=!1,autofocus:h=!1,required:p=!1,hideError:g=!1,registry:v,onBlur:y,onFocus:x,rawErrors:w,keyedFormData:T,onChange:b,handleAddItem:_,handleCopyItem:S,handleRemoveItem:C,handleReorderItems:E}=e;let{formData:O=[]}=e;const j=t.title||c||a,{schemaUtils:P,fields:$,formContext:I,globalFormOptions:L,globalUiOptions:F}=v,J=ft(n,F),{OptionalDataControlsField:ee}=$,Z=mp(v,t,p,n),H=Nf(r),oe=(nn(t.items)?t.items:[]).map((de,we)=>P.retrieveSchema(de,O[we])),ne=nn(t.additionalItems)?P.retrieveSchema(t.additionalItems,r):null,D=e.childFieldPathId??i;O.length<oe.length&&(O=O.concat(new Array(oe.length-O.length)));const q=H?T:[],U=Z?" rjsf-optional-array-field":"",N=Z?M.jsx(ee,{...e,fieldPathId:D}):void 0,G=c9(v,t,O,n)&&!!ne&&(!Z||H),te={canAdd:G,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${U}`,disabled:u,fieldPathId:i,formData:r,items:q.map((de,we)=>{const{key:Ee,item:se}=de,X=se,fe=we>=oe.length,he=(fe&&nn(t.additionalItems)?P.retrieveSchema(t.additionalItems,X):oe[we])||{},Pe=ms(we,L,D);let ye;fe?ye=n.additionalItems:Array.isArray(n.items)?ye=n.items[we]:ye=u9(n,se,we,I);const De=o?o[we]:void 0,Ue={index:we,itemKey:Ee,name:a&&`${a}-${we}`,registry:v,uiOptions:J,hideError:g,readonly:f,disabled:u,required:p,title:j?`${j}-${we+1}`:void 0,canAdd:G,canRemove:fe,canMoveUp:we>=oe.length+1,canMoveDown:fe&&we<O.length-1,itemSchema:he,itemData:X,itemUiSchema:ye,itemFieldPathId:Pe,itemErrorSchema:De,autofocus:h&&we===0,onBlur:y,onFocus:x,rawErrors:w,totalItems:T.length,onChange:b,handleAddItem:_,handleCopyItem:S,handleRemoveItem:C,handleReorderItems:E};return M.jsx(f9,{...Ue},Ee)}),onAddClick:_,readonly:f,required:p,registry:v,schema:t,uiSchema:n,title:j,errorSchema:o,rawErrors:w,optionalDataControl:N},re=gt("ArrayFieldTemplate",v,J);return M.jsx(re,{...te})}function Jue(e=[]){const t=A.useMemo(()=>Xs(e),[e]),[n,r]=A.useState(()=>({formDataHash:t,keyedFormData:Sj(e)}));let{keyedFormData:o,formDataHash:i}=n;if(t!==i){const c=Array.isArray(e)?e:[],u=o||[];o=c.length===u.length?u.map((f,h)=>({key:f.key,item:c[h]})):Sj(c),i=t,r({formDataHash:i,keyedFormData:o})}const a=A.useCallback(c=>{const u=l9(c),f=Xs(u);return r({formDataHash:f,keyedFormData:c}),u},[]);return{keyedFormData:o,updateKeyedFormData:a}}function efe(e){const{schema:t,uiSchema:n,errorSchema:r,fieldPathId:o,registry:i,formData:a,onChange:c}=e,{globalFormOptions:u,schemaUtils:f,translateString:h}=i,{keyedFormData:p,updateKeyedFormData:g}=Jue(a),v=e.childFieldPathId??o,y=A.useCallback((E,O)=>{E&&E.preventDefault();let j;if(r){j={};for(const I in r){const L=parseInt(I);O===void 0||L<O?mn(j,[L],r[I]):L>=O&&mn(j,[L+1],r[I])}}const P={key:yx(),item:Gue(i,t)},$=[...p];O!==void 0?$.splice(O,0,P):$.push(P),c(g($),v.path,j)},[p,i,t,c,g,r,v]),x=A.useCallback((E,O)=>{E&&E.preventDefault();let j;if(r){j={};for(const I in r){const L=parseInt(I);L<=O?mn(j,[L],r[I]):L>O&&mn(j,[L+1],r[I])}}const P={key:yx(),item:tp(p[O].item)},$=[...p];O!==void 0?$.splice(O+1,0,P):$.push(P),c(g($),v.path,j)},[p,c,g,r,v]),w=A.useCallback((E,O)=>{E&&E.preventDefault();let j;if(r){j={};for(const $ in r){const I=parseInt($);I<O?mn(j,[I],r[$]):I>O&&mn(j,[I-1],r[$])}}const P=p.filter(($,I)=>I!==O);c(g(P),v.path,j)},[p,c,g,r,v]),T=A.useCallback((E,O,j)=>{E&&(E.preventDefault(),E.currentTarget.blur());let P;if(r){P={};for(const L in r){const F=parseInt(L);F==O?mn(P,[j],r[O]):F==j?mn(P,[O],r[j]):mn(P,[L],r[F])}}function $(){const L=p.slice();return L.splice(O,1),L.splice(j,0,p[O]),L}const I=$();c(g(I),v.path,P)},[p,c,g,r,v]),b=A.useCallback((E,O,j,P)=>{c(E===void 0?null:E,O,j,P)},[c]),_=A.useCallback(E=>{c(E,v.path,void 0,v?.[Tn])},[c,v]),S={...e,formData:a,fieldPathId:v,onSelectChange:_},C={...e,handleAddItem:y,handleCopyItem:x,handleRemoveItem:w,handleReorderItems:T,keyedFormData:p,onChange:b};if(!(cf in t)){if(!u.useFallbackUiForUnsupportedType){const O=ft(n),j=gt("UnsupportedFieldTemplate",i,O);return M.jsx(j,{schema:t,fieldPathId:o,reason:h(It.MissingItems),registry:i})}const E={...t,[cf]:{type:void 0}};S.schema=E,C.schema=E}return f.isMultiSelect(S.schema)?M.jsx(Zue,{...S}):KI(n)?M.jsx(Yue,{...S}):G_(S.schema)?M.jsx(Que,{...C}):f.isFilesArray(S.schema,n)?M.jsx(Wue,{...S}):M.jsx(Xue,{...C})}function tfe(e){const{schema:t,name:n,uiSchema:r,fieldPathId:o,formData:i,registry:a,required:c,disabled:u,readonly:f,hideError:h,autofocus:p,title:g,onChange:v,onFocus:y,onBlur:x,rawErrors:w}=e,{title:T}=t,{widgets:b,translateString:_,globalUiOptions:S}=a,{widget:C="checkbox",title:E,label:O=!0,enumNames:j,...P}=ft(r,S),$=si(t,C,b),I=_(It.YesLabel),L=_(It.NoLabel);let F;const J=E??T??g??n;if(Array.isArray(t.oneOf))F=uf({oneOf:t.oneOf.map(Z=>{if(nn(Z))return{...Z,title:Z.title||(Z.const===!0?I:L)}}).filter(Z=>Z)},r);else{const Z=t.enum??[!0,!1];!j&&Z.length===2&&Z.every(H=>typeof H=="boolean")?F=[{value:Z[0],label:Z[0]?I:L},{value:Z[1],label:Z[1]?I:L}]:F=uf({enum:Z},r)}const ee=A.useCallback((Z,H,V)=>v(Z,o.path,H,V),[v,o]);return M.jsx($,{options:{...P,enumOptions:F},schema:t,uiSchema:r,id:o.$id,name:n,onChange:ee,onFocus:y,onBlur:x,label:J,hideLabel:!O,value:i,required:c,disabled:u,readonly:f,hideError:h,registry:a,autofocus:p,rawErrors:w,htmlName:o.name})}function nfe(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function rfe(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function ofe(e,t){switch(t){case"string":return String(e);case"number":{const n=Number(e);return isNaN(n)?0:n}case"boolean":return!!e;default:return e}}function sfe(e){const{id:t,formData:n,displayLabel:r=!0,schema:o,name:i,uiSchema:a,required:c,disabled:u=!1,readonly:f=!1,onBlur:h,onFocus:p,registry:g,fieldPathId:v,onChange:y,errorSchema:x}=e,{translateString:w,fields:T,globalFormOptions:b}=g,[_,S]=A.useState(rfe(n)),C=ft(a),E=Ac(ms("__internal_type_selector",b,v)),O=w(It.Type),j=A.useMemo(()=>nfe(O),[O]),P=L=>{L!=null&&(S(L),y(ofe(n,L),v.path,x,t))};if(!b.useFallbackUiForUnsupportedType){const{reason:L=w(It.UnknownFieldType,[String(o.type)])}=e,F=gt("UnsupportedFieldTemplate",g,C);return M.jsx(F,{schema:o,fieldPathId:v,reason:L,registry:g})}const $=gt("FallbackFieldTemplate",g,C),{SchemaField:I}=T;return M.jsx($,{schema:o,registry:g,typeSelector:M.jsx(I,{fieldPathId:E,name:`${i}__fallback_type`,schema:j,formData:_,onChange:P,onBlur:h,onFocus:p,registry:g,hideLabel:!r,disabled:u,readonly:f,required:c},n?Xs(n):"__empty__"),schemaField:M.jsx(I,{...e,schema:{type:_,title:w(It.Value),..._==="object"&&{additionalProperties:!0}}})})}var Js;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(Js||(Js={}));var hh;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(hh||(hh={}));const ife=/^\$lookup=(.+)/,gS="layoutGrid";function wj(e,t){return e??t}function afe(e){return/^\d+?$/.test(e)}const qa=W_();function lfe(e,t,n,r,o){const i=Ie(n,[dx],{}),a=Ie(n,e),c={...Ie(a,[Ua],{}),...t,...i},u={...a};ur(c)||mn(u,[Ua],c),ur(i)||mn(u,[dx],i);let{readonly:f}=ft(u);return(o===!0||NN(f)&&r===!0)&&(f=!0,Wt(c,nS)?mn(u,[Ua,nS],!0):mn(u,`ui:${nS}`,!0)),{fieldUiSchema:u,uiReadonly:f}}function cfe(e,t,n="$0m3tH1nG Un3xP3cT3d"){const r=hw([t]).sort(),o=hw([n]).sort();switch(e){case hh.ALL:return La(r,o);case hh.SOME:return DA(r,o).length>0;case hh.NONE:return DA(r,o).length===0;default:return!1}}function z0(e,t,n){let r={},o=e[t];if(Ya(o)){const{children:i,className:a,...c}=o;if(o=i,a){const f=a.split(" ").map(h=>J_(n,h,h)).join(" ");r={...c,className:f}}else r=c}if(!Array.isArray(o))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:o,gridProps:r}}function xj(e,t,n){let r;if(afe(n)&&e&&e?.type==="array"&&Wt(e,cf)){const o=Number(n),i=e[cf];Array.isArray(i)?o>i.length?r=MN(i):r=i[o]:r=i,t={[Tn]:t[Tn],path:[...t.path.slice(0,t.path.length-1),o]}}return{rawSchema:r,fieldPathId:t}}function ufe(e,t,n,r,o){const{schemaUtils:i,globalFormOptions:a}=e;let c=n,u=o;const f=t.split("."),h=f.pop();let p=i.retrieveSchema(c,r),g=r,v=p.readOnly;f.forEach(w=>{if(u=ms(w,a,u),Wt(p,un))c=Ie(p,[un,w],{});else if(p&&(Wt(p,Dt)||Wt(p,en))){const T=Wt(p,Dt)?Dt:en,b=i.findSelectedOptionInXxxOf(p,w,T,g);c=Ie(b,[un,w],{})}else{const T=xj(p,u,w);c=T.rawSchema??{},u=T.fieldPathId}g=Ie(g,w,{}),p=i.retrieveSchema(c,g),v=wj(p.readOnly,v)});let y,x=!1;if(ur(p)&&(p=void 0),p&&h){if(p&&(Wt(p,Dt)||Wt(p,en))){const T=Wt(p,Dt)?Dt:en;p=i.findSelectedOptionInXxxOf(p,h,T,g)}u=ms(h,a,u),x=p!==void 0&&Array.isArray(p.required)&&pG(p.required,h);const w=xj(p,u,h);if(w.rawSchema?(p=w.rawSchema,u=w.fieldPathId):(p=Ie(p,[un,h]),p=p&&i.retrieveSchema(p)),v=wj(p?.readOnly,v),p&&(Wt(p,Dt)||Wt(p,en))){const T=Wt(p,Dt)?Dt:en,b=oi(p);y={options:p[T],hasDiscriminator:!!b}}}return{schema:p,isRequired:x,isReadonly:v,optionsInfo:y,fieldPathId:u}}function ffe(e,t){let n=e;return Wa(n)&&(n=J_(t,n)),Yh(n)?n:null}function dfe(e,t){let n,r=null,o={},i;if(Wa(t)||NN(t))n=t??"";else{const{name:a="",render:c,...u}=t;n=a,o=u,ur(o)||oG(o,(f,h)=>{if(Wa(f)){const p=ife.exec(f);if(Array.isArray(p)&&p.length>1){const g=p[1];o[h]=J_(e,g,g)}}}),r=ffe(c,e),!a&&r&&(i=M.jsx(r,{...u,"data-testid":qa.uiComponent}))}return{name:n,UIComponent:r,uiProps:o,rendered:i}}function L0(e){const{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:o,formData:i}=n,{schemaUtils:a}=r,c=a.retrieveSchema(o,i);return t.map(u=>A.createElement(n2,{...n,key:`layoutGrid-${Xs(u)}`,schema:c,layoutGridSchema:u}))}function hfe(e){const{layoutGridSchema:t,...n}=e,{formData:r,registry:o}=n,{children:i,gridProps:a}=z0(t,Js.CONDITION,o),{operator:c,field:u="",value:f}=a,h=Ie(r,u,null);return cfe(c,h,f)?M.jsx(L0,{...n,childrenLayoutGridSchemaId:i}):null}function pfe(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:i,gridProps:a}=z0(t,Js.COLUMN,r),c=ft(o),u=gt("GridTemplate",r,c);return M.jsx(u,{column:!0,"data-testid":qa.col,...a,children:M.jsx(L0,{...n,childrenLayoutGridSchemaId:i})})}function mfe(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:i,gridProps:a}=z0(t,Js.COLUMNS,r),c=ft(o),u=gt("GridTemplate",r,c);return i.map(f=>M.jsx(u,{column:!0,"data-testid":qa.col,...a,children:M.jsx(L0,{...n,childrenLayoutGridSchemaId:[f]})},`column-${Xs(f)}`))}function gfe(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:i,gridProps:a}=z0(t,Js.ROW,r),c=ft(o),u=gt("GridTemplate",r,c);return M.jsx(u,{...a,"data-testid":qa.row,children:M.jsx(L0,{...n,childrenLayoutGridSchemaId:i})})}function yfe(e){const{gridSchema:t,schema:n,uiSchema:r,errorSchema:o,fieldPathId:i,onBlur:a,onFocus:c,formData:u,readonly:f,registry:h,layoutGridSchema:p,...g}=e,{onChange:v}=g,{fields:y}=h,{SchemaField:x,LayoutMultiSchemaField:w}=y,T=dfe(h,t),{name:b,UIComponent:_,uiProps:S}=T,{schema:C,isRequired:E,isReadonly:O,optionsInfo:j,fieldPathId:P}=ufe(h,b,n,u,i),$=Ac(P);if(T.rendered)return T.rendered;if(C){const I=j?.hasDiscriminator?w:x,{fieldUiSchema:L,uiReadonly:F}=lfe(b,S,r,O,f);return M.jsx(I,{"data-testid":j?.hasDiscriminator?qa.layoutMultiSchemaField:qa.field,...g,name:b,required:E,readonly:F,schema:C,uiSchema:L,errorSchema:Ie(o,b),fieldPathId:$,formData:Ie(u,b),onChange:v,onBlur:a,onFocus:c,options:j?.options,registry:h})}return _?M.jsx(_,{"data-testid":qa.uiComponent,...g,name:b,required:E,formData:u,readOnly:!!O||f,errorSchema:o,uiSchema:r,schema:n,fieldPathId:i,onBlur:a,onFocus:c,registry:h,...S}):null}function n2(e){const{uiSchema:t}=e;let{layoutGridSchema:n}=e;const r=ft(t);if(!n&&gS in r&&nn(r[gS])&&(n=r[gS]),nn(n)){if(Js.ROW in n)return M.jsx(gfe,{...e,layoutGridSchema:n});if(Js.COLUMN in n)return M.jsx(pfe,{...e,layoutGridSchema:n});if(Js.COLUMNS in n)return M.jsx(mfe,{...e,layoutGridSchema:n});if(Js.CONDITION in n)return M.jsx(hfe,{...e,layoutGridSchema:n})}return M.jsx(yfe,{...e,gridSchema:n})}n2.TEST_IDS=qa;function vfe(e){const{fieldPathId:t,title:n,schema:r,uiSchema:o,required:i,registry:a,name:c}=e,u=ft(o,a.globalUiOptions),{title:f}=u,{title:h}=r,p=f||n||h||c;if(!p)return null;const g=gt("TitleFieldTemplate",a,u);return M.jsx(g,{id:I0(t),title:p,required:i,schema:r,uiSchema:o,registry:a})}function yS(e,t,n){const r="!@#!@$@#$!@$#";return e.map(({schema:i})=>i).find(i=>{const a=Ie(i,[un,t]);return Ie(a,D0,Ie(a,ps,r))===n})}function Ej(e,t,n,r,o){const i=t.map(u=>n.retrieveSchema(u,o));let a=e;Wt(e,Dt)?a={...e,[Dt]:i}:Wt(e,en)&&(a={...e,[en]:i});const c=uf(a,r);if(!c)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(a)}`);return c}function bfe(e){const{name:t,baseType:n,disabled:r=!1,formData:o,fieldPathId:i,onBlur:a,onChange:c,options:u,onFocus:f,registry:h,uiSchema:p,schema:g,autofocus:v,readonly:y,required:x,errorSchema:w,hideError:T=!1}=e,{widgets:b,schemaUtils:_,globalUiOptions:S}=h,[C,E]=A.useState(Ej(g,u,_,p,o)),O=Ie(i,Tn),j=oi(g),P=gt("FieldErrorTemplate",h,u),$=gt("FieldTemplate",h,u),I=Xs(g),L=Xs(u),F=p?Xs(p):"",J=o?Xs(o):"";A.useEffect(()=>{E(Ej(g,u,_,p,o))},[I,L,_,F,J]);const{widget:ee=j?"radio":"select",title:Z="",placeholder:H="",optionsSchemaSelector:V=j,hideError:oe,...ne}=ft(p);if(!V)throw new Error("No selector field provided for the LayoutMultiSchemaField");const D=Ie(o,V);let q=Ie(C[0]?.schema,[un,V],{});const U=yS(C,V,D);q=q?.type?q:{...q,type:U?.type||n};const N=si(q,ee,b),G=oe===void 0?T:!!oe,te=Ie(w,[Zr],[]),re=Eh(w,[Zr]),de=_.getDisplayLabel(g,p,S),we=X=>{const fe=yS(C,V,X),he=yS(C,V,D);let Pe=_.sanitizeDataForNewSchema(fe,he,o);Pe&&fe&&(Pe=_.getDefaultFormState(fe,Pe,"excludeObjectChildren")),Pe&&mn(Pe,V,X),c(Pe,i.path,void 0,O)},Ee={enumOptions:C,...ne},se=!G&&te.length>0?M.jsx(P,{fieldPathId:i,schema:g,errors:te,registry:h}):void 0;return M.jsx($,{fieldPathId:i,id:O,schema:g,label:(Z||g.title)??"",disabled:r||Array.isArray(C)&&ur(C),uiSchema:p,required:x,readonly:!!y,registry:h,displayLabel:de,errors:se,onChange:c,onKeyRename:ty,onKeyRenameBlur:ty,onRemoveProperty:ty,children:M.jsx(N,{id:O,name:t,schema:g,label:(Z||g.title)??"",disabled:r||Array.isArray(C)&&ur(C),uiSchema:p,autofocus:v,readonly:y,required:x,registry:h,multiple:!1,rawErrors:te,hideError:G,hideLabel:!de,errorSchema:re,placeholder:H,onChange:we,onBlur:a,onFocus:f,value:D,options:Ee,htmlName:i.name})})}class _j extends A.Component{constructor(t){super(t);const{formData:n,options:r,registry:{schemaUtils:o}}=this.props,i=r.map(a=>o.retrieveSchema(a,n));this.state={retrievedOptions:i,selectedOption:this.getMatchingOption(0,n,i)}}componentDidUpdate(t,n){const{formData:r,options:o,fieldPathId:i}=this.props,{selectedOption:a}=this.state;let c=this.state;if(!Pn(t.options,o)){const{registry:{schemaUtils:u}}=this.props,f=o.map(h=>u.retrieveSchema(h,r));c={selectedOption:a,retrievedOptions:f}}if(!Pn(r,t.formData)&&i.$id===t.fieldPathId.$id){const{retrievedOptions:u}=c,f=this.getMatchingOption(a,r,u);n&&f!==a&&(c={selectedOption:f,retrievedOptions:u})}c!==this.state&&this.setState(c)}getMatchingOption(t,n,r){const{schema:o,registry:{schemaUtils:i}}=this.props,a=oi(o);return i.getClosestMatchingOption(n,r,t,a)}onOptionChange=t=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:o,onChange:i,registry:a,fieldPathId:c}=this.props,{schemaUtils:u}=a,f=t!==void 0?parseInt(t,10):-1;if(f===n)return;const h=f>=0?r[f]:void 0,p=n>=0?r[n]:void 0;let g=u.sanitizeDataForNewSchema(h,p,o);h&&(g=u.getDefaultFormState(h,g,"excludeObjectChildren")),this.setState({selectedOption:f},()=>{i(g,c.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:t,schema:n}=this.props;return`${t.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:n=!1,errorSchema:r={},formData:o,onBlur:i,onFocus:a,readonly:c,required:u=!1,registry:f,schema:h,uiSchema:p}=this.props,{widgets:g,fields:v,translateString:y,globalUiOptions:x,schemaUtils:w}=f,{SchemaField:T}=v,b=gt("MultiSchemaFieldTemplate",f,x),_=mp(f,h,u,p),S=Nf(o),{selectedOption:C,retrievedOptions:E}=this.state,{widget:O="select",placeholder:j,autofocus:P,autocomplete:$,title:I=h.title,...L}=ft(p,x),F=si({type:"number"},O,g),J=Ie(r,Zr,[]),ee=Eh(r,[Zr]),Z=w.getDisplayLabel(h,p,x),H=C>=0&&E[C]||null;let V;if(H){const{required:te}=h;V=te?Bi({required:te},H):H}let oe=[];Dt in h&&p&&Dt in p?Array.isArray(p[Dt])?oe=p[Dt]:console.warn(`uiSchema.oneOf is not an array for "${I||t}"`):en in h&&p&&en in p&&(Array.isArray(p[en])?oe=p[en]:console.warn(`uiSchema.anyOf is not an array for "${I||t}"`));let ne=p;C>=0&&oe.length>C&&(ne=oe[C]);const D=I?It.TitleOptionPrefix:It.OptionPrefix,q=I?[I]:[],U=E.map((te,re)=>{const{title:de=te.title}=ft(oe[re]);return{label:de||y(D,q.concat(String(re+1))),value:re}}),N=!_||S?M.jsx(F,{id:this.getFieldId(),name:`${t}${h.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:i,onFocus:a,disabled:n||ur(U),multiple:!1,rawErrors:J,errorSchema:ee,value:C>=0?C:void 0,options:{enumOptions:U,...L},registry:f,placeholder:j,autocomplete:$,autofocus:P,label:I??t,hideLabel:!Z,readonly:c}):void 0,G=V&&V.type!=="null"&&M.jsx(T,{...this.props,schema:V,uiSchema:ne})||null;return M.jsx(b,{schema:h,registry:f,uiSchema:p,selector:N,optionSchemaField:G})}}const Sfe=/\.([0-9]*0)*$/,wfe=/[0.]0*$/;function xfe(e){const{registry:t,onChange:n,formData:r,value:o}=e,[i,a]=A.useState(o),{StringField:c}=t.fields;let u=r;const f=A.useCallback((h,p,g,v)=>{a(h),`${h}`.charAt(0)==="."&&(h=`0${h}`);const y=typeof h=="string"&&h.match(Sfe)?W5(h.replace(wfe,"")):W5(h);n(y,p,g,v)},[n]);if(typeof i=="string"&&typeof u=="number"){const h=new RegExp(`^(${String(u).replace(".","\\.")})?\\.?0*$`);i.match(h)&&(u=i)}return M.jsx(c,{...e,formData:u,onChange:f})}function Gs(){return Gs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gs.apply(null,arguments)}const Ng=["strong","em","del","mark"],Cj=[["**",Ng[0]],["__",Ng[0]],["~~",Ng[2]],["==",Ng[3]],["*","em"],["_","em"]];function Efe(e,t){for(var n=1,r=t+1;r<e.length&&n>0;)e[r]!=="\\"?(e[r]==="["&&n++,e[r]==="]"&&n--,r++):r+=2;if(n===0&&r<e.length&&(e[r]==="("||e[r]==="[")){var o=e[r]==="("?")":"]",i=1;for(r++;r<e.length&&i>0;)e[r]!=="\\"?(e[r]==="("&&o===")"&&i++,e[r]===o&&i--,r++):r+=2;if(i===0)return r}return-1}function _fe(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",o=0,i="",a=0;a<6;a++){var c=Cj[a][0];if(e.startsWith(c)&&e.length>=2*c.length){r=c,o=c.length,i=Cj[a][1];break}}if(!r)return null;for(var u=o,f=!1,h=!1,p="",g=0,v="",y=!1,x="";u<e.length;){var w=e[u];if(y)v+=w,y=!1,x=w,u++;else if(w!=="\\")if(w!=="`"||g!==0){if(w==="["&&!f&&g===0){var T=Efe(e,u);if(T!==-1){v+=e.slice(u,T),u=T,x=e[T-1];continue}}if(h)v+=w,p?w===p&&(p=""):w==='"'||w==="'"?p=w:w===">"&&(h=!1),x=w,u++;else if(w!=="<"||f){if(w===`
|
|
61
|
+
`&&x===`
|
|
62
|
+
`&&!f&&g===0)return null;if(!f&&g===0){for(var b=0;u+b<e.length&&e[u+b]===r[0];)b++;if(b>=o&&(o!==1||r!=="*"&&r!=="_"||e[u-1]!==r&&e[u+1]!==r)){var _=[e.slice(0,u+b),i,v+e.slice(u+o,u+b)];return _.index=0,_.input=e,_}}v+=w,x=w,u++}else{var S=e[u+1],C=e.indexOf(">",u);if(C!==-1){var E=e.slice(u,C+1).endsWith("/>");S==="/"?g=Math.max(0,g-1):E||g++}h=!0,v+=w,x=w,u++}}else f=!f,v+=w,x=w,u++;else v+=w,y=!0,x=w,u++}return null}const Cfe=["children","options"],Tj=["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"}),Rj={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Tfe=["style","script","pre"],Rfe=["src","href","data","formAction","srcDoc","action"],Ofe=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Afe=/\n{2,}$/,Oj=/^(\s*>[\s\S]*?)(?=\n\n|$)/,kfe=/^ *> ?/gm,Mfe=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,jfe=/^ {2,}\n/,Pfe=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,Aj=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,kj=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Nfe=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Dfe=/^(?:\n *)*\n/,$fe=/\r\n?/g,Ife=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,zfe=/^\[\^([^\]]+)]/,Lfe=/\f/g,Ffe=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Ufe=/^\[(x|\s)\]/,Mj=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,jj=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Pj=/^([^\n]+)\n *(=|-)\2{2,} *\n/,r2=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function Vfe(e){const t=r2.exec(e);if(!t)return null;const n=t[1],r=n.toLowerCase(),o=r.length+1;let i=t[0].length;e[i]===`
|
|
63
|
+
`&&i++;const a=i;let c=i,u=1;const f=e.length;for(;u>0;){const p=e.indexOf("<",i);if(p===-1)return null;let g=-1,v=-1;if(e[p+1]==="/")v=p;else if(e[p+1]===r[0]||e[p+1]===n[0]){let y=!0;for(let x=0;x<r.length;x++){const w=e[p+1+x];if(w!==r[x]&&w!==n[x]){y=!1;break}}!y||e[p+o]!==" "&&e[p+o]!==">"||(g=p)}if(g!==-1||v!==-1)if(g!==-1&&(v===-1||g<v))i=g+o+1,u++;else{let y=v+2;for(;y<f;){const w=e[y];if(w!==" "&&w!==" "&&w!==`
|
|
64
|
+
`&&w!=="\r")break;y++}if(y+r.length>f)return null;let x=!0;for(let w=0;w<r.length;w++){const T=e[y+w];if(T!==r[w]&&T!==n[w]){x=!1;break}}if(!x){i=y;continue}for(y+=r.length;y<f;){const w=e[y];if(w!==" "&&w!==" "&&w!==`
|
|
65
|
+
`&&w!=="\r")break;y++}if(y>=f||e[y]!==">"){i=y;continue}c=v,i=y+1,u--}else i=p+1}let h=0;for(;i+h<f&&e[i+h]===`
|
|
66
|
+
`;)h++;return[e.slice(0,i+h),n,t[2],e.slice(a,c)]}const qfe=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Nj=/^<!--[\s\S]*?(?:-->)/,Bfe=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,vx=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Hfe=/^\{.*\}$/,Kfe=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Gfe=/^<([^ >]+[:@\/][^ >]+)>/,Zfe=/-([a-z])?/gi,Dj=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Yfe=/^[^\n]+(?: \n|\n{2,})/,Wfe=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Xfe=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Qfe=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Jfe=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,ede=/\t/g,tde=/(^ *\||\| *$)/g,nde=/^ *:-+: *$/,rde=/^ *:-+ *$/,ode=/^ *-+: *$/,sde=/^(:[a-zA-Z0-9-_]+:)/,ide=/^\\([^0-9A-Za-z\s])/,ade=/\\([^0-9A-Za-z\s])/g,lde=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,cde=/^\n+/,ude=/^([ \t]*)/,fde=/(?:^|\n)( *)$/,o2="(?:\\d+\\.)",s2="(?:[*+-])";function d9(e){return"( *)("+(e===1?o2:s2)+") +"}const h9=d9(1),p9=d9(2);function m9(e){return RegExp("^"+(e===1?h9:p9))}const dde=m9(1),hde=m9(2);function g9(e){return RegExp("^"+(e===1?h9:p9)+"[^\\n]*(?:\\n(?!\\1"+(e===1?o2:s2)+" )[^\\n]*)*(\\n|$)","gm")}const pde=g9(1),mde=g9(2);function y9(e){const t=e===1?o2:s2;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const v9=y9(1),b9=y9(2);function $j(e,t){const n=t===1,r=n?v9:b9,o=n?pde:mde,i=n?dde:hde;return{t:a=>i.test(a),o:$a(function(a,c){const u=fde.exec(c.prevCapture);return u&&(c.list||!c.inline&&!c.simple)?r.exec(a=u[1]+a):null}),u:1,i(a,c,u){const f=n?+a[2]:void 0,h=a[0].replace(Afe,`
|
|
67
|
+
`).match(o),p=i.exec(h[0]),g=RegExp("^ {1,"+(p?p[0].length:0)+"}","gm");let v=!1;return{items:h.map(function(y,x){const w=y.replace(g,"").replace(i,""),T=x===h.length-1,b=Bs(w,`
|
|
68
|
+
|
|
69
|
+
`)||T&&v;v=b;const _=u.inline,S=u.list;let C;u.list=!0,b?(u.inline=!1,C=ph(w)+`
|
|
70
|
+
|
|
71
|
+
`):(u.inline=!0,C=ph(w));const E=c(C,u);return u.inline=_,u.list=S,E}),ordered:n,start:f}}}}const gde=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),yde=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function Ij(e){return typeof e=="string"}function ph(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function bx(e,t){return e.startsWith(t)}function Bs(e,t){return e.indexOf(t)!==-1}function vde(e,t,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(bx(e,n[r]))return!0;return!1}return n(e,t)}function Hd(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 bde(e){return ode.test(e)?"right":nde.test(e)?"center":rde.test(e)?"left":null}function zj(e,t,n,r){const o=n.inTable;n.inTable=!0;let i=[[]],a="";function c(){if(!a)return;const u=i[i.length-1];u.push.apply(u,t(a,n)),a=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((u,f,h)=>{u.trim()==="|"&&(c(),r)?f!==0&&f!==h.length-1&&i.push([]):a+=u}),c(),n.inTable=o,i}function Sde(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(tde,"").split("|").map(bde):[],o=e[3]?(function(a,c,u){return a.trim().split(`
|
|
72
|
+
`).map(function(f){return zj(f,c,u,!0)})})(e[3],t,n):[],i=zj(e[1],t,n,!!o.length);return n.inline=!1,o.length?{align:r,cells:o,header:i,type:"25"}:{children:i,type:"21"}}function Lj(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function $a(e){return e.inline=1,e}function Ra(e){return $a(function(t,n){return n.inline?e.exec(t):null})}function Dg(e){return $a(function(t,n){return n.inline||n.simple?e.exec(t):null})}function Di(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function Fj(e){return $a(function(t){return e.exec(t)})}const wde=/(javascript|vbscript|data(?!:image)):/i;function xde(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(wde.test(t))return null}catch{return null}return e}function Hs(e){return e&&e.replace(ade,"$1")}function dy(e,t,n){const r=n.inline||!1,o=n.simple||!1;n.inline=!0,n.simple=!0;const i=e(t,n);return n.inline=r,n.simple=o,i}function Ede(e,t,n){const r=n.inline||!1,o=n.simple||!1;n.inline=!1,n.simple=!0;const i=e(t,n);return n.inline=r,n.simple=o,i}function _de(e,t,n){const r=n.inline||!1;n.inline=!1;const o=e(t,n);return n.inline=r,o}const Cde=(e,t,n)=>({children:dy(t,e[2],n)});function vS(){return{}}function Tde(...e){return e.filter(Boolean).join(" ")}function bS(e,t,n){let r=e;const o=t.split(".");for(;o.length&&(r=r[o[0]],r!==void 0);)o.shift();return r||n}function SS(e,t,n,r){if(!t||!t.trim())return null;const o=t.match(Ofe);return o?o.reduce(function(i,a){const c=a.indexOf("=");if(c!==-1){const u=(function(p){return p.indexOf("-")!==-1&&p.match(Bfe)===null&&(p=p.replace(Zfe,function(g,v){return v.toUpperCase()})),p})(a.slice(0,c)).trim(),f=Tj[u]||u;if(f==="ref")return i;const h=i[f]=(function(p,g,v,y){return g==="style"?(function(x){const w=[];if(!x)return w;let T="",b=0,_="";for(let C=0;C<x.length;C++){const E=x[C];if(E==='"'||E==="'")_?E===_&&(_="",b--):(_=E,b++);else if(E==="("&&T.endsWith("url"))b++;else if(E===")"&&b>0)b--;else if(E===";"&&b===0){const O=T.indexOf(":");O>0&&w.push([T.slice(0,O).trim(),T.slice(O+1).trim()]),T="";continue}T+=E}const S=T.indexOf(":");return S>0&&w.push([T.slice(0,S).trim(),T.slice(S+1).trim()]),w})(v).reduce(function(x,[w,T]){return x[w.replace(/(-[a-z])/g,b=>b[1].toUpperCase())]=y(T,p,w),x},{}):Rfe.indexOf(g)!==-1?y(Hs(v),p,g):(v.match(Hfe)&&(v=Hs(v.slice(1,v.length-1))),v==="true"||v!=="false"&&v)})(e,u,(function(p){const g=p[0];return(g==='"'||g==="'")&&p.length>=2&&p[p.length-1]===g?p.slice(1,-1):p})(a.slice(c+1).trim()),n);typeof h=="string"&&(r2.test(h)||vx.test(h))&&(i[f]=r(h.trim()))}else a!=="style"&&(i[Tj[a]||a]=!0);return i},{}):null}function Uj(e,t){for(let n=0;n<e.length;n++)if(e[n].test(t))return!0;return!1}function Rde(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?Gs({},Rj,t.namedCodesToUnicode):Rj;const n=t.slugify||Hd,r=t.sanitizer||xde,o=t.createElement||A.createElement,i=[Oj,Aj,kj,t.enforceAtxHeadings?jj:Mj,Pj,Dj,v9,b9],a=[...i,Yfe,r2,Nj,vx];function c(y,x,...w){const T=bS(t.overrides,y+".props",{});return o((function(b,_){const S=bS(_,b);return S?typeof S=="function"||typeof S=="object"&&"render"in S?S:bS(_,b+".component",b):b})(y,t.overrides),Gs({},x,T,{className:Tde(x?.className,T.className)||void 0}),...w)}function u(y){y=y.replace(Ffe,"");let x=!1;t.forceInline?x=!0:t.forceBlock||(x=Jfe.test(y)===!1);const w=g(x?y:ph(y).replace(cde,"")+`
|
|
73
|
+
|
|
74
|
+
`,{inline:x});if(t.ast)return w;const T=v(w);for(;Ij(T[T.length-1])&&!T[T.length-1].trim();)T.pop();if(f.length&&T.push(c("footer",{key:"footer"},f.map(function(S){return c("div",{id:n(S.identifier,Hd),key:S.identifier},S.identifier,v(g(S.footnote,{inline:!0})))}))),t.wrapper===null)return T;const b=t.wrapper||(x?"span":"div");let _;if(T.length>1||t.forceWrapper)_=T;else{if(T.length===1)return _=T[0],typeof _=="string"?c("span",{key:"outer"},_):_;_=null}return o(b,Gs({key:"outer"},t.wrapperProps),_)}const f=[],h={},p={0:{t:[">"],o:Di(Oj),u:1,i(y,x,w){const[,T,b]=y[0].replace(kfe,"").match(Mfe);return{alert:T,children:x(b,w)}}},1:{t:[" "],o:Ra(jfe),u:1,i:vS},2:{t:function(y,x){if(x.inline||x.simple)return!1;var w=y[0];return w==="-"||w==="*"||w==="_"},o:Di(Pfe),u:1,i:vS},3:{t:[" "],o:Di(kj),u:0,i:y=>({lang:void 0,text:Hs(ph(y[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:Di(Aj),u:0,i:y=>({attrs:SS("code",y[3]||"",r,u),lang:y[2]||void 0,text:y[4],type:"3"})},5:{t:["`"],o:Dg(Nfe),u:3,i:y=>({text:Hs(y[2])})},6:{t:["[^"],o:Di(Ife),u:0,i:y=>(f.push({footnote:y[2],identifier:y[1]}),{})},7:{t:["[^"],o:Ra(zfe),u:1,i:y=>({target:"#"+n(y[1],Hd),text:y[1]})},8:{t:["[ ]","[x]"],o:Ra(Ufe),u:1,i:y=>({completed:y[1].toLowerCase()==="x"})},9:{t:["#"],o:Di(t.enforceAtxHeadings?jj:Mj),u:1,i:(y,x,w)=>({children:dy(x,y[2],w),id:n(y[2],Hd),level:y[1].length})},10:{t:y=>{const x=y.indexOf(`
|
|
75
|
+
`);return x>0&&x<y.length-1&&(y[x+1]==="="||y[x+1]==="-")},o:Di(Pj),u:1,i:(y,x,w)=>({children:dy(x,y[1],w),level:y[2]==="="?1:2,type:"9"})},11:{t:["<"],o:$a(Vfe),u:1,i(y,x,w){const[,T]=y[3].match(ude),b=RegExp("^"+T,"gm"),_=y[3].replace(b,""),S=Uj(a,_)?_de:dy,C=y[1].toLowerCase(),E=Tfe.indexOf(C)!==-1,O=(E?C:y[1]).trim(),j={attrs:SS(O,y[2],r,u),noInnerParse:E,tag:O};if(w.inAnchor=w.inAnchor||C==="a",E)j.text=y[3];else{const P=w.inHTML;w.inHTML=!0,j.children=S(x,_,w),w.inHTML=P}return w.inAnchor=!1,j}},13:{t:["<"],o:Fj(vx),u:1,i(y){const x=y[1].trim();return{attrs:SS(x,y[2]||"",r,u),tag:x}}},12:{t:["<!--"],o:Fj(Nj),u:1,i:()=>({})},14:{t:["!["],o:Dg(yde),u:1,i:y=>({alt:Hs(y[1]),target:Hs(y[2]),title:Hs(y[3])})},15:{t:["["],o:Ra(gde),u:3,i:(y,x,w)=>({children:Ede(x,y[1],w),target:Hs(y[2]),title:Hs(y[3])})},16:{t:function(y,x){return!(!x.inline||x.inAnchor)&&y[0]==="<"&&(Bs(y,":")||Bs(y,"@")||Bs(y,"/"))},o:Ra(Gfe),u:0,i(y){let x=y[1],w=!1;return Bs(x,"@")&&!Bs(x,"//")&&(w=!0,x=x.replace("mailto:","")),{children:[{text:x,type:"27"}],target:w?"mailto:"+x:x,type:"15"}}},17:{t:(y,x)=>!x.inAnchor&&!t.disableAutoLink&&bx(y,"http"),o:Ra(Kfe),u:0,i:y=>({children:[{text:y[1],type:"27"}],target:y[1],title:void 0,type:"15"})},20:$j(0,1),30:$j(0,2),19:{t:[`
|
|
76
|
+
`],o:Di(Dfe),u:3,i:vS},21:{t:function(y,x){return!x.inline&&!x.simple},o:$a(function(y,x){if(x.inline||x.simple||x.inHTML&&!Bs(y,`
|
|
77
|
+
|
|
78
|
+
`)&&!Bs(x.prevCapture,`
|
|
79
|
+
|
|
80
|
+
`))return null;let w="",T=0;for(;;){const _=y.indexOf(`
|
|
81
|
+
`,T),S=y.slice(T,_===-1?void 0:_+1),C=y[T];if((C===">"||C==="#"||C==="|"||C==="`"||C==="~"||C==="*"||C==="-"||C==="_"||C===" ")&&Uj(i,S)||(w+=S,_===-1||!S.trim()))break;T=_+1}const b=ph(w);return b===""?null:[w,,b]}),u:3,i:Cde},22:{t:["["],o:Ra(Wfe),u:0,i:y=>(h[y[1]]={target:y[2],title:y[4]},{})},23:{t:["!["],o:Dg(Xfe),u:0,i:y=>({alt:y[1]?Hs(y[1]):void 0,ref:y[2]})},24:{t:y=>y[0]==="["&&!Bs(y,"]("),o:Ra(Qfe),u:0,i:(y,x,w)=>({children:x(y[1],w),fallbackChildren:y[0],ref:y[2]})},25:{t:["|"],o:Di(Dj),u:1,i:Sde},27:{o:$a(function(y,x){let w;return bx(y,":")&&(w=sde.exec(y)),w||lde.exec(y)}),u:4,i(y){const x=y[0];return{text:Bs(x,"&")?x.replace(qfe,(w,T)=>t.namedCodesToUnicode[T]||w):x}}},34:{t:["*","_","~","="],o:$a(_fe),u:2,i:(y,x,w)=>({children:x(y[2],w),tag:y[1]})},28:{t:["\\"],o:Dg(ide),u:1,i:y=>({text:y[1],type:"27"})}};t.disableParsingRawHTML===!0&&(delete p[11],delete p[13]);const g=(function(y){var x=Object.keys(y);function w(T,b){var _=[];if(b.prevCapture=b.prevCapture||"",T.trim())for(;T;)for(var S=0;S<x.length;){var C=x[S],E=y[C];if(!E.t||vde(T,b,E.t)){var O=E.o(T,b);if(O&&O[0]){T=T.substring(O[0].length);var j=E.i(O,w,b);b.prevCapture+=O[0],j.type||(j.type=C),_.push(j);break}S++}else S++}return b.prevCapture="",_}return x.sort(function(T,b){return y[T].u-y[b].u||(T<b?-1:1)}),function(T,b){return w((function(_){return _.replace($fe,`
|
|
82
|
+
`).replace(Lfe,"").replace(ede," ")})(T),b)}})(p),v=(function(y,x,w,T,b){function _(S){return Array.isArray(S)?S.map(C=>"text"in C?C.text:""):"text"in S?S.text:""}return function S(C,E={}){const O=(E.renderDepth||0)+1;if(O>2500)return _(C);E.renderDepth=O;try{if(Array.isArray(C)){const P=E.key,$=[];let I=!1;for(let L=0;L<C.length;L++){E.key=L;const F=S(C[L],E),J=Ij(F);J&&I?$[$.length-1]+=F:F!==null&&$.push(F),I=J}return E.key=P,E.renderDepth=O-1,$}const j=(function(P,$,I){const L=()=>(function(F,J,ee,Z,H,V,oe){switch(F.type){case"0":{const ne={key:ee.key};return F.alert&&(ne.className="markdown-alert-"+V(F.alert.toLowerCase(),Hd),F.children.unshift({attrs:{},children:[{type:"27",text:F.alert}],noInnerParse:!0,type:"11",tag:"header"})),Z("blockquote",ne,J(F.children,ee))}case"1":return Z("br",{key:ee.key});case"2":return Z("hr",{key:ee.key});case"3":return Z("pre",{key:ee.key},Z("code",Gs({},F.attrs,{className:F.lang?"lang-"+F.lang:""}),F.text));case"5":return Z("code",{key:ee.key},F.text);case"7":return Z("a",{key:ee.key,href:H(F.target,"a","href")},Z("sup",{key:ee.key},F.text));case"8":return Z("input",{checked:F.completed,key:ee.key,readOnly:!0,type:"checkbox"});case"9":return Z("h"+F.level,{id:F.id,key:ee.key},J(F.children,ee));case"11":return Z(F.tag,Gs({key:ee.key},F.attrs),F.text||(F.children?J(F.children,ee):""));case"13":return Z(F.tag,Gs({},F.attrs,{key:ee.key}));case"14":return Z("img",{key:ee.key,alt:F.alt||void 0,title:F.title||void 0,src:H(F.target,"img","src")});case"15":return Z("a",{key:ee.key,href:H(F.target,"a","href"),title:F.title},J(F.children,ee));case"23":return oe[F.ref]?Z("img",{key:ee.key,alt:F.alt,src:H(oe[F.ref].target,"img","src"),title:oe[F.ref].title}):null;case"24":return oe[F.ref]?Z("a",{key:ee.key,href:H(oe[F.ref].target,"a","href"),title:oe[F.ref].title},J(F.children,ee)):Z("span",{key:ee.key},F.fallbackChildren);case"25":{const ne=F;return Z("table",{key:ee.key},Z("thead",null,Z("tr",null,ne.header.map(function(D,q){return Z("th",{key:q,style:Lj(ne,q)},J(D,ee))}))),Z("tbody",null,ne.cells.map(function(D,q){return Z("tr",{key:q},D.map(function(U,N){return Z("td",{key:N,style:Lj(ne,N)},J(U,ee))}))})))}case"27":return F.text;case"34":return Z(F.tag,{key:ee.key},J(F.children,ee));case"20":case"30":return Z(F.ordered?"ol":"ul",{key:ee.key,start:F.type==="20"?F.start:void 0},F.items.map(function(ne,D){return Z("li",{key:D},J(ne,ee))}));case"19":return`
|
|
83
|
+
`;case"21":return Z("p",{key:ee.key},J(F.children,ee));default:return null}})(P,$,I,x,w,T,b);return y?y(L,P,$,I):L()})(C,S,E);return E.renderDepth=O-1,j}catch(j){if(j instanceof RangeError&&j.message.includes("Maximum call stack"))return _(C);throw j}}})(t.renderRule,c,r,n,h);return u(e)}const gp=e=>{let{children:t,options:n}=e,r=(function(o,i){if(o==null)return{};var a={};for(var c in o)if({}.hasOwnProperty.call(o,c)){if(i.indexOf(c)!==-1)continue;a[c]=o[c]}return a})(e,Cfe);return Rde(t??"",Gs({},n,{wrapperProps:Gs({},n?.wrapperProps,r)}))},S9=Symbol("remove-this-key"),Vj=Symbol("reset");function Ode(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function Ade(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(It.NewStringDefault)}}function kde(e){const{fieldPathId:t,schema:n,registry:r,uiSchema:o,errorSchema:i,formData:a,onChange:c,onBlur:u,onFocus:f,disabled:h,readonly:p,required:g,hideError:v,propertyName:y,handleKeyRename:x,handleRemoveProperty:w,addedByAdditionalProperties:T}=e,[b,_]=A.useState(!1),{globalFormOptions:S,fields:C}=r,{SchemaField:E}=C,O=Ac(ms(y,S,t.path)),j=A.useCallback((L,F,J,ee)=>{L===void 0&&T&&(L=""),c(L,F,J,ee)},[c,T]),P=A.useCallback(L=>{y!==L&&_(!0),x(y,L)},[y,x]),$=A.useCallback(L=>{const{target:{value:F}}=L;P(F)},[P]),I=A.useCallback(()=>{w(y)},[y,w]);return M.jsx(E,{name:y,required:g,schema:n,uiSchema:o,errorSchema:i,fieldPathId:O,formData:a,wasPropertyKeyModified:b,onKeyRename:P,onKeyRenameBlur:$,onRemoveProperty:I,onChange:j,onBlur:u,onFocus:f,registry:r,disabled:h,readonly:p,hideError:v})}function Mde(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:o,fieldPathId:i,name:a,required:c=!1,disabled:u,readonly:f,hideError:h,onBlur:p,onFocus:g,onChange:v,registry:y,title:x}=e,{fields:w,schemaUtils:T,translateString:b,globalUiOptions:_}=y,{OptionalDataControlsField:S}=w,C=T.retrieveSchema(t,r,!0),E=ft(n,_),{properties:O={}}=C,j=e.childFieldPathId??i,P=E.title??C.title??x??a,$=E.description??C.description,I=mp(y,C,c,n),L=Nf(r);let F=[];const J=A.useCallback((D,q)=>{const{duplicateKeySuffixSeparator:U="-"}=ft(n,_);let N=0,G=D;for(;Wt(q,G);)G=`${D}${U}${++N}`;return G},[n,_]),ee=A.useCallback(()=>{if(!(C.additionalProperties||C.patternProperties))return;const{translateString:D}=y,q={...r},U=J("newKey",q);if(C.patternProperties)mn(q,U,null);else{let N,G,te;if(nn(C.additionalProperties)){N=C.additionalProperties.type,G=C.additionalProperties.const,te=C.additionalProperties.default;let de=C.additionalProperties;if(Nn in de){const{schemaUtils:we}=y;de=we.retrieveSchema({[Nn]:de[Nn]},r),N=de.type,G=de.const,te=de.default}!N&&(en in de||Dt in de)&&(N="object")}const re=G??te??Ade(D,N);mn(q,U,re)}v(q,j.path)},[r,v,y,j,J,C]),Z=A.useCallback((D,q)=>{if(D!==q){const U=J(q,r),N={...r},G={[D]:U},te=Object.keys(N).map(de=>({[G[de]||de]:N[de]})),re=Object.assign({},...te);v(re,j.path)}},[r,v,j,J]),H=A.useCallback(D=>{v(S9,[...j.path,D])},[v,j]);if(!I||L)try{const D=Object.keys(O);F=Nue(D,E.order)}catch(D){return M.jsxs("div",{children:[M.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:M.jsx(gp,{options:{disableParsingRawHTML:!0},children:b(It.InvalidObjectField,[a||"root",D.message])})}),M.jsx("pre",{children:JSON.stringify(C)})]})}const V=gt("ObjectFieldTemplate",y,E),oe=I?M.jsx(S,{...e,fieldPathId:j,schema:C}):void 0,ne={title:E.label===!1?"":P,description:E.label===!1?void 0:$,properties:F.map(D=>{const q=Wt(C,[un,D,Fi]),U=q?n.additionalProperties:n[D],N=ft(U).widget==="hidden";return{content:M.jsx(kde,{propertyName:D,required:Ode(C,D),schema:Ie(C,[un,D],{}),uiSchema:U,errorSchema:Ie(o,[D]),fieldPathId:j,formData:Ie(r,[D]),handleKeyRename:Z,handleRemoveProperty:H,addedByAdditionalProperties:q,onChange:v,onBlur:p,onFocus:g,registry:y,disabled:u,readonly:f,hideError:h},D),name:D,readonly:f,disabled:u,required:c,hidden:N}}),readonly:f,disabled:u,required:c,fieldPathId:i,uiSchema:n,errorSchema:o,schema:C,formData:r,registry:y,optionalDataControl:oe,className:I?"rjsf-optional-object-field":void 0};return M.jsx(V,{...ne,onAddProperty:ee})}function jde(e){const{schema:t,uiSchema:n={},formData:r,disabled:o=!1,readonly:i=!1,onChange:a,errorSchema:c,fieldPathId:u,registry:f}=e,{globalUiOptions:h={},schemaUtils:p,translateString:g}=f,v=ft(n,h),y=gt("OptionalDataControlsTemplate",f,v),x=Nf(r);let w,T,b,_;if(o||i)w=pS(u,"Msg"),T=x?void 0:g(It.OptionalObjectEmptyMsg);else{const S=x?It.OptionalObjectRemove:It.OptionalObjectAdd;T=g(S),x?(w=pS(u,"Remove"),_=()=>a(void 0,u.path,c)):(w=pS(u,"Add"),b=()=>{let C=p.getDefaultFormState(t,r,"excludeObjectChildren");C===void 0&&(C=js(t)==="array"?[]:{}),a(C,u.path,c)})}return T&&M.jsx(y,{id:w,registry:f,schema:t,uiSchema:n,label:T,onAddClick:b,onRemoveClick:_})}const Pde={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function Nde(e,t,n){const r=t.field,{fields:o}=n;if(typeof r=="function")return r;if(typeof r=="string"&&r in o)return o[r];const i=js(e),a=Array.isArray(i)?i[0]:i||"",c=e.$id;let u=Pde[a];return c&&c in o&&(u=c),!u&&(e.anyOf||e.oneOf)?()=>null:u in o?o[u]:o.FallbackField}function Dde(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:o,errorSchema:i,name:a,onChange:c,onKeyRename:u,onKeyRenameBlur:f,onRemoveProperty:h,required:p=!1,registry:g,wasPropertyKeyModified:v=!1}=e,{schemaUtils:y,globalFormOptions:x,globalUiOptions:w,fields:T}=g,{AnyOfField:b,OneOfField:_}=T,S=ft(r,w),C=gt("FieldTemplate",g,S),E=gt("DescriptionFieldTemplate",g,S),O=gt("FieldHelpTemplate",g,S),j=gt("FieldErrorTemplate",g,S),P=y.retrieveSchema(t,o),$=n[Tn],I=A.useCallback((ye,De,Ue,ve)=>c(ye,De,Ue,ve||$),[$,c]),L=Nde(P,S,g),F=!!(S.disabled??e.disabled),J=!!(S.readonly??(e.readonly||e.schema.readOnly||P.readOnly)),ee=S.hideError,Z=ee===void 0?e.hideError:!!ee,H=!!(S.autofocus??e.autofocus);if(Object.keys(P).length===0)return null;let V=y.getDisplayLabel(P,r,w);const oe=S.field&&S.fieldReplacesAnyOrOneOf===!0;let ne,D,q={fieldPathId:n};if((en in P||Dt in P)&&!oe&&!y.isSelect(P)){P[en]?(ne=b,D=P[en].map(Ue=>y.retrieveSchema(nn(Ue)?Ue:{},o))):P[Dt]&&(ne=_,D=P[Dt].map(Ue=>y.retrieveSchema(nn(Ue)?Ue:{},o)));const ye=mp(g,P,p,r),De=Nf(o);V=V&&(!ye||De),q={childFieldPathId:n,fieldPathId:ms("XxxOf",x,n)}}const{__errors:U,...N}=i||{},G=Eh(r,["ui:classNames","classNames","ui:style"]);Ua in G&&(G[Ua]=Eh(G[Ua],["classNames","style"]));const te=M.jsx(L,{...e,onChange:I,...q,schema:P,uiSchema:G,disabled:F,readonly:J,hideError:Z,autofocus:H,errorSchema:N,rawErrors:U}),re=n[Tn];let de;v?de=a:de=Fi in P?a:S.title||e.schema.title||P.title||e.title||a;const we=S.description||e.schema.description||P.description||"",Ee=S.help,se=S.widget==="hidden",X=["rjsf-field",`rjsf-field-${js(P)}`];!Z&&U&&U.length>0&&X.push("rjsf-field-error"),S.classNames&&X.push(S.classNames);const fe=M.jsx(O,{help:Ee,fieldPathId:n,schema:P,uiSchema:r,hasErrors:!Z&&U&&U.length>0,registry:g}),he=Z||ne&&!y.isSelect(P)?void 0:M.jsx(j,{errors:U,errorSchema:i,fieldPathId:n,schema:P,uiSchema:r,registry:g}),Pe={description:M.jsx(E,{id:Oc(re),description:we,schema:P,uiSchema:r,registry:g}),rawDescription:we,help:fe,rawHelp:typeof Ee=="string"?Ee:void 0,errors:he,rawErrors:Z?void 0:U,fieldPathId:n,id:re,label:de,hidden:se,onChange:c,onKeyRename:u,onKeyRenameBlur:f,onRemoveProperty:h,required:p,disabled:F,readonly:J,hideError:Z,displayLabel:V,classNames:X.join(" ").trim(),style:S.style,formData:o,schema:P,uiSchema:r,registry:g};return M.jsx(C,{...Pe,children:M.jsxs(M.Fragment,{children:[te,ne&&M.jsx(ne,{name:a,disabled:F,readonly:J,hideError:Z,errorSchema:i,formData:o,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:D,registry:g,required:p,schema:P,uiSchema:r})]})})}class $de extends A.Component{shouldComponentUpdate(t){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:r="customDeep"}=n;return i9(this,t,this.state,r)}render(){return M.jsx(Dde,{...this.props})}}function Ide(e){const{schema:t,name:n,uiSchema:r,fieldPathId:o,formData:i,required:a,disabled:c=!1,readonly:u=!1,autofocus:f=!1,onChange:h,onBlur:p,onFocus:g,registry:v,rawErrors:y,hideError:x,title:w}=e,{title:T,format:b}=t,{widgets:_,schemaUtils:S,globalUiOptions:C}=v,E=S.isSelect(t)?uf(t,r):void 0;let O=E?"select":"text";b&&Mue(t,b,_)&&(O=b);const{widget:j=O,placeholder:P="",title:$,...I}=ft(r),L=S.getDisplayLabel(t,r,C),F=$??w??T??n,J=si(t,j,_),ee=A.useCallback((Z,H,V)=>h(Z,o.path,H,V),[h,o]);return M.jsx(J,{options:{...I,enumOptions:E},schema:t,uiSchema:r,id:o.$id,name:n,label:F,hideLabel:!L,hideError:x,value:i,onChange:ee,onBlur:p,onFocus:g,required:a,disabled:c,readonly:u,autofocus:f,registry:v,placeholder:P,rawErrors:y,htmlName:o.name})}function zde(e){const{formData:t,onChange:n,fieldPathId:r}=e;return A.useEffect(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}function Lde(){return{AnyOfField:_j,ArrayField:efe,BooleanField:tfe,FallbackField:sfe,LayoutGridField:n2,LayoutHeaderField:vfe,LayoutMultiSchemaField:bfe,NumberField:xfe,ObjectField:Mde,OneOfField:_j,OptionalDataControlsField:jde,SchemaField:$de,StringField:Ide,NullField:zde}}function Fde(e){const{fieldPathId:t,description:n,registry:r,schema:o,uiSchema:i}=e,a=ft(i,r.globalUiOptions),{label:c=!0}=a;if(!n||!c)return null;const u=gt("DescriptionFieldTemplate",r,a);return M.jsx(u,{id:Oc(t),description:n,schema:o,uiSchema:i,registry:r})}function Ude(e){const{children:t,className:n,buttonsProps:r,displayLabel:o,hasDescription:i,hasToolbar:a,registry:c,uiSchema:u}=e,f=ft(u),h=gt("ArrayFieldItemButtonsTemplate",c,f),p={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},g=i?31:9,v={display:"flex",alignItems:o?"center":"baseline"},y={display:"flex",justifyContent:"flex-end",marginTop:o?`${g}px`:0};return M.jsxs("div",{className:n,style:v,children:[M.jsx("div",{className:a?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:t}),a&&M.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:M.jsx("div",{className:"btn-group",style:y,children:M.jsx(h,{...r,style:p})})})]})}function Vde(e){const{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:o,hasRemove:i,fieldPathId:a,onCopyItem:c,onRemoveItem:u,onMoveDownItem:f,onMoveUpItem:h,readonly:p,registry:g,uiSchema:v}=e,{CopyButton:y,MoveDownButton:x,MoveUpButton:w,RemoveButton:T}=g.templates.ButtonTemplates;return M.jsxs(M.Fragment,{children:[(o||r)&&M.jsx(w,{id:Qs(a,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||p||!o,onClick:h,uiSchema:v,registry:g}),(o||r)&&M.jsx(x,{id:Qs(a,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||p||!r,onClick:f,uiSchema:v,registry:g}),n&&M.jsx(y,{id:Qs(a,"copy"),className:"rjsf-array-item-copy",disabled:t||p,onClick:c,uiSchema:v,registry:g}),i&&M.jsx(T,{id:Qs(a,"remove"),className:"rjsf-array-item-remove",disabled:t||p,onClick:u,uiSchema:v,registry:g})]})}function qde(e){const{canAdd:t,className:n,disabled:r,fieldPathId:o,uiSchema:i,items:a,optionalDataControl:c,onAddClick:u,readonly:f,registry:h,required:p,schema:g,title:v}=e,y=ft(i),x=gt("ArrayFieldDescriptionTemplate",h,y),w=gt("ArrayFieldTitleTemplate",h,y),T=!f&&!r,{ButtonTemplates:{AddButton:b}}=h.templates;return M.jsxs("fieldset",{className:n,id:o.$id,children:[M.jsx(w,{fieldPathId:o,title:y.title||v,required:p,schema:g,uiSchema:i,registry:h,optionalDataControl:T?c:void 0}),M.jsx(x,{fieldPathId:o,description:y.description||g.description,schema:g,uiSchema:i,registry:h}),T?void 0:c,M.jsx("div",{className:"row array-item-list",children:a}),t&&M.jsx(b,{id:Qs(o,"add"),className:"rjsf-array-item-add",onClick:u,disabled:r||f,uiSchema:i,registry:h})]})}function Bde(e){const{fieldPathId:t,title:n,schema:r,uiSchema:o,required:i,registry:a,optionalDataControl:c}=e,u=ft(o,a.globalUiOptions),{label:f=!0}=u;if(!n||!f)return null;const h=gt("TitleFieldTemplate",a,u);return M.jsx(h,{id:I0(t),title:n,required:i,schema:r,uiSchema:o,registry:a,optionalDataControl:c})}function Hde(e){const{id:t,name:n,htmlName:r,value:o,readonly:i,disabled:a,autofocus:c,onBlur:u,onFocus:f,onChange:h,onChangeOverride:p,options:g,schema:v,uiSchema:y,registry:x,rawErrors:w,type:T,hideLabel:b,hideError:_,...S}=e,{ClearButton:C}=x.templates.ButtonTemplates;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const E={...S,...r9(v,T,g)};let O;E.type==="number"||E.type==="integer"?O=o||o===0?o:"":O=o??"";const j=A.useCallback(({target:{value:L}})=>h(L===""?g.emptyValue:L),[h,g]),P=A.useCallback(({target:L})=>u(t,L&&L.value),[u,t]),$=A.useCallback(({target:L})=>f(t,L&&L.value),[f,t]),I=A.useCallback(L=>{L.preventDefault(),L.stopPropagation(),h(g.emptyValue??"")},[h,g.emptyValue]);return M.jsxs(M.Fragment,{children:[M.jsx("input",{id:t,name:r||t,className:"form-control",readOnly:i,disabled:a,autoFocus:c,value:O,...E,list:v.examples?$h(t):void 0,onChange:p||j,onBlur:P,onFocus:$,"aria-describedby":Oo(t,!!v.examples)}),g.allowClearTextInputs&&!i&&!a&&O&&M.jsx(C,{registry:x,onClick:I}),Array.isArray(v.examples)&&M.jsx("datalist",{id:$h(t),children:v.examples.concat(v.default&&!v.examples.includes(v.default)?[v.default]:[]).map(L=>M.jsx("option",{value:L},L))},`datalist_${t}`)]})}function Kde({uiSchema:e}){const{submitText:t,norender:n,props:r={}}=o9(e);return n?null:M.jsx("div",{children:M.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:t})})}function rl(e){const{iconType:t="default",icon:n,className:r,uiSchema:o,registry:i,...a}=e;return M.jsx("button",{type:"button",className:`btn btn-${t} ${r}`,...a,children:M.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function Gde(e){const{registry:{translateString:t}}=e;return M.jsx(rl,{title:t(It.CopyButton),...e,icon:"copy"})}function Zde(e){const{registry:{translateString:t}}=e;return M.jsx(rl,{title:t(It.MoveDownButton),...e,icon:"arrow-down"})}function Yde(e){const{registry:{translateString:t}}=e;return M.jsx(rl,{title:t(It.MoveUpButton),...e,icon:"arrow-up"})}function Wde(e){const{registry:{translateString:t}}=e;return M.jsx(rl,{title:t(It.RemoveButton),...e,iconType:"danger",icon:"remove"})}function Xde({id:e,className:t,onClick:n,disabled:r,registry:o,...i}){const{translateString:a}=o;return M.jsx(rl,{id:e,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:a(It.ClearButton),onClick:n,disabled:r,registry:o,...i})}function Qde({id:e,className:t,onClick:n,disabled:r,registry:o}){const{translateString:i}=o;return M.jsx("div",{className:"row",children:M.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:M.jsx(rl,{id:e,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:i(It.AddButton),onClick:n,disabled:r,registry:o})})})}function Jde(){return{SubmitButton:Kde,AddButton:Qde,CopyButton:Gde,MoveDownButton:Zde,MoveUpButton:Yde,RemoveButton:Wde,ClearButton:Xde}}const w9=W_();function i2({description:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return ft(n,r).enableMarkdownInDescription&&typeof e=="string"?M.jsx(gp,{options:{disableParsingRawHTML:!0},"data-testid":w9.markdown,children:e}):e}i2.TEST_IDS=w9;function ehe(e){const{id:t,description:n,registry:r,uiSchema:o}=e;return n?M.jsx("div",{id:t,className:"field-description",children:M.jsx(i2,{description:n,registry:r,uiSchema:o})}):null}function the({errors:e,registry:t}){const{translateString:n}=t;return M.jsxs("div",{className:"panel panel-danger errors",children:[M.jsx("div",{className:"panel-heading",children:M.jsx("h3",{className:"panel-title",children:n(It.ErrorsLabel)})}),M.jsx("ul",{className:"list-group",children:e.map((r,o)=>M.jsx("li",{className:"list-group-item text-danger",children:r.stack},o))})]})}function nhe(e){const{schema:t,registry:n,typeSelector:r,schemaField:o}=e,i=gt("MultiSchemaFieldTemplate",n);return M.jsx(i,{selector:r,optionSchemaField:o,schema:t,registry:n})}const rhe="*";function x9(e){const{label:t,required:n,id:r}=e;return t?M.jsxs("label",{className:"control-label",htmlFor:r,children:[t,n&&M.jsx("span",{className:"required",children:rhe})]}):null}function ohe(e){const{id:t,label:n,children:r,errors:o,help:i,description:a,hidden:c,required:u,displayLabel:f,registry:h,uiSchema:p}=e,g=ft(p),v=gt("WrapIfAdditionalTemplate",h,g);if(c)return M.jsx("div",{className:"hidden",children:r});const y=g.widget==="checkbox";return M.jsxs(v,{...e,children:[f&&!y&&M.jsx(x9,{label:n,required:u,id:t}),f&&a?a:null,r,o,i]})}function she(e){const{errors:t=[],fieldPathId:n}=e;if(t.length===0)return null;const r=X_(n);return M.jsx("div",{children:M.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:t.filter(o=>!!o).map((o,i)=>M.jsx("li",{className:"text-danger",children:o},i))})})}const E9=W_();function a2({help:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return ft(n,r).enableMarkdownInHelp&&typeof e=="string"?M.jsx(gp,{options:{disableParsingRawHTML:!0},"data-testid":E9.markdown,children:e}):e}a2.TEST_IDS=E9;function ihe(e){const{fieldPathId:t,help:n,uiSchema:r,registry:o}=e;return n?M.jsx("div",{id:Q_(t),className:"help-block",children:M.jsx(a2,{help:n,registry:o,uiSchema:r})}):null}function ahe(e){const{children:t,column:n,className:r,...o}=e;return M.jsx("div",{className:r,...o,children:t})}function lhe(e){const{selector:t,optionSchemaField:n}=e;return M.jsxs("div",{className:"panel panel-default panel-body",children:[M.jsx("div",{className:"form-group",children:t}),n]})}function che(e){const{className:t,description:n,disabled:r,formData:o,fieldPathId:i,onAddProperty:a,optionalDataControl:c,properties:u,readonly:f,registry:h,required:p,schema:g,title:v,uiSchema:y}=e,x=ft(y),w=gt("TitleFieldTemplate",h,x),T=gt("DescriptionFieldTemplate",h,x);if((g.oneOf||g.anyOf)&&!g.properties&&u.length===0)return null;const _=!f&&!r,{ButtonTemplates:{AddButton:S}}=h.templates;return M.jsxs("fieldset",{className:t,id:i.$id,children:[v&&M.jsx(w,{id:I0(i),title:v,required:p,schema:g,uiSchema:y,registry:h,optionalDataControl:_?c:void 0}),n&&M.jsx(T,{id:Oc(i),description:n,schema:g,uiSchema:y,registry:h}),_?void 0:c,u.map(C=>C.content),AI(g,y,o)&&M.jsx(S,{id:Qs(i,"add"),className:"rjsf-object-property-expand",onClick:a,disabled:r||f,uiSchema:y,registry:h})]})}function uhe(e){const{id:t,registry:n,label:r,onAddClick:o,onRemoveClick:i}=e;return o?M.jsx(rl,{id:t,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:o,title:r}):i?M.jsx(rl,{id:t,registry:n,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:i,title:r}):M.jsx("em",{id:t,children:r})}const fhe="*";function dhe(e){const{id:t,title:n,required:r,optionalDataControl:o}=e;return M.jsxs("legend",{id:t,children:[n,r&&M.jsx("span",{className:"required",children:fhe}),o&&M.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:o})]})}function hhe(e){const{schema:t,fieldPathId:n,reason:r,registry:o}=e,{translateString:i}=o;let a=It.UnsupportedField;const c=[];return n&&n.$id&&(a=It.UnsupportedFieldWithId,c.push(n.$id)),r&&(a=a===It.UnsupportedField?It.UnsupportedFieldWithReason:It.UnsupportedFieldWithIdAndReason,c.push(r)),M.jsxs("div",{className:"unsupported-field",children:[M.jsx("p",{children:M.jsx(gp,{options:{disableParsingRawHTML:!0},children:i(a,c)})}),t&&M.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function phe(e){const{id:t,classNames:n,style:r,disabled:o,displayLabel:i,label:a,onKeyRenameBlur:c,onRemoveProperty:u,rawDescription:f,readonly:h,required:p,schema:g,hideError:v,rawErrors:y,children:x,uiSchema:w,registry:T}=e,{templates:b,translateString:_}=T,{RemoveButton:S}=b.ButtonTemplates,C=_(It.KeyLabel,[a]),E=Fi in g,O=!!f,j=["form-group",n];!v&&y&&y.length>0&&j.push("has-error has-danger");const P=j.join(" ").trim();if(!E)return M.jsx("div",{className:P,style:r,children:x});const $=O?46:26;return M.jsx("div",{className:P,style:r,children:M.jsxs("div",{className:"row",children:[M.jsx("div",{className:"col-xs-5 form-additional",children:M.jsxs("div",{className:"form-group",children:[i&&M.jsx(x9,{label:C,required:p,id:`${t}-key`}),i&&f&&M.jsx("div",{children:" "}),M.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:c,defaultValue:a})]})}),M.jsx("div",{className:"form-additional form-group col-xs-5",children:x}),M.jsx("div",{className:"col-xs-2",style:{marginTop:i?`${$}px`:void 0},children:M.jsx(S,{id:Qs(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:o||h,onClick:u,uiSchema:w,registry:T})})]})})}function mhe(){return{ArrayFieldDescriptionTemplate:Fde,ArrayFieldItemTemplate:Ude,ArrayFieldItemButtonsTemplate:Vde,ArrayFieldTemplate:qde,ArrayFieldTitleTemplate:Bde,ButtonTemplates:Jde(),BaseInputTemplate:Hde,DescriptionFieldTemplate:ehe,ErrorListTemplate:the,FallbackFieldTemplate:nhe,FieldTemplate:ohe,FieldErrorTemplate:she,FieldHelpTemplate:ihe,GridTemplate:ahe,MultiSchemaFieldTemplate:lhe,ObjectFieldTemplate:che,OptionalDataControlsTemplate:uhe,TitleFieldTemplate:dhe,UnsupportedFieldTemplate:hhe,WrapIfAdditionalTemplate:phe}}function ghe(e){const{disabled:t=!1,readonly:n=!1,autofocus:r=!1,options:o,id:i,name:a,registry:c,onBlur:u,onFocus:f}=e,{translateString:h}=c,{elements:p,handleChange:g,handleClear:v,handleSetNow:y}=zue(e);return M.jsxs("ul",{className:"list-inline",children:[p.map((x,w)=>M.jsx("li",{className:"list-inline-item",children:M.jsx(Iue,{rootId:i,name:a,select:g,...x,disabled:t,readonly:n,registry:c,onBlur:u,onFocus:f,autofocus:r&&w===0})},w)),(o.hideNowButton!=="undefined"?!o.hideNowButton:!0)&&M.jsx("li",{className:"list-inline-item",children:M.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:y,children:h(It.NowLabel)})}),(o.hideClearButton!=="undefined"?!o.hideClearButton:!0)&&M.jsx("li",{className:"list-inline-item",children:M.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:v,children:h(It.ClearLabel)})})]})}function yhe({time:e=!0,...t}){const{AltDateWidget:n}=t.registry.widgets;return M.jsx(n,{time:e,...t})}function vhe({schema:e,uiSchema:t,options:n,id:r,value:o,disabled:i,readonly:a,label:c,hideLabel:u,autofocus:f=!1,onBlur:h,onFocus:p,onChange:g,registry:v,htmlName:y}){const x=gt("DescriptionFieldTemplate",v,n),w=dh(e),T=A.useCallback(O=>g(O.target.checked),[g]),b=A.useCallback(O=>h(r,O.target.checked),[h,r]),_=A.useCallback(O=>p(r,O.target.checked),[p,r]),E=ft(t).widget==="checkbox"?void 0:n.description??e.description;return M.jsxs("div",{className:`checkbox ${i||a?"disabled":""}`,children:[!u&&E&&M.jsx(x,{id:Oc(r),description:E,schema:e,uiSchema:t,registry:v}),M.jsxs("label",{children:[M.jsx("input",{type:"checkbox",id:r,name:y||r,checked:typeof o>"u"?!1:o,required:w,disabled:i||a,autoFocus:f,onChange:T,onBlur:b,onFocus:_,"aria-describedby":Oo(r)}),s9(M.jsx("span",{children:c}),u)]})]})}function bhe({id:e,disabled:t,options:{inline:n=!1,enumOptions:r,enumDisabled:o,emptyValue:i},value:a,autofocus:c=!1,readonly:u,onChange:f,onBlur:h,onFocus:p,htmlName:g}){const v=Array.isArray(a)?a:[a],y=A.useCallback(({target:w})=>h(e,jr(w&&w.value,r,i)),[h,e,r,i]),x=A.useCallback(({target:w})=>p(e,jr(w&&w.value,r,i)),[p,e,r,i]);return M.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(r)&&r.map((w,T)=>{const b=pp(w.value,v),_=Array.isArray(o)&&o.indexOf(w.value)!==-1,S=t||_||u?"disabled":"",C=O=>{O.target.checked?f(e9(T,v,r)):f(QI(T,v,r))},E=M.jsxs("span",{children:[M.jsx("input",{type:"checkbox",id:oc(e,T),name:g||e,checked:b,value:String(T),disabled:t||_||u,autoFocus:c&&T===0,onChange:C,onBlur:y,onFocus:x,"aria-describedby":Oo(e)}),M.jsx("span",{children:w.label})]});return n?M.jsx("label",{className:`checkbox-inline ${S}`,children:E},T):M.jsx("div",{className:`checkbox ${S}`,children:M.jsx("label",{children:E})},T)})})}function She(e){const{disabled:t,readonly:n,options:r,registry:o}=e,i=gt("BaseInputTemplate",o,r);return M.jsx(i,{type:"color",...e,disabled:t||n})}function whe(e){const{onChange:t,options:n,registry:r}=e,o=gt("BaseInputTemplate",r,n),i=A.useCallback(a=>t(a||void 0),[t]);return M.jsx(o,{type:"date",...e,onChange:i})}function xhe(e){const{onChange:t,value:n,options:r,registry:o}=e,i=gt("BaseInputTemplate",o,r);return M.jsx(i,{type:"datetime-local",...e,value:que(n),onChange:a=>t(Pue(a))})}function Ehe(e){const{options:t,registry:n}=e,r=gt("BaseInputTemplate",n,t);return M.jsx(r,{type:"email",...e})}function _he({fileInfo:e,registry:t}){const{translateString:n}=t,{dataURL:r,type:o,name:i}=e;return r?["image/jpeg","image/png"].includes(o)?M.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):M.jsxs(M.Fragment,{children:[" ",M.jsx("a",{download:`preview-${i}`,href:r,className:"file-download",children:n(It.PreviewLabel)})]}):null}function Che({filesInfo:e,registry:t,preview:n,onRemove:r,options:o}){if(e.length===0)return null;const{translateString:i}=t,{RemoveButton:a}=gt("ButtonTemplates",t,o);return M.jsx("ul",{className:"file-info",children:e.map((c,u)=>{const{name:f,size:h,type:p}=c,g=()=>r(u);return M.jsxs("li",{children:[M.jsx(gp,{children:i(It.FilesInfo,[f,p,String(h)])}),n&&M.jsx(_he,{fileInfo:c,registry:t}),M.jsx(a,{onClick:g,registry:t})]},u)})})}function The(e){const{disabled:t,readonly:n,required:r,multiple:o,onChange:i,value:a,options:c,registry:u}=e,{filesInfo:f,handleChange:h,handleRemove:p}=Vue(a,i,o),g=gt("BaseInputTemplate",u,c),v=y=>{y.target.files&&h(y.target.files)};return M.jsxs("div",{children:[M.jsx(g,{...e,disabled:t||n,type:"file",required:a?!1:r,onChangeOverride:v,value:"",accept:c.accept?String(c.accept):void 0}),M.jsx(Che,{filesInfo:f,onRemove:p,registry:u,preview:c.filePreview,options:c})]})}function Rhe({id:e,value:t,htmlName:n}){return M.jsx("input",{type:"hidden",id:e,name:n||e,value:typeof t>"u"?"":t})}function Ohe(e){const{options:t,registry:n}=e,r=gt("BaseInputTemplate",n,t);return M.jsx(r,{type:"password",...e})}function Ahe({options:e,value:t,required:n,disabled:r,readonly:o,autofocus:i=!1,onBlur:a,onFocus:c,onChange:u,id:f,htmlName:h}){const{enumOptions:p,enumDisabled:g,inline:v,emptyValue:y}=e,x=A.useCallback(({target:T})=>a(f,jr(T&&T.value,p,y)),[a,p,y,f]),w=A.useCallback(({target:T})=>c(f,jr(T&&T.value,p,y)),[c,p,y,f]);return M.jsx("div",{className:"field-radio-group",id:f,role:"radiogroup",children:Array.isArray(p)&&p.map((T,b)=>{const _=pp(T.value,t),S=Array.isArray(g)&&g.indexOf(T.value)!==-1,C=r||S||o?"disabled":"",E=()=>u(T.value),O=M.jsxs("span",{children:[M.jsx("input",{type:"radio",id:oc(f,b),checked:_,name:h||f,required:n,value:String(b),disabled:r||S||o,autoFocus:i&&b===0,onChange:E,onBlur:x,onFocus:w,"aria-describedby":Oo(f)}),M.jsx("span",{children:T.label})]});return v?M.jsx("label",{className:`radio-inline ${C}`,children:O},b):M.jsx("div",{className:`radio ${C}`,children:M.jsx("label",{children:O})},b)})})}function khe(e){const{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return M.jsxs("div",{className:"field-range-wrapper",children:[M.jsx(n,{type:"range",...e}),M.jsx("span",{className:"range-view",children:t})]})}function Mhe({id:e,value:t,required:n,disabled:r,readonly:o,autofocus:i,onChange:a,onFocus:c,onBlur:u,schema:f,options:h,htmlName:p}){const{stars:g=5,shape:v="star"}=h,y=f.maximum?Math.min(f.maximum,5):Math.min(Math.max(g,1),5),x=f.minimum||0,w=A.useCallback(S=>{!r&&!o&&a(S)},[a,r,o]),T=A.useCallback(S=>{if(c){const C=Number(S.target.dataset.value);c(e,C)}},[c,e]),b=A.useCallback(S=>{if(u){const C=Number(S.target.dataset.value);u(e,C)}},[u,e]),_=S=>v==="heart"?S?"♥":"♡":S?"★":"☆";return M.jsx(M.Fragment,{children:M.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:r||o?"default":"pointer"},children:[[...Array(y)].map((S,C)=>{const E=x+C,O=E<=t;return M.jsx("span",{onClick:()=>w(E),onFocus:T,onBlur:b,"data-value":E,tabIndex:r||o?-1:0,role:"radio","aria-checked":E===t,"aria-label":`${E} ${v==="heart"?"heart":"star"}${E===1?"":"s"}`,style:{color:O?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:_(O)},C)}),M.jsx("input",{type:"hidden",id:e,name:p||e,value:t||"",required:n,disabled:r||o,"aria-hidden":"true"})]})})}function wS(e,t){return t?Array.from(e.target.options).slice().filter(n=>n.selected).map(n=>n.value):e.target.value}function jhe({schema:e,id:t,options:n,value:r,required:o,disabled:i,readonly:a,multiple:c=!1,autofocus:u=!1,onChange:f,onBlur:h,onFocus:p,placeholder:g,htmlName:v}){const{enumOptions:y,enumDisabled:x,emptyValue:w}=n,T=c?[]:"",b=A.useCallback(O=>{const j=wS(O,c);return p(t,jr(j,y,w))},[p,t,c,y,w]),_=A.useCallback(O=>{const j=wS(O,c);return h(t,jr(j,y,w))},[h,t,c,y,w]),S=A.useCallback(O=>{const j=wS(O,c);return f(jr(j,y,w))},[f,c,y,w]),C=JI(r,y,c),E=!c&&e.default===void 0;return M.jsxs("select",{id:t,name:v||t,multiple:c,role:"combobox",className:"form-control",value:typeof C>"u"?T:C,required:o,disabled:i||a,autoFocus:u,onBlur:_,onFocus:b,onChange:S,"aria-describedby":Oo(t),children:[E&&M.jsx("option",{value:"",children:g}),Array.isArray(y)&&y.map(({value:O,label:j},P)=>{const $=x&&x.indexOf(O)!==-1;return M.jsx("option",{value:String(P),disabled:$,children:j},P)})]})}function Phe({id:e,options:t={},placeholder:n,value:r,required:o,disabled:i,readonly:a,autofocus:c=!1,onChange:u,onBlur:f,onFocus:h,htmlName:p}){const g=A.useCallback(({target:{value:x}})=>u(x===""?t.emptyValue:x),[u,t.emptyValue]),v=A.useCallback(({target:x})=>f(e,x&&x.value),[f,e]),y=A.useCallback(({target:x})=>h(e,x&&x.value),[e,h]);return M.jsx("textarea",{id:e,name:p||e,className:"form-control",value:r||"",placeholder:n,required:o,disabled:i,readOnly:a,autoFocus:c,rows:t.rows,onBlur:v,onFocus:y,onChange:g,"aria-describedby":Oo(e)})}function Nhe(e){const{options:t,registry:n}=e,r=gt("BaseInputTemplate",n,t);return M.jsx(r,{...e})}function Dhe(e){const{onChange:t,options:n,registry:r}=e,o=gt("BaseInputTemplate",r,n),i=A.useCallback(a=>t(a?`${a}:00`:void 0),[t]);return M.jsx(o,{type:"time",...e,onChange:i})}function $he(e){const{options:t,registry:n}=e,r=gt("BaseInputTemplate",n,t);return M.jsx(r,{type:"url",...e})}function Ihe(e){const{options:t,registry:n}=e,r=gt("BaseInputTemplate",n,t);return M.jsx(r,{type:"number",...e})}function zhe(){return{AltDateWidget:ghe,AltDateTimeWidget:yhe,CheckboxWidget:vhe,CheckboxesWidget:bhe,ColorWidget:She,DateWidget:whe,DateTimeWidget:xhe,EmailWidget:Ehe,FileWidget:The,HiddenWidget:Rhe,PasswordWidget:Ohe,RadioWidget:Ahe,RangeWidget:khe,RatingWidget:Mhe,SelectWidget:jhe,TextWidget:Nhe,TextareaWidget:Phe,TimeWidget:Dhe,UpDownWidget:Ihe,URLWidget:$he}}function Lhe(){return{fields:Lde(),templates:mhe(),widgets:zhe(),rootSchema:{},formContext:{},translateString:xue,globalFormOptions:{idPrefix:TI,idSeparator:RI,useFallbackUiForUnsupportedType:!1}}}function bu(e,t){return{...xE(e,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...t!==void 0&&{status:t}}}class Fhe extends A.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;constructor(t){if(super(t),!t.validator)throw new Error("A validator is required for Form functionality to work");const{formData:n,initialFormData:r,onChange:o}=t,i=n??r;this.state=this.getStateFromProps(t,i,void 0,void 0,void 0,!0),o&&!Pn(this.state.formData,i)&&o(bu(this.state)),this.formElement=A.createRef()}getSnapshotBeforeUpdate(t,n){if(!Pn(this.props,t)){const r=dj(this.props.formData,t.formData),o=dj(this.props.formData,this.state.formData),i=!Pn(t.schema,this.props.schema),a=r.length>0||!Pn(t.formData,this.props.formData),c=o.length>0||!Pn(this.state.formData,this.props.formData),u=this.getStateFromProps(this.props,this.props.formData,i||a?void 0:this.state.retrievedSchema,i,r,!c),f=!Pn(u,n);return{nextState:u,shouldUpdate:f}}return{shouldUpdate:!1}}componentDidUpdate(t,n,r){if(r.shouldUpdate){const{nextState:o}=r,i=!Pn(o.formData,this.props.formData),a=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,a&&i)return;i&&!Pn(o.formData,n.formData)&&this.props.onChange&&this.props.onChange(bu(o)),this.setState(o)}}getStateFromProps(t,n,r,o=!1,i=[],a=!1){const c=this.state||{},u="schema"in t?t.schema:this.props.schema,f="validator"in t?t.validator:this.props.validator,h=("uiSchema"in t?t.uiSchema:this.props.uiSchema)||{},p=t.formData===void 0&&this.props.formData===void 0,g=typeof n<"u",v="liveValidate"in t?t.liveValidate:this.props.liveValidate,y=g&&!t.noValidate&&v,x="experimental_defaultFormStateBehavior"in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,w="experimental_customMergeAllOf"in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let T=c.schemaUtils;(!T||T.doesSchemaUtilsDiffer(f,u,x,w))&&(T=bue(f,u,x,w));const b=T.getRootSchema();let _=n;n===Vj?_=void 0:n===void 0&&p&&(_=c.formData);const S=T.getDefaultFormState(b,_,!1,c.initialDefaultsGenerated),C=this.updateRetrievedSchema(r??T.retrieveSchema(b,S)),E=()=>t.noValidate||o?{errors:[],errorSchema:{}}:t.liveValidate?{errors:c.errors||[],errorSchema:c.errorSchema||{}}:{errors:c.schemaValidationErrors||[],errorSchema:c.schemaValidationErrorSchema||{}};let O,j,P=c.schemaValidationErrors,$=c.schemaValidationErrorSchema;if(y&&!a){const ee=this.liveValidate(b,T,c.errorSchema,S,void 0,c.customErrors,r,r!==void 0);O=ee.errors,j=ee.errorSchema,P=ee.schemaValidationErrors,$=ee.schemaValidationErrorSchema}else{const ee=E();if(O=ee.errors,j=ee.errorSchema,i.length>0&&!y){const H=i.reduce((V,oe)=>(V[oe]=void 0,V),{});j=$=Dh(ee.errorSchema,H,"preventDuplicates")}const Z=this.mergeErrors({errorSchema:j,errors:O},t.extraErrors,c.customErrors);O=Z.errors,j=Z.errorSchema}const I=this.getRegistry(t,b,T),L=Pn(c.registry,I)?c.registry:I,F=c.fieldPathId&&c.fieldPathId?.[Tn]===L.globalFormOptions.idPrefix?c.fieldPathId:ms("",L.globalFormOptions);return{schemaUtils:T,schema:b,uiSchema:h,fieldPathId:F,formData:S,edit:g,errors:O,errorSchema:j,schemaValidationErrors:P,schemaValidationErrorSchema:$,retrievedSchema:C,initialDefaultsGenerated:!0,registry:L}}shouldComponentUpdate(t,n){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props;return i9(this,t,n,r)}validate(t,n=this.state.schema,r,o){const i=r||this.state.schemaUtils,{customValidate:a,transformErrors:c,uiSchema:u}=this.props,f=o??i.retrieveSchema(n,t);return i.getValidator().validateFormData(t,f,a,c,u)}renderErrors(t){const{errors:n,errorSchema:r,schema:o,uiSchema:i}=this.state,a=ft(i),c=gt("ErrorListTemplate",t,a);return n&&n.length?M.jsx(c,{errors:n,errorSchema:r||{},schema:o,uiSchema:i,registry:t}):null}mergeErrors(t,n,r){let o=t.errorSchema,i=t.errors;if(n){const a=fy(t,n);o=a.errorSchema,i=a.errors}if(r){const a=fy(t,r.ErrorSchema,!0);o=a.errorSchema,i=a.errors}return{errors:i,errorSchema:o}}liveValidate(t,n,r,o,i,a,c,u=!1){const f=this.validate(o,t,n,c),h=f.errors;let p=f.errorSchema;u&&(p=Dh(r,f.errorSchema,"preventDuplicates"));const g=h,v=p;return{...this.mergeErrors({errorSchema:p,errors:h},i,a),schemaValidationErrors:g,schemaValidationErrorSchema:v}}getUsedFormData=(t,n)=>YI(t,n);getFieldNames=(t,n)=>WI(t,n);omitExtraData=t=>{const{schema:n,schemaUtils:r}=this.state;return r.omitExtraData(n,t)};setFieldValue=(t,n)=>{const{registry:r}=this.state,o=Array.isArray(t)?t:t.split("."),i=ms("",r.globalFormOptions,o);this.onChange(n,o,void 0,i[Tn])};onChange=(t,n,r,o)=>{this.pendingChanges.push({newValue:t,path:n,newErrorSchema:r,id:o}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;const{newValue:t,path:n,id:r}=this.pendingChanges[0],{newErrorSchema:o}=this.pendingChanges[0],{extraErrors:i,omitExtraData:a,liveOmit:c,noValidate:u,liveValidate:f,onChange:h}=this.props,{formData:p,schemaUtils:g,schema:v,fieldPathId:y,schemaValidationErrorSchema:x,errors:w}=this.state;let{customErrors:T,errorSchema:b}=this.state;const _=y.path[0]||"",S=!n||n.length===0||n.length===1&&n[0]===_;let C=this.state.retrievedSchema,E=S?t:tp(p);const O=Kt(E)&&Object.keys(E).length>0&&Object.values(E).every(F=>F===void 0),j=p==null,P=O&&j?void 0:E;if(Kt(E)||Array.isArray(E)){t===S9?HG(E,n):S||mn(E,n,t);const F=this.getStateFromProps(this.props,P,void 0,void 0,void 0,!0);E=F.formData,C=F.retrievedSchema}const $=!u&&(f===!0||f==="onChange");let I={formData:E,schema:v},L=E;if(a===!0&&(c===!0||c==="onChange")&&(L=this.omitExtraData(E),I={formData:L}),o){const F=S?x:Ie(x,n);if(!ur(F))S?b=o:mn(b,n,o);else if(T||(T=new t9),S){const J=Ie(o,Zr);J&&T.setErrors(J)}else mn(T.ErrorSchema,n,o)}else T&&Ie(T.ErrorSchema,[...n,Zr])&&T.clearErrors(n);if($&&this.pendingChanges.length===1){const F=this.liveValidate(v,g,b,L,i,T,C);I={formData:L,...F,customErrors:T}}else if(!u&&o){const F=this.mergeErrors({errorSchema:b,errors:w},i,T);I={formData:L,...F,customErrors:T}}this.setState(I,()=>{h&&h(bu({...this.state,...I}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(t){return Pn(t,this.state?.retrievedSchema)?this.state.retrievedSchema:t}reset=()=>{const{formData:t,initialFormData:n=Vj,onChange:r}=this.props,a={formData:this.getStateFromProps(this.props,t??n,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(a,()=>r&&r(bu({...this.state,...a})))};onBlur=(t,n)=>{const{onBlur:r,omitExtraData:o,liveOmit:i,liveValidate:a}=this.props;if(r&&r(t,n),o===!0&&i==="onBlur"||a==="onBlur"){const{onChange:c,extraErrors:u}=this.props,{formData:f}=this.state;let h=f,p={formData:h};if(o===!0&&i==="onBlur"&&(h=this.omitExtraData(f),p={formData:h}),a==="onBlur"){const{schema:v,schemaUtils:y,errorSchema:x,customErrors:w,retrievedSchema:T}=this.state,b=this.liveValidate(v,y,x,h,u,w,T);p={formData:h,...b,customErrors:w}}const g=Object.keys(p).filter(v=>!v.startsWith("schemaValidation")).some(v=>{const y=Ie(this.state,v),x=Ie(p,v);return!Pn(y,x)});this.setState(p,()=>{c&&g&&c(bu({...this.state,...p}),t)})}};onFocus=(t,n)=>{const{onFocus:r}=this.props;r&&r(t,n)};onSubmit=t=>{if(t.preventDefault(),t.target!==t.currentTarget)return;t.persist();const{omitExtraData:n,extraErrors:r,noValidate:o,onSubmit:i}=this.props;let{formData:a}=this.state;if(n===!0&&(a=this.omitExtraData(a)),o||this.validateFormWithFormData(a)){const c=r||{},u=r?e2(r):[];this.setState({formData:a,errors:u,errorSchema:c,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{i&&i(bu({...this.state,formData:a},"submitted"),t)})}};getGlobalFormOptions(t){const{uiSchema:n={},experimental_componentUpdateStrategy:r,idSeparator:o=RI,idPrefix:i=TI,nameGenerator:a,useFallbackUiForUnsupportedType:c=!1}=t;return{idPrefix:n["ui:rootFieldId"]||i,idSeparator:o,useFallbackUiForUnsupportedType:c,...r!==void 0&&{experimental_componentUpdateStrategy:r},...a!==void 0&&{nameGenerator:a}}}getRegistry(t,n,r){const{translateString:o,uiSchema:i={}}=t,{fields:a,templates:c,widgets:u,formContext:f,translateString:h}=Lhe();return{fields:{...a,...t.fields},templates:{...c,...t.templates,ButtonTemplates:{...c.ButtonTemplates,...t.templates?.ButtonTemplates}},widgets:{...u,...t.widgets},rootSchema:n,formContext:t.formContext||f,schemaUtils:r,translateString:o||h,globalUiOptions:i[dx],globalFormOptions:this.getGlobalFormOptions(t)}}submit=()=>{if(this.formElement.current){const t=new CustomEvent("submit",{cancelable:!0});t.preventDefault(),this.formElement.current.dispatchEvent(t),this.formElement.current.requestSubmit()}};focusOnError(t){const{idPrefix:n="root",idSeparator:r="_"}=this.props,{property:o}=t,i=zN(o);i[0]===""?i[0]=n:i.unshift(n);const a=i.join(r);let c=this.formElement.current.elements[a];c||(c=this.formElement.current.querySelector(`input[id^="${a}"`)),c&&c.length&&(c=c[0]),c&&c.focus()}validateFormWithFormData=t=>{const{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:o,onError:i}=this.props,{errors:a}=this.state,c=this.validate(t);let u=c.errors,f=c.errorSchema;const h=u,p=f,g=u.length>0||n&&r;if(g){if(n){const v=fy(c,n);f=v.errorSchema,u=v.errors}o&&(typeof o=="function"?o(u[0]):this.focusOnError(u[0])),this.setState({errors:u,errorSchema:f,schemaValidationErrors:h,schemaValidationErrorSchema:p},()=>{i?i(u):console.error("Form validation failed",u)})}else a.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}});return!g};validateForm(){const{omitExtraData:t}=this.props;let{formData:n}=this.state;return t===!0&&(n=this.omitExtraData(n)),this.validateFormWithFormData(n)}render(){const{children:t,id:n,className:r="",tagName:o,name:i,method:a,target:c,action:u,autoComplete:f,enctype:h,acceptCharset:p,noHtml5Validate:g=!1,disabled:v,readonly:y,showErrorList:x="top",_internalFormWrapper:w}=this.props,{schema:T,uiSchema:b,formData:_,errorSchema:S,fieldPathId:C,registry:E}=this.state,{SchemaField:O}=E.fields,{SubmitButton:j}=E.templates.ButtonTemplates,P=w?o:void 0,$=w||o||"form";let{[Ky]:I={}}=ft(b);v&&(I={...I,props:{...I.props,disabled:!0}});const L={[Ua]:{[Ky]:I}};return M.jsxs($,{className:r||"rjsf",id:n,name:i,method:a,target:c,action:u,autoComplete:f,encType:h,acceptCharset:p,noValidate:g,onSubmit:this.onSubmit,as:P,ref:this.formElement,children:[x==="top"&&this.renderErrors(E),M.jsx(O,{name:"",schema:T,uiSchema:b,errorSchema:S,fieldPathId:C,formData:_,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:E,disabled:v,readonly:y}),t||M.jsx(j,{uiSchema:L,registry:E}),x==="bottom"&&this.renderErrors(E)]})}}function Uhe(e){return A.forwardRef(({fields:t,widgets:n,templates:r,...o},i)=>(t={...e?.fields,...t},n={...e?.widgets,...n},r={...e?.templates,...r,ButtonTemplates:{...e?.templates?.ButtonTemplates,...r?.ButtonTemplates}},M.jsx(Fhe,{...e,...o,fields:t,widgets:n,templates:r,ref:i})))}var $g={exports:{}},xS={},qj;function Vhe(){return qj||(qj=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(P,$){return{validate:P,compare:$}}e.fullFormats={date:t(i,a),time:t(u,f),"date-time":t(p,g),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:x,"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:j,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:T,int32:{type:"number",validate:S},int64:{type:"number",validate:C},float:{type:"number",validate:E},double:{type:"number",validate:E},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,f),"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,g),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 n(P){return P%4===0&&(P%100!==0||P%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(P){const $=r.exec(P);if(!$)return!1;const I=+$[1],L=+$[2],F=+$[3];return L>=1&&L<=12&&F>=1&&F<=(L===2&&n(I)?29:o[L])}function a(P,$){if(P&&$)return P>$?1:P<$?-1:0}const c=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function u(P,$){const I=c.exec(P);if(!I)return!1;const L=+I[1],F=+I[2],J=+I[3],ee=I[5];return(L<=23&&F<=59&&J<=59||L===23&&F===59&&J===60)&&(!$||ee!=="")}function f(P,$){if(!(P&&$))return;const I=c.exec(P),L=c.exec($);if(I&&L)return P=I[1]+I[2]+I[3]+(I[4]||""),$=L[1]+L[2]+L[3]+(L[4]||""),P>$?1:P<$?-1:0}const h=/t|\s/i;function p(P){const $=P.split(h);return $.length===2&&i($[0])&&u($[1],!0)}function g(P,$){if(!(P&&$))return;const[I,L]=P.split(h),[F,J]=$.split(h),ee=a(I,F);if(ee!==void 0)return ee||f(L,J)}const v=/\/|:/,y=/^(?:[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 x(P){return v.test(P)&&y.test(P)}const w=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function T(P){return w.lastIndex=0,w.test(P)}const b=-2147483648,_=2**31-1;function S(P){return Number.isInteger(P)&&P<=_&&P>=b}function C(P){return Number.isInteger(P)}function E(){return!0}const O=/[^\\]\\Z/;function j(P){if(O.test(P))return!1;try{return new RegExp(P),!0}catch{return!1}}})(xS)),xS}var ES={},Bj;function qhe(){return Bj||(Bj=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=e_(),n=Pt(),r=n.operators,o={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},i={message:({keyword:c,schemaCode:u})=>n.str`should be ${o[c].okStr} ${u}`,params:({keyword:c,schemaCode:u})=>n._`{comparison: ${o[c].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:i,code(c){const{gen:u,data:f,schemaCode:h,keyword:p,it:g}=c,{opts:v,self:y}=g;if(!v.validateFormats)return;const x=new t.KeywordCxt(g,y.RULES.all.format.definition,"format");x.$data?w():T();function w(){const _=u.scopeValue("formats",{ref:y.formats,code:v.code.formats}),S=u.const("fmt",n._`${_}[${x.schemaCode}]`);c.fail$data(n.or(n._`typeof ${S} != "object"`,n._`${S} instanceof RegExp`,n._`typeof ${S}.compare != "function"`,b(S)))}function T(){const _=x.schema,S=y.formats[_];if(!S||S===!0)return;if(typeof S!="object"||S instanceof RegExp||typeof S.compare!="function")throw new Error(`"${p}": format "${_}" does not define "compare" function`);const C=u.scopeValue("formats",{key:_,ref:S,code:v.code.formats?n._`${v.code.formats}${n.getProperty(_)}`:void 0});c.fail$data(b(C))}function b(_){return n._`${_}.compare(${f}, ${h}) ${o[p].fail} 0`}},dependencies:["format"]};const a=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=a})(ES)),ES}var Hj;function Bhe(){return Hj||(Hj=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=Vhe(),r=qhe(),o=Pt(),i=new o.Name("fullFormats"),a=new o.Name("fastFormats"),c=(f,h={keywords:!0})=>{if(Array.isArray(h))return u(f,h,n.fullFormats,i),f;const[p,g]=h.mode==="fast"?[n.fastFormats,a]:[n.fullFormats,i],v=h.formats||n.formatNames;return u(f,v,p,g),h.keywords&&r.default(f),f};c.get=(f,h="full")=>{const g=(h==="fast"?n.fastFormats:n.fullFormats)[f];if(!g)throw new Error(`Unknown format "${f}"`);return g};function u(f,h,p,g){var v,y;(v=(y=f.opts.code).formats)!==null&&v!==void 0||(y.formats=o._`require("ajv-formats/dist/formats").${g}`);for(const x of h)f.addFormat(x,p[x])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})($g,$g.exports)),$g.exports}var Hhe=Bhe();const Kj=ii(Hhe),Khe={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},Ghe=/^(#?([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*\)))$/,Zhe=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function Yhe(e,t,n={},r,o=dD,i){let a=new o({...Khe,...n});return r?Kj(a,r):r!==!1&&Kj(a),a.addFormat("data-url",Zhe),a.addFormat("color",Ghe),a.addKeyword(Fi),a.addKeyword(V_),Array.isArray(e)&&a.addMetaSchema(e),nn(t)&&Object.keys(t).forEach(c=>{a.addFormat(c,t[c])}),i&&(a=i(a)),a}function Whe(e=[],t){return e.map(r=>{var o;const{instancePath:i,keyword:a,params:c,schemaPath:u,parentSchema:f,...h}=r;let{message:p=""}=h,g=i.replace(/\//g,"."),v=`${g} ${p}`.trim(),y="";const x=[...((o=c.deps)===null||o===void 0?void 0:o.split(", "))||[],c.missingProperty,c.property].filter(w=>w);if(x.length>0)x.forEach(w=>{const T=g?`${g}.${w}`:w;let b=ft(Ie(t,`${T.replace(/^\./,"")}`)).title;if(b===void 0){const _=u.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([w]);b=ft(Ie(t,_)).title}if(b)p=p.replace(`'${w}'`,`'${b}'`),y=b;else{const _=Ie(f,[un,w,"title"]);_&&(p=p.replace(`'${w}'`,`'${_}'`),y=_)}}),v=p;else{const w=ft(Ie(t,`${g.replace(/^\./,"")}`)).title;if(w)v=`'${w}' ${p}`.trim(),y=w;else{const T=f?.title;T&&(v=`'${T}' ${p}`.trim(),y=T)}}return"missingProperty"in c&&(g=g?`${g}.${c.missingProperty}`:c.missingProperty),{name:a,property:g,message:p,params:c,stack:v,schemaPath:u,title:y}}).reduce((r,o)=>{const{message:i,schemaPath:a}=o,c=a?.indexOf(`/${en}/`),u=a?.indexOf(`/${Dt}/`);let f;return c&&c>=0?f=a?.substring(0,c):u&&u>=0&&(f=a?.substring(0,u)),f&&r.find(p=>{var g;return p.message===i&&((g=p.schemaPath)===null||g===void 0?void 0:g.startsWith(f))})||r.push(o),r},[])}function Xhe(e,t,n,r,o,i,a){const{validationError:c}=t;let u=Whe(t.errors,a);c&&(u=[...u,{stack:c.message}]),typeof i=="function"&&(u=i(u,a));let f=Due(u);if(c&&(f={...f,$schema:{__errors:[c.message]}}),typeof o!="function")return{errors:u,errorSchema:f};const h=HI(e,r,n,r,!0),p=o(h,hx(h),a,f),g=a9(p);return fy({errors:u,errorSchema:f},g)}class Qhe{constructor(t,n){const{additionalMetaSchemas:r,customFormats:o,ajvOptionsOverrides:i,ajvFormatOptions:a,AjvClass:c,extenderFn:u}=t;this.ajv=Yhe(r,o,i,a,c,u),this.localizer=n}reset(){this.ajv.removeSchema()}rawValidation(t,n){var r,o;let i,a;try{t[Tn]&&(a=this.ajv.getSchema(t[Tn])),a===void 0&&(a=this.ajv.compile(t)),a(n)}catch(u){i=u}let c;return a&&(typeof this.localizer=="function"&&(((r=a.errors)!==null&&r!==void 0?r:[]).forEach(u=>{var f;["missingProperty","property"].forEach(h=>{var p;!((p=u.params)===null||p===void 0)&&p[h]&&(u.params[h]=`'${u.params[h]}'`)}),!((f=u.params)===null||f===void 0)&&f.deps&&(u.params.deps=u.params.deps.split(", ").map(h=>`'${h}'`).join(", "))}),this.localizer(a.errors),((o=a.errors)!==null&&o!==void 0?o:[]).forEach(u=>{var f;["missingProperty","property"].forEach(h=>{var p;!((p=u.params)===null||p===void 0)&&p[h]&&(u.params[h]=u.params[h].slice(1,-1))}),!((f=u.params)===null||f===void 0)&&f.deps&&(u.params.deps=u.params.deps.split(", ").map(h=>h.slice(1,-1)).join(", "))})),c=a.errors||void 0,a.errors=null),{errors:c,validationError:i}}validateFormData(t,n,r,o,i){const a=this.rawValidation(n,t);return Xhe(this,a,t,n,r,o,i)}handleSchemaUpdate(t){var n,r;const o=(n=t[Tn])!==null&&n!==void 0?n:OI;this.ajv.getSchema(o)===void 0?this.ajv.addSchema(t,o):Pn(t,(r=this.ajv.getSchema(o))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(o),this.ajv.addSchema(t,o))}isValid(t,n,r){var o;try{this.handleSchemaUpdate(r);const i=t2(t),a=(o=i[Tn])!==null&&o!==void 0?o:kue(i);let c;return c=this.ajv.getSchema(a),c===void 0&&(c=this.ajv.addSchema(i,a).getSchema(a)||this.ajv.compile(i)),c(n)}catch(i){return console.warn("Error encountered compiling schema:",i),!1}}}function Jhe(e={},t){return new Qhe(e,t)}const epe=Jhe();const tpe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),npe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Gj=e=>{const t=npe(e);return t.charAt(0).toUpperCase()+t.slice(1)},_9=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),rpe=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var ope={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 spe=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...c},u)=>A.createElement("svg",{ref:u,...ope,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:_9("lucide",o),...!i&&!rpe(c)&&{"aria-hidden":"true"},...c},[...a.map(([f,h])=>A.createElement(f,h)),...Array.isArray(i)?i:[i]]));const ci=(e,t)=>{const n=A.forwardRef(({className:r,...o},i)=>A.createElement(spe,{ref:i,iconNode:t,className:_9(`lucide-${tpe(Gj(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Gj(e),n};const ipe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ape=ci("check",ipe);const lpe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],C9=ci("chevron-down",lpe);const cpe=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],upe=ci("chevron-up",cpe);const fpe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],dpe=ci("circle-alert",fpe);const hpe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],T9=ci("circle-plus",hpe);const ppe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],mpe=ci("circle",ppe);const gpe=[["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"}]],ype=ci("copy",gpe);const vpe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],bpe=ci("search",vpe);const Spe=[["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"}]],wpe=ci("trash-2",Spe);const xpe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],R9=ci("x",xpe);function Zj(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ol(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Zj(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Zj(e[o],null)}}}}function fr(...e){return A.useCallback(ol(...e),e)}var Epe=Symbol.for("react.lazy"),Zy=Kh[" use ".trim().toString()];function _pe(e){return typeof e=="object"&&e!==null&&"then"in e}function O9(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Epe&&"_payload"in e&&_pe(e._payload)}function A9(e){const t=Cpe(e),n=A.forwardRef((r,o)=>{let{children:i,...a}=r;O9(i)&&typeof Zy=="function"&&(i=Zy(i._payload));const c=A.Children.toArray(i),u=c.find(Rpe);if(u){const f=u.props.children,h=c.map(p=>p===u?A.Children.count(f)>1?A.Children.only(null):A.isValidElement(f)?f.props.children:null:p);return M.jsx(t,{...a,ref:o,children:A.isValidElement(f)?A.cloneElement(f,void 0,h):null})}return M.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var k9=A9("Slot");function Cpe(e){const t=A.forwardRef((n,r)=>{let{children:o,...i}=n;if(O9(o)&&typeof Zy=="function"&&(o=Zy(o._payload)),A.isValidElement(o)){const a=Ape(o),c=Ope(i,o.props);return o.type!==A.Fragment&&(c.ref=r?ol(r,a):a),A.cloneElement(o,c)}return A.Children.count(o)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Tpe=Symbol("radix.slottable");function Rpe(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Tpe}function Ope(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const u=i(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ape(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Vt(...e){return UD(l_(e))}const kpe=Wi("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 l2({className:e,variant:t,size:n,asChild:r=!1,...o}){const i=r?k9:"button";return M.jsx(i,{"data-slot":"button",className:Vt(kpe({variant:t,size:n,className:e})),...o})}function Mpe({uiSchema:e,registry:t,className:n,...r}){const{translateString:o}=t;return M.jsx("div",{className:"p-0 m-0",children:M.jsxs(l2,{...r,className:Vt("w-fit gap-2",n),variant:"outline",type:"button",children:[M.jsx(T9,{size:16})," ",o(It.AddItemButton)]})})}function jpe(e){const{children:t,buttonsProps:n,displayLabel:r,hasDescription:o,hasToolbar:i,uiSchema:a,registry:c}=e,u=ft(a),f=gt("ArrayFieldItemButtonsTemplate",c,u),h=o?-6:22;return M.jsx("div",{children:M.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[M.jsx("div",{className:"grow shrink",children:t}),M.jsx("div",{className:"flex items-end justify-end p-0.5",children:i&&M.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:r?`${h}px`:void 0},children:M.jsx(f,{...n})})})]})})}function Ppe(e){const{canAdd:t,disabled:n,fieldPathId:r,uiSchema:o,items:i,optionalDataControl:a,onAddClick:c,readonly:u,registry:f,required:h,schema:p,title:g}=e,v=ft(o),y=gt("ArrayFieldDescriptionTemplate",f,v),x=gt("ArrayFieldTitleTemplate",f,v),w=!u&&!n,{ButtonTemplates:{AddButton:T}}=f.templates;return M.jsx("div",{children:M.jsx("div",{className:"m-0 flex p-0",children:M.jsxs("div",{className:"m-0 w-full p-0",children:[M.jsx(x,{fieldPathId:r,title:v.title||g,schema:p,uiSchema:o,required:h,registry:f,optionalDataControl:w?a:void 0}),M.jsx(y,{fieldPathId:r,description:v.description||p.description,schema:p,uiSchema:o,registry:f}),M.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[w?void 0:a,i,t&&M.jsx("div",{className:"mt-2 flex justify-end",children:M.jsx(T,{id:Qs(r,"add"),className:"rjsf-array-item-add",onClick:c,disabled:n||u,uiSchema:o,registry:f})})]},`array-item-list-${r.$id}`)]})})})}function M9({className:e,type:t,...n}){return M.jsx("input",{type:t,"data-slot":"input",className:Vt("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),...n})}function Npe({id:e,htmlName:t,placeholder:n,required:r,readonly:o,disabled:i,type:a,value:c,onChange:u,onChangeOverride:f,onBlur:h,onFocus:p,autofocus:g,options:v,schema:y,rawErrors:x=[],children:w,extraProps:T,className:b,registry:_}){const{ClearButton:S}=_.templates.ButtonTemplates,C={...T,...r9(y,a,v)},E=({target:{value:$}})=>u($===""?v.emptyValue:$),O=({target:$})=>h(e,$&&$.value),j=({target:$})=>p(e,$&&$.value),P=A.useCallback($=>{var I;$.preventDefault(),$.stopPropagation(),u((I=v.emptyValue)!==null&&I!==void 0?I:"")},[u,v.emptyValue]);return M.jsxs("div",{className:"p-0.5",children:[M.jsx(M9,{id:e,name:t||e,type:a,placeholder:n,autoFocus:g,required:r,disabled:i,readOnly:o,className:Vt({"border-destructive focus-visible:ring-0":x.length>0},b),list:y.examples?$h(e):void 0,...C,value:c||c===0?c:"",onChange:f||E,onBlur:O,onFocus:j,"aria-describedby":Oo(e,!!y.examples)}),v.allowClearTextInputs&&!o&&!i&&c&&M.jsx(S,{onClick:P,registry:_}),w,Array.isArray(y.examples)?M.jsx("datalist",{id:$h(e),children:y.examples.concat(y.default&&!y.examples.includes(y.default)?[y.default]:[]).map($=>M.jsx("option",{value:$},$))}):null]})}function Dpe({id:e,description:t,registry:n,uiSchema:r}){return t?M.jsx("div",{children:M.jsx("div",{id:e,className:"text-sm text-muted-foreground",children:M.jsx(i2,{description:t,registry:n,uiSchema:r})})}):null}const $pe=Wi("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 Ipe({className:e,variant:t,...n}){return M.jsx("div",{"data-slot":"alert",role:"alert",className:Vt($pe({variant:t}),e),...n})}function zpe({className:e,...t}){return M.jsx("div",{"data-slot":"alert-title",className:Vt("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Lpe({className:e,...t}){return M.jsx("div",{"data-slot":"alert-description",className:Vt("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function Fpe({errors:e,registry:t}){const{translateString:n}=t;return M.jsxs(Ipe,{variant:"destructive",className:"mb-2",children:[M.jsx(dpe,{className:"h-4 w-4"}),M.jsx(zpe,{children:n(It.ErrorsLabel)}),M.jsx(Lpe,{className:"flex flex-col gap-1",children:e.map((r,o)=>M.jsxs("span",{children:["• ",r.stack]},o))})]})}function Upe(e){const{errors:t=[],fieldPathId:n}=e;if(t.length===0)return null;const r=X_(n);return M.jsx("div",{className:"flex flex-col gap-1",id:r,children:t.map((o,i)=>M.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:o},i))})}function Vpe(e){const{fieldPathId:t,help:n,uiSchema:r,registry:o,hasErrors:i}=e;return n?M.jsx("span",{className:Vt("text-xs font-medium text-muted-foreground",{"text-destructive":i}),id:Q_(t),children:M.jsx(a2,{help:n,registry:o,uiSchema:r})}):null}function qpe({id:e,children:t,displayLabel:n,rawErrors:r=[],errors:o,help:i,description:a,rawDescription:c,classNames:u,style:f,disabled:h,label:p,hidden:g,onKeyRename:v,onKeyRenameBlur:y,onRemoveProperty:x,readonly:w,required:T,schema:b,uiSchema:_,registry:S}){const C=ft(_),E=gt("WrapIfAdditionalTemplate",S,C);if(g)return M.jsx("div",{className:"hidden",children:t});const O=C.widget==="checkbox";return M.jsx(E,{classNames:u,style:f,disabled:h,id:e,label:p,displayLabel:n,onKeyRename:v,onKeyRenameBlur:y,onRemoveProperty:x,rawDescription:c,readonly:w,required:T,schema:b,uiSchema:_,registry:S,children:M.jsxs("div",{className:"flex flex-col gap-2",children:[n&&!O&&M.jsxs("label",{className:Vt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":r.length>0}),htmlFor:e,children:[p,T?"*":null]}),t,n&&c&&!O&&M.jsx("span",{className:Vt("text-xs font-medium text-muted-foreground",{" text-destructive":r.length>0}),children:a}),o,i]})})}function Bpe(e){const{children:t,column:n,className:r,...o}=e;return M.jsx("div",{className:Vt("grid gap-2",r),...o,children:t})}function Df(e){const{icon:t,iconType:n,className:r,uiSchema:o,registry:i,...a}=e;return M.jsx(l2,{size:"icon",variant:"outline",className:r,...a,type:"button",children:t})}function Hpe(e){const{registry:{translateString:t}}=e;return M.jsx(Df,{title:t(It.CopyButton),...e,icon:M.jsx(ype,{className:"h-4 w-4"})})}function Kpe(e){const{registry:{translateString:t}}=e;return M.jsx(Df,{title:t(It.MoveDownButton),...e,icon:M.jsx(C9,{className:"h-4 w-4"})})}function Gpe(e){const{registry:{translateString:t}}=e;return M.jsx(Df,{title:t(It.MoveUpButton),...e,icon:M.jsx(upe,{className:"h-4 w-4"})})}function j9(e){const{registry:{translateString:t}}=e;return M.jsx(Df,{title:t(It.RemoveButton),...e,className:"border-destructive",icon:M.jsx(wpe,{className:"h-4 w-4 stroke-destructive"})})}function Zpe(e){const{registry:{translateString:t}}=e;return M.jsx(Df,{title:t(It.ClearButton),...e,icon:M.jsx(R9,{})})}function Ype({selector:e,optionSchemaField:t}){return M.jsxs("div",{className:Vt("p-4 border rounded-md bg-background shadow-sm"),children:[M.jsx("div",{className:Vt("mb-4"),children:e}),t]})}function Wpe({description:e,title:t,properties:n,required:r,uiSchema:o,fieldPathId:i,schema:a,formData:c,optionalDataControl:u,onAddProperty:f,disabled:h,readonly:p,registry:g}){const v=ft(o),y=gt("TitleFieldTemplate",g,v),x=gt("DescriptionFieldTemplate",g,v),w=!p&&!h,{ButtonTemplates:{AddButton:T}}=g.templates;return M.jsxs(M.Fragment,{children:[t&&M.jsx(y,{id:I0(i),title:t,required:r,schema:a,uiSchema:o,registry:g,optionalDataControl:w?u:void 0}),e&&M.jsx(x,{id:Oc(i),description:e,schema:a,uiSchema:o,registry:g}),M.jsxs("div",{className:"flex flex-col gap-2",children:[w?void 0:u,n.map((b,_)=>M.jsx("div",{className:`${b.hidden?"hidden":""} flex`,children:M.jsx("div",{className:"w-full",children:b.content})},_)),AI(a,o,c)?M.jsx("div",{className:"mt-2 flex justify-end",children:M.jsx(T,{id:Qs(i,"add"),onClick:f,disabled:h||p,className:"rjsf-object-property-expand",uiSchema:o,registry:g})}):null]})]})}function Xpe(e){const{id:t,registry:n,label:r,onAddClick:o,onRemoveClick:i}=e;return o?M.jsx(Df,{id:t,registry:n,className:"rjsf-add-optional-data",onClick:o,title:r,icon:M.jsx(T9,{}),size:"xs"}):i?M.jsx(j9,{id:t,registry:n,className:"rjsf-remove-optional-data",onClick:i,title:r,size:"xs"}):M.jsx("em",{id:t,children:r})}function Qpe(e){const{submitText:t,norender:n,props:r}=o9(e.uiSchema);return n?null:M.jsx("div",{children:M.jsx(l2,{type:"submit",...r,className:Vt("my-2",r?.className),children:t})})}var gs=g3();const Jpe=ii(gs);var eme=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ui=eme.reduce((e,t)=>{const n=A9(`Primitive.${t}`),r=A.forwardRef((o,i)=>{const{asChild:a,...c}=o,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(u,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),tme="Separator",Yj="horizontal",nme=["horizontal","vertical"],P9=A.forwardRef((e,t)=>{const{decorative:n,orientation:r=Yj,...o}=e,i=rme(r)?r:Yj,c=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return M.jsx(ui.div,{"data-orientation":i,...c,...o,ref:t})});P9.displayName=tme;function rme(e){return nme.includes(e)}var ome=P9;function N9({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return M.jsx(ome,{"data-slot":"separator",decorative:n,orientation:t,className:Vt("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),...r})}function sme({id:e,title:t,uiSchema:n,optionalDataControl:r}){const o=ft(n);let i=M.jsx("h5",{children:o.title||t});return r&&(i=M.jsxs("div",{className:"flex flex-row",children:[M.jsx("div",{className:"flex-grow",children:i}),M.jsx("div",{className:"flex",children:r})]})),M.jsxs("div",{id:e,className:"my-1 flex flex-col gap-0.5",children:[i,M.jsx(N9,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function ime({classNames:e,style:t,children:n,disabled:r,id:o,label:i,displayLabel:a,onRemoveProperty:c,onKeyRenameBlur:u,rawDescription:f,readonly:h,required:p,schema:g,uiSchema:v,registry:y}){const{templates:x,translateString:w}=y,{RemoveButton:T}=x.ButtonTemplates,b=w(It.KeyLabel,[i]);if(!(Fi in g))return M.jsx("div",{className:e,style:t,children:n});const C=a?22+(f?-28:0):0,E=`${o}-key`;return M.jsxs(M.Fragment,{children:[M.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[M.jsx("div",{className:"grid gap-2 col-span-5",children:M.jsxs("div",{className:"flex flex-col gap-2",children:[a&&M.jsx("label",{htmlFor:E,className:"text-sm font-medium text-muted-foreground leading-none",children:b}),M.jsx("div",{className:"pl-0.5",children:M.jsx(M9,{required:p,defaultValue:i,disabled:r||h,id:E,name:E,onBlur:h?void 0:u,type:"text",className:"w-full border shadow-sm"})}),!!f&&M.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:M.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),M.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:n}),M.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${C}px`},children:M.jsx(T,{id:Qs(o,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||h,onClick:c,uiSchema:v,registry:y})})]}),M.jsx(N9,{dir:"horizontal",className:"mt-2"})]})}function ame(){return{ArrayFieldItemTemplate:jpe,ArrayFieldTemplate:Ppe,BaseInputTemplate:Npe,ButtonTemplates:{AddButton:Mpe,CopyButton:Hpe,MoveDownButton:Kpe,MoveUpButton:Gpe,RemoveButton:j9,SubmitButton:Qpe,ClearButton:Zpe},DescriptionFieldTemplate:Dpe,ErrorListTemplate:Fpe,FieldErrorTemplate:Upe,FieldHelpTemplate:Vpe,FieldTemplate:qpe,GridTemplate:Bpe,MultiSchemaFieldTemplate:Ype,ObjectFieldTemplate:Wpe,OptionalDataControlsTemplate:Xpe,TitleFieldTemplate:sme,WrapIfAdditionalTemplate:ime}}function lme(e,t){const n=A.createContext(t),r=i=>{const{children:a,...c}=i,u=A.useMemo(()=>c,Object.values(c));return M.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function o(i){const a=A.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function kc(e,t=[]){let n=[];function r(i,a){const c=A.createContext(a),u=n.length;n=[...n,a];const f=p=>{const{scope:g,children:v,...y}=p,x=g?.[e]?.[u]||c,w=A.useMemo(()=>y,Object.values(y));return M.jsx(x.Provider,{value:w,children:v})};f.displayName=i+"Provider";function h(p,g){const v=g?.[e]?.[u]||c,y=A.useContext(v);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,h]}const o=()=>{const i=n.map(a=>A.createContext(a));return function(c){const u=c?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,cme(o,...t)]}function cme(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((c,{useScope:u,scopeName:f})=>{const p=u(i)[`__scope${f}`];return{...c,...p}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Vn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var df=globalThis?.document?A.useLayoutEffect:()=>{},ume=Kh[" useInsertionEffect ".trim().toString()]||df;function yp({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=fme({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:o;{const h=A.useRef(e!==void 0);A.useEffect(()=>{const p=h.current;p!==c&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${c?"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.`),h.current=c},[c,r])}const f=A.useCallback(h=>{if(c){const p=dme(h)?h(e):h;p!==e&&a.current?.(p)}else i(h)},[c,e,i,a]);return[u,f]}function fme({defaultProp:e,onChange:t}){const[n,r]=A.useState(e),o=A.useRef(n),i=A.useRef(t);return ume(()=>{i.current=t},[t]),A.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function dme(e){return typeof e=="function"}function c2(e){const t=A.useRef({value:e,previous:e});return A.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function u2(e){const[t,n]=A.useState(void 0);return df(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,c;if("borderBoxSize"in i){const u=i.borderBoxSize,f=Array.isArray(u)?u[0]:u;a=f.inlineSize,c=f.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function hme(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}var $f=e=>{const{present:t,children:n}=e,r=pme(t),o=typeof n=="function"?n({present:r.isPresent}):A.Children.only(n),i=fr(r.ref,mme(o));return typeof n=="function"||r.isPresent?A.cloneElement(o,{ref:i}):null};$f.displayName="Presence";function pme(e){const[t,n]=A.useState(),r=A.useRef(null),o=A.useRef(e),i=A.useRef("none"),a=e?"mounted":"unmounted",[c,u]=hme(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const f=Ig(r.current);i.current=c==="mounted"?f:"none"},[c]),df(()=>{const f=r.current,h=o.current;if(h!==e){const g=i.current,v=Ig(f);e?u("MOUNT"):v==="none"||f?.display==="none"?u("UNMOUNT"):u(h&&g!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),df(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,p=v=>{const x=Ig(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&x&&(u("ANIMATION_END"),!o.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},g=v=>{v.target===t&&(i.current=Ig(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:A.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Ig(e){return e?.animationName||"none"}function mme(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Yy(e){const t=gme(e),n=A.forwardRef((r,o)=>{const{children:i,...a}=r,c=A.Children.toArray(i),u=c.find(vme);if(u){const f=u.props.children,h=c.map(p=>p===u?A.Children.count(f)>1?A.Children.only(null):A.isValidElement(f)?f.props.children:null:p);return M.jsx(t,{...a,ref:o,children:A.isValidElement(f)?A.cloneElement(f,void 0,h):null})}return M.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function gme(e){const t=A.forwardRef((n,r)=>{const{children:o,...i}=n;if(A.isValidElement(o)){const a=Sme(o),c=bme(i,o.props);return o.type!==A.Fragment&&(c.ref=r?ol(r,a):a),A.cloneElement(o,c)}return A.Children.count(o)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var yme=Symbol("radix.slottable");function vme(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yme}function bme(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const u=i(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Sme(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wme=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],er=wme.reduce((e,t)=>{const n=Yy(`Primitive.${t}`),r=A.forwardRef((o,i)=>{const{asChild:a,...c}=o,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(u,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function xme(e,t){e&&gs.flushSync(()=>e.dispatchEvent(t))}var F0="Checkbox",[Eme]=kc(F0),[_me,f2]=Eme(F0);function Cme(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:a,name:c,onCheckedChange:u,required:f,value:h="on",internal_do_not_use_render:p}=e,[g,v]=yp({prop:n,defaultProp:o??!1,onChange:u,caller:F0}),[y,x]=A.useState(null),[w,T]=A.useState(null),b=A.useRef(!1),_=y?!!a||!!y.closest("form"):!0,S={checked:g,disabled:i,setChecked:v,control:y,setControl:x,name:c,form:a,value:h,hasConsumerStoppedPropagationRef:b,required:f,defaultChecked:Ba(o)?!1:o,isFormControl:_,bubbleInput:w,setBubbleInput:T};return M.jsx(_me,{scope:t,...S,children:Tme(p)?p(S):r})}var D9="CheckboxTrigger",$9=A.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:a,disabled:c,checked:u,required:f,setControl:h,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:y}=f2(D9,e),x=fr(o,h),w=A.useRef(u);return A.useEffect(()=>{const T=i?.form;if(T){const b=()=>p(w.current);return T.addEventListener("reset",b),()=>T.removeEventListener("reset",b)}},[i,p]),M.jsx(er.button,{type:"button",role:"checkbox","aria-checked":Ba(u)?"mixed":u,"aria-required":f,"data-state":V9(u),"data-disabled":c?"":void 0,disabled:c,value:a,...r,ref:x,onKeyDown:Vn(t,T=>{T.key==="Enter"&&T.preventDefault()}),onClick:Vn(n,T=>{p(b=>Ba(b)?!0:!b),y&&v&&(g.current=T.isPropagationStopped(),g.current||T.stopPropagation())})})});$9.displayName=D9;var I9=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:c,value:u,onCheckedChange:f,form:h,...p}=e;return M.jsx(Cme,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:c,required:a,onCheckedChange:f,name:r,form:h,value:u,internal_do_not_use_render:({isFormControl:g})=>M.jsxs(M.Fragment,{children:[M.jsx($9,{...p,ref:t,__scopeCheckbox:n}),g&&M.jsx(U9,{__scopeCheckbox:n})]})})});I9.displayName=F0;var z9="CheckboxIndicator",L9=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=f2(z9,n);return M.jsx($f,{present:r||Ba(i.checked)||i.checked===!0,children:M.jsx(er.span,{"data-state":V9(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});L9.displayName=z9;var F9="CheckboxBubbleInput",U9=A.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:a,required:c,disabled:u,name:f,value:h,form:p,bubbleInput:g,setBubbleInput:v}=f2(F9,e),y=fr(n,v),x=c2(i),w=u2(r);A.useEffect(()=>{const b=g;if(!b)return;const _=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(_,"checked").set,E=!o.current;if(x!==i&&C){const O=new Event("click",{bubbles:E});b.indeterminate=Ba(i),C.call(b,Ba(i)?!1:i),b.dispatchEvent(O)}},[g,x,i,o]);const T=A.useRef(Ba(i)?!1:i);return M.jsx(er.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??T.current,required:c,disabled:u,name:f,value:h,form:p,...t,tabIndex:-1,ref:y,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});U9.displayName=F9;function Tme(e){return typeof e=="function"}function Ba(e){return e==="indeterminate"}function V9(e){return Ba(e)?"indeterminate":e?"checked":"unchecked"}function Rme(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Ome=["color"],Ame=A.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Rme(e,Ome);return A.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),A.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:r,fillRule:"evenodd",clipRule:"evenodd"}))});function q9({className:e,...t}){return M.jsx(I9,{"data-slot":"checkbox",className:Vt("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:M.jsx(L9,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:M.jsx(Ame,{className:"size-3.5"})})})}var kme="Label",B9=A.forwardRef((e,t)=>M.jsx(ui.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));B9.displayName=kme;var Mme=B9;function d2({className:e,...t}){return M.jsx(Mme,{"data-slot":"label",className:Vt("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function jme(e){const{id:t,htmlName:n,value:r,disabled:o,readonly:i,label:a,hideLabel:c,schema:u,autofocus:f,options:h,onChange:p,onBlur:g,onFocus:v,registry:y,uiSchema:x,className:w}=e,T=dh(u),b=gt("DescriptionFieldTemplate",y,h),_=O=>p(O),S=()=>g(t,r),C=()=>v(t,r),E=h.description||u.description;return M.jsxs("div",{className:`relative ${o||i?"cursor-not-allowed opacity-50":""}`,"aria-describedby":Oo(t),children:[!c&&E&&M.jsx(b,{id:Oc(t),description:E,schema:u,uiSchema:x,registry:y}),M.jsxs("div",{className:"flex items-center gap-2 my-2",children:[M.jsx(q9,{id:t,name:n||t,checked:typeof r>"u"?!1:!!r,required:T,disabled:o||i,autoFocus:f,onCheckedChange:_,onBlur:S,onFocus:C,className:w}),M.jsx(d2,{className:"leading-tight",htmlFor:t,children:s9(a,c||!a)})]})]})}function Pme({id:e,htmlName:t,disabled:n,options:r,value:o,autofocus:i,readonly:a,required:c,onChange:u,onBlur:f,onFocus:h,className:p}){const{enumOptions:g,enumDisabled:v,inline:y,emptyValue:x}=r,w=Array.isArray(o)?o:[o],T=({target:_})=>f(e,jr(_&&_.value,g,x)),b=({target:_})=>h(e,jr(_&&_.value,g,x));return M.jsx("div",{className:Vt({"flex flex-col gap-2":!y,"flex flex-row gap-4 flex-wrap":y}),children:Array.isArray(g)&&g.map((_,S)=>{const C=pp(_.value,w),E=Array.isArray(v)&&v.indexOf(_.value)!==-1,O=oc(e,S);return M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx(q9,{id:O,name:t||e,required:c,disabled:n||E||a,onCheckedChange:j=>{u(j?e9(S,w,g):QI(S,w,g))},className:p,checked:C,autoFocus:i&&S===0,onBlur:T,onFocus:b,"aria-describedby":Oo(e)}),M.jsx(d2,{className:"leading-tight",htmlFor:oc(e,S),children:_.label})]},O)})})}function H9(e){const t=e+"CollectionProvider",[n,r]=kc(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=x=>{const{scope:w,children:T}=x,b=zo.useRef(null),_=zo.useRef(new Map).current;return M.jsx(o,{scope:w,itemMap:_,collectionRef:b,children:T})};a.displayName=t;const c=e+"CollectionSlot",u=Yy(c),f=zo.forwardRef((x,w)=>{const{scope:T,children:b}=x,_=i(c,T),S=fr(w,_.collectionRef);return M.jsx(u,{ref:S,children:b})});f.displayName=c;const h=e+"CollectionItemSlot",p="data-radix-collection-item",g=Yy(h),v=zo.forwardRef((x,w)=>{const{scope:T,children:b,..._}=x,S=zo.useRef(null),C=fr(w,S),E=i(h,T);return zo.useEffect(()=>(E.itemMap.set(S,{ref:S,..._}),()=>{E.itemMap.delete(S)})),M.jsx(g,{[p]:"",ref:C,children:b})});v.displayName=h;function y(x){const w=i(e+"CollectionConsumer",x);return zo.useCallback(()=>{const b=w.collectionRef.current;if(!b)return[];const _=Array.from(b.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((E,O)=>_.indexOf(E.ref.current)-_.indexOf(O.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:f,ItemSlot:v},y,r]}var Nme=Kh[" useId ".trim().toString()]||(()=>{}),Dme=0;function ti(e){const[t,n]=A.useState(Nme());return df(()=>{n(r=>r??String(Dme++))},[e]),t?`radix-${t}`:""}function hf(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...n)=>t.current?.(...n),[])}var $me=A.createContext(void 0);function h2(e){const t=A.useContext($me);return e||t||"ltr"}var _S="rovingFocusGroup.onEntryFocus",Ime={bubbles:!1,cancelable:!0},vp="RovingFocusGroup",[Sx,K9,zme]=H9(vp),[Lme,G9]=kc(vp,[zme]),[Fme,Ume]=Lme(vp),Z9=A.forwardRef((e,t)=>M.jsx(Sx.Provider,{scope:e.__scopeRovingFocusGroup,children:M.jsx(Sx.Slot,{scope:e.__scopeRovingFocusGroup,children:M.jsx(Vme,{...e,ref:t})})}));Z9.displayName=vp;var Vme=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:h=!1,...p}=e,g=A.useRef(null),v=fr(t,g),y=h2(i),[x,w]=yp({prop:a,defaultProp:c??null,onChange:u,caller:vp}),[T,b]=A.useState(!1),_=hf(f),S=K9(n),C=A.useRef(!1),[E,O]=A.useState(0);return A.useEffect(()=>{const j=g.current;if(j)return j.addEventListener(_S,_),()=>j.removeEventListener(_S,_)},[_]),M.jsx(Fme,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:x,onItemFocus:A.useCallback(j=>w(j),[w]),onItemShiftTab:A.useCallback(()=>b(!0),[]),onFocusableItemAdd:A.useCallback(()=>O(j=>j+1),[]),onFocusableItemRemove:A.useCallback(()=>O(j=>j-1),[]),children:M.jsx(er.div,{tabIndex:T||E===0?-1:0,"data-orientation":r,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:Vn(e.onMouseDown,()=>{C.current=!0}),onFocus:Vn(e.onFocus,j=>{const P=!C.current;if(j.target===j.currentTarget&&P&&!T){const $=new CustomEvent(_S,Ime);if(j.currentTarget.dispatchEvent($),!$.defaultPrevented){const I=S().filter(Z=>Z.focusable),L=I.find(Z=>Z.active),F=I.find(Z=>Z.id===x),ee=[L,F,...I].filter(Boolean).map(Z=>Z.ref.current);X9(ee,h)}}C.current=!1}),onBlur:Vn(e.onBlur,()=>b(!1))})})}),Y9="RovingFocusGroupItem",W9=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:a,...c}=e,u=ti(),f=i||u,h=Ume(Y9,n),p=h.currentTabStopId===f,g=K9(n),{onFocusableItemAdd:v,onFocusableItemRemove:y,currentTabStopId:x}=h;return A.useEffect(()=>{if(r)return v(),()=>y()},[r,v,y]),M.jsx(Sx.ItemSlot,{scope:n,id:f,focusable:r,active:o,children:M.jsx(er.span,{tabIndex:p?0:-1,"data-orientation":h.orientation,...c,ref:t,onMouseDown:Vn(e.onMouseDown,w=>{r?h.onItemFocus(f):w.preventDefault()}),onFocus:Vn(e.onFocus,()=>h.onItemFocus(f)),onKeyDown:Vn(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){h.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const T=Hme(w,h.orientation,h.dir);if(T!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let _=g().filter(S=>S.focusable).map(S=>S.ref.current);if(T==="last")_.reverse();else if(T==="prev"||T==="next"){T==="prev"&&_.reverse();const S=_.indexOf(w.currentTarget);_=h.loop?Kme(_,S+1):_.slice(S+1)}setTimeout(()=>X9(_))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:x!=null}):a})})});W9.displayName=Y9;var qme={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Bme(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Hme(e,t,n){const r=Bme(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return qme[r]}function X9(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Kme(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Gme=Z9,Zme=W9,p2="Radio",[Yme,Q9]=kc(p2),[Wme,Xme]=Yme(p2),J9=A.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:c="on",onCheck:u,form:f,...h}=e,[p,g]=A.useState(null),v=fr(t,w=>g(w)),y=A.useRef(!1),x=p?f||!!p.closest("form"):!0;return M.jsxs(Wme,{scope:n,checked:o,disabled:a,children:[M.jsx(er.button,{type:"button",role:"radio","aria-checked":o,"data-state":r6(o),"data-disabled":a?"":void 0,disabled:a,value:c,...h,ref:v,onClick:Vn(e.onClick,w=>{o||u?.(),x&&(y.current=w.isPropagationStopped(),y.current||w.stopPropagation())})}),x&&M.jsx(n6,{control:p,bubbles:!y.current,name:r,value:c,checked:o,required:i,disabled:a,form:f,style:{transform:"translateX(-100%)"}})]})});J9.displayName=p2;var e6="RadioIndicator",t6=A.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=Xme(e6,n);return M.jsx($f,{present:r||i.checked,children:M.jsx(er.span,{"data-state":r6(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});t6.displayName=e6;var Qme="RadioBubbleInput",n6=A.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const a=A.useRef(null),c=fr(a,i),u=c2(n),f=u2(t);return A.useEffect(()=>{const h=a.current;if(!h)return;const p=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==n&&v){const y=new Event("click",{bubbles:r});v.call(h,n),h.dispatchEvent(y)}},[u,n,r]),M.jsx(er.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:c,style:{...o.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});n6.displayName=Qme;function r6(e){return e?"checked":"unchecked"}var Jme=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],U0="RadioGroup",[ege]=kc(U0,[G9,Q9]),o6=G9(),s6=Q9(),[tge,nge]=ege(U0),i6=A.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:c=!1,orientation:u,dir:f,loop:h=!0,onValueChange:p,...g}=e,v=o6(n),y=h2(f),[x,w]=yp({prop:i,defaultProp:o??null,onChange:p,caller:U0});return M.jsx(tge,{scope:n,name:r,required:a,disabled:c,value:x,onValueChange:w,children:M.jsx(Gme,{asChild:!0,...v,orientation:u,dir:y,loop:h,children:M.jsx(er.div,{role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":c?"":void 0,dir:y,...g,ref:t})})})});i6.displayName=U0;var a6="RadioGroupItem",l6=A.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=nge(a6,n),a=i.disabled||r,c=o6(n),u=s6(n),f=A.useRef(null),h=fr(t,f),p=i.value===o.value,g=A.useRef(!1);return A.useEffect(()=>{const v=x=>{Jme.includes(x.key)&&(g.current=!0)},y=()=>g.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",y)}},[]),M.jsx(Zme,{asChild:!0,...c,focusable:!a,active:p,children:M.jsx(J9,{disabled:a,required:i.required,checked:p,...u,...o,name:i.name,ref:h,onCheck:()=>i.onValueChange(o.value),onKeyDown:Vn(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:Vn(o.onFocus,()=>{g.current&&f.current?.click()})})})});l6.displayName=a6;var rge="RadioGroupIndicator",c6=A.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=s6(n);return M.jsx(t6,{...o,...r,ref:t})});c6.displayName=rge;var oge=i6,sge=l6,ige=c6;function age({className:e,...t}){return M.jsx(oge,{"data-slot":"radio-group",className:Vt("grid gap-3",e),...t})}function lge({className:e,...t}){return M.jsx(sge,{"data-slot":"radio-group-item",className:Vt("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:M.jsx(ige,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:M.jsx(mpe,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function cge({id:e,options:t,value:n,required:r,disabled:o,readonly:i,onChange:a,onBlur:c,onFocus:u,className:f}){const{enumOptions:h,enumDisabled:p,emptyValue:g}=t,v=T=>a(jr(T,h,g)),y=({target:T})=>c(e,jr(T&&T.value,h,g)),x=({target:T})=>u(e,jr(T&&T.value,h,g)),w=!!(t&&t.inline);return M.jsx("div",{className:"mb-0",children:M.jsx(age,{defaultValue:n?.toString(),required:r,disabled:o||i,onValueChange:T=>{v(T)},onBlur:y,onFocus:x,"aria-describedby":Oo(e),orientation:w?"horizontal":"vertical",className:Vt("flex flex-wrap",{"flex-col":!w},f),children:Array.isArray(h)&&h.map((T,b)=>{const _=Array.isArray(p)&&p.indexOf(T.value)!==-1,S=pp(T.value,n);return M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx(lge,{checked:S,value:b.toString(),id:oc(e,b),disabled:_}),M.jsx(d2,{className:"leading-tight",htmlFor:oc(e,b),children:T.label})]},oc(e,b))})})})}function u6(e,[t,n]){return Math.min(n,Math.max(t,e))}var f6=["PageUp","PageDown"],d6=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],h6={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},If="Slider",[wx,uge,fge]=H9(If),[p6]=kc(If,[fge]),[dge,V0]=p6(If),m6=A.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:c=!1,minStepsBetweenThumbs:u=0,defaultValue:f=[r],value:h,onValueChange:p=()=>{},onValueCommit:g=()=>{},inverted:v=!1,form:y,...x}=e,w=A.useRef(new Set),T=A.useRef(0),_=a==="horizontal"?hge:pge,[S=[],C]=yp({prop:h,defaultProp:f,onChange:I=>{[...w.current][T.current]?.focus(),p(I)}}),E=A.useRef(S);function O(I){const L=bge(S,I);$(I,L)}function j(I){$(I,T.current)}function P(){const I=E.current[T.current];S[T.current]!==I&&g(S)}function $(I,L,{commit:F}={commit:!1}){const J=Ege(i),ee=_ge(Math.round((I-r)/i)*i+r,J),Z=u6(ee,[r,o]);C((H=[])=>{const V=yge(H,Z,L);if(xge(V,u*i)){T.current=V.indexOf(Z);const oe=String(V)!==String(H);return oe&&F&&g(V),oe?V:H}else return H})}return M.jsx(dge,{scope:e.__scopeSlider,name:n,disabled:c,min:r,max:o,valueIndexToChangeRef:T,thumbs:w.current,values:S,orientation:a,form:y,children:M.jsx(wx.Provider,{scope:e.__scopeSlider,children:M.jsx(wx.Slot,{scope:e.__scopeSlider,children:M.jsx(_,{"aria-disabled":c,"data-disabled":c?"":void 0,...x,ref:t,onPointerDown:Vn(x.onPointerDown,()=>{c||(E.current=S)}),min:r,max:o,inverted:v,onSlideStart:c?void 0:O,onSlideMove:c?void 0:j,onSlideEnd:c?void 0:P,onHomeKeyDown:()=>!c&&$(r,0,{commit:!0}),onEndKeyDown:()=>!c&&$(o,S.length-1,{commit:!0}),onStepKeyDown:({event:I,direction:L})=>{if(!c){const ee=f6.includes(I.key)||I.shiftKey&&d6.includes(I.key)?10:1,Z=T.current,H=S[Z],V=i*ee*L;$(H+V,Z,{commit:!0})}}})})})})});m6.displayName=If;var[g6,y6]=p6(If,{startEdge:"left",endEdge:"right",size:"width",direction:1}),hge=A.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:c,onSlideEnd:u,onStepKeyDown:f,...h}=e,[p,g]=A.useState(null),v=fr(t,_=>g(_)),y=A.useRef(void 0),x=h2(o),w=x==="ltr",T=w&&!i||!w&&i;function b(_){const S=y.current||p.getBoundingClientRect(),C=[0,S.width],O=m2(C,T?[n,r]:[r,n]);return y.current=S,O(_-S.left)}return M.jsx(g6,{scope:e.__scopeSlider,startEdge:T?"left":"right",endEdge:T?"right":"left",direction:T?1:-1,size:"width",children:M.jsx(v6,{dir:x,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:_=>{const S=b(_.clientX);a?.(S)},onSlideMove:_=>{const S=b(_.clientX);c?.(S)},onSlideEnd:()=>{y.current=void 0,u?.()},onStepKeyDown:_=>{const C=h6[T?"from-left":"from-right"].includes(_.key);f?.({event:_,direction:C?-1:1})}})})}),pge=A.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:c,onStepKeyDown:u,...f}=e,h=A.useRef(null),p=fr(t,h),g=A.useRef(void 0),v=!o;function y(x){const w=g.current||h.current.getBoundingClientRect(),T=[0,w.height],_=m2(T,v?[r,n]:[n,r]);return g.current=w,_(x-w.top)}return M.jsx(g6,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:M.jsx(v6,{"data-orientation":"vertical",...f,ref:p,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:x=>{const w=y(x.clientY);i?.(w)},onSlideMove:x=>{const w=y(x.clientY);a?.(w)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:x=>{const T=h6[v?"from-bottom":"from-top"].includes(x.key);u?.({event:x,direction:T?-1:1})}})})}),v6=A.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:c,onStepKeyDown:u,...f}=e,h=V0(If,n);return M.jsx(er.span,{...f,ref:t,onKeyDown:Vn(e.onKeyDown,p=>{p.key==="Home"?(a(p),p.preventDefault()):p.key==="End"?(c(p),p.preventDefault()):f6.concat(d6).includes(p.key)&&(u(p),p.preventDefault())}),onPointerDown:Vn(e.onPointerDown,p=>{const g=p.target;g.setPointerCapture(p.pointerId),p.preventDefault(),h.thumbs.has(g)?g.focus():r(p)}),onPointerMove:Vn(e.onPointerMove,p=>{p.target.hasPointerCapture(p.pointerId)&&o(p)}),onPointerUp:Vn(e.onPointerUp,p=>{const g=p.target;g.hasPointerCapture(p.pointerId)&&(g.releasePointerCapture(p.pointerId),i(p))})})}),b6="SliderTrack",S6=A.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=V0(b6,n);return M.jsx(er.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});S6.displayName=b6;var xx="SliderRange",w6=A.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=V0(xx,n),i=y6(xx,n),a=A.useRef(null),c=fr(t,a),u=o.values.length,f=o.values.map(g=>_6(g,o.min,o.max)),h=u>1?Math.min(...f):0,p=100-Math.max(...f);return M.jsx(er.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:c,style:{...e.style,[i.startEdge]:h+"%",[i.endEdge]:p+"%"}})});w6.displayName=xx;var Ex="SliderThumb",x6=A.forwardRef((e,t)=>{const n=uge(e.__scopeSlider),[r,o]=A.useState(null),i=fr(t,c=>o(c)),a=A.useMemo(()=>r?n().findIndex(c=>c.ref.current===r):-1,[n,r]);return M.jsx(mge,{...e,ref:i,index:a})}),mge=A.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=V0(Ex,n),c=y6(Ex,n),[u,f]=A.useState(null),h=fr(t,b=>f(b)),p=u?a.form||!!u.closest("form"):!0,g=u2(u),v=a.values[r],y=v===void 0?0:_6(v,a.min,a.max),x=vge(r,a.values.length),w=g?.[c.size],T=w?Sge(w,y,c.direction):0;return A.useEffect(()=>{if(u)return a.thumbs.add(u),()=>{a.thumbs.delete(u)}},[u,a.thumbs]),M.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${y}% + ${T}px)`},children:[M.jsx(wx.ItemSlot,{scope:e.__scopeSlider,children:M.jsx(er.span,{role:"slider","aria-label":e["aria-label"]||x,"aria-valuemin":a.min,"aria-valuenow":v,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:Vn(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),p&&M.jsx(E6,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:v},r)]})});x6.displayName=Ex;var gge="RadioBubbleInput",E6=A.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=A.useRef(null),i=fr(o,r),a=c2(t);return A.useEffect(()=>{const c=o.current;if(!c)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==t&&h){const p=new Event("input",{bubbles:!0});h.call(c,t),c.dispatchEvent(p)}},[a,t]),M.jsx(er.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});E6.displayName=gge;function yge(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function _6(e,t,n){const i=100/(n-t)*(e-t);return u6(i,[0,100])}function vge(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function bge(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function Sge(e,t,n){const r=e/2,i=m2([0,50],[0,r]);return(r-i(t)*n)*n}function wge(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function xge(e,t){if(t>0){const n=wge(e);return Math.min(...n)>=t}return!0}function m2(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Ege(e){return(String(e).split(".")[1]||"").length}function _ge(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Cge=m6,Tge=S6,Rge=w6,Oge=x6;function Age({className:e,defaultValue:t,value:n,min:r=0,max:o=100,...i}){const a=A.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,o],[n,t,r,o]);return M.jsxs(Cge,{"data-slot":"slider",defaultValue:t,value:n,min:r,max:o,className:Vt("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),...i,children:[M.jsx(Tge,{"data-slot":"slider-track",className:Vt("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:M.jsx(Rge,{"data-slot":"slider-range",className:Vt("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:a.length},(c,u)=>M.jsx(Oge,{"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"},u))]})}const kge=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function Mge({value:e,readonly:t,disabled:n,options:r,schema:o,onChange:i,label:a,id:c}){const u=p=>i(p[0]),f={...n9(o)},h={id:c,...xE(r.props||{},kge)};return M.jsxs(M.Fragment,{children:[M.jsx(Age,{disabled:n||t,min:f.min,max:f.max,step:f.step,value:[e],onValueChange:u,...h,"aria-describedby":Oo(c)}),e]})}var Wj=1,jge=.9,Pge=.8,Nge=.17,CS=.1,TS=.999,Dge=.9999,$ge=.99,Ige=/[\\\/_+.#"@\[\(\{&]/,zge=/[\\\/_+.#"@\[\(\{&]/g,Lge=/[\s-]/,C6=/[\s-]/g;function _x(e,t,n,r,o,i,a){if(i===t.length)return o===e.length?Wj:$ge;var c=`${o},${i}`;if(a[c]!==void 0)return a[c];for(var u=r.charAt(i),f=n.indexOf(u,o),h=0,p,g,v,y;f>=0;)p=_x(e,t,n,r,f+1,i+1,a),p>h&&(f===o?p*=Wj:Ige.test(e.charAt(f-1))?(p*=Pge,v=e.slice(o,f-1).match(zge),v&&o>0&&(p*=Math.pow(TS,v.length))):Lge.test(e.charAt(f-1))?(p*=jge,y=e.slice(o,f-1).match(C6),y&&o>0&&(p*=Math.pow(TS,y.length))):(p*=Nge,o>0&&(p*=Math.pow(TS,f-o))),e.charAt(f)!==t.charAt(i)&&(p*=Dge)),(p<CS&&n.charAt(f-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(f-1)!==r.charAt(i))&&(g=_x(e,t,n,r,f+1,i+2,a),g*CS>p&&(p=g*CS)),p>h&&(h=p),f=n.indexOf(u,f+1);return a[c]=h,h}function Xj(e){return e.toLowerCase().replace(C6," ")}function Fge(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,_x(e,t,Xj(e),Xj(t),0,0,{})}function Uge(e,t=globalThis?.document){const n=hf(e);A.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Vge="DismissableLayer",Cx="dismissableLayer.update",qge="dismissableLayer.pointerDownOutside",Bge="dismissableLayer.focusOutside",Qj,T6=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),R6=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:c,...u}=e,f=A.useContext(T6),[h,p]=A.useState(null),g=h?.ownerDocument??globalThis?.document,[,v]=A.useState({}),y=fr(t,O=>p(O)),x=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),T=x.indexOf(w),b=h?x.indexOf(h):-1,_=f.layersWithOutsidePointerEventsDisabled.size>0,S=b>=T,C=Gge(O=>{const j=O.target,P=[...f.branches].some($=>$.contains(j));!S||P||(o?.(O),a?.(O),O.defaultPrevented||c?.())},g),E=Zge(O=>{const j=O.target;[...f.branches].some($=>$.contains(j))||(i?.(O),a?.(O),O.defaultPrevented||c?.())},g);return Uge(O=>{b===f.layers.size-1&&(r?.(O),!O.defaultPrevented&&c&&(O.preventDefault(),c()))},g),A.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Qj=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),Jj(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Qj)}},[h,g,n,f]),A.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),Jj())},[h,f]),A.useEffect(()=>{const O=()=>v({});return document.addEventListener(Cx,O),()=>document.removeEventListener(Cx,O)},[]),M.jsx(er.div,{...u,ref:y,style:{pointerEvents:_?S?"auto":"none":void 0,...e.style},onFocusCapture:Vn(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Vn(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Vn(e.onPointerDownCapture,C.onPointerDownCapture)})});R6.displayName=Vge;var Hge="DismissableLayerBranch",Kge=A.forwardRef((e,t)=>{const n=A.useContext(T6),r=A.useRef(null),o=fr(t,r);return A.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),M.jsx(er.div,{...e,ref:o})});Kge.displayName=Hge;function Gge(e,t=globalThis?.document){const n=hf(e),r=A.useRef(!1),o=A.useRef(()=>{});return A.useEffect(()=>{const i=c=>{if(c.target&&!r.current){let u=function(){O6(qge,n,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Zge(e,t=globalThis?.document){const n=hf(e),r=A.useRef(!1);return A.useEffect(()=>{const o=i=>{i.target&&!r.current&&O6(Bge,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Jj(){const e=new CustomEvent(Cx);document.dispatchEvent(e)}function O6(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?xme(o,i):o.dispatchEvent(i)}var RS="focusScope.autoFocusOnMount",OS="focusScope.autoFocusOnUnmount",eP={bubbles:!1,cancelable:!0},Yge="FocusScope",A6=A.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[c,u]=A.useState(null),f=hf(o),h=hf(i),p=A.useRef(null),g=fr(t,x=>u(x)),v=A.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;A.useEffect(()=>{if(r){let x=function(_){if(v.paused||!c)return;const S=_.target;c.contains(S)?p.current=S:Pa(p.current,{select:!0})},w=function(_){if(v.paused||!c)return;const S=_.relatedTarget;S!==null&&(c.contains(S)||Pa(p.current,{select:!0}))},T=function(_){if(document.activeElement===document.body)for(const C of _)C.removedNodes.length>0&&Pa(c)};document.addEventListener("focusin",x),document.addEventListener("focusout",w);const b=new MutationObserver(T);return c&&b.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",w),b.disconnect()}}},[r,c,v.paused]),A.useEffect(()=>{if(c){nP.add(v);const x=document.activeElement;if(!c.contains(x)){const T=new CustomEvent(RS,eP);c.addEventListener(RS,f),c.dispatchEvent(T),T.defaultPrevented||(Wge(tye(k6(c)),{select:!0}),document.activeElement===x&&Pa(c))}return()=>{c.removeEventListener(RS,f),setTimeout(()=>{const T=new CustomEvent(OS,eP);c.addEventListener(OS,h),c.dispatchEvent(T),T.defaultPrevented||Pa(x??document.body,{select:!0}),c.removeEventListener(OS,h),nP.remove(v)},0)}}},[c,f,h,v]);const y=A.useCallback(x=>{if(!n&&!r||v.paused)return;const w=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,T=document.activeElement;if(w&&T){const b=x.currentTarget,[_,S]=Xge(b);_&&S?!x.shiftKey&&T===S?(x.preventDefault(),n&&Pa(_,{select:!0})):x.shiftKey&&T===_&&(x.preventDefault(),n&&Pa(S,{select:!0})):T===b&&x.preventDefault()}},[n,r,v.paused]);return M.jsx(er.div,{tabIndex:-1,...a,ref:g,onKeyDown:y})});A6.displayName=Yge;function Wge(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Pa(r,{select:t}),document.activeElement!==n)return}function Xge(e){const t=k6(e),n=tP(t,e),r=tP(t.reverse(),e);return[n,r]}function k6(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function tP(e,t){for(const n of e)if(!Qge(n,{upTo:t}))return n}function Qge(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 Jge(e){return e instanceof HTMLInputElement&&"select"in e}function Pa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Jge(e)&&t&&e.select()}}var nP=eye();function eye(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=rP(e,t),e.unshift(t)},remove(t){e=rP(e,t),e[0]?.resume()}}}function rP(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function tye(e){return e.filter(t=>t.tagName!=="A")}var nye="Portal",M6=A.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=A.useState(!1);df(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?Jpe.createPortal(M.jsx(er.div,{...r,ref:t}),a):null});M6.displayName=nye;var AS=0;function rye(){A.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??oP()),document.body.insertAdjacentElement("beforeend",e[1]??oP()),AS++,()=>{AS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),AS--}},[])}function oP(){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 Ys=function(){return Ys=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ys.apply(this,arguments)};function j6(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Tx(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function oye(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var hy="right-scroll-bar-position",py="width-before-scroll-bar",sye="with-scroll-bars-hidden",iye="--removed-body-scroll-bar-size";function kS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function aye(e,t){var n=A.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var lye=typeof window<"u"?A.useLayoutEffect:A.useEffect,sP=new WeakMap;function cye(e,t){var n=aye(null,function(r){return e.forEach(function(o){return kS(o,r)})});return lye(function(){var r=sP.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(c){i.has(c)||kS(c,null)}),i.forEach(function(c){o.has(c)||kS(c,a)})}sP.set(n,e)},[e]),n}function uye(e){return e}function fye(e,t){t===void 0&&(t=uye);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(i),a=n}var u=function(){var h=a;a=[],h.forEach(i)},f=function(){return Promise.resolve().then(u)};f(),n={push:function(h){a.push(h),f()},filter:function(h){return a=a.filter(h),n}}}};return o}function dye(e){e===void 0&&(e={});var t=fye(null);return t.options=Ys({async:!0,ssr:!1},e),t}var P6=function(e){var t=e.sideCar,n=j6(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return A.createElement(r,Ys({},n))};P6.isSideCarExport=!0;function hye(e,t){return e.useMedium(t),P6}var N6=dye(),MS=function(){},q0=A.forwardRef(function(e,t){var n=A.useRef(null),r=A.useState({onScrollCapture:MS,onWheelCapture:MS,onTouchMoveCapture:MS}),o=r[0],i=r[1],a=e.forwardProps,c=e.children,u=e.className,f=e.removeScrollBar,h=e.enabled,p=e.shards,g=e.sideCar,v=e.noRelative,y=e.noIsolation,x=e.inert,w=e.allowPinchZoom,T=e.as,b=T===void 0?"div":T,_=e.gapMode,S=j6(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=g,E=cye([n,t]),O=Ys(Ys({},S),o);return A.createElement(A.Fragment,null,h&&A.createElement(C,{sideCar:N6,removeScrollBar:f,shards:p,noRelative:v,noIsolation:y,inert:x,setCallbacks:i,allowPinchZoom:!!w,lockRef:n,gapMode:_}),a?A.cloneElement(A.Children.only(c),Ys(Ys({},O),{ref:E})):A.createElement(b,Ys({},O,{className:u,ref:E}),c))});q0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};q0.classNames={fullWidth:py,zeroRight:hy};var pye=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mye(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=pye();return t&&e.setAttribute("nonce",t),e}function gye(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yye(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vye=function(){var e=0,t=null;return{add:function(n){e==0&&(t=mye())&&(gye(t,n),yye(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bye=function(){var e=vye();return function(t,n){A.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},D6=function(){var e=bye(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Sye={left:0,top:0,right:0,gap:0},jS=function(e){return parseInt(e||"",10)||0},wye=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[jS(n),jS(r),jS(o)]},xye=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Sye;var t=wye(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Eye=D6(),Hu="data-scroll-locked",_ye=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
84
|
+
.`.concat(sye,` {
|
|
85
|
+
overflow: hidden `).concat(r,`;
|
|
86
|
+
padding-right: `).concat(c,"px ").concat(r,`;
|
|
87
|
+
}
|
|
88
|
+
body[`).concat(Hu,`] {
|
|
89
|
+
overflow: hidden `).concat(r,`;
|
|
90
|
+
overscroll-behavior: contain;
|
|
91
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
92
|
+
padding-left: `.concat(o,`px;
|
|
93
|
+
padding-top: `).concat(i,`px;
|
|
94
|
+
padding-right: `).concat(a,`px;
|
|
95
|
+
margin-left:0;
|
|
96
|
+
margin-top:0;
|
|
97
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
98
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.`).concat(hy,` {
|
|
102
|
+
right: `).concat(c,"px ").concat(r,`;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.`).concat(py,` {
|
|
106
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.`).concat(hy," .").concat(hy,` {
|
|
110
|
+
right: 0 `).concat(r,`;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.`).concat(py," .").concat(py,` {
|
|
114
|
+
margin-right: 0 `).concat(r,`;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
body[`).concat(Hu,`] {
|
|
118
|
+
`).concat(iye,": ").concat(c,`px;
|
|
119
|
+
}
|
|
120
|
+
`)},iP=function(){var e=parseInt(document.body.getAttribute(Hu)||"0",10);return isFinite(e)?e:0},Cye=function(){A.useEffect(function(){return document.body.setAttribute(Hu,(iP()+1).toString()),function(){var e=iP()-1;e<=0?document.body.removeAttribute(Hu):document.body.setAttribute(Hu,e.toString())}},[])},Tye=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Cye();var i=A.useMemo(function(){return xye(o)},[o]);return A.createElement(Eye,{styles:_ye(i,!t,o,n?"":"!important")})},Rx=!1;if(typeof window<"u")try{var zg=Object.defineProperty({},"passive",{get:function(){return Rx=!0,!0}});window.addEventListener("test",zg,zg),window.removeEventListener("test",zg,zg)}catch{Rx=!1}var Su=Rx?{passive:!1}:!1,Rye=function(e){return e.tagName==="TEXTAREA"},$6=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Rye(e)&&n[t]==="visible")},Oye=function(e){return $6(e,"overflowY")},Aye=function(e){return $6(e,"overflowX")},aP=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=I6(e,r);if(o){var i=z6(e,r),a=i[1],c=i[2];if(a>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kye=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Mye=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},I6=function(e,t){return e==="v"?Oye(t):Aye(t)},z6=function(e,t){return e==="v"?kye(t):Mye(t)},jye=function(e,t){return e==="h"&&t==="rtl"?-1:1},Pye=function(e,t,n,r,o){var i=jye(e,window.getComputedStyle(t).direction),a=i*r,c=n.target,u=t.contains(c),f=!1,h=a>0,p=0,g=0;do{if(!c)break;var v=z6(e,c),y=v[0],x=v[1],w=v[2],T=x-w-i*y;(y||T)&&I6(e,c)&&(p+=T,g+=y);var b=c.parentNode;c=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(h&&Math.abs(p)<1||!h&&Math.abs(g)<1)&&(f=!0),f},Lg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lP=function(e){return[e.deltaX,e.deltaY]},cP=function(e){return e&&"current"in e?e.current:e},Nye=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Dye=function(e){return`
|
|
121
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
122
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
123
|
+
`)},$ye=0,wu=[];function Iye(e){var t=A.useRef([]),n=A.useRef([0,0]),r=A.useRef(),o=A.useState($ye++)[0],i=A.useState(D6)[0],a=A.useRef(e);A.useEffect(function(){a.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=oye([e.lockRef.current],(e.shards||[]).map(cP),!0).filter(Boolean);return x.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=A.useCallback(function(x,w){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!a.current.allowPinchZoom;var T=Lg(x),b=n.current,_="deltaX"in x?x.deltaX:b[0]-T[0],S="deltaY"in x?x.deltaY:b[1]-T[1],C,E=x.target,O=Math.abs(_)>Math.abs(S)?"h":"v";if("touches"in x&&O==="h"&&E.type==="range")return!1;var j=window.getSelection(),P=j&&j.anchorNode,$=P?P===E||P.contains(E):!1;if($)return!1;var I=aP(O,E);if(!I)return!0;if(I?C=O:(C=O==="v"?"h":"v",I=aP(O,E)),!I)return!1;if(!r.current&&"changedTouches"in x&&(_||S)&&(r.current=C),!C)return!0;var L=r.current||C;return Pye(L,w,x,L==="h"?_:S)},[]),u=A.useCallback(function(x){var w=x;if(!(!wu.length||wu[wu.length-1]!==i)){var T="deltaY"in w?lP(w):Lg(w),b=t.current.filter(function(C){return C.name===w.type&&(C.target===w.target||w.target===C.shadowParent)&&Nye(C.delta,T)})[0];if(b&&b.should){w.cancelable&&w.preventDefault();return}if(!b){var _=(a.current.shards||[]).map(cP).filter(Boolean).filter(function(C){return C.contains(w.target)}),S=_.length>0?c(w,_[0]):!a.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),f=A.useCallback(function(x,w,T,b){var _={name:x,delta:w,target:T,should:b,shadowParent:zye(T)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(S){return S!==_})},1)},[]),h=A.useCallback(function(x){n.current=Lg(x),r.current=void 0},[]),p=A.useCallback(function(x){f(x.type,lP(x),x.target,c(x,e.lockRef.current))},[]),g=A.useCallback(function(x){f(x.type,Lg(x),x.target,c(x,e.lockRef.current))},[]);A.useEffect(function(){return wu.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,Su),document.addEventListener("touchmove",u,Su),document.addEventListener("touchstart",h,Su),function(){wu=wu.filter(function(x){return x!==i}),document.removeEventListener("wheel",u,Su),document.removeEventListener("touchmove",u,Su),document.removeEventListener("touchstart",h,Su)}},[]);var v=e.removeScrollBar,y=e.inert;return A.createElement(A.Fragment,null,y?A.createElement(i,{styles:Dye(o)}):null,v?A.createElement(Tye,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function zye(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Lye=hye(N6,Iye);var L6=A.forwardRef(function(e,t){return A.createElement(q0,Ys({},e,{ref:t,sideCar:Lye}))});L6.classNames=q0.classNames;var Fye=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xu=new WeakMap,Fg=new WeakMap,Ug={},PS=0,F6=function(e){return e&&(e.host||F6(e.parentNode))},Uye=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=F6(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Vye=function(e,t,n,r){var o=Uye(t,Array.isArray(e)?e:[e]);Ug[n]||(Ug[n]=new WeakMap);var i=Ug[n],a=[],c=new Set,u=new Set(o),f=function(p){!p||c.has(p)||(c.add(p),f(p.parentNode))};o.forEach(f);var h=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(g){if(c.has(g))h(g);else try{var v=g.getAttribute(r),y=v!==null&&v!=="false",x=(xu.get(g)||0)+1,w=(i.get(g)||0)+1;xu.set(g,x),i.set(g,w),a.push(g),x===1&&y&&Fg.set(g,!0),w===1&&g.setAttribute(n,"true"),y||g.setAttribute(r,"true")}catch(T){console.error("aria-hidden: cannot operate on ",g,T)}})};return h(t),c.clear(),PS++,function(){a.forEach(function(p){var g=xu.get(p)-1,v=i.get(p)-1;xu.set(p,g),i.set(p,v),g||(Fg.has(p)||p.removeAttribute(r),Fg.delete(p)),v||p.removeAttribute(n)}),PS--,PS||(xu=new WeakMap,xu=new WeakMap,Fg=new WeakMap,Ug={})}},qye=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Fye(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Vye(r,o,n,"aria-hidden")):function(){return null}},B0="Dialog",[U6]=kc(B0),[Bye,Ns]=U6(B0),V6=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,c=A.useRef(null),u=A.useRef(null),[f,h]=yp({prop:r,defaultProp:o??!1,onChange:i,caller:B0});return M.jsx(Bye,{scope:t,triggerRef:c,contentRef:u,contentId:ti(),titleId:ti(),descriptionId:ti(),open:f,onOpenChange:h,onOpenToggle:A.useCallback(()=>h(p=>!p),[h]),modal:a,children:n})};V6.displayName=B0;var q6="DialogTrigger",Hye=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ns(q6,n),i=fr(t,o.triggerRef);return M.jsx(er.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":v2(o.open),...r,ref:i,onClick:Vn(e.onClick,o.onOpenToggle)})});Hye.displayName=q6;var g2="DialogPortal",[Kye,B6]=U6(g2,{forceMount:void 0}),H6=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Ns(g2,t);return M.jsx(Kye,{scope:t,forceMount:n,children:A.Children.map(r,a=>M.jsx($f,{present:n||i.open,children:M.jsx(M6,{asChild:!0,container:o,children:a})}))})};H6.displayName=g2;var Wy="DialogOverlay",K6=A.forwardRef((e,t)=>{const n=B6(Wy,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Ns(Wy,e.__scopeDialog);return i.modal?M.jsx($f,{present:r||i.open,children:M.jsx(Zye,{...o,ref:t})}):null});K6.displayName=Wy;var Gye=Yy("DialogOverlay.RemoveScroll"),Zye=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ns(Wy,n);return M.jsx(L6,{as:Gye,allowPinchZoom:!0,shards:[o.contentRef],children:M.jsx(er.div,{"data-state":v2(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),pc="DialogContent",G6=A.forwardRef((e,t)=>{const n=B6(pc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Ns(pc,e.__scopeDialog);return M.jsx($f,{present:r||i.open,children:i.modal?M.jsx(Yye,{...o,ref:t}):M.jsx(Wye,{...o,ref:t})})});G6.displayName=pc;var Yye=A.forwardRef((e,t)=>{const n=Ns(pc,e.__scopeDialog),r=A.useRef(null),o=fr(t,n.contentRef,r);return A.useEffect(()=>{const i=r.current;if(i)return qye(i)},[]),M.jsx(Z6,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Vn(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Vn(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&i.preventDefault()}),onFocusOutside:Vn(e.onFocusOutside,i=>i.preventDefault())})}),Wye=A.forwardRef((e,t)=>{const n=Ns(pc,e.__scopeDialog),r=A.useRef(!1),o=A.useRef(!1);return M.jsx(Z6,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;n.triggerRef.current?.contains(a)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Z6=A.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,c=Ns(pc,n),u=A.useRef(null),f=fr(t,u);return rye(),M.jsxs(M.Fragment,{children:[M.jsx(A6,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:M.jsx(R6,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":v2(c.open),...a,ref:f,onDismiss:()=>c.onOpenChange(!1)})}),M.jsxs(M.Fragment,{children:[M.jsx(e0e,{titleId:c.titleId}),M.jsx(n0e,{contentRef:u,descriptionId:c.descriptionId})]})]})}),y2="DialogTitle",Xye=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ns(y2,n);return M.jsx(er.h2,{id:o.titleId,...r,ref:t})});Xye.displayName=y2;var Y6="DialogDescription",Qye=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ns(Y6,n);return M.jsx(er.p,{id:o.descriptionId,...r,ref:t})});Qye.displayName=Y6;var W6="DialogClose",Jye=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ns(W6,n);return M.jsx(er.button,{type:"button",...r,ref:t,onClick:Vn(e.onClick,()=>o.onOpenChange(!1))})});Jye.displayName=W6;function v2(e){return e?"open":"closed"}var X6="DialogTitleWarning",[EEe,Q6]=lme(X6,{contentName:pc,titleName:y2,docsSlug:"dialog"}),e0e=({titleId:e})=>{const t=Q6(X6),n=`\`${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 A.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},t0e="DialogDescriptionWarning",n0e=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Q6(t0e).contentName}}.`;return A.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},r0e=V6,o0e=H6,s0e=K6,i0e=G6,Kd='[cmdk-group=""]',NS='[cmdk-group-items=""]',a0e='[cmdk-group-heading=""]',J6='[cmdk-item=""]',uP=`${J6}:not([aria-disabled="true"])`,Ox="cmdk-item-select",Cu="data-value",l0e=(e,t,n)=>Fge(e,t,n),ez=A.createContext(void 0),bp=()=>A.useContext(ez),tz=A.createContext(void 0),b2=()=>A.useContext(tz),nz=A.createContext(void 0),rz=A.forwardRef((e,t)=>{let n=Tu(()=>{var q,U;return{search:"",value:(U=(q=e.value)!=null?q:e.defaultValue)!=null?U:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Tu(()=>new Set),o=Tu(()=>new Map),i=Tu(()=>new Map),a=Tu(()=>new Set),c=oz(e),{label:u,children:f,value:h,onValueChange:p,filter:g,shouldFilter:v,loop:y,disablePointerSelection:x=!1,vimBindings:w=!0,...T}=e,b=ti(),_=ti(),S=ti(),C=A.useRef(null),E=b0e();mc(()=>{if(h!==void 0){let q=h.trim();n.current.value=q,O.emit()}},[h]),mc(()=>{E(6,F)},[]);let O=A.useMemo(()=>({subscribe:q=>(a.current.add(q),()=>a.current.delete(q)),snapshot:()=>n.current,setState:(q,U,N)=>{var G,te,re,de;if(!Object.is(n.current[q],U)){if(n.current[q]=U,q==="search")L(),$(),E(1,I);else if(q==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let we=document.getElementById(S);we?we.focus():(G=document.getElementById(b))==null||G.focus()}if(E(7,()=>{var we;n.current.selectedItemId=(we=J())==null?void 0:we.id,O.emit()}),N||E(5,F),((te=c.current)==null?void 0:te.value)!==void 0){let we=U??"";(de=(re=c.current).onValueChange)==null||de.call(re,we);return}}O.emit()}},emit:()=>{a.current.forEach(q=>q())}}),[]),j=A.useMemo(()=>({value:(q,U,N)=>{var G;U!==((G=i.current.get(q))==null?void 0:G.value)&&(i.current.set(q,{value:U,keywords:N}),n.current.filtered.items.set(q,P(U,N)),E(2,()=>{$(),O.emit()}))},item:(q,U)=>(r.current.add(q),U&&(o.current.has(U)?o.current.get(U).add(q):o.current.set(U,new Set([q]))),E(3,()=>{L(),$(),n.current.value||I(),O.emit()}),()=>{i.current.delete(q),r.current.delete(q),n.current.filtered.items.delete(q);let N=J();E(4,()=>{L(),N?.getAttribute("id")===q&&I(),O.emit()})}),group:q=>(o.current.has(q)||o.current.set(q,new Set),()=>{i.current.delete(q),o.current.delete(q)}),filter:()=>c.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:b,inputId:S,labelId:_,listInnerRef:C}),[]);function P(q,U){var N,G;let te=(G=(N=c.current)==null?void 0:N.filter)!=null?G:l0e;return q?te(q,n.current.search,U):0}function $(){if(!n.current.search||c.current.shouldFilter===!1)return;let q=n.current.filtered.items,U=[];n.current.filtered.groups.forEach(G=>{let te=o.current.get(G),re=0;te.forEach(de=>{let we=q.get(de);re=Math.max(we,re)}),U.push([G,re])});let N=C.current;ee().sort((G,te)=>{var re,de;let we=G.getAttribute("id"),Ee=te.getAttribute("id");return((re=q.get(Ee))!=null?re:0)-((de=q.get(we))!=null?de:0)}).forEach(G=>{let te=G.closest(NS);te?te.appendChild(G.parentElement===te?G:G.closest(`${NS} > *`)):N.appendChild(G.parentElement===N?G:G.closest(`${NS} > *`))}),U.sort((G,te)=>te[1]-G[1]).forEach(G=>{var te;let re=(te=C.current)==null?void 0:te.querySelector(`${Kd}[${Cu}="${encodeURIComponent(G[0])}"]`);re?.parentElement.appendChild(re)})}function I(){let q=ee().find(N=>N.getAttribute("aria-disabled")!=="true"),U=q?.getAttribute(Cu);O.setState("value",U||void 0)}function L(){var q,U,N,G;if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let te=0;for(let re of r.current){let de=(U=(q=i.current.get(re))==null?void 0:q.value)!=null?U:"",we=(G=(N=i.current.get(re))==null?void 0:N.keywords)!=null?G:[],Ee=P(de,we);n.current.filtered.items.set(re,Ee),Ee>0&&te++}for(let[re,de]of o.current)for(let we of de)if(n.current.filtered.items.get(we)>0){n.current.filtered.groups.add(re);break}n.current.filtered.count=te}function F(){var q,U,N;let G=J();G&&(((q=G.parentElement)==null?void 0:q.firstChild)===G&&((N=(U=G.closest(Kd))==null?void 0:U.querySelector(a0e))==null||N.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function J(){var q;return(q=C.current)==null?void 0:q.querySelector(`${J6}[aria-selected="true"]`)}function ee(){var q;return Array.from(((q=C.current)==null?void 0:q.querySelectorAll(uP))||[])}function Z(q){let U=ee()[q];U&&O.setState("value",U.getAttribute(Cu))}function H(q){var U;let N=J(),G=ee(),te=G.findIndex(de=>de===N),re=G[te+q];(U=c.current)!=null&&U.loop&&(re=te+q<0?G[G.length-1]:te+q===G.length?G[0]:G[te+q]),re&&O.setState("value",re.getAttribute(Cu))}function V(q){let U=J(),N=U?.closest(Kd),G;for(;N&&!G;)N=q>0?y0e(N,Kd):v0e(N,Kd),G=N?.querySelector(uP);G?O.setState("value",G.getAttribute(Cu)):H(q)}let oe=()=>Z(ee().length-1),ne=q=>{q.preventDefault(),q.metaKey?oe():q.altKey?V(1):H(1)},D=q=>{q.preventDefault(),q.metaKey?Z(0):q.altKey?V(-1):H(-1)};return A.createElement(ui.div,{ref:t,tabIndex:-1,...T,"cmdk-root":"",onKeyDown:q=>{var U;(U=T.onKeyDown)==null||U.call(T,q);let N=q.nativeEvent.isComposing||q.keyCode===229;if(!(q.defaultPrevented||N))switch(q.key){case"n":case"j":{w&&q.ctrlKey&&ne(q);break}case"ArrowDown":{ne(q);break}case"p":case"k":{w&&q.ctrlKey&&D(q);break}case"ArrowUp":{D(q);break}case"Home":{q.preventDefault(),Z(0);break}case"End":{q.preventDefault(),oe();break}case"Enter":{q.preventDefault();let G=J();if(G){let te=new Event(Ox);G.dispatchEvent(te)}}}}},A.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:w0e},u),H0(e,q=>A.createElement(tz.Provider,{value:O},A.createElement(ez.Provider,{value:j},q))))}),c0e=A.forwardRef((e,t)=>{var n,r;let o=ti(),i=A.useRef(null),a=A.useContext(nz),c=bp(),u=oz(e),f=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;mc(()=>{if(!f)return c.item(o,a?.id)},[f]);let h=sz(o,i,[e.value,e.children,i],e.keywords),p=b2(),g=sl(E=>E.value&&E.value===h.current),v=sl(E=>f||c.filter()===!1?!0:E.search?E.filtered.items.get(o)>0:!0);A.useEffect(()=>{let E=i.current;if(!(!E||e.disabled))return E.addEventListener(Ox,y),()=>E.removeEventListener(Ox,y)},[v,e.onSelect,e.disabled]);function y(){var E,O;x(),(O=(E=u.current).onSelect)==null||O.call(E,h.current)}function x(){p.setState("value",h.current,!0)}if(!v)return null;let{disabled:w,value:T,onSelect:b,forceMount:_,keywords:S,...C}=e;return A.createElement(ui.div,{ref:ol(i,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!w,"aria-selected":!!g,"data-disabled":!!w,"data-selected":!!g,onPointerMove:w||c.getDisablePointerSelection()?void 0:x,onClick:w?void 0:y},e.children)}),u0e=A.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,a=ti(),c=A.useRef(null),u=A.useRef(null),f=ti(),h=bp(),p=sl(v=>o||h.filter()===!1?!0:v.search?v.filtered.groups.has(a):!0);mc(()=>h.group(a),[]),sz(a,c,[e.value,e.heading,u]);let g=A.useMemo(()=>({id:a,forceMount:o}),[o]);return A.createElement(ui.div,{ref:ol(c,t),...i,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&A.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),H0(e,v=>A.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},A.createElement(nz.Provider,{value:g},v))))}),f0e=A.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=A.useRef(null),i=sl(a=>!a.search);return!n&&!i?null:A.createElement(ui.div,{ref:ol(o,t),...r,"cmdk-separator":"",role:"separator"})}),d0e=A.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,i=b2(),a=sl(f=>f.search),c=sl(f=>f.selectedItemId),u=bp();return A.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),A.createElement(ui.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":c,id:u.inputId,type:"text",value:o?e.value:a,onChange:f=>{o||i.setState("search",f.target.value),n?.(f.target.value)}})}),h0e=A.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,i=A.useRef(null),a=A.useRef(null),c=sl(f=>f.selectedItemId),u=bp();return A.useEffect(()=>{if(a.current&&i.current){let f=a.current,h=i.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let v=f.offsetHeight;h.style.setProperty("--cmdk-list-height",v.toFixed(1)+"px")})});return g.observe(f),()=>{cancelAnimationFrame(p),g.unobserve(f)}}},[]),A.createElement(ui.div,{ref:ol(i,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:u.listId},H0(e,f=>A.createElement("div",{ref:ol(a,u.listInnerRef),"cmdk-list-sizer":""},f)))}),p0e=A.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:a,...c}=e;return A.createElement(r0e,{open:n,onOpenChange:r},A.createElement(o0e,{container:a},A.createElement(s0e,{"cmdk-overlay":"",className:o}),A.createElement(i0e,{"aria-label":e.label,"cmdk-dialog":"",className:i},A.createElement(rz,{ref:t,...c}))))}),m0e=A.forwardRef((e,t)=>sl(n=>n.filtered.count===0)?A.createElement(ui.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),g0e=A.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...i}=e;return A.createElement(ui.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},H0(e,a=>A.createElement("div",{"aria-hidden":!0},a)))}),Go=Object.assign(rz,{List:h0e,Item:c0e,Input:d0e,Group:u0e,Separator:f0e,Dialog:p0e,Empty:m0e,Loading:g0e});function y0e(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function v0e(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function oz(e){let t=A.useRef(e);return mc(()=>{t.current=e}),t}var mc=typeof window>"u"?A.useEffect:A.useLayoutEffect;function Tu(e){let t=A.useRef();return t.current===void 0&&(t.current=e()),t}function sl(e){let t=b2(),n=()=>e(t.snapshot());return A.useSyncExternalStore(t.subscribe,n,n)}function sz(e,t,n,r=[]){let o=A.useRef(),i=bp();return mc(()=>{var a;let c=(()=>{var f;for(let h of n){if(typeof h=="string")return h.trim();if(typeof h=="object"&&"current"in h)return h.current?(f=h.current.textContent)==null?void 0:f.trim():o.current}})(),u=r.map(f=>f.trim());i.value(e,c,u),(a=t.current)==null||a.setAttribute(Cu,c),o.current=c}),o}var b0e=()=>{let[e,t]=A.useState(),n=Tu(()=>new Map);return mc(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function S0e(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function H0({asChild:e,children:t},n){return e&&A.isValidElement(t)?A.cloneElement(S0e(t),{ref:t.ref},n(t.props.children)):n(t)}var w0e={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const x0e=Wi("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 E0e({className:e,variant:t,asChild:n=!1,...r}){const o=n?k9:"span";return M.jsx(o,{"data-slot":"badge",className:Vt(x0e({variant:t}),e),...r})}const iz=A.forwardRef(({className:e,...t},n)=>M.jsx(Go,{ref:n,"data-slot":"command",className:Vt("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})),_0e=A.forwardRef(({className:e,...t},n)=>M.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[M.jsx(bpe,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),M.jsx(Go.Input,{ref:n,className:Vt("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})]}));_0e.displayName=Go.Input.displayName;function az({className:e,...t}){return M.jsx(Go.List,{"data-slot":"command-list",className:Vt("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function lz({className:e,...t}){return M.jsx(Go.Group,{"data-slot":"command-group",className:Vt("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 cz({className:e,...t}){return M.jsx(Go.Item,{"data-slot":"command-item",className:Vt("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 C0e({multiple:e,items:t=[],selected:n,onValueChange:r,autoFocus:o=!1,disabled:i=!1,ariaDescribedby:a,ariaPlaceholder:c,onFocus:u,onBlur:f,className:h,id:p}){const g=A.useRef(null),[v,y]=A.useState(!1),[x,w]=A.useState(""),T=A.useMemo(()=>t.filter(O=>n.some(j=>La(O.value,j))),[t,n]),b=A.useMemo(()=>t.filter(O=>!T.some(j=>La(j.value,O.value))),[t,T]),_=A.useCallback(O=>{if(i)return;const j=T.filter(P=>!La(P.value,O.value));r?.(j.map(P=>P.index))},[T,r,i]),S=A.useCallback(O=>{if(!(i||!g.current||g.current.value!==""))if(O.key==="Delete"||O.key==="Backspace"){const j=T.slice(0,-1);r?.(j.map(P=>P.index))}else O.key==="Escape"&&g.current.blur()},[T,r,i]),C=A.useCallback(O=>{if(i)return;w("");const j=e?[...T,O]:[O];r?.(j.map(P=>P.index))},[e,T,r,i]),E=A.useCallback(O=>{i||y(!0),u?.(O)},[i,u]);return M.jsxs(iz,{onKeyDown:S,className:Vt("overflow-visible bg-transparent",h),autoFocus:o,"aria-disabled":i,onBlur:f,onFocus:E,"aria-describedby":a,"aria-placeholder":c,children:[M.jsx("div",{className:Vt("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",i&&"opacity-50 cursor-not-allowed"),children:M.jsxs("div",{className:"flex gap-1 flex-wrap",children:[T.map(O=>M.jsxs(E0e,{variant:"secondary",children:[O.label,M.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:j=>j.key==="Enter"&&!i&&_(O),onMouseDown:j=>{j.preventDefault(),j.stopPropagation()},onClick:()=>_(O),disabled:i,children:M.jsx(R9,{className:Vt("h-3 w-3 text-muted-foreground hover:text-foreground",i&&"pointer-events-none")})})]},O.value)),M.jsx(Go.Input,{ref:g,value:x,onValueChange:w,onBlur:()=>y(!1),onFocus:()=>!i&&y(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:i,"aria-controls":`command-item-input-${p}`,"aria-labelledby":`command-item-input-${p}`,id:`command-item-input-${p}`})]})}),v&&!i&&b.length>0&&M.jsx("div",{className:"relative mt-2",children:M.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:M.jsx(lz,{className:"h-full overflow-auto",children:M.jsx(az,{children:b.map(O=>M.jsx(cz,{disabled:O.disabled,onMouseDown:j=>{j.preventDefault(),j.stopPropagation()},"aria-controls":`${O.value}-command-item`,"aria-labelledby":`${O.value}-command-item`,id:`${O.value}-command-item`,onSelect:()=>C(O),className:"cursor-pointer",children:O.label},`${O.value}-command-item`))})})})})]})}function T0e({items:e,selected:t,onValueChange:n,autoFocus:r=!1,disabled:o=!1,required:i=!1,placeholder:a="Select...",ariaDescribedby:c,ariaPlaceholder:u,onFocus:f,onBlur:h,className:p}){const[g,v]=A.useState(!1),y=e?.find(b=>b.value===t),x=A.useRef(null),w=A.useRef(null);A.useEffect(()=>{g&&x.current&&requestAnimationFrame(()=>{var b;(b=x.current)===null||b===void 0||b.scrollIntoView({block:"nearest"})})},[g]);const T=b=>{w.current&&!w.current.contains(b.relatedTarget)&&v(!1),h?.(b)};return M.jsxs(iz,{ref:w,className:Vt("overflow-visible bg-transparent",p),autoFocus:r,"aria-disabled":o,onBlur:T,onFocus:f,"aria-describedby":c,"aria-placeholder":u,children:[M.jsxs("div",{onClick:()=>!o&&v(!g),className:Vt("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",!y&&i&&"border-red-500",o&&"opacity-50 cursor-not-allowed",p),children:[M.jsx("span",{className:Vt("flex-1 line-clamp-1",!y&&"text-muted-foreground"),children:y?.label||a}),M.jsx(C9,{className:"h-4 w-4 opacity-50"})]}),M.jsx("div",{className:"relative",children:g&&e&&e.length>0?M.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:M.jsx(lz,{className:"h-full overflow-auto",children:M.jsx(az,{children:e.map(b=>M.jsxs(cz,{ref:b.value===t?x:void 0,onMouseDown:_=>{_.preventDefault(),_.stopPropagation()},onSelect:()=>{b.disabled||(n?.(b.value),v(!1))},className:Vt("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",b.value===t&&"font-semibold",b.disabled&&"opacity-50 cursor-not-allowed"),children:[M.jsx("span",{children:b.label}),M.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:b.value===t&&M.jsx(ape,{className:"h-4 w-4"})})]},b.value))})})}):null})]})}function R0e({id:e,options:t,required:n,disabled:r,readonly:o,value:i,multiple:a,autofocus:c,onChange:u,onBlur:f,onFocus:h,defaultValue:p,placeholder:g,rawErrors:v=[],className:y}){const{enumOptions:x,enumDisabled:w,emptyValue:T}=t,b=()=>{h(e,jr(i,x,T))},_=()=>{f(e,jr(i,x,T))},S=x?.map(({value:E,label:O},j)=>({value:a?E:j.toString(),label:O,index:j,disabled:Array.isArray(w)&&w.includes(E)})),C=Vt({"border-destructive":v.length>0},y);return M.jsx("div",{className:"p-0.5",children:a?M.jsx(C0e,{id:e,autoFocus:c,disabled:r||o,multiple:!0,className:C,items:S,selected:i,onValueChange:E=>{u(jr(E,x,T))},onFocus:b,onBlur:_}):M.jsx(T0e,{items:S,selected:JI(i??p,x,!1),onValueChange:E=>{u(jr(E,x,T))},autoFocus:c,disabled:r||o,required:n,placeholder:g,className:C,onFocus:b,onBlur:_,ariaDescribedby:Oo(e)})})}function O0e({className:e,...t}){return M.jsx("textarea",{"data-slot":"textarea",className:Vt("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 A0e({id:e,htmlName:t,placeholder:n,value:r,required:o,disabled:i,autofocus:a,readonly:c,onBlur:u,onFocus:f,onChange:h,options:p,className:g}){const v=({target:{value:w}})=>h(w===""?p.emptyValue:w),y=({target:w})=>u(e,w&&w.value),x=({target:w})=>f(e,w&&w.value);return M.jsx("div",{className:"flex p-0.5",children:M.jsx(O0e,{id:e,name:t||e,placeholder:n,disabled:i,readOnly:c,value:r??"",required:o,autoFocus:a,rows:p.rows||5,onChange:v,onBlur:y,onFocus:x,"aria-describedby":Oo(e),className:g})})}function k0e(){return{CheckboxWidget:jme,CheckboxesWidget:Pme,RadioWidget:cge,RangeWidget:Mge,SelectWidget:R0e,TextareaWidget:A0e}}function M0e(){return{templates:ame(),widgets:k0e()}}function j0e(){return Uhe(M0e())}const P0e=j0e();function N0e({className:e,size:t="default",...n}){return M.jsx("div",{"data-slot":"card","data-size":t,className:St("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),...n})}function D0e({className:e,...t}){return M.jsx("div",{"data-slot":"card-content",className:St("px-4 group-data-[size=sm]/card:px-3",e),...t})}var uz=function(e){return typeof e=="function"},$0e=function(e){return typeof e=="string"},fz=function(e){return typeof e=="number"};function fP(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function Ax(e){var t=A.useRef(e);return t.current=e,t}var I0e=function(e){var t=Ax(e);A.useEffect(function(){return function(){t.current()}},[])},z0e=!!(typeof window<"u"&&window.document&&window.document.createElement);function dz(e,t){if(z0e){if(!e)return t;var n;return uz(e)?n=e():"current"in e?n=e.current:n=e,n}}var L0e=function(e){var t=function(n,r,o){var i=A.useRef(!1),a=A.useRef([]),c=A.useRef([]),u=A.useRef(void 0);e(function(){var f,h=Array.isArray(o)?o:[o],p=h.map(function(g){return dz(g)});if(!i.current){i.current=!0,a.current=p,c.current=r,u.current=n();return}(p.length!==a.current.length||!fP(a.current,p)||!fP(c.current,r))&&((f=u.current)===null||f===void 0||f.call(u),a.current=p,c.current=r,u.current=n())}),I0e(function(){var f;(f=u.current)===null||f===void 0||f.call(u),i.current=!1})};return t},F0e=L0e(A.useEffect),DS,dP;function U0e(){if(dP)return DS;dP=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(i,a){if(i===a)return!0;if(i&&a&&typeof i=="object"&&typeof a=="object"){if(i.constructor!==a.constructor)return!1;var c,u,f;if(Array.isArray(i)){if(c=i.length,c!=a.length)return!1;for(u=c;u--!==0;)if(!o(i[u],a[u]))return!1;return!0}var h;if(t&&i instanceof Map&&a instanceof Map){if(i.size!==a.size)return!1;for(h=i.entries();!(u=h.next()).done;)if(!a.has(u.value[0]))return!1;for(h=i.entries();!(u=h.next()).done;)if(!o(u.value[1],a.get(u.value[0])))return!1;return!0}if(n&&i instanceof Set&&a instanceof Set){if(i.size!==a.size)return!1;for(h=i.entries();!(u=h.next()).done;)if(!a.has(u.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(a)){if(c=i.length,c!=a.length)return!1;for(u=c;u--!==0;)if(i[u]!==a[u])return!1;return!0}if(i.constructor===RegExp)return i.source===a.source&&i.flags===a.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof a.valueOf=="function")return i.valueOf()===a.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof a.toString=="function")return i.toString()===a.toString();if(f=Object.keys(i),c=f.length,c!==Object.keys(a).length)return!1;for(u=c;u--!==0;)if(!Object.prototype.hasOwnProperty.call(a,f[u]))return!1;if(e&&i instanceof Element)return!1;for(u=c;u--!==0;)if(!((f[u]==="_owner"||f[u]==="__v"||f[u]==="__o")&&i.$$typeof)&&!o(i[f[u]],a[f[u]]))return!1;return!0}return i!==i&&a!==a}return DS=function(a,c){try{return o(a,c)}catch(u){if((u.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw u}},DS}var V0e=U0e();const q0e=ii(V0e);var B0e=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),q0e(e,t)},H0e=function(e,t,n){var r=A.useRef(void 0),o=A.useRef(0);B0e(t,r.current)||(o.current+=1),r.current=t,F0e(e,[o.current],n)},K0e=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator?.platform:""),hz={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:K0e?[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},kx={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"?hz.meta.includes(e.keyCode):e.metaKey}};function pz(e){return $0e(e)||fz(e)}function G0e(e){var t=Object.keys(kx).reduce(function(n,r){return kx[r](e)?n+1:n},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function hP(e,t,n){var r,o;if(!e.key)return!1;if(fz(t))return e.keyCode===t?t:!1;var i=t.split("."),a=0;try{for(var c=Tx(i),u=c.next();!u.done;u=c.next()){var f=u.value,h=kx[f],p=hz[f.toLowerCase()];(h&&h(e)||p&&p===e.keyCode)&&a++}}catch(g){r={error:g}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return n?a===i.length&&G0e(e)===i.length?t:!1:a===i.length?t:!1}function Z0e(e,t){return uz(e)?e:pz(e)?function(n){return hP(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(r){return hP(n,r,t)})}:function(){return!!e}}var Y0e=["keydown"];function W0e(e,t,n){var r={},o=r.events,i=o===void 0?Y0e:o,a=r.target,c=r.exactMatch,u=c===void 0?!1:c,f=r.useCapture,h=f===void 0?!1:f,p=Ax(t),g=Ax(e);H0e(function(){var v,y,x,w=dz(a,window);if(w){var T=function(C){var E,O=C,j=Z0e(g.current,u),P=j(O),$=pz(P)?P:O.key;if(P)return(E=p.current)===null||E===void 0?void 0:E.call(p,O,$)};try{for(var b=Tx(i),_=b.next();!_.done;_=b.next()){var S=_.value;(x=w?.addEventListener)===null||x===void 0||x.call(w,S,T,h)}}catch(C){v={error:C}}finally{try{_&&!_.done&&(y=b.return)&&y.call(b)}finally{if(v)throw v.error}}return function(){var C,E,O;try{for(var j=Tx(i),P=j.next();!P.done;P=j.next()){var $=P.value;(O=w?.removeEventListener)===null||O===void 0||O.call(w,$,T,h)}}catch(I){C={error:I}}finally{try{P&&!P.done&&(E=j.return)&&E.call(j)}finally{if(C)throw C.error}}}}},[i],a)}const X0e=({validateForm:e,formData:t})=>{const n=hl(),{mutateAsync:r,isPending:o}=Nne(),i=async()=>{e&&!await e()||t&&await r({toolName:n.name,args:t})};return W0e("Enter",i),M.jsx("div",{className:"flex flex-col items-end gap-1",children:M.jsxs(Ja,{onClick:i,variant:"default",disabled:o,children:[o?M.jsx(Jne,{className:"h-4 w-4 animate-spin"}):M.jsx(rre,{className:"h-4 w-4"}),"Call Tool"]})})};var my={exports:{}},Q0e=my.exports,pP;function J0e(){return pP||(pP=1,(function(e,t){(function(n,r){e.exports=r(Sf())})(Q0e,n=>(()=>{var r={9735:(c,u)=>{u.__esModule=!0,u.default={scheme:"apathy",author:"jannik siebert (https://github.com/janniks)",base00:"#031A16",base01:"#0B342D",base02:"#184E45",base03:"#2B685E",base04:"#5F9C92",base05:"#81B5AC",base06:"#A7CEC8",base07:"#D2E7E4",base08:"#3E9688",base09:"#3E7996",base0A:"#3E4C96",base0B:"#883E96",base0C:"#963E4C",base0D:"#96883E",base0E:"#4C963E",base0F:"#3E965B"},c.exports=u.default},294:(c,u)=>{u.__esModule=!0,u.default={scheme:"ashes",author:"jannik siebert (https://github.com/janniks)",base00:"#1C2023",base01:"#393F45",base02:"#565E65",base03:"#747C84",base04:"#ADB3BA",base05:"#C7CCD1",base06:"#DFE2E5",base07:"#F3F4F5",base08:"#C7AE95",base09:"#C7C795",base0A:"#AEC795",base0B:"#95C7AE",base0C:"#95AEC7",base0D:"#AE95C7",base0E:"#C795AE",base0F:"#C79595"},c.exports=u.default},1733:(c,u)=>{u.__esModule=!0,u.default={scheme:"atelier dune",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)",base00:"#20201d",base01:"#292824",base02:"#6e6b5e",base03:"#7d7a68",base04:"#999580",base05:"#a6a28c",base06:"#e8e4cf",base07:"#fefbec",base08:"#d73737",base09:"#b65611",base0A:"#cfb017",base0B:"#60ac39",base0C:"#1fad83",base0D:"#6684e1",base0E:"#b854d4",base0F:"#d43552"},c.exports=u.default},8974:(c,u)=>{u.__esModule=!0,u.default={scheme:"atelier forest",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)",base00:"#1b1918",base01:"#2c2421",base02:"#68615e",base03:"#766e6b",base04:"#9c9491",base05:"#a8a19f",base06:"#e6e2e0",base07:"#f1efee",base08:"#f22c40",base09:"#df5320",base0A:"#d5911a",base0B:"#5ab738",base0C:"#00ad9c",base0D:"#407ee7",base0E:"#6666ea",base0F:"#c33ff3"},c.exports=u.default},6933:(c,u)=>{u.__esModule=!0,u.default={scheme:"atelier heath",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)",base00:"#1b181b",base01:"#292329",base02:"#695d69",base03:"#776977",base04:"#9e8f9e",base05:"#ab9bab",base06:"#d8cad8",base07:"#f7f3f7",base08:"#ca402b",base09:"#a65926",base0A:"#bb8a35",base0B:"#379a37",base0C:"#159393",base0D:"#516aec",base0E:"#7b59c0",base0F:"#cc33cc"},c.exports=u.default},523:(c,u)=>{u.__esModule=!0,u.default={scheme:"atelier lakeside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)",base00:"#161b1d",base01:"#1f292e",base02:"#516d7b",base03:"#5a7b8c",base04:"#7195a8",base05:"#7ea2b4",base06:"#c1e4f6",base07:"#ebf8ff",base08:"#d22d72",base09:"#935c25",base0A:"#8a8a0f",base0B:"#568c3b",base0C:"#2d8f6f",base0D:"#257fad",base0E:"#5d5db1",base0F:"#b72dd2"},c.exports=u.default},1223:(c,u)=>{u.__esModule=!0,u.default={scheme:"atelier seaside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)",base00:"#131513",base01:"#242924",base02:"#5e6e5e",base03:"#687d68",base04:"#809980",base05:"#8ca68c",base06:"#cfe8cf",base07:"#f0fff0",base08:"#e6193c",base09:"#87711d",base0A:"#c3c322",base0B:"#29a329",base0C:"#1999b3",base0D:"#3d62f5",base0E:"#ad2bee",base0F:"#e619c3"},c.exports=u.default},1233:(c,u)=>{u.__esModule=!0,u.default={scheme:"bespin",author:"jan t. sott",base00:"#28211c",base01:"#36312e",base02:"#5e5d5c",base03:"#666666",base04:"#797977",base05:"#8a8986",base06:"#9d9b97",base07:"#baae9e",base08:"#cf6a4c",base09:"#cf7d34",base0A:"#f9ee98",base0B:"#54be0d",base0C:"#afc4db",base0D:"#5ea6ea",base0E:"#9b859d",base0F:"#937121"},c.exports=u.default},2847:(c,u)=>{u.__esModule=!0,u.default={scheme:"brewer",author:"timothée poisot (http://github.com/tpoisot)",base00:"#0c0d0e",base01:"#2e2f30",base02:"#515253",base03:"#737475",base04:"#959697",base05:"#b7b8b9",base06:"#dadbdc",base07:"#fcfdfe",base08:"#e31a1c",base09:"#e6550d",base0A:"#dca060",base0B:"#31a354",base0C:"#80b1d3",base0D:"#3182bd",base0E:"#756bb1",base0F:"#b15928"},c.exports=u.default},8120:(c,u)=>{u.__esModule=!0,u.default={scheme:"bright",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#303030",base02:"#505050",base03:"#b0b0b0",base04:"#d0d0d0",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ffffff",base08:"#fb0120",base09:"#fc6d24",base0A:"#fda331",base0B:"#a1c659",base0C:"#76c7b7",base0D:"#6fb3d2",base0E:"#d381c3",base0F:"#be643c"},c.exports=u.default},6305:(c,u)=>{u.__esModule=!0,u.default={scheme:"chalk",author:"chris kempson (http://chriskempson.com)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#eda987",base0A:"#ddb26f",base0B:"#acc267",base0C:"#12cfc0",base0D:"#6fc2ef",base0E:"#e1a3ee",base0F:"#deaf8f"},c.exports=u.default},525:(c,u)=>{u.__esModule=!0,u.default={scheme:"codeschool",author:"brettof86",base00:"#232c31",base01:"#1c3657",base02:"#2a343a",base03:"#3f4944",base04:"#84898c",base05:"#9ea7a6",base06:"#a7cfa3",base07:"#b5d8f6",base08:"#2a5491",base09:"#43820d",base0A:"#a03b1e",base0B:"#237986",base0C:"#b02f30",base0D:"#484d79",base0E:"#c59820",base0F:"#c98344"},c.exports=u.default},4124:(c,u)=>{u.__esModule=!0,u.default={scheme:"colors",author:"mrmrs (http://clrs.cc)",base00:"#111111",base01:"#333333",base02:"#555555",base03:"#777777",base04:"#999999",base05:"#bbbbbb",base06:"#dddddd",base07:"#ffffff",base08:"#ff4136",base09:"#ff851b",base0A:"#ffdc00",base0B:"#2ecc40",base0C:"#7fdbff",base0D:"#0074d9",base0E:"#b10dc9",base0F:"#85144b"},c.exports=u.default},7167:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},4582:(c,u)=>{u.__esModule=!0,u.default={scheme:"eighties",author:"chris kempson (http://chriskempson.com)",base00:"#2d2d2d",base01:"#393939",base02:"#515151",base03:"#747369",base04:"#a09f93",base05:"#d3d0c8",base06:"#e8e6df",base07:"#f2f0ec",base08:"#f2777a",base09:"#f99157",base0A:"#ffcc66",base0B:"#99cc99",base0C:"#66cccc",base0D:"#6699cc",base0E:"#cc99cc",base0F:"#d27b53"},c.exports=u.default},7096:(c,u)=>{u.__esModule=!0,u.default={scheme:"embers",author:"jannik siebert (https://github.com/janniks)",base00:"#16130F",base01:"#2C2620",base02:"#433B32",base03:"#5A5047",base04:"#8A8075",base05:"#A39A90",base06:"#BEB6AE",base07:"#DBD6D1",base08:"#826D57",base09:"#828257",base0A:"#6D8257",base0B:"#57826D",base0C:"#576D82",base0D:"#6D5782",base0E:"#82576D",base0F:"#825757"},c.exports=u.default},9887:(c,u)=>{u.__esModule=!0,u.default={scheme:"flat",author:"chris kempson (http://chriskempson.com)",base00:"#2C3E50",base01:"#34495E",base02:"#7F8C8D",base03:"#95A5A6",base04:"#BDC3C7",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ECF0F1",base08:"#E74C3C",base09:"#E67E22",base0A:"#F1C40F",base0B:"#2ECC71",base0C:"#1ABC9C",base0D:"#3498DB",base0E:"#9B59B6",base0F:"#be643c"},c.exports=u.default},7199:(c,u)=>{u.__esModule=!0,u.default={scheme:"google",author:"seth wright (http://sethawright.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#CC342B",base09:"#F96A38",base0A:"#FBA922",base0B:"#198844",base0C:"#3971ED",base0D:"#3971ED",base0E:"#A36AC7",base0F:"#3971ED"},c.exports=u.default},1985:(c,u)=>{u.__esModule=!0,u.default={scheme:"grayscale",author:"alexandre gavioli (https://github.com/alexx2/)",base00:"#101010",base01:"#252525",base02:"#464646",base03:"#525252",base04:"#ababab",base05:"#b9b9b9",base06:"#e3e3e3",base07:"#f7f7f7",base08:"#7c7c7c",base09:"#999999",base0A:"#a0a0a0",base0B:"#8e8e8e",base0C:"#868686",base0D:"#686868",base0E:"#747474",base0F:"#5e5e5e"},c.exports=u.default},8093:(c,u)=>{u.__esModule=!0,u.default={scheme:"green screen",author:"chris kempson (http://chriskempson.com)",base00:"#001100",base01:"#003300",base02:"#005500",base03:"#007700",base04:"#009900",base05:"#00bb00",base06:"#00dd00",base07:"#00ff00",base08:"#007700",base09:"#009900",base0A:"#007700",base0B:"#00bb00",base0C:"#005500",base0D:"#009900",base0E:"#00bb00",base0F:"#005500"},c.exports=u.default},1615:(c,u)=>{u.__esModule=!0,u.default={scheme:"harmonic16",author:"jannik siebert (https://github.com/janniks)",base00:"#0b1c2c",base01:"#223b54",base02:"#405c79",base03:"#627e99",base04:"#aabcce",base05:"#cbd6e2",base06:"#e5ebf1",base07:"#f7f9fb",base08:"#bf8b56",base09:"#bfbf56",base0A:"#8bbf56",base0B:"#56bf8b",base0C:"#568bbf",base0D:"#8b56bf",base0E:"#bf568b",base0F:"#bf5656"},c.exports=u.default},9063:(c,u)=>{u.__esModule=!0,u.default={scheme:"hopscotch",author:"jan t. sott",base00:"#322931",base01:"#433b42",base02:"#5c545b",base03:"#797379",base04:"#989498",base05:"#b9b5b8",base06:"#d5d3d5",base07:"#ffffff",base08:"#dd464c",base09:"#fd8b19",base0A:"#fdcc59",base0B:"#8fc13e",base0C:"#149b93",base0D:"#1290bf",base0E:"#c85e7c",base0F:"#b33508"},c.exports=u.default},9446:(c,u,f)=>{function h(X){return X&&X.__esModule?X.default:X}u.__esModule=!0;var p=f(1308);u.threezerotwofour=h(p);var g=f(9735);u.apathy=h(g);var v=f(294);u.ashes=h(v);var y=f(1733);u.atelierDune=h(y);var x=f(8974);u.atelierForest=h(x);var w=f(6933);u.atelierHeath=h(w);var T=f(523);u.atelierLakeside=h(T);var b=f(1223);u.atelierSeaside=h(b);var _=f(1233);u.bespin=h(_);var S=f(2847);u.brewer=h(S);var C=f(8120);u.bright=h(C);var E=f(6305);u.chalk=h(E);var O=f(525);u.codeschool=h(O);var j=f(4124);u.colors=h(j);var P=f(7167);u.default=h(P);var $=f(4582);u.eighties=h($);var I=f(7096);u.embers=h(I);var L=f(9887);u.flat=h(L);var F=f(7199);u.google=h(F);var J=f(1985);u.grayscale=h(J);var ee=f(8093);u.greenscreen=h(ee);var Z=f(1615);u.harmonic=h(Z);var H=f(9063);u.hopscotch=h(H);var V=f(9033);u.isotope=h(V);var oe=f(4112);u.marrakesh=h(oe);var ne=f(9600);u.mocha=h(ne);var D=f(1240);u.monokai=h(D);var q=f(9768);u.ocean=h(q);var U=f(8293);u.paraiso=h(U);var N=f(3093);u.pop=h(N);var G=f(1951);u.railscasts=h(G);var te=f(6368);u.shapeshifter=h(te);var re=f(2317);u.solarized=h(re);var de=f(1091);u.summerfruit=h(de);var we=f(6943);u.tomorrow=h(we);var Ee=f(5670);u.tube=h(Ee);var se=f(2536);u.twilight=h(se)},9033:(c,u)=>{u.__esModule=!0,u.default={scheme:"isotope",author:"jan t. sott",base00:"#000000",base01:"#404040",base02:"#606060",base03:"#808080",base04:"#c0c0c0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#ff0000",base09:"#ff9900",base0A:"#ff0099",base0B:"#33ff00",base0C:"#00ffff",base0D:"#0066ff",base0E:"#cc00ff",base0F:"#3300ff"},c.exports=u.default},4112:(c,u)=>{u.__esModule=!0,u.default={scheme:"marrakesh",author:"alexandre gavioli (http://github.com/alexx2/)",base00:"#201602",base01:"#302e00",base02:"#5f5b17",base03:"#6c6823",base04:"#86813b",base05:"#948e48",base06:"#ccc37a",base07:"#faf0a5",base08:"#c35359",base09:"#b36144",base0A:"#a88339",base0B:"#18974e",base0C:"#75a738",base0D:"#477ca1",base0E:"#8868b3",base0F:"#b3588e"},c.exports=u.default},9600:(c,u)=>{u.__esModule=!0,u.default={scheme:"mocha",author:"chris kempson (http://chriskempson.com)",base00:"#3B3228",base01:"#534636",base02:"#645240",base03:"#7e705a",base04:"#b8afad",base05:"#d0c8c6",base06:"#e9e1dd",base07:"#f5eeeb",base08:"#cb6077",base09:"#d28b71",base0A:"#f4bc87",base0B:"#beb55b",base0C:"#7bbda4",base0D:"#8ab3b5",base0E:"#a89bb9",base0F:"#bb9584"},c.exports=u.default},1240:(c,u)=>{u.__esModule=!0,u.default={scheme:"monokai",author:"wimer hazenberg (http://www.monokai.nl)",base00:"#272822",base01:"#383830",base02:"#49483e",base03:"#75715e",base04:"#a59f85",base05:"#f8f8f2",base06:"#f5f4f1",base07:"#f9f8f5",base08:"#f92672",base09:"#fd971f",base0A:"#f4bf75",base0B:"#a6e22e",base0C:"#a1efe4",base0D:"#66d9ef",base0E:"#ae81ff",base0F:"#cc6633"},c.exports=u.default},9768:(c,u)=>{u.__esModule=!0,u.default={scheme:"ocean",author:"chris kempson (http://chriskempson.com)",base00:"#2b303b",base01:"#343d46",base02:"#4f5b66",base03:"#65737e",base04:"#a7adba",base05:"#c0c5ce",base06:"#dfe1e8",base07:"#eff1f5",base08:"#bf616a",base09:"#d08770",base0A:"#ebcb8b",base0B:"#a3be8c",base0C:"#96b5b4",base0D:"#8fa1b3",base0E:"#b48ead",base0F:"#ab7967"},c.exports=u.default},8293:(c,u)=>{u.__esModule=!0,u.default={scheme:"paraiso",author:"jan t. sott",base00:"#2f1e2e",base01:"#41323f",base02:"#4f424c",base03:"#776e71",base04:"#8d8687",base05:"#a39e9b",base06:"#b9b6b0",base07:"#e7e9db",base08:"#ef6155",base09:"#f99b15",base0A:"#fec418",base0B:"#48b685",base0C:"#5bc4bf",base0D:"#06b6ef",base0E:"#815ba4",base0F:"#e96ba8"},c.exports=u.default},3093:(c,u)=>{u.__esModule=!0,u.default={scheme:"pop",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#eb008a",base09:"#f29333",base0A:"#f8ca12",base0B:"#37b349",base0C:"#00aabb",base0D:"#0e5a94",base0E:"#b31e8d",base0F:"#7a2d00"},c.exports=u.default},1951:(c,u)=>{u.__esModule=!0,u.default={scheme:"railscasts",author:"ryan bates (http://railscasts.com)",base00:"#2b2b2b",base01:"#272935",base02:"#3a4055",base03:"#5a647e",base04:"#d4cfc9",base05:"#e6e1dc",base06:"#f4f1ed",base07:"#f9f7f3",base08:"#da4939",base09:"#cc7833",base0A:"#ffc66d",base0B:"#a5c261",base0C:"#519f50",base0D:"#6d9cbe",base0E:"#b6b3eb",base0F:"#bc9458"},c.exports=u.default},6368:(c,u)=>{u.__esModule=!0,u.default={scheme:"shapeshifter",author:"tyler benziger (http://tybenz.com)",base00:"#000000",base01:"#040404",base02:"#102015",base03:"#343434",base04:"#555555",base05:"#ababab",base06:"#e0e0e0",base07:"#f9f9f9",base08:"#e92f2f",base09:"#e09448",base0A:"#dddd13",base0B:"#0ed839",base0C:"#23edda",base0D:"#3b48e3",base0E:"#f996e2",base0F:"#69542d"},c.exports=u.default},2317:(c,u)=>{u.__esModule=!0,u.default={scheme:"solarized",author:"ethan schoonover (http://ethanschoonover.com/solarized)",base00:"#002b36",base01:"#073642",base02:"#586e75",base03:"#657b83",base04:"#839496",base05:"#93a1a1",base06:"#eee8d5",base07:"#fdf6e3",base08:"#dc322f",base09:"#cb4b16",base0A:"#b58900",base0B:"#859900",base0C:"#2aa198",base0D:"#268bd2",base0E:"#6c71c4",base0F:"#d33682"},c.exports=u.default},1091:(c,u)=>{u.__esModule=!0,u.default={scheme:"summerfruit",author:"christopher corley (http://cscorley.github.io/)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#B0B0B0",base05:"#D0D0D0",base06:"#E0E0E0",base07:"#FFFFFF",base08:"#FF0086",base09:"#FD8900",base0A:"#ABA800",base0B:"#00C918",base0C:"#1faaaa",base0D:"#3777E6",base0E:"#AD00A1",base0F:"#cc6633"},c.exports=u.default},1308:(c,u)=>{u.__esModule=!0,u.default={scheme:"threezerotwofour",author:"jan t. sott (http://github.com/idleberg)",base00:"#090300",base01:"#3a3432",base02:"#4a4543",base03:"#5c5855",base04:"#807d7c",base05:"#a5a2a2",base06:"#d6d5d4",base07:"#f7f7f7",base08:"#db2d20",base09:"#e8bbd0",base0A:"#fded02",base0B:"#01a252",base0C:"#b5e4f4",base0D:"#01a0e4",base0E:"#a16a94",base0F:"#cdab53"},c.exports=u.default},6943:(c,u)=>{u.__esModule=!0,u.default={scheme:"tomorrow",author:"chris kempson (http://chriskempson.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#cc6666",base09:"#de935f",base0A:"#f0c674",base0B:"#b5bd68",base0C:"#8abeb7",base0D:"#81a2be",base0E:"#b294bb",base0F:"#a3685a"},c.exports=u.default},5670:(c,u)=>{u.__esModule=!0,u.default={scheme:"london tube",author:"jan t. sott",base00:"#231f20",base01:"#1c3f95",base02:"#5a5758",base03:"#737171",base04:"#959ca1",base05:"#d9d8d8",base06:"#e7e7e8",base07:"#ffffff",base08:"#ee2e24",base09:"#f386a1",base0A:"#ffd204",base0B:"#00853e",base0C:"#85cebc",base0D:"#009ddc",base0E:"#98005d",base0F:"#b06110"},c.exports=u.default},2536:(c,u)=>{u.__esModule=!0,u.default={scheme:"twilight",author:"david hart (http://hart-dev.com)",base00:"#1e1e1e",base01:"#323537",base02:"#464b50",base03:"#5f5a60",base04:"#838184",base05:"#a7a7a7",base06:"#c3c3c3",base07:"#ffffff",base08:"#cf6a4c",base09:"#cda869",base0A:"#f9ee98",base0B:"#8f9d6a",base0C:"#afc4db",base0D:"#7587a6",base0E:"#9b859d",base0F:"#9b703f"},c.exports=u.default},6481:(c,u,f)=>{var h=f(4176),p={};for(var g in h)h.hasOwnProperty(g)&&(p[h[g]]=g);var v=c.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var y in v)if(v.hasOwnProperty(y)){if(!("channels"in v[y]))throw new Error("missing channels property: "+y);if(!("labels"in v[y]))throw new Error("missing channel labels property: "+y);if(v[y].labels.length!==v[y].channels)throw new Error("channel and label counts mismatch: "+y);var x=v[y].channels,w=v[y].labels;delete v[y].channels,delete v[y].labels,Object.defineProperty(v[y],"channels",{value:x}),Object.defineProperty(v[y],"labels",{value:w})}function T(b,_){return Math.pow(b[0]-_[0],2)+Math.pow(b[1]-_[1],2)+Math.pow(b[2]-_[2],2)}v.rgb.hsl=function(b){var _,S,C=b[0]/255,E=b[1]/255,O=b[2]/255,j=Math.min(C,E,O),P=Math.max(C,E,O),$=P-j;return P===j?_=0:C===P?_=(E-O)/$:E===P?_=2+(O-C)/$:O===P&&(_=4+(C-E)/$),(_=Math.min(60*_,360))<0&&(_+=360),S=(j+P)/2,[_,100*(P===j?0:S<=.5?$/(P+j):$/(2-P-j)),100*S]},v.rgb.hsv=function(b){var _,S,C,E,O,j=b[0]/255,P=b[1]/255,$=b[2]/255,I=Math.max(j,P,$),L=I-Math.min(j,P,$),F=function(J){return(I-J)/6/L+.5};return L===0?E=O=0:(O=L/I,_=F(j),S=F(P),C=F($),j===I?E=C-S:P===I?E=.3333333333333333+_-C:$===I&&(E=.6666666666666666+S-_),E<0?E+=1:E>1&&(E-=1)),[360*E,100*O,100*I]},v.rgb.hwb=function(b){var _=b[0],S=b[1],C=b[2];return[v.rgb.hsl(b)[0],100*(.00392156862745098*Math.min(_,Math.min(S,C))),100*(C=1-.00392156862745098*Math.max(_,Math.max(S,C)))]},v.rgb.cmyk=function(b){var _,S=b[0]/255,C=b[1]/255,E=b[2]/255;return[100*((1-S-(_=Math.min(1-S,1-C,1-E)))/(1-_)||0),100*((1-C-_)/(1-_)||0),100*((1-E-_)/(1-_)||0),100*_]},v.rgb.keyword=function(b){var _=p[b];if(_)return _;var S,C=1/0;for(var E in h)if(h.hasOwnProperty(E)){var O=T(b,h[E]);O<C&&(C=O,S=E)}return S},v.keyword.rgb=function(b){return h[b]},v.rgb.xyz=function(b){var _=b[0]/255,S=b[1]/255,C=b[2]/255;return[100*(.4124*(_=_>.04045?Math.pow((_+.055)/1.055,2.4):_/12.92)+.3576*(S=S>.04045?Math.pow((S+.055)/1.055,2.4):S/12.92)+.1805*(C=C>.04045?Math.pow((C+.055)/1.055,2.4):C/12.92)),100*(.2126*_+.7152*S+.0722*C),100*(.0193*_+.1192*S+.9505*C)]},v.rgb.lab=function(b){var _=v.rgb.xyz(b),S=_[0],C=_[1],E=_[2];return C/=100,E/=108.883,S=(S/=95.047)>.008856?Math.pow(S,.3333333333333333):7.787*S+.13793103448275862,[116*(C=C>.008856?Math.pow(C,.3333333333333333):7.787*C+.13793103448275862)-16,500*(S-C),200*(C-(E=E>.008856?Math.pow(E,.3333333333333333):7.787*E+.13793103448275862))]},v.hsl.rgb=function(b){var _,S,C,E,O,j=b[0]/360,P=b[1]/100,$=b[2]/100;if(P===0)return[O=255*$,O,O];_=2*$-(S=$<.5?$*(1+P):$+P-$*P),E=[0,0,0];for(var I=0;I<3;I++)(C=j+.3333333333333333*-(I-1))<0&&C++,C>1&&C--,O=6*C<1?_+6*(S-_)*C:2*C<1?S:3*C<2?_+(S-_)*(.6666666666666666-C)*6:_,E[I]=255*O;return E},v.hsl.hsv=function(b){var _=b[0],S=b[1]/100,C=b[2]/100,E=S,O=Math.max(C,.01);return S*=(C*=2)<=1?C:2-C,E*=O<=1?O:2-O,[_,100*(C===0?2*E/(O+E):2*S/(C+S)),100*((C+S)/2)]},v.hsv.rgb=function(b){var _=b[0]/60,S=b[1]/100,C=b[2]/100,E=Math.floor(_)%6,O=_-Math.floor(_),j=255*C*(1-S),P=255*C*(1-S*O),$=255*C*(1-S*(1-O));switch(C*=255,E){case 0:return[C,$,j];case 1:return[P,C,j];case 2:return[j,C,$];case 3:return[j,P,C];case 4:return[$,j,C];case 5:return[C,j,P]}},v.hsv.hsl=function(b){var _,S,C,E=b[0],O=b[1]/100,j=b[2]/100,P=Math.max(j,.01);return C=(2-O)*j,S=O*P,[E,100*(S=(S/=(_=(2-O)*P)<=1?_:2-_)||0),100*(C/=2)]},v.hwb.rgb=function(b){var _,S,C,E,O,j,P,$=b[0]/360,I=b[1]/100,L=b[2]/100,F=I+L;switch(F>1&&(I/=F,L/=F),C=6*$-(_=Math.floor(6*$)),1&_&&(C=1-C),E=I+C*((S=1-L)-I),_){default:case 6:case 0:O=S,j=E,P=I;break;case 1:O=E,j=S,P=I;break;case 2:O=I,j=S,P=E;break;case 3:O=I,j=E,P=S;break;case 4:O=E,j=I,P=S;break;case 5:O=S,j=I,P=E}return[255*O,255*j,255*P]},v.cmyk.rgb=function(b){var _=b[0]/100,S=b[1]/100,C=b[2]/100,E=b[3]/100;return[255*(1-Math.min(1,_*(1-E)+E)),255*(1-Math.min(1,S*(1-E)+E)),255*(1-Math.min(1,C*(1-E)+E))]},v.xyz.rgb=function(b){var _,S,C,E=b[0]/100,O=b[1]/100,j=b[2]/100;return S=-.9689*E+1.8758*O+.0415*j,C=.0557*E+-.204*O+1.057*j,_=(_=3.2406*E+-1.5372*O+-.4986*j)>.0031308?1.055*Math.pow(_,.4166666666666667)-.055:12.92*_,S=S>.0031308?1.055*Math.pow(S,.4166666666666667)-.055:12.92*S,C=C>.0031308?1.055*Math.pow(C,.4166666666666667)-.055:12.92*C,[255*(_=Math.min(Math.max(0,_),1)),255*(S=Math.min(Math.max(0,S),1)),255*(C=Math.min(Math.max(0,C),1))]},v.xyz.lab=function(b){var _=b[0],S=b[1],C=b[2];return S/=100,C/=108.883,_=(_/=95.047)>.008856?Math.pow(_,.3333333333333333):7.787*_+.13793103448275862,[116*(S=S>.008856?Math.pow(S,.3333333333333333):7.787*S+.13793103448275862)-16,500*(_-S),200*(S-(C=C>.008856?Math.pow(C,.3333333333333333):7.787*C+.13793103448275862))]},v.lab.xyz=function(b){var _,S,C,E=b[0];_=b[1]/500+(S=(E+16)/116),C=S-b[2]/200;var O=Math.pow(S,3),j=Math.pow(_,3),P=Math.pow(C,3);return S=O>.008856?O:(S-.13793103448275862)/7.787,_=j>.008856?j:(_-.13793103448275862)/7.787,C=P>.008856?P:(C-.13793103448275862)/7.787,[_*=95.047,S*=100,C*=108.883]},v.lab.lch=function(b){var _,S=b[0],C=b[1],E=b[2];return(_=360*Math.atan2(E,C)/2/Math.PI)<0&&(_+=360),[S,Math.sqrt(C*C+E*E),_]},v.lch.lab=function(b){var _,S=b[0],C=b[1];return _=b[2]/360*2*Math.PI,[S,C*Math.cos(_),C*Math.sin(_)]},v.rgb.ansi16=function(b){var _=b[0],S=b[1],C=b[2],E=1 in arguments?arguments[1]:v.rgb.hsv(b)[2];if((E=Math.round(E/50))===0)return 30;var O=30+(Math.round(C/255)<<2|Math.round(S/255)<<1|Math.round(_/255));return E===2&&(O+=60),O},v.hsv.ansi16=function(b){return v.rgb.ansi16(v.hsv.rgb(b),b[2])},v.rgb.ansi256=function(b){var _=b[0],S=b[1],C=b[2];return _===S&&S===C?_<8?16:_>248?231:Math.round((_-8)/247*24)+232:16+36*Math.round(_/255*5)+6*Math.round(S/255*5)+Math.round(C/255*5)},v.ansi16.rgb=function(b){var _=b%10;if(_===0||_===7)return b>50&&(_+=3.5),[_=_/10.5*255,_,_];var S=.5*(1+~~(b>50));return[(1&_)*S*255,(_>>1&1)*S*255,(_>>2&1)*S*255]},v.ansi256.rgb=function(b){if(b>=232){var _=10*(b-232)+8;return[_,_,_]}var S;return b-=16,[Math.floor(b/36)/5*255,Math.floor((S=b%36)/6)/5*255,S%6/5*255]},v.rgb.hex=function(b){var _=(((255&Math.round(b[0]))<<16)+((255&Math.round(b[1]))<<8)+(255&Math.round(b[2]))).toString(16).toUpperCase();return"000000".substring(_.length)+_},v.hex.rgb=function(b){var _=b.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!_)return[0,0,0];var S=_[0];_[0].length===3&&(S=S.split("").map(function(E){return E+E}).join(""));var C=parseInt(S,16);return[C>>16&255,C>>8&255,255&C]},v.rgb.hcg=function(b){var _,S=b[0]/255,C=b[1]/255,E=b[2]/255,O=Math.max(Math.max(S,C),E),j=Math.min(Math.min(S,C),E),P=O-j;return _=P<=0?0:O===S?(C-E)/P%6:O===C?2+(E-S)/P:4+(S-C)/P+4,_/=6,[360*(_%=1),100*P,100*(P<1?j/(1-P):0)]},v.hsl.hcg=function(b){var _=b[1]/100,S=b[2]/100,C=1,E=0;return(C=S<.5?2*_*S:2*_*(1-S))<1&&(E=(S-.5*C)/(1-C)),[b[0],100*C,100*E]},v.hsv.hcg=function(b){var _=b[1]/100,S=b[2]/100,C=_*S,E=0;return C<1&&(E=(S-C)/(1-C)),[b[0],100*C,100*E]},v.hcg.rgb=function(b){var _=b[0]/360,S=b[1]/100,C=b[2]/100;if(S===0)return[255*C,255*C,255*C];var E,O=[0,0,0],j=_%1*6,P=j%1,$=1-P;switch(Math.floor(j)){case 0:O[0]=1,O[1]=P,O[2]=0;break;case 1:O[0]=$,O[1]=1,O[2]=0;break;case 2:O[0]=0,O[1]=1,O[2]=P;break;case 3:O[0]=0,O[1]=$,O[2]=1;break;case 4:O[0]=P,O[1]=0,O[2]=1;break;default:O[0]=1,O[1]=0,O[2]=$}return E=(1-S)*C,[255*(S*O[0]+E),255*(S*O[1]+E),255*(S*O[2]+E)]},v.hcg.hsv=function(b){var _=b[1]/100,S=_+b[2]/100*(1-_),C=0;return S>0&&(C=_/S),[b[0],100*C,100*S]},v.hcg.hsl=function(b){var _=b[1]/100,S=b[2]/100*(1-_)+.5*_,C=0;return S>0&&S<.5?C=_/(2*S):S>=.5&&S<1&&(C=_/(2*(1-S))),[b[0],100*C,100*S]},v.hcg.hwb=function(b){var _=b[1]/100,S=_+b[2]/100*(1-_);return[b[0],100*(S-_),100*(1-S)]},v.hwb.hcg=function(b){var _=b[1]/100,S=1-b[2]/100,C=S-_,E=0;return C<1&&(E=(S-C)/(1-C)),[b[0],100*C,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=v.gray.hsv=function(b){return[0,0,b[0]]},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){var _=255&Math.round(b[0]/100*255),S=((_<<16)+(_<<8)+_).toString(16).toUpperCase();return"000000".substring(S.length)+S},v.rgb.gray=function(b){return[(b[0]+b[1]+b[2])/3/255*100]}},4732:(c,u,f)=>{var h=f(6481),p=f(1157),g={};Object.keys(h).forEach(function(v){g[v]={},Object.defineProperty(g[v],"channels",{value:h[v].channels}),Object.defineProperty(g[v],"labels",{value:h[v].labels});var y=p(v);Object.keys(y).forEach(function(x){var w=y[x];g[v][x]=(function(T){var b=function(_){if(_==null)return _;arguments.length>1&&(_=Array.prototype.slice.call(arguments));var S=T(_);if(typeof S=="object")for(var C=S.length,E=0;E<C;E++)S[E]=Math.round(S[E]);return S};return"conversion"in T&&(b.conversion=T.conversion),b})(w),g[v][x].raw=(function(T){var b=function(_){return _==null?_:(arguments.length>1&&(_=Array.prototype.slice.call(arguments)),T(_))};return"conversion"in T&&(b.conversion=T.conversion),b})(w)})}),c.exports=g},1157:(c,u,f)=>{var h=f(6481);function p(y){var x=(function(){for(var O={},j=Object.keys(h),P=j.length,$=0;$<P;$++)O[j[$]]={distance:-1,parent:null};return O})(),w=[y];for(x[y].distance=0;w.length;)for(var T=w.pop(),b=Object.keys(h[T]),_=b.length,S=0;S<_;S++){var C=b[S],E=x[C];E.distance===-1&&(E.distance=x[T].distance+1,E.parent=T,w.unshift(C))}return x}function g(y,x){return function(w){return x(y(w))}}function v(y,x){for(var w=[x[y].parent,y],T=h[x[y].parent][y],b=x[y].parent;x[b].parent;)w.unshift(x[b].parent),T=g(h[x[b].parent][b],T),b=x[b].parent;return T.conversion=w,T}c.exports=function(y){for(var x=p(y),w={},T=Object.keys(x),b=T.length,_=0;_<b;_++){var S=T[_];x[S].parent!==null&&(w[S]=v(S,x))}return w}},4176:c=>{c.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},4877:c=>{c.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},6138:(c,u,f)=>{var h=f(4877),p=f(3403),g=Object.hasOwnProperty,v=Object.create(null);for(var y in h)g.call(h,y)&&(v[h[y]]=y);var x=c.exports={to:{},get:{}};function w(b,_,S){return Math.min(Math.max(_,b),S)}function T(b){var _=Math.round(b).toString(16).toUpperCase();return _.length<2?"0"+_:_}x.get=function(b){var _,S;switch(b.substring(0,3).toLowerCase()){case"hsl":_=x.get.hsl(b),S="hsl";break;case"hwb":_=x.get.hwb(b),S="hwb";break;default:_=x.get.rgb(b),S="rgb"}return _?{model:S,value:_}:null},x.get.rgb=function(b){if(!b)return null;var _,S,C,E=[0,0,0,1];if(_=b.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(C=_[2],_=_[1],S=0;S<3;S++){var O=2*S;E[S]=parseInt(_.slice(O,O+2),16)}C&&(E[3]=parseInt(C,16)/255)}else if(_=b.match(/^#([a-f0-9]{3,4})$/i)){for(C=(_=_[1])[3],S=0;S<3;S++)E[S]=parseInt(_[S]+_[S],16);C&&(E[3]=parseInt(C+C,16)/255)}else if(_=b.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(S=0;S<3;S++)E[S]=parseInt(_[S+1],0);_[4]&&(_[5]?E[3]=.01*parseFloat(_[4]):E[3]=parseFloat(_[4]))}else{if(!(_=b.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(_=b.match(/^(\w+)$/))?_[1]==="transparent"?[0,0,0,0]:g.call(h,_[1])?((E=h[_[1]])[3]=1,E):null:null;for(S=0;S<3;S++)E[S]=Math.round(2.55*parseFloat(_[S+1]));_[4]&&(_[5]?E[3]=.01*parseFloat(_[4]):E[3]=parseFloat(_[4]))}for(S=0;S<3;S++)E[S]=w(E[S],0,255);return E[3]=w(E[3],0,1),E},x.get.hsl=function(b){if(!b)return null;var _=b.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(_){var S=parseFloat(_[4]);return[(parseFloat(_[1])%360+360)%360,w(parseFloat(_[2]),0,100),w(parseFloat(_[3]),0,100),w(isNaN(S)?1:S,0,1)]}return null},x.get.hwb=function(b){if(!b)return null;var _=b.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(_){var S=parseFloat(_[4]);return[(parseFloat(_[1])%360+360)%360,w(parseFloat(_[2]),0,100),w(parseFloat(_[3]),0,100),w(isNaN(S)?1:S,0,1)]}return null},x.to.hex=function(){var b=p(arguments);return"#"+T(b[0])+T(b[1])+T(b[2])+(b[3]<1?T(Math.round(255*b[3])):"")},x.to.rgb=function(){var b=p(arguments);return b.length<4||b[3]===1?"rgb("+Math.round(b[0])+", "+Math.round(b[1])+", "+Math.round(b[2])+")":"rgba("+Math.round(b[0])+", "+Math.round(b[1])+", "+Math.round(b[2])+", "+b[3]+")"},x.to.rgb.percent=function(){var b=p(arguments),_=Math.round(b[0]/255*100),S=Math.round(b[1]/255*100),C=Math.round(b[2]/255*100);return b.length<4||b[3]===1?"rgb("+_+"%, "+S+"%, "+C+"%)":"rgba("+_+"%, "+S+"%, "+C+"%, "+b[3]+")"},x.to.hsl=function(){var b=p(arguments);return b.length<4||b[3]===1?"hsl("+b[0]+", "+b[1]+"%, "+b[2]+"%)":"hsla("+b[0]+", "+b[1]+"%, "+b[2]+"%, "+b[3]+")"},x.to.hwb=function(){var b=p(arguments),_="";return b.length>=4&&b[3]!==1&&(_=", "+b[3]),"hwb("+b[0]+", "+b[1]+"%, "+b[2]+"%"+_+")"},x.to.keyword=function(b){return v[b.slice(0,3)]}},3639:(c,u,f)=>{var h=f(6138),p=f(4732),g=[].slice,v=["keyword","gray","hex"],y={};Object.keys(p).forEach(function(S){y[g.call(p[S].labels).sort().join("")]=S});var x={};function w(S,C){if(!(this instanceof w))return new w(S,C);if(C&&C in v&&(C=null),C&&!(C in p))throw new Error("Unknown model: "+C);var E,O;if(S==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(S instanceof w)this.model=S.model,this.color=S.color.slice(),this.valpha=S.valpha;else if(typeof S=="string"){var j=h.get(S);if(j===null)throw new Error("Unable to parse color from string: "+S);this.model=j.model,O=p[this.model].channels,this.color=j.value.slice(0,O),this.valpha=typeof j.value[O]=="number"?j.value[O]:1}else if(S.length){this.model=C||"rgb",O=p[this.model].channels;var P=g.call(S,0,O);this.color=_(P,O),this.valpha=typeof S[O]=="number"?S[O]:1}else if(typeof S=="number")S&=16777215,this.model="rgb",this.color=[S>>16&255,S>>8&255,255&S],this.valpha=1;else{this.valpha=1;var $=Object.keys(S);"alpha"in S&&($.splice($.indexOf("alpha"),1),this.valpha=typeof S.alpha=="number"?S.alpha:0);var I=$.sort().join("");if(!(I in y))throw new Error("Unable to parse color from object: "+JSON.stringify(S));this.model=y[I];var L=p[this.model].labels,F=[];for(E=0;E<L.length;E++)F.push(S[L[E]]);this.color=_(F)}if(x[this.model])for(O=p[this.model].channels,E=0;E<O;E++){var J=x[this.model][E];J&&(this.color[E]=J(this.color[E]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function T(S,C,E){return(S=Array.isArray(S)?S:[S]).forEach(function(O){(x[O]||(x[O]=[]))[C]=E}),S=S[0],function(O){var j;return arguments.length?(E&&(O=E(O)),(j=this[S]()).color[C]=O,j):(j=this[S]().color[C],E&&(j=E(j)),j)}}function b(S){return function(C){return Math.max(0,Math.min(S,C))}}function _(S,C){for(var E=0;E<C;E++)typeof S[E]!="number"&&(S[E]=0);return S}w.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(S){var C=this.model in h.to?this:this.rgb(),E=(C=C.round(typeof S=="number"?S:1)).valpha===1?C.color:C.color.concat(this.valpha);return h.to[C.model](E)},percentString:function(S){var C=this.rgb().round(typeof S=="number"?S:1),E=C.valpha===1?C.color:C.color.concat(this.valpha);return h.to.rgb.percent(E)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var S={},C=p[this.model].channels,E=p[this.model].labels,O=0;O<C;O++)S[E[O]]=this.color[O];return this.valpha!==1&&(S.alpha=this.valpha),S},unitArray:function(){var S=this.rgb().color;return S[0]/=255,S[1]/=255,S[2]/=255,this.valpha!==1&&S.push(this.valpha),S},unitObject:function(){var S=this.rgb().object();return S.r/=255,S.g/=255,S.b/=255,this.valpha!==1&&(S.alpha=this.valpha),S},round:function(S){return S=Math.max(S||0,0),new w(this.color.map((function(C){return function(E){return(function(O,j){return Number(O.toFixed(j))})(E,C)}})(S)).concat(this.valpha),this.model)},alpha:function(S){return arguments.length?new w(this.color.concat(Math.max(0,Math.min(1,S))),this.model):this.valpha},red:T("rgb",0,b(255)),green:T("rgb",1,b(255)),blue:T("rgb",2,b(255)),hue:T(["hsl","hsv","hsl","hwb","hcg"],0,function(S){return(S%360+360)%360}),saturationl:T("hsl",1,b(100)),lightness:T("hsl",2,b(100)),saturationv:T("hsv",1,b(100)),value:T("hsv",2,b(100)),chroma:T("hcg",1,b(100)),gray:T("hcg",2,b(100)),white:T("hwb",1,b(100)),wblack:T("hwb",2,b(100)),cyan:T("cmyk",0,b(100)),magenta:T("cmyk",1,b(100)),yellow:T("cmyk",2,b(100)),black:T("cmyk",3,b(100)),x:T("xyz",0,b(100)),y:T("xyz",1,b(100)),z:T("xyz",2,b(100)),l:T("lab",0,b(100)),a:T("lab",1),b:T("lab",2),keyword:function(S){return arguments.length?new w(S):p[this.model].keyword(this.color)},hex:function(S){return arguments.length?new w(S):h.to.hex(this.rgb().round().color)},rgbNumber:function(){var S=this.rgb().color;return(255&S[0])<<16|(255&S[1])<<8|255&S[2]},luminosity:function(){for(var S=this.rgb().color,C=[],E=0;E<S.length;E++){var O=S[E]/255;C[E]=O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4)}return .2126*C[0]+.7152*C[1]+.0722*C[2]},contrast:function(S){var C=this.luminosity(),E=S.luminosity();return C>E?(C+.05)/(E+.05):(E+.05)/(C+.05)},level:function(S){var C=this.contrast(S);return C>=7.1?"AAA":C>=4.5?"AA":""},isDark:function(){var S=this.rgb().color;return(299*S[0]+587*S[1]+114*S[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var S=this.rgb(),C=0;C<3;C++)S.color[C]=255-S.color[C];return S},lighten:function(S){var C=this.hsl();return C.color[2]+=C.color[2]*S,C},darken:function(S){var C=this.hsl();return C.color[2]-=C.color[2]*S,C},saturate:function(S){var C=this.hsl();return C.color[1]+=C.color[1]*S,C},desaturate:function(S){var C=this.hsl();return C.color[1]-=C.color[1]*S,C},whiten:function(S){var C=this.hwb();return C.color[1]+=C.color[1]*S,C},blacken:function(S){var C=this.hwb();return C.color[2]+=C.color[2]*S,C},grayscale:function(){var S=this.rgb().color,C=.3*S[0]+.59*S[1]+.11*S[2];return w.rgb(C,C,C)},fade:function(S){return this.alpha(this.valpha-this.valpha*S)},opaquer:function(S){return this.alpha(this.valpha+this.valpha*S)},rotate:function(S){var C=this.hsl(),E=C.color[0];return E=(E=(E+S)%360)<0?360+E:E,C.color[0]=E,C},mix:function(S,C){if(!S||!S.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof S);var E=S.rgb(),O=this.rgb(),j=C===void 0?.5:C,P=2*j-1,$=E.alpha()-O.alpha(),I=((P*$===-1?P:(P+$)/(1+P*$))+1)/2,L=1-I;return w.rgb(I*E.red()+L*O.red(),I*E.green()+L*O.green(),I*E.blue()+L*O.blue(),E.alpha()*j+O.alpha()*(1-j))}},Object.keys(p).forEach(function(S){if(v.indexOf(S)===-1){var C=p[S].channels;w.prototype[S]=function(){if(this.model===S)return new w(this);if(arguments.length)return new w(arguments,S);var E,O=typeof arguments[C]=="number"?C:this.valpha;return new w((E=p[this.model][S].raw(this.color),Array.isArray(E)?E:[E]).concat(O),S)},w[S]=function(E){return typeof E=="number"&&(E=_(g.call(arguments),C)),new w(E,S)}}}),c.exports=w},9784:c=>{var u,f=typeof Reflect=="object"?Reflect:null,h=f&&typeof f.apply=="function"?f.apply:function(O,j,P){return Function.prototype.apply.call(O,j,P)};u=f&&typeof f.ownKeys=="function"?f.ownKeys:Object.getOwnPropertySymbols?function(O){return Object.getOwnPropertyNames(O).concat(Object.getOwnPropertySymbols(O))}:function(O){return Object.getOwnPropertyNames(O)};var p=Number.isNaN||function(O){return O!=O};function g(){g.init.call(this)}c.exports=g,c.exports.once=function(O,j){return new Promise(function(P,$){function I(F){O.removeListener(j,L),$(F)}function L(){typeof O.removeListener=="function"&&O.removeListener("error",I),P([].slice.call(arguments))}E(O,j,L,{once:!0}),j!=="error"&&(function(F,J,ee){typeof F.on=="function"&&E(F,"error",J,ee)})(O,I,{once:!0})})},g.EventEmitter=g,g.prototype._events=void 0,g.prototype._eventsCount=0,g.prototype._maxListeners=void 0;var v=10;function y(O){if(typeof O!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof O)}function x(O){return O._maxListeners===void 0?g.defaultMaxListeners:O._maxListeners}function w(O,j,P,$){var I,L,F,J;if(y(P),(L=O._events)===void 0?(L=O._events=Object.create(null),O._eventsCount=0):(L.newListener!==void 0&&(O.emit("newListener",j,P.listener?P.listener:P),L=O._events),F=L[j]),F===void 0)F=L[j]=P,++O._eventsCount;else if(typeof F=="function"?F=L[j]=$?[P,F]:[F,P]:$?F.unshift(P):F.push(P),(I=x(O))>0&&F.length>I&&!F.warned){F.warned=!0;var ee=new Error("Possible EventEmitter memory leak detected. "+F.length+" "+String(j)+" listeners added. Use emitter.setMaxListeners() to increase limit");ee.name="MaxListenersExceededWarning",ee.emitter=O,ee.type=j,ee.count=F.length,J=ee,console&&console.warn&&console.warn(J)}return O}function T(){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 b(O,j,P){var $={fired:!1,wrapFn:void 0,target:O,type:j,listener:P},I=T.bind($);return I.listener=P,$.wrapFn=I,I}function _(O,j,P){var $=O._events;if($===void 0)return[];var I=$[j];return I===void 0?[]:typeof I=="function"?P?[I.listener||I]:[I]:P?(function(L){for(var F=new Array(L.length),J=0;J<F.length;++J)F[J]=L[J].listener||L[J];return F})(I):C(I,I.length)}function S(O){var j=this._events;if(j!==void 0){var P=j[O];if(typeof P=="function")return 1;if(P!==void 0)return P.length}return 0}function C(O,j){for(var P=new Array(j),$=0;$<j;++$)P[$]=O[$];return P}function E(O,j,P,$){if(typeof O.on=="function")$.once?O.once(j,P):O.on(j,P);else{if(typeof O.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof O);O.addEventListener(j,function I(L){$.once&&O.removeEventListener(j,I),P(L)})}}Object.defineProperty(g,"defaultMaxListeners",{enumerable:!0,get:function(){return v},set:function(O){if(typeof O!="number"||O<0||p(O))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+O+".");v=O}}),g.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},g.prototype.setMaxListeners=function(O){if(typeof O!="number"||O<0||p(O))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+O+".");return this._maxListeners=O,this},g.prototype.getMaxListeners=function(){return x(this)},g.prototype.emit=function(O){for(var j=[],P=1;P<arguments.length;P++)j.push(arguments[P]);var $=O==="error",I=this._events;if(I!==void 0)$=$&&I.error===void 0;else if(!$)return!1;if($){var L;if(j.length>0&&(L=j[0]),L instanceof Error)throw L;var F=new Error("Unhandled error."+(L?" ("+L.message+")":""));throw F.context=L,F}var J=I[O];if(J===void 0)return!1;if(typeof J=="function")h(J,this,j);else{var ee=J.length,Z=C(J,ee);for(P=0;P<ee;++P)h(Z[P],this,j)}return!0},g.prototype.addListener=function(O,j){return w(this,O,j,!1)},g.prototype.on=g.prototype.addListener,g.prototype.prependListener=function(O,j){return w(this,O,j,!0)},g.prototype.once=function(O,j){return y(j),this.on(O,b(this,O,j)),this},g.prototype.prependOnceListener=function(O,j){return y(j),this.prependListener(O,b(this,O,j)),this},g.prototype.removeListener=function(O,j){var P,$,I,L,F;if(y(j),($=this._events)===void 0)return this;if((P=$[O])===void 0)return this;if(P===j||P.listener===j)--this._eventsCount===0?this._events=Object.create(null):(delete $[O],$.removeListener&&this.emit("removeListener",O,P.listener||j));else if(typeof P!="function"){for(I=-1,L=P.length-1;L>=0;L--)if(P[L]===j||P[L].listener===j){F=P[L].listener,I=L;break}if(I<0)return this;I===0?P.shift():(function(J,ee){for(;ee+1<J.length;ee++)J[ee]=J[ee+1];J.pop()})(P,I),P.length===1&&($[O]=P[0]),$.removeListener!==void 0&&this.emit("removeListener",O,F||j)}return this},g.prototype.off=g.prototype.removeListener,g.prototype.removeAllListeners=function(O){var j,P,$;if((P=this._events)===void 0)return this;if(P.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):P[O]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete P[O]),this;if(arguments.length===0){var I,L=Object.keys(P);for($=0;$<L.length;++$)(I=L[$])!=="removeListener"&&this.removeAllListeners(I);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(j=P[O])=="function")this.removeListener(O,j);else if(j!==void 0)for($=j.length-1;$>=0;$--)this.removeListener(O,j[$]);return this},g.prototype.listeners=function(O){return _(this,O,!0)},g.prototype.rawListeners=function(O){return _(this,O,!1)},g.listenerCount=function(O,j){return typeof O.listenerCount=="function"?O.listenerCount(j):S.call(O,j)},g.prototype.listenerCount=S,g.prototype.eventNames=function(){return this._eventsCount>0?u(this._events):[]}},2094:c=>{c.exports=function(u){return!(!u||typeof u=="string")&&(u instanceof Array||Array.isArray(u)||u.length>=0&&(u.splice instanceof Function||Object.getOwnPropertyDescriptor(u,u.length-1)&&u.constructor.name!=="String"))}},3989:c=>{var u="__lodash_placeholder__",f=32,h=1/0,p=NaN,g=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",f],["partialRight",64],["rearg",256]],v="[object Function]",y="[object GeneratorFunction]",x=/^\s+|\s+$/g,w=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,T=/\{\n\/\* \[wrapped with (.+)\] \*/,b=/,? & /,_=/^[-+]0x[0-9a-f]+$/i,S=/^0b[01]+$/i,C=/^\[object .+?Constructor\]$/,E=/^0o[0-7]+$/i,O=/^(?:0|[1-9]\d*)$/,j=parseInt,P=typeof Nm=="object"&&Nm&&Nm.Object===Object&&Nm,$=typeof self=="object"&&self&&self.Object===Object&&self,I=P||$||Function("return this")();function L(Ce,me,Me){switch(Me.length){case 0:return Ce.call(me);case 1:return Ce.call(me,Me[0]);case 2:return Ce.call(me,Me[0],Me[1]);case 3:return Ce.call(me,Me[0],Me[1],Me[2])}return Ce.apply(me,Me)}function F(Ce,me){return!!(Ce&&Ce.length)&&(function(Me,Ve,it){if(Ve!=Ve)return(function(vt,Gt,kt,Tt){for(var Xt=vt.length,wt=kt+-1;++wt<Xt;)if(Gt(vt[wt],wt,vt))return wt;return-1})(Me,J,it);for(var Ct=it-1,Nt=Me.length;++Ct<Nt;)if(Me[Ct]===Ve)return Ct;return-1})(Ce,me,0)>-1}function J(Ce){return Ce!=Ce}function ee(Ce,me){for(var Me=-1,Ve=Ce.length,it=0,Ct=[];++Me<Ve;){var Nt=Ce[Me];Nt!==me&&Nt!==u||(Ce[Me]=u,Ct[it++]=Me)}return Ct}var Z,H,V,oe=Function.prototype,ne=Object.prototype,D=I["__core-js_shared__"],q=(Z=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||""))?"Symbol(src)_1."+Z:"",U=oe.toString,N=ne.hasOwnProperty,G=ne.toString,te=RegExp("^"+U.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=Object.create,de=Math.max,we=Math.min,Ee=(H=De(Object,"defineProperty"),(V=De.name)&&V.length>2?H:void 0);function se(Ce){if(!ze(Ce)||(function(Me){return!!q&&q in Me})(Ce))return!1;var me=(function(Me){var Ve=ze(Me)?G.call(Me):"";return Ve==v||Ve==y})(Ce)||(function(Me){var Ve=!1;if(Me!=null&&typeof Me.toString!="function")try{Ve=!!(Me+"")}catch{}return Ve})(Ce)?te:C;return me.test((function(Me){if(Me!=null){try{return U.call(Me)}catch{}try{return Me+""}catch{}}return""})(Ce))}function X(Ce){return function(){var me=arguments;switch(me.length){case 0:return new Ce;case 1:return new Ce(me[0]);case 2:return new Ce(me[0],me[1]);case 3:return new Ce(me[0],me[1],me[2]);case 4:return new Ce(me[0],me[1],me[2],me[3]);case 5:return new Ce(me[0],me[1],me[2],me[3],me[4]);case 6:return new Ce(me[0],me[1],me[2],me[3],me[4],me[5]);case 7:return new Ce(me[0],me[1],me[2],me[3],me[4],me[5],me[6])}var Me,Ve=ze(Me=Ce.prototype)?re(Me):{},it=Ce.apply(Ve,me);return ze(it)?it:Ve}}function fe(Ce,me,Me,Ve,it,Ct,Nt,vt,Gt,kt){var Tt=128&me,Xt=1&me,wt=2&me,sn=24&me,rn=512&me,vn=wt?void 0:X(Ce);return function xt(){for(var on=arguments.length,zt=Array(on),$n=on;$n--;)zt[$n]=arguments[$n];if(sn)var tr=ye(xt),xr=(function(Lt,tn){for(var Rt=Lt.length,Er=0;Rt--;)Lt[Rt]===tn&&Er++;return Er})(zt,tr);if(Ve&&(zt=(function(Lt,tn,Rt,Er){for(var ir=-1,oo=Lt.length,_r=Rt.length,an=-1,On=tn.length,zr=de(oo-_r,0),Ao=Array(On+zr),Ds=!Er;++an<On;)Ao[an]=tn[an];for(;++ir<_r;)(Ds||ir<oo)&&(Ao[Rt[ir]]=Lt[ir]);for(;zr--;)Ao[an++]=Lt[ir++];return Ao})(zt,Ve,it,sn)),Ct&&(zt=(function(Lt,tn,Rt,Er){for(var ir=-1,oo=Lt.length,_r=-1,an=Rt.length,On=-1,zr=tn.length,Ao=de(oo-an,0),Ds=Array(Ao+zr),Bf=!Er;++ir<Ao;)Ds[ir]=Lt[ir];for(var vl=ir;++On<zr;)Ds[vl+On]=tn[On];for(;++_r<an;)(Bf||ir<oo)&&(Ds[vl+Rt[_r]]=Lt[ir++]);return Ds})(zt,Ct,Nt,sn)),on-=xr,sn&&on<kt){var at=ee(zt,tr);return he(Ce,me,fe,xt.placeholder,Me,zt,at,vt,Gt,kt-on)}var Mt=Xt?Me:this,Rn=wt?Mt[Ce]:Ce;return on=zt.length,vt?zt=(function(Lt,tn){for(var Rt=Lt.length,Er=we(tn.length,Rt),ir=(function(_r,an){var On=-1,zr=_r.length;for(an||(an=Array(zr));++On<zr;)an[On]=_r[On];return an})(Lt);Er--;){var oo=tn[Er];Lt[Er]=Fe(oo,Rt)?ir[oo]:void 0}return Lt})(zt,vt):rn&&on>1&&zt.reverse(),Tt&&Gt<on&&(zt.length=Gt),this&&this!==I&&this instanceof xt&&(Rn=vn||X(Rn)),Rn.apply(Mt,zt)}}function he(Ce,me,Me,Ve,it,Ct,Nt,vt,Gt,kt){var Tt=8&me;me|=Tt?f:64,4&(me&=~(Tt?64:f))||(me&=-4);var Xt=Me(Ce,me,it,Tt?Ct:void 0,Tt?Nt:void 0,Tt?void 0:Ct,Tt?void 0:Nt,vt,Gt,kt);return Xt.placeholder=Ve,Le(Xt,Ce,me)}function Pe(Ce,me,Me,Ve,it,Ct,Nt,vt){var Gt=2&me;if(!Gt&&typeof Ce!="function")throw new TypeError("Expected a function");var kt=Ve?Ve.length:0;if(kt||(me&=-97,Ve=it=void 0),Nt=Nt===void 0?Nt:de(dt(Nt),0),vt=vt===void 0?vt:dt(vt),kt-=it?it.length:0,64&me){var Tt=Ve,Xt=it;Ve=it=void 0}var wt=[Ce,me,Me,Ve,it,Tt,Xt,Ct,Nt,vt];if(Ce=wt[0],me=wt[1],Me=wt[2],Ve=wt[3],it=wt[4],!(vt=wt[9]=wt[9]==null?Gt?0:Ce.length:de(wt[9]-kt,0))&&24&me&&(me&=-25),me&&me!=1)sn=me==8||me==16?(function(rn,vn,xt){var on=X(rn);return function zt(){for(var $n=arguments.length,tr=Array($n),xr=$n,at=ye(zt);xr--;)tr[xr]=arguments[xr];var Mt=$n<3&&tr[0]!==at&&tr[$n-1]!==at?[]:ee(tr,at);return($n-=Mt.length)<xt?he(rn,vn,fe,zt.placeholder,void 0,tr,Mt,void 0,void 0,xt-$n):L(this&&this!==I&&this instanceof zt?on:rn,this,tr)}})(Ce,me,vt):me!=f&&me!=33||it.length?fe.apply(void 0,wt):(function(rn,vn,xt,on){var zt=1&vn,$n=X(rn);return function tr(){for(var xr=-1,at=arguments.length,Mt=-1,Rn=on.length,Lt=Array(Rn+at),tn=this&&this!==I&&this instanceof tr?$n:rn;++Mt<Rn;)Lt[Mt]=on[Mt];for(;at--;)Lt[Mt++]=arguments[++xr];return L(tn,zt?xt:this,Lt)}})(Ce,me,Me,Ve);else var sn=(function(rn,vn,xt){var on=1&vn,zt=X(rn);return function $n(){return(this&&this!==I&&this instanceof $n?zt:rn).apply(on?xt:this,arguments)}})(Ce,me,Me);return Le(sn,Ce,me)}function ye(Ce){return Ce.placeholder}function De(Ce,me){var Me=(function(Ve,it){return Ve?.[it]})(Ce,me);return se(Me)?Me:void 0}function Ue(Ce){var me=Ce.match(T);return me?me[1].split(b):[]}function ve(Ce,me){var Me=me.length,Ve=Me-1;return me[Ve]=(Me>1?"& ":"")+me[Ve],me=me.join(Me>2?", ":" "),Ce.replace(w,`{
|
|
128
|
+
/* [wrapped with `+me+`] */
|
|
129
|
+
`)}function Fe(Ce,me){return!!(me=me??9007199254740991)&&(typeof Ce=="number"||O.test(Ce))&&Ce>-1&&Ce%1==0&&Ce<me}var Le=Ee?function(Ce,me,Me){var Ve,it=me+"";return Ee(Ce,"toString",{configurable:!0,enumerable:!1,value:(Ve=ve(it,Ze(Ue(it),Me)),function(){return Ve})})}:function(Ce){return Ce};function Ze(Ce,me){return(function(Me,Ve){for(var it=-1,Ct=Me?Me.length:0;++it<Ct&&Ve(Me[it],it,Me)!==!1;);})(g,function(Me){var Ve="_."+Me[0];me&Me[1]&&!F(Ce,Ve)&&Ce.push(Ve)}),Ce.sort()}function Oe(Ce,me,Me){var Ve=Pe(Ce,8,void 0,void 0,void 0,void 0,void 0,me=Me?void 0:me);return Ve.placeholder=Oe.placeholder,Ve}function ze(Ce){var me=typeof Ce;return!!Ce&&(me=="object"||me=="function")}function Be(Ce){return Ce?(Ce=(function(me){if(typeof me=="number")return me;if((function(it){return typeof it=="symbol"||(function(Ct){return!!Ct&&typeof Ct=="object"})(it)&&G.call(it)=="[object Symbol]"})(me))return p;if(ze(me)){var Me=typeof me.valueOf=="function"?me.valueOf():me;me=ze(Me)?Me+"":Me}if(typeof me!="string")return me===0?me:+me;me=me.replace(x,"");var Ve=S.test(me);return Ve||E.test(me)?j(me.slice(2),Ve?2:8):_.test(me)?p:+me})(Ce))===h||Ce===-1/0?17976931348623157e292*(Ce<0?-1:1):Ce==Ce?Ce:0:Ce===0?Ce:0}function dt(Ce){var me=Be(Ce),Me=me%1;return me==me?Me?me-Me:me:0}Oe.placeholder={},c.exports=Oe},3403:(c,u,f)=>{var h=f(2094),p=Array.prototype.concat,g=Array.prototype.slice,v=c.exports=function(y){for(var x=[],w=0,T=y.length;w<T;w++){var b=y[w];h(b)?x=p.call(x,g.call(b)):x.push(b)}return x};v.wrap=function(y){return function(){return y(v(arguments))}}},4119:c=>{c.exports=n}},o={};function i(c){var u=o[c];if(u!==void 0)return u.exports;var f=o[c]={exports:{}};return r[c](f,f.exports,i),f.exports}i.n=c=>{var u=c&&c.__esModule?()=>c.default:()=>c;return i.d(u,{a:u}),u},i.d=(c,u)=>{for(var f in u)i.o(u,f)&&!i.o(c,f)&&Object.defineProperty(c,f,{enumerable:!0,get:u[f]})},i.o=(c,u)=>Object.prototype.hasOwnProperty.call(c,u),i.r=c=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})};var a={};return(()=>{function c(Q){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},c(Q)}function u(Q){var B=(function(K,Y){if(c(K)!="object"||!K)return K;var ae=K[Symbol.toPrimitive];if(ae!==void 0){var _e=ae.call(K,Y);if(c(_e)!="object")return _e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)(K)})(Q,"string");return c(B)=="symbol"?B:B+""}function f(Q,B,K){return(B=u(B))in Q?Object.defineProperty(Q,B,{value:K,enumerable:!0,configurable:!0,writable:!0}):Q[B]=K,Q}function h(Q,B){var K=Object.keys(Q);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(Q);B&&(Y=Y.filter(function(ae){return Object.getOwnPropertyDescriptor(Q,ae).enumerable})),K.push.apply(K,Y)}return K}function p(Q){for(var B=1;B<arguments.length;B++){var K=arguments[B]!=null?arguments[B]:{};B%2?h(Object(K),!0).forEach(function(Y){f(Q,Y,K[Y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Q,Object.getOwnPropertyDescriptors(K)):h(Object(K)).forEach(function(Y){Object.defineProperty(Q,Y,Object.getOwnPropertyDescriptor(K,Y))})}return Q}function g(Q,B){if(!(Q instanceof B))throw new TypeError("Cannot call a class as a function")}function v(Q,B){for(var K=0;K<B.length;K++){var Y=B[K];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(Q,u(Y.key),Y)}}function y(Q,B,K){return B&&v(Q.prototype,B),K&&v(Q,K),Object.defineProperty(Q,"prototype",{writable:!1}),Q}function x(Q){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(B){return B.__proto__||Object.getPrototypeOf(B)},x(Q)}function w(){try{var Q=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w=function(){return!!Q})()}function T(Q,B){if(B&&(c(B)=="object"||typeof B=="function"))return B;if(B!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(K){if(K===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K})(Q)}function b(Q,B,K){return B=x(B),T(Q,w()?Reflect.construct(B,K||[],x(Q).constructor):B.apply(Q,K))}function _(Q,B){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(K,Y){return K.__proto__=Y,K},_(Q,B)}function S(Q,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");Q.prototype=Object.create(B&&B.prototype,{constructor:{value:Q,writable:!0,configurable:!0}}),Object.defineProperty(Q,"prototype",{writable:!1}),B&&_(Q,B)}i.r(a),i.d(a,{default:()=>Ap});var C=i(4119),E=i.n(C);function O(){var Q=this.constructor.getDerivedStateFromProps(this.props,this.state);Q!=null&&this.setState(Q)}function j(Q){this.setState((function(B){var K=this.constructor.getDerivedStateFromProps(Q,B);return K??null}).bind(this))}function P(Q,B){try{var K=this.props,Y=this.state;this.props=Q,this.state=B,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(K,Y)}finally{this.props=K,this.state=Y}}function $(Q){var B=Q.prototype;if(!B||!B.isReactComponent)throw new Error("Can only polyfill class components");if(typeof Q.getDerivedStateFromProps!="function"&&typeof B.getSnapshotBeforeUpdate!="function")return Q;var K=null,Y=null,ae=null;if(typeof B.componentWillMount=="function"?K="componentWillMount":typeof B.UNSAFE_componentWillMount=="function"&&(K="UNSAFE_componentWillMount"),typeof B.componentWillReceiveProps=="function"?Y="componentWillReceiveProps":typeof B.UNSAFE_componentWillReceiveProps=="function"&&(Y="UNSAFE_componentWillReceiveProps"),typeof B.componentWillUpdate=="function"?ae="componentWillUpdate":typeof B.UNSAFE_componentWillUpdate=="function"&&(ae="UNSAFE_componentWillUpdate"),K!==null||Y!==null||ae!==null){var _e=Q.displayName||Q.name,ge=typeof Q.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
130
|
+
|
|
131
|
+
`+_e+" uses "+ge+" but also contains the following legacy lifecycles:"+(K!==null?`
|
|
132
|
+
`+K:"")+(Y!==null?`
|
|
133
|
+
`+Y:"")+(ae!==null?`
|
|
134
|
+
`+ae:"")+`
|
|
135
|
+
|
|
136
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
137
|
+
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof Q.getDerivedStateFromProps=="function"&&(B.componentWillMount=O,B.componentWillReceiveProps=j),typeof B.getSnapshotBeforeUpdate=="function"){if(typeof B.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");B.componentWillUpdate=P;var le=B.componentDidUpdate;B.componentDidUpdate=function(Re,$e,He){var qe=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:He;le.call(this,Re,$e,qe)}}return Q}function I(Q,B){if(Q==null)return{};var K={};for(var Y in Q)if({}.hasOwnProperty.call(Q,Y)){if(B.indexOf(Y)!==-1)continue;K[Y]=Q[Y]}return K}function L(Q,B){if(Q==null)return{};var K,Y,ae=I(Q,B);if(Object.getOwnPropertySymbols){var _e=Object.getOwnPropertySymbols(Q);for(Y=0;Y<_e.length;Y++)K=_e[Y],B.indexOf(K)===-1&&{}.propertyIsEnumerable.call(Q,K)&&(ae[K]=Q[K])}return ae}function F(Q,B){if(B&&Q?.constructor===B)return"bigNumber";var K=(function(Y){return{}.toString.call(Y).match(/\s([a-zA-Z]+)/)[1].toLowerCase()})(Q);return K==="number"&&(K=isNaN(Q)?"nan":(0|Q)!=Q?"float":"integer"),K}function J(Q){return Q.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\f/g,"\\f")}O.__suppressDeprecationWarning=!0,j.__suppressDeprecationWarning=!0,P.__suppressDeprecationWarning=!0;var ee={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"},Z={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 H={globalFontFamily:"monospace",globalCursor:"default",braceFontWeight:"bold",braceCursor:"pointer",ellipsisFontSize:"18px",ellipsisLineHeight:"10px",ellipsisCursor:"pointer",keyMargin:"0px 5px",keyLetterSpacing:"0.5px",keyFontStyle:"none",keyVerticalAlign:"top",keyOpacity:"0.85",keyOpacityHover:"1",keyValPaddingTop:"3px",keyValPaddingBottom:"3px",keyValPaddingRight:"5px",keyValBorderLeft:"1px solid",keyValBorderHover:"2px solid",pushedContentMarginLeft:"6px",variableValuePaddingRight:"6px",nullFontSize:"11px",nullFontWeight:"bold",nullPadding:"1px 2px",nullBorderRadius:"3px",nanFontSize:"11px",nanFontWeight:"bold",nanPadding:"1px 2px",nanBorderRadius:"3px",undefinedFontSize:"11px",undefinedPadding:"1px 2px",undefinedBorderRadius:"3px",dataTypeFontSize:"11px",dataTypeMarginRight:"4px",datatypeOpacity:"0.8",objectSizeBorderRadius:"3px",objectSizeFontStyle:"italic",objectSizeMargin:"0px 6px 0px 0px",clipboardCursor:"pointer",clipboardCheckMarginLeft:"-12px",metaDataPadding:"0px 0px 0px 10px",arrayGroupMetaPadding:"0px 0px 0px 4px",iconContainerWidth:"17px",tooltipPadding:"4px",editInputMinWidth:"130px",editInputBorderRadius:"2px",editInputPadding:"5px",editInputMarginRight:"4px",editInputFontFamily:"monospace",iconCursor:"pointer",iconFontSize:"15px",iconPaddingRight:"1px",dateValueMarginLeft:"2px",iconMarginRight:"3px",detectedRowPaddingTop:"3px",addKeyCoverBackground:"rgba(255, 255, 255, 0.3)",addKeyCoverPosition:"absolute",addKeyCoverPositionPx:"0px",addKeyModalWidth:"200px",addKeyModalMargin:"auto",addKeyModalPadding:"10px",addKeyModalRadius:"3px",commaColor:"#666",commaFontSize:"12px",commaMarginRight:"4px"};function V(Q,B){(B==null||B>Q.length)&&(B=Q.length);for(var K=0,Y=Array(B);K<B;K++)Y[K]=Q[K];return Y}function oe(Q,B){if(Q){if(typeof Q=="string")return V(Q,B);var K={}.toString.call(Q).slice(8,-1);return K==="Object"&&Q.constructor&&(K=Q.constructor.name),K==="Map"||K==="Set"?Array.from(Q):K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K)?V(Q,B):void 0}}function ne(Q,B){return(function(K){if(Array.isArray(K))return K})(Q)||(function(K,Y){var ae=K==null?null:typeof Symbol<"u"&&K[Symbol.iterator]||K["@@iterator"];if(ae!=null){var _e,ge,le,Re,$e=[],He=!0,qe=!1;try{if(le=(ae=ae.call(K)).next,Y===0){if(Object(ae)!==ae)return;He=!1}else for(;!(He=(_e=le.call(ae)).done)&&($e.push(_e.value),$e.length!==Y);He=!0);}catch(rt){qe=!0,ge=rt}finally{try{if(!He&&ae.return!=null&&(Re=ae.return(),Object(Re)!==Re))return}finally{if(qe)throw ge}}return $e}})(Q,B)||oe(Q,B)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
138
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}var D=i(9446),q=i(3639),U=i.n(q),N=i(3989),G=i.n(N);function te(Q,B){var K=Object.keys(Q);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(Q);B&&(Y=Y.filter(function(ae){return Object.getOwnPropertyDescriptor(Q,ae).enumerable})),K.push.apply(K,Y)}return K}function re(Q){for(var B=1;B<arguments.length;B++){var K=arguments[B]!=null?arguments[B]:{};B%2?te(Object(K),!0).forEach(function(Y){f(Q,Y,K[Y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Q,Object.getOwnPropertyDescriptors(K)):te(Object(K)).forEach(function(Y){Object.defineProperty(Q,Y,Object.getOwnPropertyDescriptor(K,Y))})}return Q}var de=D.default,we=Object.keys(de),Ee=function(Q){var B,K=(function(Re){var $e=Re[0]/255,He=Re[1]/255,qe=Re[2]/255;return[.299*$e+.587*He+.114*qe,-.14713*$e+-.28886*He+.436*qe,.615*$e+-.51499*He+-.10001*qe]})(U()(Q).array()),Y=ne(K,3),ae=Y[0],_e=Y[1],ge=Y[2],le=(function(Re){var $e,He,qe,rt=Re[0],Ke=Re[1],Ot=Re[2];return $e=1*rt+0*Ke+1.13983*Ot,He=1*rt+-.39465*Ke+-.5806*Ot,qe=1*rt+2.02311*Ke+0*Ot,[255*($e=Math.min(Math.max(0,$e),1)),255*(He=Math.min(Math.max(0,He),1)),255*(qe=Math.min(Math.max(0,qe),1))]})([(B=ae,B<.25?1:B<.5?.9-B:1.1-B),_e,ge]);return U().rgb(le).hex()},se=function(Q){return function(B){return{className:[B.className,Q.className].filter(Boolean).join(" "),style:re(re({},B.style||{}),Q.style||{})}}},X=function(Q,B){var K=Object.keys(B);for(var Y in Q)K.indexOf(Y)===-1&&K.push(Y);return K.reduce(function(ae,_e){return ae[_e]=(function(ge,le){if(ge===void 0)return le;if(le===void 0)return ge;var Re=c(ge),$e=c(le);switch(Re){case"string":switch($e){case"string":return[le,ge].filter(Boolean).join(" ");case"object":return se({className:ge,style:le});case"function":return function(He){for(var qe=arguments.length,rt=new Array(qe>1?qe-1:0),Ke=1;Ke<qe;Ke++)rt[Ke-1]=arguments[Ke];return se({className:ge})(le.apply(void 0,[He].concat(rt)))}}break;case"object":switch($e){case"string":return se({className:le,style:ge});case"object":return re(re({},le),ge);case"function":return function(He){for(var qe=arguments.length,rt=new Array(qe>1?qe-1:0),Ke=1;Ke<qe;Ke++)rt[Ke-1]=arguments[Ke];return se({style:ge})(le.apply(void 0,[He].concat(rt)))}}break;case"function":switch($e){case"string":return function(He){for(var qe=arguments.length,rt=new Array(qe>1?qe-1:0),Ke=1;Ke<qe;Ke++)rt[Ke-1]=arguments[Ke];return ge.apply(void 0,[se(He)({className:le})].concat(rt))};case"object":return function(He){for(var qe=arguments.length,rt=new Array(qe>1?qe-1:0),Ke=1;Ke<qe;Ke++)rt[Ke-1]=arguments[Ke];return ge.apply(void 0,[se(He)({style:le})].concat(rt))};case"function":return function(He){for(var qe=arguments.length,rt=new Array(qe>1?qe-1:0),Ke=1;Ke<qe;Ke++)rt[Ke-1]=arguments[Ke];return ge.apply(void 0,[le.apply(void 0,[He].concat(rt))].concat(rt))}}}})(Q[_e],B[_e]),ae},{})},fe=function(Q,B){for(var K=arguments.length,Y=new Array(K>2?K-2:0),ae=2;ae<K;ae++)Y[ae-2]=arguments[ae];if(B===null)return Q;Array.isArray(B)||(B=[B]);var _e=B.map(function(ge){return Q[ge]}).filter(Boolean).reduce(function(ge,le){return typeof le=="string"?ge.className=[ge.className,le].filter(Boolean).join(" "):c(le)==="object"?ge.style=re(re({},ge.style),le):typeof le=="function"&&(ge=re(re({},ge),le.apply(void 0,[ge].concat(Y)))),ge},{className:"",style:{}});return _e.className||delete _e.className,Object.keys(_e.style).length===0&&delete _e.style,_e},he=function(Q){return Object.keys(Q).reduce(function(B,K){return B[K]=/^base/.test(K)?Ee(Q[K]):K==="scheme"?Q[K]+":inverted":Q[K],B},{})},Pe=G()(function(Q){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Y=B.defaultBase16,ae=Y===void 0?de:Y,_e=B.base16Themes,ge=De(K,_e===void 0?null:_e);ge&&(K=re(re({},ge),K));for(var le=we.reduce(function(Ot,qt){return Ot[qt]=K[qt]||ae[qt],Ot},{}),Re=Object.keys(K).reduce(function(Ot,qt){return we.indexOf(qt)===-1&&(Ot[qt]=K[qt]),Ot},{}),$e=Q(le),He=X(Re,$e),qe=arguments.length,rt=new Array(qe>3?qe-3:0),Ke=3;Ke<qe;Ke++)rt[Ke-3]=arguments[Ke];return G()(fe,2).apply(void 0,[He].concat(rt))},3),ye=function(Q){return!!Q.extend},De=function(Q,B){if(Q&&ye(Q)&&Q.extend&&(Q=Q.extend),typeof Q=="string"){var K=ne(Q.split(":"),2),Y=K[0],ae=K[1];Q=B?B[Y]:D[Y],ae==="inverted"&&(Q=he(Q))}return Q&&Object.prototype.hasOwnProperty.call(Q,"base00")?Q:void 0},Ue=function(Q){var B=(function(K){return{backgroundColor:K.base00,ellipsisColor:K.base09,braceColor:K.base07,expandedIcon:K.base0D,collapsedIcon:K.base0E,keyColor:K.base07,arrayKeyColor:K.base0C,objectSize:K.base04,copyToClipboard:K.base0F,copyToClipboardCheck:K.base0D,objectBorder:K.base02,dataTypes:{boolean:K.base0E,date:K.base0D,float:K.base0B,function:K.base0D,integer:K.base0F,string:K.base09,nan:K.base08,null:K.base0A,undefined:K.base05,regexp:K.base0A,background:K.base02,bigNumber:K.base09},editVariable:{editIcon:K.base0E,cancelIcon:K.base09,removeIcon:K.base09,addIcon:K.base0E,checkIcon:K.base0E,background:K.base01,color:K.base0A,border:K.base07},addKeyModal:{background:K.base05,border:K.base04,color:K.base0A,labelColor:K.base01},validationFailure:{background:K.base09,iconColor:K.base01,fontColor:K.base01}}})(Q);return{"app-container":{fontFamily:H.globalFontFamily,cursor:H.globalCursor,backgroundColor:B.backgroundColor,position:"relative"},ellipsis:{display:"inline-block",color:B.ellipsisColor,fontSize:H.ellipsisFontSize,lineHeight:H.ellipsisLineHeight,cursor:H.ellipsisCursor},"brace-row":{display:"inline-block",cursor:"pointer"},brace:{display:"inline-block",cursor:H.braceCursor,fontWeight:H.braceFontWeight,color:B.braceColor},"expanded-icon":{color:B.expandedIcon},"collapsed-icon":{color:B.collapsedIcon},colon:{display:"inline-block",margin:H.keyMargin,color:B.keyColor,verticalAlign:"top"},objectKeyVal:function(K,Y){return{style:p({paddingTop:H.keyValPaddingTop,paddingRight:H.keyValPaddingRight,paddingBottom:H.keyValPaddingBottom,borderLeft:H.keyValBorderLeft+" "+B.objectBorder,":hover":{paddingLeft:Y.paddingLeft-1+"px",borderLeft:H.keyValBorderHover+" "+B.objectBorder}},Y)}},"object-key-val-no-border":{padding:H.keyValPadding},"pushed-content":{marginLeft:H.pushedContentMarginLeft},variableValue:function(K,Y){return{style:p({display:"inline-block",paddingRight:H.variableValuePaddingRight,position:"relative"},Y)}},"object-name":{display:"inline-block",color:B.keyColor,letterSpacing:H.keyLetterSpacing,fontStyle:H.keyFontStyle,verticalAlign:H.keyVerticalAlign,opacity:H.keyOpacity,":hover":{opacity:H.keyOpacityHover}},"array-key":{display:"inline-block",color:B.arrayKeyColor,letterSpacing:H.keyLetterSpacing,fontStyle:H.keyFontStyle,verticalAlign:H.keyVerticalAlign,opacity:H.keyOpacity,":hover":{opacity:H.keyOpacityHover}},"object-size":{color:B.objectSize,borderRadius:H.objectSizeBorderRadius,fontStyle:H.objectSizeFontStyle,margin:H.objectSizeMargin,cursor:"default"},"data-type-label":{fontSize:H.dataTypeFontSize,marginRight:H.dataTypeMarginRight,opacity:H.datatypeOpacity},boolean:{display:"inline-block",color:B.dataTypes.boolean},date:{display:"inline-block",color:B.dataTypes.date},"date-value":{marginLeft:H.dateValueMarginLeft},float:{display:"inline-block",color:B.dataTypes.float},function:{display:"inline-block",color:B.dataTypes.function,cursor:"pointer",whiteSpace:"pre-line"},"function-value":{fontStyle:"italic"},integer:{display:"inline-block",color:B.dataTypes.integer},bigNumber:{display:"inline-block",color:B.dataTypes.bigNumber},string:{display:"inline-block",color:B.dataTypes.string},nan:{display:"inline-block",color:B.dataTypes.nan,fontSize:H.nanFontSize,fontWeight:H.nanFontWeight,backgroundColor:B.dataTypes.background,padding:H.nanPadding,borderRadius:H.nanBorderRadius},null:{display:"inline-block",color:B.dataTypes.null,fontSize:H.nullFontSize,fontWeight:H.nullFontWeight,backgroundColor:B.dataTypes.background,padding:H.nullPadding,borderRadius:H.nullBorderRadius},undefined:{display:"inline-block",color:B.dataTypes.undefined,fontSize:H.undefinedFontSize,padding:H.undefinedPadding,borderRadius:H.undefinedBorderRadius,backgroundColor:B.dataTypes.background},regexp:{display:"inline-block",color:B.dataTypes.regexp},"copy-to-clipboard":{cursor:H.clipboardCursor},"copy-icon":{color:B.copyToClipboard,fontSize:H.iconFontSize,marginRight:H.iconMarginRight,verticalAlign:"top"},"copy-icon-copied":{color:B.copyToClipboardCheck,marginLeft:H.clipboardCheckMarginLeft},"array-group-meta-data":{display:"inline-block",padding:H.arrayGroupMetaPadding},"object-meta-data":{display:"inline-block",padding:H.metaDataPadding},"icon-container":{display:"inline-block",width:H.iconContainerWidth},tooltip:{padding:H.tooltipPadding},removeVarIcon:{verticalAlign:"top",display:"inline-block",color:B.editVariable.removeIcon,cursor:H.iconCursor,fontSize:H.iconFontSize,marginRight:H.iconMarginRight},addVarIcon:{verticalAlign:"top",display:"inline-block",color:B.editVariable.addIcon,cursor:H.iconCursor,fontSize:H.iconFontSize,marginRight:H.iconMarginRight},editVarIcon:{verticalAlign:"top",display:"inline-block",color:B.editVariable.editIcon,cursor:H.iconCursor,fontSize:H.iconFontSize,marginRight:H.iconMarginRight},"edit-icon-container":{display:"inline-block",verticalAlign:"top"},"check-icon":{display:"inline-block",cursor:H.iconCursor,color:B.editVariable.checkIcon,fontSize:H.iconFontSize,paddingRight:H.iconPaddingRight},"cancel-icon":{display:"inline-block",cursor:H.iconCursor,color:B.editVariable.cancelIcon,fontSize:H.iconFontSize,paddingRight:H.iconPaddingRight},"edit-input":{display:"inline-block",minWidth:H.editInputMinWidth,borderRadius:H.editInputBorderRadius,backgroundColor:B.editVariable.background,color:B.editVariable.color,padding:H.editInputPadding,marginRight:H.editInputMarginRight,fontFamily:H.editInputFontFamily},"detected-row":{paddingTop:H.detectedRowPaddingTop},"key-modal-request":{position:H.addKeyCoverPosition,top:H.addKeyCoverPositionPx,left:H.addKeyCoverPositionPx,right:H.addKeyCoverPositionPx,bottom:H.addKeyCoverPositionPx,backgroundColor:H.addKeyCoverBackground},"key-modal":{width:H.addKeyModalWidth,backgroundColor:B.addKeyModal.background,marginLeft:H.addKeyModalMargin,marginRight:H.addKeyModalMargin,padding:H.addKeyModalPadding,borderRadius:H.addKeyModalRadius,marginTop:"15px",position:"relative"},"key-modal-label":{color:B.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:B.addKeyModal.color,border:"none",boxSizing:"border-box",borderRadius:"2px"},"key-modal-cancel":{backgroundColor:B.editVariable.removeIcon,position:"absolute",top:"0px",right:"0px",borderRadius:"0px 3px 0px 3px",cursor:"pointer"},"key-modal-cancel-icon":{color:B.addKeyModal.labelColor,fontSize:H.iconFontSize,transform:"rotate(45deg)"},"key-modal-submit":{color:B.editVariable.addIcon,fontSize:H.iconFontSize,position:"absolute",right:"2px",top:"3px",cursor:"pointer"},"function-ellipsis":{display:"inline-block",color:B.ellipsisColor,fontSize:H.ellipsisFontSize,lineHeight:H.ellipsisLineHeight,cursor:H.ellipsisCursor},"validation-failure":{float:"right",padding:"3px 6px",borderRadius:"2px",cursor:"pointer",color:B.validationFailure.fontColor,backgroundColor:B.validationFailure.background},"validation-failure-label":{marginRight:"6px"},"validation-failure-clear":{position:"relative",verticalAlign:"top",cursor:"pointer",color:B.validationFailure.iconColor,fontSize:H.iconFontSize,transform:"rotate(45deg)"},comma:{display:"inline-block",color:H.commaColor,fontSize:H.commaFontSize,marginRight:H.commaMarginRight,cursor:"default"}}};function ve(Q,B,K){return Q||console.error("theme has not been set"),(function(Y){var ae=ee;return Y!==!1&&Y!=="none"||(ae=Z),Pe(Ue,{defaultBase16:ae})(Y)})(Q)(B,K)}var Fe=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=(K.rjvId,K.type_name),ae=K.displayDataTypes,_e=K.theme;return ae?E().createElement("span",Object.assign({className:"data-type-label"},ve(_e,"data-type-label")),Y):null}}])})(E().PureComponent),Le=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props;return E().createElement("div",ve(K.theme,"boolean"),E().createElement(Fe,Object.assign({type_name:"bool"},K)),K.value?"true":"false")}}])})(E().PureComponent),Ze=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props;return E().createElement("div",ve(K.theme,"date"),E().createElement(Fe,Object.assign({type_name:"date"},K)),E().createElement("span",Object.assign({className:"date-value"},ve(K.theme,"date-value")),K.value.toLocaleTimeString("en-us",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})))}}])})(E().PureComponent),Oe=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props;return E().createElement("div",ve(K.theme,"float"),E().createElement(Fe,Object.assign({type_name:"float"},K)),this.props.value)}}])})(E().PureComponent);function ze(Q){return(function(B){if(Array.isArray(B))return V(B)})(Q)||(function(B){if(typeof Symbol<"u"&&B[Symbol.iterator]!=null||B["@@iterator"]!=null)return Array.from(B)})(Q)||oe(Q)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
139
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}var Be=i(9784),dt=(function(){return y(function Q(){g(this,Q),this.handler=function(){}},[{key:"register",value:function(Q){this.handler=Q}},{key:"dispatch",value:function(Q){var B;(B=this.handler)===null||B===void 0||B.call(this,Q)}}])})();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new dt);const Ce=globalThis.__globalDispatcherInstance;var me=new((function(Q){function B(){var K;g(this,B);for(var Y=arguments.length,ae=new Array(Y),_e=0;_e<Y;_e++)ae[_e]=arguments[_e];return(K=b(this,B,[].concat(ae))).objects={},K.set=function(ge,le,Re,$e){K.objects[ge]===void 0&&(K.objects[ge]={}),K.objects[ge][le]===void 0&&(K.objects[ge][le]={}),K.objects[ge][le][Re]=$e},K.get=function(ge,le,Re,$e){return K.objects[ge]===void 0||K.objects[ge][le]===void 0||K.objects[ge][le][Re]==null?$e:K.objects[ge][le][Re]},K.handleAction=function(ge){var le=ge.rjvId,Re=ge.data;switch(ge.name){case"RESET":K.emit("reset-"+le);break;case"VARIABLE_UPDATED":ge.data.updated_src=K.updateSrc(le,Re),K.set(le,"action","variable-update",p(p({},Re),{},{type:"variable-edited"})),K.emit("variable-update-"+le);break;case"VARIABLE_REMOVED":ge.data.updated_src=K.updateSrc(le,Re),K.set(le,"action","variable-update",p(p({},Re),{},{type:"variable-removed"})),K.emit("variable-update-"+le);break;case"VARIABLE_ADDED":ge.data.updated_src=K.updateSrc(le,Re),K.set(le,"action","variable-update",p(p({},Re),{},{type:"variable-added"})),K.emit("variable-update-"+le);break;case"ADD_VARIABLE_KEY_REQUEST":K.set(le,"action","new-key-request",Re),K.emit("add-key-request-"+le)}},K.updateSrc=function(ge,le){var Re=le.name,$e=le.namespace,He=le.new_value,qe=(le.existing_value,le.variable_removed);$e.shift();var rt,Ke=K.get(ge,"global","src"),Ot=K.deepCopy(Ke,ze($e)),qt=Ot,ct=(function(Et,ar){var hn=typeof Symbol<"u"&&Et[Symbol.iterator]||Et["@@iterator"];if(!hn){if(Array.isArray(Et)||(hn=oe(Et))||ar){hn&&(Et=hn);var Cr=0,Nr=function(){};return{s:Nr,n:function(){return Cr>=Et.length?{done:!0}:{done:!1,value:Et[Cr++]}},e:function(ao){throw ao},f:Nr}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
140
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var $s,pi=!0,ws=!1;return{s:function(){hn=hn.call(Et)},n:function(){var ao=hn.next();return pi=ao.done,ao},e:function(ao){ws=!0,$s=ao},f:function(){try{pi||hn.return==null||hn.return()}finally{if(ws)throw $s}}}})($e);try{for(ct.s();!(rt=ct.n()).done;)qt=qt[rt.value]}catch(Et){ct.e(Et)}finally{ct.f()}return qe?F(qt)=="array"?qt.splice(Re,1):delete qt[Re]:Re!==null?qt[Re]=He:Ot=He,K.set(ge,"global","src",Ot),Ot},K.deepCopy=function(ge,le){var Re,$e=F(ge),He=le.shift();return $e=="array"?Re=ze(ge):$e=="object"&&(Re=p({},ge)),He!==void 0&&(Re[He]=K.deepCopy(ge[He],le)),Re},K}return S(B,Q),y(B)})(Be.EventEmitter));Ce.register(me.handleAction.bind(me));const Me=me;var Ve=(function(Q){function B(K){var Y;return g(this,B),(Y=b(this,B,[K])).toggleCollapsed=function(){Y.setState({collapsed:!Y.state.collapsed},function(){Me.set(Y.props.rjvId,Y.props.namespace,"collapsed",Y.state.collapsed)})},Y.getFunctionDisplay=function(ae){var _e=Y.props;return ae?E().createElement("span",null,Y.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,""),E().createElement("span",{className:"function-collapsed",style:{fontWeight:"bold"}},E().createElement("span",null,"{"),E().createElement("span",ve(_e.theme,"ellipsis"),"..."),E().createElement("span",null,"}"))):Y.props.value.toString().slice(9,-1)},Y.state={collapsed:Me.get(K.rjvId,K.namespace,"collapsed",!0)},Y}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=this.state.collapsed;return E().createElement("div",ve(K.theme,"function"),E().createElement(Fe,Object.assign({type_name:"function"},K)),E().createElement("span",Object.assign({},ve(K.theme,"function-value"),{className:"rjv-function-container",onClick:this.toggleCollapsed}),this.getFunctionDisplay(Y)))}}])})(E().PureComponent),it=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){return E().createElement("div",ve(this.props.theme,"nan"),"NaN")}}])})(E().PureComponent),Ct=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){return E().createElement("div",ve(this.props.theme,"null"),"NULL")}}])})(E().PureComponent),Nt=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props;return E().createElement("div",ve(K.theme,"integer"),E().createElement(Fe,Object.assign({type_name:"int"},K)),this.props.value)}}])})(E().PureComponent),vt=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props;return E().createElement("div",ve(K.theme,"regexp"),E().createElement(Fe,Object.assign({type_name:"regexp"},K)),this.props.value.toString())}}])})(E().PureComponent),Gt=(function(Q){function B(K){var Y;return g(this,B),(Y=b(this,B,[K])).toggleCollapsed=function(){Y.setState({collapsed:!Y.state.collapsed},function(){Me.set(Y.props.rjvId,Y.props.namespace,"collapsed",Y.state.collapsed)})},Y.state={collapsed:Me.get(K.rjvId,K.namespace,"collapsed",!0)},Y}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.state.collapsed,Y=this.props,ae=Y.collapseStringsAfterLength,_e=Y.theme,ge=Y.escapeStrings,le=Y.value,Re=F(ae)==="integer",$e={style:{cursor:"default",wordBreak:"break-all"}};return ge&&(le=J(le)),Re&&le.length>ae&&($e.style.cursor="pointer",K&&(le=E().createElement("span",null,le.substring(0,ae),E().createElement("span",ve(_e,"ellipsis")," ...")))),E().createElement("div",ve(_e,"string"),E().createElement(Fe,Object.assign({type_name:"string"},Y)),E().createElement("span",Object.assign({className:"string-value"},$e,{onClick:this.toggleCollapsed}),'"',le,'"'))}}])})(E().PureComponent),kt=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){return E().createElement("div",ve(this.props.theme,"undefined"),"undefined")}}])})(E().PureComponent),Tt=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props;return E().createElement("div",ve(K.theme,"bigNumber"),E().createElement(Fe,Object.assign({type_name:"bigNumber"},K)),this.props.value.toString())}}])})(E().PureComponent);function Xt(){return Xt=Object.assign?Object.assign.bind():function(Q){for(var B=1;B<arguments.length;B++){var K=arguments[B];for(var Y in K)({}).hasOwnProperty.call(K,Y)&&(Q[Y]=K[Y])}return Q},Xt.apply(null,arguments)}var wt=C.useLayoutEffect,sn=function(Q,B){typeof Q!="function"?Q.current=B:Q(B)},rn={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},vn=function(Q){Object.keys(rn).forEach(function(B){Q.style.setProperty(B,rn[B],"important")})},xt=null,on=function(Q,B){var K=Q.scrollHeight;return B.sizingStyle.boxSizing==="border-box"?K+B.borderSize:K-B.paddingSize},zt=function(){},$n=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],tr=!!document.documentElement.currentStyle,xr=function(Q){var B=window.getComputedStyle(Q);if(B===null)return null;var K,Y=(K=B,$n.reduce(function(_e,ge){return _e[ge]=K[ge],_e},{})),ae=Y.boxSizing;return ae===""?null:(tr&&ae==="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 at(Q,B,K){var Y,ae,_e=(Y=K,ae=E().useRef(Y),wt(function(){ae.current=Y}),ae);C.useLayoutEffect(function(){var ge=function(le){return _e.current(le)};if(Q)return Q.addEventListener(B,ge),function(){return Q.removeEventListener(B,ge)}},[])}var Mt=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Rn=function(Q,B){var K=Q.cacheMeasurements,Y=Q.maxRows,ae=Q.minRows,_e=Q.onChange,ge=_e===void 0?zt:_e,le=Q.onHeightChange,Re=le===void 0?zt:le,$e=I(Q,Mt),He=$e.value!==void 0,qe=C.useRef(null),rt=(function(ct,Et){var ar=E().useRef();return E().useCallback(function(hn){ct.current=hn,ar.current&&sn(ar.current,null),ar.current=Et,Et&&sn(Et,hn)},[Et])})(qe,B),Ke=C.useRef(0),Ot=C.useRef(),qt=function(){var ct=qe.current,Et=K&&Ot.current?Ot.current:xr(ct);if(Et){Ot.current=Et;var ar=(function(Nr,$s,pi,ws){pi===void 0&&(pi=1),ws===void 0&&(ws=1/0),xt||((xt=document.createElement("textarea")).setAttribute("tabindex","-1"),xt.setAttribute("aria-hidden","true"),vn(xt)),xt.parentNode===null&&document.body.appendChild(xt);var ao=Nr.paddingSize,Wf=Nr.borderSize,Dr=Nr.sizingStyle,Is=Dr.boxSizing;Object.keys(Dr).forEach(function(Qf){var na=Qf;xt.style[na]=Dr[na]}),vn(xt),xt.value=$s;var zs=on(xt,Nr);xt.value=$s,zs=on(xt,Nr),xt.value="x";var mi=xt.scrollHeight-ao,Xf=mi*pi;Is==="border-box"&&(Xf=Xf+ao+Wf),zs=Math.max(Xf,zs);var El=mi*ws;return Is==="border-box"&&(El=El+ao+Wf),[zs=Math.min(El,zs),mi]})(Et,ct.value||ct.placeholder||"x",ae,Y),hn=ar[0],Cr=ar[1];Ke.current!==hn&&(Ke.current=hn,ct.style.setProperty("height",hn+"px","important"),Re(hn,{rowHeight:Cr}))}};return C.useLayoutEffect(qt),(function(ct,Et){at(document.body,"reset",function(ar){ct.current.form===ar.target&&Et(ar)})})(qe,function(){if(!He){var ct=qe.current.value;requestAnimationFrame(function(){var Et=qe.current;Et&&ct!==Et.value&&qt()})}}),at(window,"resize",qt),(function(ct){at(document.fonts,"loadingdone",ct)})(qt),C.createElement("textarea",Xt({},$e,{onChange:function(ct){He||qt(),ge(ct)},ref:rt}))},Lt=C.forwardRef(Rn);function tn(Q,B){Q=Q.trim();try{if((Q=structuredClone(Q))[0]==="[")return Rt("array",JSON.parse(Q));if(Q[0]==="{")return Rt("object",JSON.parse(Q));if(Q.match(/\-?\d+\.\d+/)&&Q.match(/\-?\d+\.\d+/)[0]===Q)return B&&parseFloat(Q).toString()!==Q?Rt("bigNumber",Q):Rt("float",parseFloat(Q));if(Q.match(/\-?\d+e-\d+/)&&Q.match(/\-?\d+e-\d+/)[0]===Q)return Rt("float",Number(Q));if(Q.match(/\-?\d+/)&&Q.match(/\-?\d+/)[0]===Q)return B&&parseInt(Q).toString()!==Q?Rt("bigNumber",Q):Rt("integer",parseInt(Q));if(Q.match(/\-?\d+e\+\d+/)&&Q.match(/\-?\d+e\+\d+/)[0]===Q)return Rt("integer",Number(Q))}catch{}switch(Q=Q.toLowerCase()){case"undefined":return Rt("undefined",void 0);case"nan":return Rt("nan",NaN);case"null":return Rt("null",null);case"true":return Rt("boolean",!0);case"false":return Rt("boolean",!1);default:if(Q=Date.parse(Q))return Rt("date",new Date(Q))}return Rt(!1,null)}function Rt(Q,B){return{type:Q,value:B}}var Er=["style"],ir=["style"],oo=["style"],_r=["style"],an=["style"],On=["style"],zr=["style"],Ao=["style"],Ds=["style"],Bf=["style"],vl=["style"],bl=["style"],Hf=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.style,ae=L(K,Er);return E().createElement("span",ae,E().createElement("svg",Object.assign({},so(Y),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().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"})))}}])})(E().PureComponent),Xi=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.style,ae=L(K,ir);return E().createElement("span",ae,E().createElement("svg",Object.assign({},so(Y),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().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"})))}}])})(E().PureComponent),Qi=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.style,ae=L(K,oo),_e=so(Y).style;return E().createElement("span",ae,E().createElement("svg",{fill:_e.color,width:_e.height,height:_e.width,style:_e,viewBox:"0 0 1792 1792"},E().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"})))}}])})(E().PureComponent),Sl=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.style,ae=L(K,_r),_e=so(Y).style;return E().createElement("span",ae,E().createElement("svg",{fill:_e.color,width:_e.height,height:_e.width,style:_e,viewBox:"0 0 1792 1792"},E().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"})))}}])})(E().PureComponent),Ji=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.style,ae=L(K,an);return E().createElement("span",ae,E().createElement("svg",{style:p(p({},so(Y).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},E().createElement("path",{d:"M0 14l6-6-6-6z"})))}}])})(E().PureComponent),dr=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.style,ae=L(K,On);return E().createElement("span",ae,E().createElement("svg",{style:p(p({},so(Y).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},E().createElement("path",{d:"M0 5l6 6 6-6z"})))}}])})(E().PureComponent),Kf=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.style,ae=L(K,zr);return E().createElement("span",ae,E().createElement("svg",Object.assign({},so(Y),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().createElement("g",null,E().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"}))))}}])})(E().PureComponent),Pc=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.style,ae=L(K,Ao);return E().createElement("span",ae,E().createElement("svg",Object.assign({},so(Y),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().createElement("g",null,E().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"}))))}}])})(E().PureComponent),di=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.style,ae=L(K,Ds);return E().createElement("span",ae,E().createElement("svg",Object.assign({},so(Y),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().createElement("g",null,E().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"}))))}}])})(E().PureComponent),hi=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.style,ae=L(K,Bf);return E().createElement("span",ae,E().createElement("svg",Object.assign({},so(Y),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().createElement("g",null,E().createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}])})(E().PureComponent),rv=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.style,ae=L(K,vl);return E().createElement("span",ae,E().createElement("svg",Object.assign({},so(Y),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().createElement("g",null,E().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"}))))}}])})(E().PureComponent),Nc=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.style,ae=L(K,bl);return E().createElement("span",ae,E().createElement("svg",Object.assign({},so(Y),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().createElement("g",null,E().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"}))))}}])})(E().PureComponent);function so(Q){return Q||(Q={}),{style:p(p({verticalAlign:"middle"},Q),{},{color:Q.color?Q.color:"#000000",height:"1em",width:"1em"})}}var Tp=(function(Q){function B(K){var Y;return g(this,B),(Y=b(this,B,[K])).copiedTimer=null,Y.copyToClipboardFallback=function(ae){var _e=document.createElement("textarea");_e.value=ae,document.body.appendChild(_e),_e.select(),document.execCommand("copy"),document.body.removeChild(_e)},Y.handleCopy=function(){var ae=Y.props,_e=ae.clickCallback,ge=ae.src,le=ae.namespace,Re=JSON.stringify(Y.clipboardValue(ge),null," ");navigator.clipboard?navigator.clipboard.writeText(Re).catch(function(){Y.copyToClipboardFallback(Re)}):Y.copyToClipboardFallback(Re),Y.copiedTimer=setTimeout(function(){Y.setState({copied:!1})},5500),Y.setState({copied:!0},function(){typeof _e=="function"&&_e({src:ge,namespace:le,name:le[le.length-1]})})},Y.getClippyIcon=function(){var ae=Y.props.theme;return Y.state.copied?E().createElement("span",null,E().createElement(Kf,Object.assign({className:"copy-icon"},ve(ae,"copy-icon"))),E().createElement("span",ve(ae,"copy-icon-copied"),"✔")):E().createElement(Kf,Object.assign({className:"copy-icon"},ve(ae,"copy-icon")))},Y.clipboardValue=function(ae){switch(F(ae)){case"function":case"regexp":return ae.toString();default:return ae}},Y.state={copied:!1},Y}return S(B,Q),y(B,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var K=this.props,Y=(K.src,K.theme),ae=K.hidden,_e=K.rowHovered,ge=ve(Y,"copy-to-clipboard").style,le="inline";return ae&&(le="none"),E().createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:_e?"inline-block":"none"}},E().createElement("span",{style:p(p({},ge),{},{display:le}),onClick:this.handleCopy},this.getClippyIcon()))}}])})(E().PureComponent);const Dc=(function(Q){function B(K){var Y;return g(this,B),(Y=b(this,B,[K])).getEditIcon=function(){var ae=Y.props,_e=ae.variable,ge=ae.theme;return E().createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:Y.state.hovered?"inline-block":"none"}},E().createElement(rv,Object.assign({className:"click-to-edit-icon"},ve(ge,"editVarIcon"),{onClick:function(){Y.prepopInput(_e)}})))},Y.prepopInput=function(ae){if(Y.props.onEdit!==!1){var _e=(function(le,Re){var $e;switch(F(le,Re)){case"undefined":$e="undefined";break;case"nan":$e="NaN";break;case"string":$e=le;break;case"bigNumber":case"date":case"function":case"regexp":$e=le.toString();break;default:try{$e=JSON.stringify(le,null," ")}catch{$e=""}}return $e})(ae.value,Y.props.bigNumber),ge=tn(_e,Y.props.bigNumber);Y.setState({editMode:!0,editValue:_e,parsedInput:{type:ge.type,value:ge.value}})}},Y.getRemoveIcon=function(){var ae=Y.props,_e=ae.variable,ge=ae.namespace,le=ae.theme,Re=ae.rjvId;return E().createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:Y.state.hovered?"inline-block":"none"}},E().createElement(Pc,Object.assign({className:"click-to-remove-icon"},ve(le,"removeVarIcon"),{onClick:function(){Ce.dispatch({name:"VARIABLE_REMOVED",rjvId:Re,data:{name:_e.name,namespace:ge,existing_value:_e.value,variable_removed:!0}})}})))},Y.getValue=function(ae,_e){var ge=!_e&&ae.type,le=Y.props;switch(ge){case!1:return Y.getEditInput();case"string":return E().createElement(Gt,Object.assign({value:ae.value},le));case"integer":return E().createElement(Nt,Object.assign({value:ae.value},le));case"float":return E().createElement(Oe,Object.assign({value:ae.value},le));case"boolean":return E().createElement(Le,Object.assign({value:ae.value},le));case"function":return E().createElement(Ve,Object.assign({value:ae.value},le));case"null":return E().createElement(Ct,le);case"nan":return E().createElement(it,le);case"undefined":return E().createElement(kt,le);case"date":return E().createElement(Ze,Object.assign({value:ae.value},le));case"regexp":return E().createElement(vt,Object.assign({value:ae.value},le));case"bigNumber":return E().createElement(Tt,Object.assign({value:ae.value},le));default:return E().createElement("div",{className:"object-value"},JSON.stringify(ae.value))}},Y.getEditInput=function(){var ae=Y.props,_e=ae.keyModifier,ge=ae.selectOnFocus,le=ae.theme,Re=Y.state.editValue;return E().createElement("div",null,E().createElement(Lt,Object.assign({type:"text",ref:function($e){$e&&$e[ge?"select":"focus"]()},value:Re,className:"variable-editor",onChange:function($e){var He=$e.target.value,qe=tn(He,Y.props.bigNumber);Y.setState({editValue:He,parsedInput:{type:qe.type,value:qe.value}})},onKeyDown:function($e){switch($e.key){case"Escape":Y.setState({editMode:!1,editValue:""});break;case"Enter":_e($e,"submit")&&Y.submitEdit(!0)}$e.stopPropagation()},placeholder:"update this value",minRows:2},ve(le,"edit-input"))),E().createElement("div",ve(le,"edit-icon-container"),E().createElement(Pc,Object.assign({className:"edit-cancel"},ve(le,"cancel-icon"),{onClick:function($e){$e&&$e.stopPropagation(),Y.setState({editMode:!1,editValue:""})}})),E().createElement(Nc,Object.assign({className:"edit-check string-value"},ve(le,"check-icon"),{onClick:function($e){$e&&$e.stopPropagation(),Y.submitEdit()}})),E().createElement("div",null,Y.showDetected())))},Y.submitEdit=function(ae){var _e=Y.props,ge=_e.variable,le=_e.namespace,Re=_e.rjvId,$e=_e.bigNumber,He=Y.state,qe=He.editValue,rt=He.parsedInput,Ke=qe;ae&&rt.type&&(Ke=rt.value,$e&&rt.type==="bigNumber"&&(Ke=new $e(Ke))),Y.setState({editMode:!1}),Ce.dispatch({name:"VARIABLE_UPDATED",rjvId:Re,data:{name:ge.name,namespace:le,existing_value:ge.value,new_value:Ke,variable_removed:!1}})},Y.showDetected=function(){var ae=Y.props,_e=ae.theme,ge=(ae.variable,ae.namespace,ae.rjvId,Y.state.parsedInput),le=(ge.type,ge.value,Y.getDetectedInput());if(le)return E().createElement("div",null,E().createElement("div",ve(_e,"detected-row"),le,E().createElement(Nc,{className:"edit-check detected",style:p({verticalAlign:"top",paddingLeft:"3px"},ve(_e,"check-icon").style),onClick:function(Re){Re&&Re.stopPropagation(),Y.submitEdit(!0)}})))},Y.getDetectedInput=function(){var ae=Y.state.parsedInput,_e=ae.type,ge=ae.value,le=Y.props,Re=le.theme;if(_e!==!1)switch(_e.toLowerCase()){case"object":return E().createElement("span",null,E().createElement("span",{style:p(p({},ve(Re,"brace").style),{},{cursor:"default"})},"{"),E().createElement("span",{style:p(p({},ve(Re,"ellipsis").style),{},{cursor:"default"})},"..."),E().createElement("span",{style:p(p({},ve(Re,"brace").style),{},{cursor:"default"})},"}"));case"array":return E().createElement("span",null,E().createElement("span",{style:p(p({},ve(Re,"brace").style),{},{cursor:"default"})},"["),E().createElement("span",{style:p(p({},ve(Re,"ellipsis").style),{},{cursor:"default"})},"..."),E().createElement("span",{style:p(p({},ve(Re,"brace").style),{},{cursor:"default"})},"]"));case"string":return E().createElement(Gt,Object.assign({value:ge},le));case"integer":return E().createElement(Nt,Object.assign({value:ge},le));case"float":return E().createElement(Oe,Object.assign({value:ge},le));case"boolean":return E().createElement(Le,Object.assign({value:ge},le));case"function":return E().createElement(Ve,Object.assign({value:ge},le));case"null":return E().createElement(Ct,le);case"nan":return E().createElement(it,le);case"undefined":return E().createElement(kt,le);case"date":return E().createElement(Ze,Object.assign({value:new Date(ge)},le));case"bignumber":return E().createElement(Tt,Object.assign({value:ge},le))}},Y.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},Y}return S(B,Q),y(B,[{key:"render",value:function(){var K=this,Y=this.props,ae=Y.variable,_e=Y.singleIndent,ge=Y.type,le=Y.theme,Re=Y.namespace,$e=Y.indentWidth,He=Y.enableClipboard,qe=Y.onEdit,rt=Y.onDelete,Ke=Y.onSelect,Ot=Y.displayArrayKey,qt=Y.quotesOnKeys,ct=Y.keyModifier,Et=Y.showComma,ar=Y.isLast,hn=this.state.editMode;return E().createElement("div",Object.assign({},ve(le,"objectKeyVal",{paddingLeft:$e*_e}),{onMouseEnter:function(){return K.setState(p(p({},K.state),{},{hovered:!0}))},onMouseLeave:function(){return K.setState(p(p({},K.state),{},{hovered:!1}))},className:"variable-row",key:ae.name}),ge=="array"?Ot?E().createElement("span",Object.assign({},ve(le,"array-key"),{key:ae.name+"_"+Re}),ae.name,E().createElement("div",ve(le,"colon"),":")):null:E().createElement("span",null,E().createElement("span",Object.assign({},ve(le,"object-name"),{className:"object-key",key:ae.name+"_"+Re}),!!qt&&E().createElement("span",{style:{verticalAlign:"top"}},'"'),E().createElement("span",{style:{display:"inline-block"}},J(ae.name)),!!qt&&E().createElement("span",{style:{verticalAlign:"top"}},'"')),E().createElement("span",ve(le,"colon"),":")),E().createElement("div",Object.assign({className:"variable-value",onClick:Ke===!1&&qe===!1?null:function(Cr){var Nr=ze(Re);ct(Cr,"edit")&&qe!==!1?K.prepopInput(ae):Ke!==!1&&(Nr.shift(),Ke(p(p({},ae),{},{namespace:Nr})))}},ve(le,"variableValue",{cursor:Ke===!1?"default":"pointer"})),this.getValue(ae,hn)),Et&&!ar&&E().createElement("span",ve(le,"comma"),","),He?E().createElement(Tp,{rowHovered:this.state.hovered,hidden:hn,src:ae.value,clickCallback:He,theme:le,namespace:[].concat(ze(Re),[ae.name])}):null,qe!==!1&&hn==0?this.getEditIcon():null,rt!==!1&&hn==0?this.getRemoveIcon():null)}}])})(E().PureComponent);var wl=(function(Q){function B(){var K;g(this,B);for(var Y=arguments.length,ae=new Array(Y),_e=0;_e<Y;_e++)ae[_e]=arguments[_e];return(K=b(this,B,[].concat(ae))).getObjectSize=function(){var ge=K.props,le=ge.size,Re=ge.theme;if(ge.displayObjectSize)return E().createElement("span",Object.assign({className:"object-size"},ve(Re,"object-size")),le," item",le===1?"":"s")},K.getAddAttribute=function(ge){var le=K.props,Re=le.theme,$e=le.namespace,He=le.name,qe=le.src,rt=le.rjvId,Ke=le.depth;return E().createElement("span",{className:"click-to-add",style:{verticalAlign:"top",display:ge?"inline-block":"none"}},E().createElement(di,Object.assign({className:"click-to-add-icon"},ve(Re,"addVarIcon"),{onClick:function(){var Ot={name:Ke>0?He:null,namespace:$e.splice(0,$e.length-1),existing_value:qe,variable_removed:!1,key_name:null};F(qe)==="object"?Ce.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:rt,data:Ot}):Ce.dispatch({name:"VARIABLE_ADDED",rjvId:rt,data:p(p({},Ot),{},{new_value:[].concat(ze(qe),[null])})})}})))},K.getRemoveObject=function(ge){var le=K.props,Re=le.theme,$e=(le.hover,le.namespace),He=le.name,qe=le.src,rt=le.rjvId;if($e.length!==1)return E().createElement("span",{className:"click-to-remove",style:{display:ge?"inline-block":"none"}},E().createElement(Pc,Object.assign({className:"click-to-remove-icon"},ve(Re,"removeVarIcon"),{onClick:function(){Ce.dispatch({name:"VARIABLE_REMOVED",rjvId:rt,data:{name:He,namespace:$e.splice(0,$e.length-1),existing_value:qe,variable_removed:!0}})}})))},K.render=function(){var ge=K.props,le=ge.theme,Re=ge.onDelete,$e=ge.onAdd,He=ge.enableClipboard,qe=ge.src,rt=ge.namespace,Ke=ge.rowHovered;return E().createElement("div",Object.assign({},ve(le,"object-meta-data"),{className:"object-meta-data",onClick:function(Ot){Ot.stopPropagation()}}),K.getObjectSize(),He?E().createElement(Tp,{rowHovered:Ke,clickCallback:He,src:qe,theme:le,namespace:rt}):null,$e!==!1?K.getAddAttribute(Ke):null,Re!==!1?K.getRemoveObject(Ke):null)},K}return S(B,Q),y(B)})(E().PureComponent);function Zo(Q){var B=Q.parent_type,K=Q.namespace,Y=Q.quotesOnKeys,ae=Q.theme,_e=Q.jsvRoot,ge=Q.name,le=Q.displayArrayKey,Re=Q.name?Q.name:"";return!_e||ge!==!1&&ge!==null?B=="array"?le?E().createElement("span",Object.assign({},ve(ae,"array-key"),{key:K}),E().createElement("span",{className:"array-key"},Re),E().createElement("span",ve(ae,"colon"),":")):E().createElement("span",null):E().createElement("span",Object.assign({},ve(ae,"object-name"),{key:K}),E().createElement("span",{className:"object-key"},Y&&E().createElement("span",{style:{verticalAlign:"top"}},'"'),E().createElement("span",null,Re),Y&&E().createElement("span",{style:{verticalAlign:"top"}},'"')),E().createElement("span",ve(ae,"colon"),":")):E().createElement("span",null)}function io(Q){var B=Q.theme;switch(Q.iconStyle){case"triangle":return E().createElement(dr,Object.assign({},ve(B,"expanded-icon"),{className:"expanded-icon"}));case"square":return E().createElement(Qi,Object.assign({},ve(B,"expanded-icon"),{className:"expanded-icon"}));default:return E().createElement(Hf,Object.assign({},ve(B,"expanded-icon"),{className:"expanded-icon"}))}}function Gf(Q){var B=Q.theme;switch(Q.iconStyle){case"triangle":return E().createElement(Ji,Object.assign({},ve(B,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return E().createElement(Sl,Object.assign({},ve(B,"collapsed-icon"),{className:"collapsed-icon"}));default:return E().createElement(Xi,Object.assign({},ve(B,"collapsed-icon"),{className:"collapsed-icon"}))}}var ov=["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace","parent_type"],$c=(function(Q){function B(K){var Y;return g(this,B),(Y=b(this,B,[K])).toggleCollapsed=function(ae){for(var _e=Y.state.expanded,ge=[],le=Math.max(_e.length||0,ae+1),Re=0;Re<le;Re++)ge[Re]=_e[Re]===!0;ge[ae]=!ge[ae],Y.setState({expanded:ge})},Y.state={expanded:[]},Y}return S(B,Q),y(B,[{key:"getExpandedIcon",value:function(K){var Y=this.props,ae=Y.theme,_e=Y.iconStyle;return this.state.expanded[K]?E().createElement(io,{theme:ae,iconStyle:_e}):E().createElement(Gf,{theme:ae,iconStyle:_e})}},{key:"render",value:function(){var K=this,Y=this.props,ae=Y.src,_e=Y.groupArraysAfterLength,ge=(Y.depth,Y.name),le=Y.theme,Re=Y.jsvRoot,$e=Y.namespace,He=(Y.parent_type,L(Y,ov)),qe=0,rt=5*this.props.indentWidth;Re||(qe=5*this.props.indentWidth);var Ke=_e,Ot=Math.ceil(ae.length/Ke);return E().createElement("div",Object.assign({className:"object-key-val"},ve(le,Re?"jsv-root":"objectKeyVal",{paddingLeft:qe})),E().createElement(Zo,this.props),E().createElement("span",null,E().createElement(wl,Object.assign({size:ae.length},this.props))),ze(Array(Ot)).map(function(qt,ct){return E().createElement("div",Object.assign({key:ct,className:"object-key-val array-group"},ve(le,"objectKeyVal",{marginLeft:6,paddingLeft:rt})),E().createElement("span",ve(le,"brace-row"),E().createElement("div",Object.assign({className:"icon-container"},ve(le,"icon-container"),{onClick:function(Et){K.toggleCollapsed(ct)}}),K.getExpandedIcon(ct)),K.state.expanded[ct]?E().createElement(Lr,Object.assign({key:ge+ct,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:Ke,index_offset:ct*Ke,src:ae.slice(ct*Ke,ct*Ke+Ke),namespace:$e,type:"array",parent_type:"array_group",theme:le,showComma:K.props.showComma,isLast:ct===Ot-1},He)):E().createElement("span",Object.assign({},ve(le,"brace"),{onClick:function(Et){K.toggleCollapsed(ct)},className:"array-group-brace"}),"[",E().createElement("div",Object.assign({},ve(le,"array-group-meta-data"),{className:"array-group-meta-data"}),E().createElement("span",Object.assign({className:"object-size"},ve(le,"object-size")),ct*Ke," - ",ct*Ke+Ke>ae.length?ae.length:ct*Ke+Ke)),"]")))}))}}])})(E().PureComponent),Rp=["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle","showComma","isLast"],ea=(function(Q){function B(K){var Y;g(this,B),(Y=b(this,B,[K])).toggleCollapsed=function(){Y.setState({expanded:!Y.state.expanded},function(){Me.set(Y.props.rjvId,Y.props.namespace,"expanded",Y.state.expanded)})},Y.getObjectContent=function(_e,ge,le){return E().createElement("div",{className:"pushed-content object-container"},E().createElement("div",Object.assign({className:"object-content"},ve(Y.props.theme,"pushed-content")),Y.renderObjectContents(ge,le)))},Y.getEllipsis=function(){return Y.state.size===0?null:E().createElement("div",Object.assign({},ve(Y.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:Y.toggleCollapsed}),"...")},Y.getObjectMetaData=function(_e){var ge=Y.props,le=(ge.rjvId,ge.theme,Y.state),Re=le.size,$e=le.hovered;return E().createElement(wl,Object.assign({rowHovered:$e,size:Re},Y.props))},Y.renderObjectContents=function(_e,ge){var le,Re=Y.props,$e=Re.depth,He=Re.parent_type,qe=Re.index_offset,rt=Re.groupArraysAfterLength,Ke=Re.namespace,Ot=Re.showComma,qt=Y.state.object_type,ct=[],Et=Object.keys(_e||{});return Y.props.sortKeys&&qt!=="array"&&(Et=Et.sort()),Et.forEach(function(ar,hn){le=new sv(ar,_e[ar],ge.bigNumber);var Cr=hn===Et.length-1;if(He==="array_group"&&qe&&(le.name=parseInt(le.name)+qe),Object.prototype.hasOwnProperty.call(_e,ar))if(le.type==="object")ct.push(E().createElement(Lr,Object.assign({key:le.name,depth:$e+1,name:le.name,src:le.value,namespace:Ke.concat(le.name),parent_type:qt,isLast:Cr,showComma:Ot},ge)));else if(le.type==="array"){var Nr=Lr;rt&&le.value.length>rt&&(Nr=$c),ct.push(E().createElement(Nr,Object.assign({key:le.name,depth:$e+1,name:le.name,src:le.value,namespace:Ke.concat(le.name),type:"array",parent_type:qt,isLast:Cr,showComma:Ot},ge)))}else ct.push(E().createElement(Dc,Object.assign({key:le.name+"_"+Ke,variable:le,singleIndent:5,namespace:Ke,type:Y.props.type,isLast:Cr,showComma:Ot},ge)))}),ct};var ae=B.getState(K);return Y.state=p(p({},ae),{},{prevProps:{}}),Y}return S(B,Q),y(B,[{key:"getBraceStart",value:function(K,Y){var ae=this,_e=this.props,ge=(_e.src,_e.theme),le=_e.iconStyle;if(_e.parent_type==="array_group")return E().createElement("span",null,E().createElement("span",ve(ge,"brace"),K==="array"?"[":"{"));var Re=Y?io:Gf;return E().createElement("span",null,E().createElement("span",Object.assign({onClick:function($e){ae.toggleCollapsed()}},ve(ge,"brace-row")),E().createElement("div",Object.assign({className:"icon-container"},ve(ge,"icon-container")),E().createElement(Re,{theme:ge,iconStyle:le})),E().createElement(Zo,this.props),E().createElement("span",ve(ge,"brace"),K==="array"?"[":"{")))}},{key:"render",value:function(){var K=this,Y=this.props,ae=Y.depth,_e=Y.src,ge=(Y.namespace,Y.name,Y.type,Y.parent_type),le=Y.theme,Re=Y.jsvRoot,$e=Y.iconStyle,He=Y.showComma,qe=Y.isLast,rt=L(Y,Rp),Ke=this.state,Ot=Ke.object_type,qt=Ke.expanded,ct={};return Re||ge==="array_group"?ge==="array_group"&&(ct.borderLeft=0,ct.display="inline"):ct.paddingLeft=5*this.props.indentWidth,E().createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return K.setState(p(p({},K.state),{},{hovered:!0}))},onMouseLeave:function(){return K.setState(p(p({},K.state),{},{hovered:!1}))}},ve(le,Re?"jsv-root":"objectKeyVal",ct)),this.getBraceStart(Ot,qt),qt?this.getObjectContent(ae,_e,p({theme:le,iconStyle:$e},rt)):this.getEllipsis(),E().createElement("span",{className:"brace-row"},E().createElement("span",{style:p(p({},ve(le,"brace").style),{},{paddingLeft:qt?"3px":"0px"})},Ot==="array"?"]":"}")),He&&!qe&&!Re&&E().createElement("span",ve(le,"comma"),","),this.getObjectMetaData(_e))}}],[{key:"getDerivedStateFromProps",value:function(K,Y){var ae=Y.prevProps;return K.src!==ae.src||K.collapsed!==ae.collapsed||K.name!==ae.name||K.namespace!==ae.namespace||K.rjvId!==ae.rjvId?p(p({},B.getState(K)),{},{prevProps:K}):null}}])})(E().PureComponent);ea.getState=function(Q){var B=Object.keys(Q.src).length,K=(Q.collapsed===!1||Q.collapsed!==!0&&Q.collapsed>Q.depth)&&(!Q.shouldCollapse||Q.shouldCollapse({name:Q.name,src:Q.src,type:F(Q.src),namespace:Q.namespace})===!1)&&B!==0;return{expanded:Me.get(Q.rjvId,Q.namespace,"expanded",K),object_type:Q.type==="array"?"array":"object",parent_type:Q.type==="array"?"array":"object",size:B,hovered:!1}};var sv=y(function Q(B,K,Y){g(this,Q),this.name=B,this.value=K,this.type=F(K,Y)});$(ea);const Lr=ea;var Zf=(function(Q){function B(){var K;g(this,B);for(var Y=arguments.length,ae=new Array(Y),_e=0;_e<Y;_e++)ae[_e]=arguments[_e];return(K=b(this,B,[].concat(ae))).render=function(){var ge,le,Re,$e,He=K.props,qe=[He.name],rt=Lr;return typeof He.name!="object"||Array.isArray(He.name)||(qe=[((ge=He.name)===null||ge===void 0?void 0:ge.displayName)||((le=He.name)===null||le===void 0?void 0:le.name)||((Re=He.name)===null||Re===void 0||($e=Re.type)===null||$e===void 0?void 0:$e.name)||"Anonymous"]),Array.isArray(He.src)&&He.groupArraysAfterLength&&He.src.length>He.groupArraysAfterLength&&(rt=$c),E().createElement("div",{className:"pretty-json-container object-container"},E().createElement("div",{className:"object-content"},E().createElement(rt,Object.assign({namespace:qe,depth:0,jsvRoot:!0},He))))},K}return S(B,Q),y(B)})(E().PureComponent),Op=(function(Q){function B(K){var Y;return g(this,B),(Y=b(this,B,[K])).closeModal=function(){Ce.dispatch({rjvId:Y.props.rjvId,name:"RESET"})},Y.submit=function(){Y.props.submit(Y.state.input)},Y.state={input:K.input?K.input:""},Y}return S(B,Q),y(B,[{key:"render",value:function(){var K=this,Y=this.props,ae=Y.theme,_e=Y.rjvId,ge=Y.isValid,le=this.state.input,Re=ge(le);return E().createElement("div",Object.assign({className:"key-modal-request"},ve(ae,"key-modal-request"),{onClick:this.closeModal}),E().createElement("div",Object.assign({},ve(ae,"key-modal"),{onClick:function($e){$e.stopPropagation()}}),E().createElement("div",ve(ae,"key-modal-label"),"Key Name:"),E().createElement("div",{style:{position:"relative"}},E().createElement("input",Object.assign({},ve(ae,"key-modal-input"),{className:"key-modal-input",ref:function($e){return $e&&$e.focus()},spellCheck:!1,value:le,placeholder:"...",onChange:function($e){K.setState({input:$e.target.value})},onKeyPress:function($e){Re&&$e.key==="Enter"?K.submit():$e.key==="Escape"&&K.closeModal()}})),Re?E().createElement(Nc,Object.assign({},ve(ae,"key-modal-submit"),{className:"key-modal-submit",onClick:function($e){return K.submit()}})):null),E().createElement("span",ve(ae,"key-modal-cancel"),E().createElement(hi,Object.assign({},ve(ae,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){Ce.dispatch({rjvId:_e,name:"RESET"})}})))))}}])})(E().PureComponent),Yf=(function(Q){function B(){var K;g(this,B);for(var Y=arguments.length,ae=new Array(Y),_e=0;_e<Y;_e++)ae[_e]=arguments[_e];return(K=b(this,B,[].concat(ae))).isValid=function(ge){var le=K.props.rjvId,Re=Me.get(le,"action","new-key-request");return ge!=""&&Object.keys(Re.existing_value).indexOf(ge)===-1},K.submit=function(ge){var le=K.props.rjvId,Re=Me.get(le,"action","new-key-request");Re.new_value=p({},Re.existing_value),Re.new_value[ge]=K.props.defaultValue,Ce.dispatch({name:"VARIABLE_ADDED",rjvId:le,data:Re})},K}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.active,ae=K.theme,_e=K.rjvId;return Y?E().createElement(Op,{rjvId:_e,theme:ae,isValid:this.isValid,submit:this.submit}):null}}])})(E().PureComponent),ta=(function(Q){function B(){return g(this,B),b(this,B,arguments)}return S(B,Q),y(B,[{key:"render",value:function(){var K=this.props,Y=K.message,ae=K.active,_e=K.theme,ge=K.rjvId;return ae?E().createElement("div",Object.assign({className:"validation-failure"},ve(_e,"validation-failure"),{onClick:function(){Ce.dispatch({rjvId:ge,name:"RESET"})}}),E().createElement("span",ve(_e,"validation-failure-label"),Y),E().createElement(hi,ve(_e,"validation-failure-clear"))):null}}])})(E().PureComponent),xl=(function(Q){function B(K){var Y;return g(this,B),(Y=b(this,B,[K])).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 ae,_e=Me.get(Y.rjvId,"action","variable-update"),ge=_e.name,le=_e.namespace,Re=_e.new_value,$e=_e.existing_value,He=_e.updated_src,qe=_e.type,rt=Y.props,Ke=rt.onEdit,Ot=rt.onDelete,qt=rt.onAdd,ct={existing_src:Y.state.src,new_value:Re,updated_src:He,name:ge,namespace:le,existing_value:$e};switch(qe){case"variable-added":ae=qt(ct);break;case"variable-edited":ae=Ke(ct);break;case"variable-removed":ae=Ot(ct)}ae!==!1?(Me.set(Y.rjvId,"global","src",He),Y.setState({src:He})):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:B.defaultProps.src,name:B.defaultProps.name,theme:B.defaultProps.theme,validationMessage:B.defaultProps.validationMessage,prevSrc:B.defaultProps.src,prevName:B.defaultProps.name,prevTheme:B.defaultProps.theme},Y}return S(B,Q),y(B,[{key:"componentDidMount",value:function(){Me.set(this.rjvId,"global","src",this.state.src);var K=this.getListeners();for(var Y in K)Me.on(Y+"-"+this.rjvId,K[Y]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:"componentDidUpdate",value:function(K,Y){Y.addKeyRequest!==!1&&this.setState({addKeyRequest:!1}),Y.editKeyRequest!==!1&&this.setState({editKeyRequest:!1}),K.src!==this.state.src&&Me.set(this.rjvId,"global","src",this.state.src)}},{key:"componentWillUnmount",value:function(){var K=this.getListeners();for(var Y in K)Me.removeListener(Y+"-"+this.rjvId,K[Y])}},{key:"render",value:function(){var K=this.state,Y=K.validationFailure,ae=K.validationMessage,_e=K.addKeyRequest,ge=K.theme,le=K.src,Re=K.name,$e=this.props,He=$e.style,qe=$e.defaultValue;return E().createElement("div",{className:"react-json-view",style:p(p({},ve(ge,"app-container").style),He)},E().createElement(ta,{message:ae,active:Y,theme:ge,rjvId:this.rjvId}),E().createElement(Zf,Object.assign({},this.props,{src:le,name:Re,theme:ge,type:F(le),rjvId:this.rjvId})),E().createElement(Yf,{active:_e,theme:ge,rjvId:this.rjvId,defaultValue:qe}))}}],[{key:"getDerivedStateFromProps",value:function(K,Y){if(K.src!==Y.prevSrc||K.name!==Y.prevName||K.theme!==Y.prevTheme){var ae={src:K.src,name:K.name,theme:K.theme,validationMessage:K.validationMessage,prevSrc:K.src,prevName:K.name,prevTheme:K.theme};return B.validateState(ae)}return null}}])})(E().PureComponent);xl.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(Q){return Q.metaKey||Q.ctrlKey},bigNumber:null,showComma:!0},xl.validateState=function(Q){var B={};return F(Q.theme)!=="object"||(function(K){var Y=["base00","base01","base02","base03","base04","base05","base06","base07","base08","base09","base0A","base0B","base0C","base0D","base0E","base0F"];if(F(K)==="object"){for(var ae=0;ae<Y.length;ae++)if(!(Y[ae]in K))return!1;return!0}return!1})(Q.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'),B.theme="rjv-default"),F(Q.src)!=="object"&&F(Q.src)!=="array"&&(console.error("react-json-view error:","src property must be a valid json object"),B.name="ERROR",B.src={message:"src property must be a valid json object"}),p(p({},Q),B)},$(xl);const Ap=xl})(),a})())})(my)),my.exports}var eve=J0e();const K0=ii(eve),mz=A.createContext(void 0);function zf(e){const t=A.useContext(mz);if(e===!1&&t===void 0)throw new Error(eo(27));return t}let Ih=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const tve={[Ih.startingStyle]:""},nve={[Ih.endingStyle]:""},Sp={transitionStatus(e){return e==="starting"?tve:e==="ending"?nve:null}};let ec=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Ih.startingStyle]="startingStyle",e[e.endingStyle=Ih.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),Mx=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const rve={[Mx.popupOpen]:""},ove={[Mx.popupOpen]:"",[Mx.pressed]:""},sve={[ec.open]:""},ive={[ec.closed]:""},ave={[ec.anchorHidden]:""},gz={open(e){return e?rve:null}},yz={open(e){return e?ove:null}},Lf={open(e){return e?sve:ive},anchorHidden(e){return e?ave:null}},lve={...Lf,...Sp},cve=A.forwardRef(function(t,n){const{render:r,className:o,forceRender:i=!1,...a}=t,{store:c}=zf(),u=c.useState("open"),f=c.useState("nested"),h=c.useState("mounted"),p=c.useState("transitionStatus"),g=A.useMemo(()=>({open:u,transitionStatus:p}),[u,p]);return Mn("div",t,{state:g,ref:[c.context.backdropRef,n],stateAttributesMapping:lve,props:[{role:"presentation",hidden:!h,style:{userSelect:"none",WebkitUserSelect:"none"}},a],enabled:i||!f})}),il="none",Ha="trigger-press",Lo="trigger-hover",S2="outside-press",$S="item-press",uve="close-press",gc="focus-out",vz="escape-key",IS="list-navigation",fve="cancel-open",bz="imperative-action",dve="window-resize";function $t(e,t,n,r){let o=!1,i=!1;const a=r??Mr;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...a}}const hve=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:a=!0,...c}=t,{store:u}=zf(),f=u.useState("open");function h(y){f&&u.setOpen(!1,$t(uve,y.nativeEvent))}const{getButtonProps:p,buttonRef:g}=Tc({disabled:i,native:a}),v=A.useMemo(()=>({disabled:i}),[i]);return Mn("button",t,{state:v,ref:[n,g],props:[{onClick:h},c,p]})}),pve={...Kh};let mP=0;function mve(e,t="mui"){const[n,r]=A.useState(e),o=e||n;return A.useEffect(()=>{n==null&&(mP+=1,r(`${t}-${mP}`))},[n,t]),o}const gP=pve.useId;function Ff(e,t){if(gP!==void 0){const n=gP();return e??(t?`${t}-${n}`:n)}return mve(e,t)}function Uf(e){return Ff(e,"base-ui")}const gve=[];function w2(e){A.useEffect(e,gve)}const Gd=0;class al{static create(){return new al}currentId=Gd;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Gd,n()},t)}isStarted(){return this.currentId!==Gd}clear=()=>{this.currentId!==Gd&&(clearTimeout(this.currentId),this.currentId=Gd)};disposeEffect=()=>this.clear}function go(){const e=Co(al.create).current;return w2(e.disposeEffect),e}function kr(e){const t=Co(yve,e).current;return t.next=e,Je(t.effect),t}function yve(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Vf=typeof navigator<"u",zS=Sve(),Sz=xve(),wz=wve(),xz=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Ez=zS.platform==="MacIntel"&&zS.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(zS.platform),vve=Vf&&/apple/i.test(navigator.vendor),jx=Vf&&/android/i.test(Sz)||/android/i.test(wz);Vf&&Sz.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const bve=wz.includes("jsdom/");function Sve(){if(!Vf)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 wve(){if(!Vf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function xve(){if(!Vf)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const Px="data-base-ui-focusable",_z="active",Cz="selected",Tz="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ka="ArrowLeft",Ga="ArrowRight",x2="ArrowUp",wp="ArrowDown";function Ii(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Jt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Iw(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function xo(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Rs(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Eve(e){return e.matches("html,body")}function br(e){return e?.ownerDocument||document}function Rz(e){return Yn(e)&&e.matches(Tz)}function Nx(e){return e?e.getAttribute("role")==="combobox"&&Rz(e):!1}function zh(e){return e?e.hasAttribute(Px)?e:e.querySelector(`[${Px}]`)||e:null}function sc(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...sc(e,o.id,n)])}function yP(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(i=>i.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function no(e){e.preventDefault(),e.stopPropagation()}function _ve(e){return"nativeEvent"in e}function Oz(e){return e.mozInputSource===0&&e.isTrusted?!0:jx&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Az(e){return bve?!1:!jx&&e.width===0&&e.height===0||jx&&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 pf(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function kz(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Cve=["top","right","bottom","left"],mf=Math.min,Fo=Math.max,Xy=Math.round,Lu=Math.floor,ni=e=>({x:e,y:e}),Tve={left:"right",right:"left",bottom:"top",top:"bottom"},Rve={start:"end",end:"start"};function Dx(e,t,n){return Fo(e,mf(t,n))}function Hi(e,t){return typeof e=="function"?e(t):e}function _o(e){return e.split("-")[0]}function gl(e){return e.split("-")[1]}function E2(e){return e==="x"?"y":"x"}function _2(e){return e==="y"?"height":"width"}const Ove=new Set(["top","bottom"]);function cs(e){return Ove.has(_o(e))?"y":"x"}function C2(e){return E2(cs(e))}function Ave(e,t,n){n===void 0&&(n=!1);const r=gl(e),o=C2(e),i=_2(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Qy(a)),[a,Qy(a)]}function kve(e){const t=Qy(e);return[$x(e),t,$x(t)]}function $x(e){return e.replace(/start|end/g,t=>Rve[t])}const vP=["left","right"],bP=["right","left"],Mve=["top","bottom"],jve=["bottom","top"];function Pve(e,t,n){switch(e){case"top":case"bottom":return n?t?bP:vP:t?vP:bP;case"left":case"right":return t?Mve:jve;default:return[]}}function Nve(e,t,n,r){const o=gl(e);let i=Pve(_o(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map($x)))),i}function Qy(e){return e.replace(/left|right|bottom|top/g,t=>Tve[t])}function Dve(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mz(e){return typeof e!="number"?Dve(e):{top:e,right:e,bottom:e,left:e}}function Jy(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Vg(e,t,n){return Math.floor(e/t)!==n}function Ku(e,t){return t<0||t>=e.current.length}function gy(e,t){return Kr(e,{disabledIndices:t})}function Ix(e,t){return Kr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Kr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let i=t;do i+=n?-o:o;while(i>=0&&i<=e.current.length-1&&Za(e,i,r));return i}function jz(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:i,disabledIndices:a,minIndex:c,maxIndex:u,prevIndex:f,stopEvent:h=!1}){let p=f;const g=[],v={};let y=!1;{let T=null,b=-1;e.current.forEach((_,S)=>{if(_==null)return;const C=_.closest('[role="row"]');C&&(y=!0),(C!==T||b===-1)&&(T=C,b+=1,g[b]=[]),g[b].push(S),v[S]=b})}const x=y&&g.length>0&&g.some(T=>T.length!==i);function w(T){if(!x||f===-1)return;const b=v[f];if(b==null)return;const _=g[b].indexOf(f);let S=T==="up"?b-1:b+1;r&&(S<0?S=g.length-1:S>=g.length&&(S=0));const C=new Set;for(;S>=0&&S<g.length&&!C.has(S);){C.add(S);const E=g[S];if(E.length===0){S=T==="up"?S-1:S+1;continue}const O=Math.min(_,E.length-1);for(let j=O;j>=0;j-=1){const P=E[j];if(!Za(e,P,a))return P}S=T==="up"?S-1:S+1,r&&(S<0?S=g.length-1:S>=g.length&&(S=0))}}if(t.key===x2){const T=w("up");if(T!==void 0)h&&no(t),p=T;else{if(h&&no(t),f===-1)p=u;else if(p=Kr(e,{startingIndex:p,amount:i,decrement:!0,disabledIndices:a}),r&&(f-i<c||p<0)){const b=f%i,_=u%i,S=u-(_-b);_===b?p=u:p=_>b?S:S-i}Ku(e,p)&&(p=f)}}if(t.key===wp){const T=w("down");T!==void 0?(h&&no(t),p=T):(h&&no(t),f===-1?p=c:(p=Kr(e,{startingIndex:f,amount:i,disabledIndices:a}),r&&f+i>u&&(p=Kr(e,{startingIndex:f%i-i,amount:i,disabledIndices:a}))),Ku(e,p)&&(p=f))}if(n==="both"){const T=Lu(f/i);t.key===(o?Ka:Ga)&&(h&&no(t),f%i!==i-1?(p=Kr(e,{startingIndex:f,disabledIndices:a}),r&&Vg(p,i,T)&&(p=Kr(e,{startingIndex:f-f%i-1,disabledIndices:a}))):r&&(p=Kr(e,{startingIndex:f-f%i-1,disabledIndices:a})),Vg(p,i,T)&&(p=f)),t.key===(o?Ga:Ka)&&(h&&no(t),f%i!==0?(p=Kr(e,{startingIndex:f,decrement:!0,disabledIndices:a}),r&&Vg(p,i,T)&&(p=Kr(e,{startingIndex:f+(i-f%i),decrement:!0,disabledIndices:a}))):r&&(p=Kr(e,{startingIndex:f+(i-f%i),decrement:!0,disabledIndices:a})),Vg(p,i,T)&&(p=f));const b=Lu(u/i)===T;Ku(e,p)&&(r&&b?p=t.key===(o?Ga:Ka)?u:Kr(e,{startingIndex:f-f%i-1,disabledIndices:a}):p=f)}return p}function Pz(e,t,n){const r=[];let o=0;return e.forEach(({width:i,height:a},c)=>{let u=!1;for(n&&(o=0);!u;){const f=[];for(let h=0;h<i;h+=1)for(let p=0;p<a;p+=1)f.push(o+h+p*t);o%t+i<=t&&f.every(h=>r[h]==null)?(f.forEach(h=>{r[h]=c}),u=!0):o+=1}}),[...r]}function Nz(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e);default:return-1}}function Dz(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Za(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}var $ve=["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] *)"],e0=$ve.join(","),$z=typeof Element>"u",gf=$z?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,t0=!$z&&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},n0=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):n0(t.parentNode));return a},Ive=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Iz=function(t,n,r){if(n0(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(e0));return n&&gf.call(t,e0)&&o.unshift(t),o=o.filter(r),o},r0=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!n0(a,!1))if(a.tagName==="SLOT"){var c=a.assignedElements(),u=c.length?c:a.children,f=r0(u,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else{var h=gf.call(a,e0);h&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),g=!n0(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(p&&g){var v=r0(p===!0?a.children:p.children,!0,r);r.flatten?o.push.apply(o,v):o.push({scopeParent:a,candidates:v})}else i.unshift.apply(i,a.children)}}return o},zz=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Lz=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Ive(t))&&!zz(t)?0:t.tabIndex},zve=function(t,n){var r=Lz(t);return r<0&&n&&!zz(t)?0:r},Lve=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Fz=function(t){return t.tagName==="INPUT"},Fve=function(t){return Fz(t)&&t.type==="hidden"},Uve=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Vve=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},qve=function(t){if(!t.name)return!0;var n=t.form||t0(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){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",a.message),!1}var i=Vve(o,t.form);return!i||i===t},Bve=function(t){return Fz(t)&&t.type==="radio"},Hve=function(t){return Bve(t)&&!qve(t)},Kve=function(t){var n,r=t&&t0(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,c,u;for(i=!!((a=o)!==null&&a!==void 0&&(c=a.ownerDocument)!==null&&c!==void 0&&c.contains(o)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!i&&o;){var f,h,p;r=t0(o),o=(f=r)===null||f===void 0?void 0:f.host,i=!!((h=o)!==null&&h!==void 0&&(p=h.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return i},SP=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Gve=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var a=gf.call(t,"details>summary:first-of-type"),c=a?t.parentElement:t;if(gf.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var u=t;t;){var f=t.parentElement,h=t0(t);if(f&&!f.shadowRoot&&o(f)===!0)return SP(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=u}if(Kve(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return SP(t);return!1},Zve=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return gf.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},zx=function(t,n){return!(n.disabled||Fve(n)||Gve(n,t)||Uve(n)||Zve(n))},Lx=function(t,n){return!(Hve(n)||Lz(n)<0||!zx(t,n))},Yve=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Uz=function(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,c=a?o.scopeParent:o,u=zve(c,a),f=a?Uz(o.candidates):c;u===0?a?n.push.apply(n,f):n.push(c):r.push({documentOrder:i,tabIndex:u,item:o,isScope:a,content:f})}),r.sort(Lve).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},xp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=r0([t],n.includeContainer,{filter:Lx.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Yve}):r=Iz(t,n.includeContainer,Lx.bind(null,n)),Uz(r)},Wve=function(t,n){n=n||{};var r;return n.getShadowRoot?r=r0([t],n.includeContainer,{filter:zx.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Iz(t,n.includeContainer,zx.bind(null,n)),r},Vz=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return gf.call(t,e0)===!1?!1:Lx(n,t)};const qf=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function qz(e,t){const n=xp(e,qf()),r=n.length;if(r===0)return;const o=Ii(br(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function T2(e){return qz(br(e).body,1)||e}function Bz(e){return qz(br(e).body,-1)||e}function Hz(e,t){if(!e)return null;const n=xp(br(e).body,qf()),r=n.length;if(r===0)return null;const o=n.indexOf(e);if(o===-1)return null;const i=(o+t+r)%r;return n[i]}function Xve(e){return Hz(e,1)}function Qve(e){return Hz(e,-1)}function Gu(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Jt(n,r)}function Jve(e){xp(e,qf()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function wP(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Kz(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class ebe{nodesRef={current:[]};events=Kz();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const Gz=A.createContext(null),Zz=A.createContext(null),yl=()=>A.useContext(Gz)?.id||null,Mc=e=>{const t=A.useContext(Zz);return e??t};function tbe(e){const t=Ff(),n=Mc(e),r=yl();return Je(()=>{if(!t)return;const o={id:t,parentId:r};return n?.addNode(o),()=>{n?.removeNode(o)}},[n,t,r]),t}function nbe(e){const{children:t,id:n}=e,r=yl();return M.jsx(Gz.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function rbe(e){const{children:t,externalTree:n}=e,r=Co(()=>n??new ebe).current;return M.jsx(Zz.Provider,{value:r,children:t})}function Lh(e){return`data-base-ui-${e}`}function LS(e,t,n){if(n&&!pf(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}const Yz={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},G0={...Yz,position:"fixed",top:0,left:0},Wz={...Yz,position:"absolute"},qg=null;class obe{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Bg=new obe;class Zs{static create(){return new Zs}static request(t){return Bg.request(t)}static cancel(t){return Bg.cancel(t)}currentId=qg;request(t){this.cancel(),this.currentId=Bg.request(()=>{this.currentId=qg,t()})}cancel=()=>{this.currentId!==qg&&(Bg.cancel(this.currentId),this.currentId=qg)};disposeEffect=()=>this.cancel}function Z0(){const e=Co(Zs.create).current;return w2(e.disposeEffect),e}function ys(e){return e?.ownerDocument||document}const yf=A.forwardRef(function(t,n){const[r,o]=A.useState();Je(()=>{vve&&o("button")},[]);const i={tabIndex:0,role:r};return M.jsx("span",{...t,ref:n,style:G0,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});let xP=0;function yy(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(xP);const i=()=>e?.focus({preventScroll:n});o?i():xP=requestAnimationFrame(i)}const Zu={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function EP(e){return e==="inert"?Zu.inert:e==="aria-hidden"?Zu["aria-hidden"]:Zu.none}let Hg=new WeakSet,Kg={},FS=0;const Xz=e=>e&&(e.host||Xz(e.parentNode)),sbe=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Xz(n);return e.contains(r)?r:null}).filter(n=>n!=null);function ibe(e,t,n,r){const o="data-base-ui-inert",i=r?"inert":n?"aria-hidden":null,a=sbe(t,e),c=new Set,u=new Set(a),f=[];Kg[o]||(Kg[o]=new WeakMap);const h=Kg[o];a.forEach(p),g(t),c.clear();function p(v){!v||c.has(v)||(c.add(v),v.parentNode&&p(v.parentNode))}function g(v){!v||u.has(v)||[].forEach.call(v.children,y=>{if(pl(y)!=="script")if(c.has(y))g(y);else{const x=i?y.getAttribute(i):null,w=x!==null&&x!=="false",T=EP(i),b=(T.get(y)||0)+1,_=(h.get(y)||0)+1;T.set(y,b),h.set(y,_),f.push(y),b===1&&w&&Hg.add(y),_===1&&y.setAttribute(o,""),!w&&i&&y.setAttribute(i,i==="inert"?"":"true")}})}return FS+=1,()=>{f.forEach(v=>{const y=EP(i),w=(y.get(v)||0)-1,T=(h.get(v)||0)-1;y.set(v,w),h.set(v,T),w||(!Hg.has(v)&&i&&v.removeAttribute(i),Hg.delete(v)),T||v.removeAttribute(o)}),FS-=1,FS||(Zu.inert=new WeakMap,Zu["aria-hidden"]=new WeakMap,Zu.none=new WeakMap,Hg=new WeakSet,Kg={})}}function abe(e,t=!1,n=!1){const r=br(e[0]).body;return ibe(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Qz=A.createContext(null),Jz=()=>A.useContext(Qz),lbe=Lh("portal");function cbe(e={}){const{ref:t,container:n,componentProps:r=Mr,elementProps:o,elementState:i}=e,a=Ff(),u=Jz()?.portalNode,[f,h]=A.useState(null),[p,g]=A.useState(null),v=We(T=>{T!==null&&g(T)}),y=A.useRef(null);Je(()=>{if(n===null){y.current&&(y.current=null,g(null),h(null));return}if(a==null)return;const T=(n&&(s_(n)?n:n.current))??u??document.body;if(T==null){y.current&&(y.current=null,g(null),h(null));return}y.current!==T&&(y.current=T,g(null),h(T))},[n,u,a]);const x=Mn("div",r,{ref:[t,v],state:i,props:[{id:a,[lbe]:""},o]});return{portalNode:p,portalSubtree:f&&x?gs.createPortal(x,f):null}}const R2=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,renderGuards:c,...u}=t,{portalNode:f,portalSubtree:h}=cbe({container:o,ref:n,componentProps:t,elementProps:u}),p=A.useRef(null),g=A.useRef(null),v=A.useRef(null),y=A.useRef(null),[x,w]=A.useState(null),T=x?.modal,b=x?.open,_=typeof c=="boolean"?c:!!x&&!x.modal&&x.open&&!!f;A.useEffect(()=>{if(!f||T)return;function C(E){f&&E.relatedTarget&&Gu(E)&&(E.type==="focusin"?wP:Jve)(f)}return f.addEventListener("focusin",C,!0),f.addEventListener("focusout",C,!0),()=>{f.removeEventListener("focusin",C,!0),f.removeEventListener("focusout",C,!0)}},[f,T]),A.useEffect(()=>{!f||b||wP(f)},[b,f]);const S=A.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:g,beforeInsideRef:v,afterInsideRef:y,portalNode:f,setFocusManagerState:w}),[f]);return M.jsxs(A.Fragment,{children:[h,M.jsxs(Qz.Provider,{value:S,children:[_&&f&&M.jsx(yf,{"data-type":"outside",ref:p,onFocus:C=>{if(Gu(C,f))v.current?.focus();else{const E=x?x.domReference:null;Bz(E)?.focus()}}}),_&&f&&M.jsx("span",{"aria-owns":f.id,style:qre}),f&&gs.createPortal(r,f),_&&f&&M.jsx(yf,{"data-type":"outside",ref:g,onFocus:C=>{if(Gu(C,f))y.current?.focus();else{const E=x?x.domReference:null;T2(E)?.focus(),x?.closeOnFocusOut&&x?.onOpenChange(!1,$t(gc,C.nativeEvent))}}})]})]})});function $i(e){return e==null?e:"current"in e?e.current:e}function ube(e,t){const n=wr(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const _P=20;let Ia=[];function O2(){Ia=Ia.filter(e=>e.isConnected)}function fbe(e){O2(),e&&pl(e)!=="body"&&(Ia.push(e),Ia.length>_P&&(Ia=Ia.slice(-_P)))}function US(){return O2(),Ia[Ia.length-1]}function dbe(e){if(!e)return null;const t=qf();return Vz(e,t)?e:xp(e,t)[0]||e}function hbe(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Bo(e).display!=="none"}function CP(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=qf(),o=Wve(e,n).filter(a=>{const c=a.getAttribute("data-tabindex")||"";return Vz(a,n)||a.hasAttribute("data-tabindex")&&!c.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function A2(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],initialFocus:i=!0,returnFocus:a=!0,restoreFocus:c=!1,modal:u=!0,closeOnFocusOut:f=!0,openInteractionType:h="",getInsideElements:p=()=>[],nextFocusableElement:g,previousFocusableElement:v,beforeContentFocusGuardRef:y,externalTree:x}=e,w="rootStore"in t?t.rootStore:t,T=w.useState("open"),b=w.useState("domReferenceElement"),_=w.useState("floatingElement"),{events:S,dataRef:C}=w.context,E=We(()=>C.current.floatingContext?.nodeId),O=We(p),j=i===!1,P=Nx(b)&&j,$=kr(o),I=kr(i),L=kr(a),F=kr(h),J=Mc(x),ee=Jz(),Z=A.useRef(null),H=A.useRef(null),V=A.useRef(!1),oe=A.useRef(!1),ne=A.useRef(!1),D=A.useRef(-1),q=A.useRef(""),U=A.useRef(""),N=A.useRef(null),G=A.useRef(null),te=Vi(N,y,ee?.beforeInsideRef),re=Vi(G,ee?.afterInsideRef),de=go(),we=go(),Ee=Z0(),se=ee!=null,X=zh(_),fe=We((ye=X)=>ye?xp(ye,qf()):[]),he=We(ye=>{const De=fe(ye);return $.current.map(()=>De).filter(Boolean).flat()});A.useEffect(()=>{if(r||!u)return;function ye(Ue){Ue.key==="Tab"&&Jt(X,Ii(br(X)))&&fe().length===0&&!P&&no(Ue)}const De=br(X);return De.addEventListener("keydown",ye),()=>{De.removeEventListener("keydown",ye)}},[r,b,X,u,$,P,fe,he]),A.useEffect(()=>{if(r||!_)return;function ye(De){const Ue=xo(De),Fe=fe().indexOf(Ue);Fe!==-1&&(D.current=Fe)}return _.addEventListener("focusin",ye),()=>{_.removeEventListener("focusin",ye)}},[r,_,fe]),A.useEffect(()=>{if(r||!T)return;const ye=br(X);function De(){ne.current=!1}function Ue(Fe){const Le=xo(Fe),Ze=Jt(_,Le)||Jt(b,Le)||Jt(ee?.portalNode,Le);ne.current=!Ze,U.current=Fe.pointerType||"keyboard"}function ve(){U.current="keyboard"}return ye.addEventListener("pointerdown",Ue,!0),ye.addEventListener("pointerup",De,!0),ye.addEventListener("pointercancel",De,!0),ye.addEventListener("keydown",ve,!0),()=>{ye.removeEventListener("pointerdown",Ue,!0),ye.removeEventListener("pointerup",De,!0),ye.removeEventListener("pointercancel",De,!0),ye.removeEventListener("keydown",ve,!0)}},[r,_,b,X,T,ee]),A.useEffect(()=>{if(r||!f)return;function ye(){oe.current=!0,we.start(0,()=>{oe.current=!1})}function De(Le){const Ze=Le.relatedTarget,Oe=Le.currentTarget,ze=xo(Le);queueMicrotask(()=>{const Be=E(),dt=w.context.triggerElements,Ce=Ze?.hasAttribute(Lh("focus-guard"))&&[N.current,G.current,ee?.beforeInsideRef.current,ee?.afterInsideRef.current,ee?.beforeOutsideRef.current,ee?.afterOutsideRef.current,$i(v),$i(g)].includes(Ze),me=!(Jt(b,Ze)||Jt(_,Ze)||Jt(Ze,_)||Jt(ee?.portalNode,Ze)||Ze!=null&&dt.hasElement(Ze)||dt.hasMatchingElement(Me=>Jt(Me,Ze))||Ce||J&&(sc(J.nodesRef.current,Be).find(Me=>Jt(Me.context?.elements.floating,Ze)||Jt(Me.context?.elements.domReference,Ze))||yP(J.nodesRef.current,Be).find(Me=>[Me.context?.elements.floating,zh(Me.context?.elements.floating)].includes(Ze)||Me.context?.elements.domReference===Ze)));if(Oe===b&&X&&CP(X,$),c&&Oe!==b&&!hbe(ze)&&Ii(br(X))===br(X).body){if(Yn(X)&&(X.focus(),c==="popup")){Ee.request(()=>{X.focus()});return}const Me=D.current,Ve=fe(),it=Ve[Me]||Ve[Ve.length-1]||X;Yn(it)&&it.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(P||!u)&&Ze&&me&&!oe.current&&(P||Ze!==US())&&(V.current=!0,w.setOpen(!1,$t(gc,Le)))})}function Ue(){ne.current||(C.current.insideReactTree=!0,de.start(0,()=>{C.current.insideReactTree=!1}))}const ve=Yn(b)?b:null,Fe=[];if(!(!_&&!ve))return ve&&(ve.addEventListener("focusout",De),ve.addEventListener("pointerdown",ye),Fe.push(()=>{ve.removeEventListener("focusout",De),ve.removeEventListener("pointerdown",ye)})),_&&(_.addEventListener("focusout",De),ee&&(_.addEventListener("focusout",Ue,!0),Fe.push(()=>{_.removeEventListener("focusout",Ue,!0)})),Fe.push(()=>{_.removeEventListener("focusout",De)})),()=>{Fe.forEach(Le=>{Le()})}},[r,b,_,X,u,J,ee,w,f,c,fe,P,E,$,C,de,we,Ee,g,v]),A.useEffect(()=>{if(r||!_||!T)return;const ye=Array.from(ee?.portalNode?.querySelectorAll(`[${Lh("portal")}]`)||[]),Ue=(J?yP(J.nodesRef.current,E()):[]).find(Le=>Nx(Le.context?.elements.domReference||null))?.context?.elements.domReference,ve=[_,Ue,...ye,...O(),Z.current,H.current,N.current,G.current,ee?.beforeOutsideRef.current,ee?.afterOutsideRef.current,$i(v),$i(g),P?b:null].filter(Le=>Le!=null),Fe=abe(ve,u||P);return()=>{Fe()}},[T,r,b,_,u,$,ee,P,J,E,O,g,v]),Je(()=>{if(!T||r||!Yn(X))return;const ye=br(X),De=Ii(ye);queueMicrotask(()=>{const Ue=he(X),ve=I.current,Fe=typeof ve=="function"?ve(F.current||""):ve;if(Fe===void 0||Fe===!1)return;let Le;Fe===!0||Fe===null?Le=Ue[0]||X:Le=$i(Fe),Le=Le||Ue[0]||X,!Jt(X,De)&&yy(Le,{preventScroll:Le===X})})},[r,T,X,j,he,I,F]),Je(()=>{if(r||!X)return;const ye=br(X),De=Ii(ye);fbe(De);function Ue(Le){if(Le.open||(q.current=ube(Le.nativeEvent,U.current)),Le.reason===Lo&&Le.nativeEvent.type==="mouseleave"&&(V.current=!0),Le.reason===S2)if(Le.nested)V.current=!1;else if(Oz(Le.nativeEvent)||Az(Le.nativeEvent))V.current=!1;else{let Ze=!1;document.createElement("div").focus({get preventScroll(){return Ze=!0,!1}}),Ze?V.current=!1:V.current=!0}}S.on("openchange",Ue);const ve=ye.createElement("span");ve.setAttribute("tabindex","-1"),ve.setAttribute("aria-hidden","true"),Object.assign(ve.style,G0),se&&b&&b.insertAdjacentElement("afterend",ve);function Fe(){const Le=L.current;let Ze=typeof Le=="function"?Le(q.current):Le;if(Ze===void 0||Ze===!1)return null;if(Ze===null&&(Ze=!0),typeof Ze=="boolean"){const ze=b||US();return ze&&ze.isConnected?ze:ve}const Oe=b||US()||ve;return $i(Ze)||Oe}return()=>{S.off("openchange",Ue);const Le=Ii(ye),Ze=Jt(_,Le)||J&&sc(J.nodesRef.current,E(),!1).some(ze=>Jt(ze.context?.elements.floating,Le)),Oe=Fe();queueMicrotask(()=>{const ze=dbe(Oe),Be=typeof L.current!="boolean";L.current&&!V.current&&Yn(ze)&&(!(!Be&&ze!==Le&&Le!==ye.body)||Ze)&&ze.focus({preventScroll:!0}),ve.remove()})}},[r,_,X,L,C,S,J,se,b,E]),A.useEffect(()=>{queueMicrotask(()=>{V.current=!1})},[r]),A.useEffect(()=>{if(r||!T)return;function ye(Ue){xo(Ue)?.closest(`[${RD}]`)&&(oe.current=!0)}const De=br(X);return De.addEventListener("pointerdown",ye,!0),()=>{De.removeEventListener("pointerdown",ye,!0)}},[r,T,X]),Je(()=>{if(!r&&ee)return ee.setFocusManagerState({modal:u,closeOnFocusOut:f,open:T,onOpenChange:w.setOpen,domReference:b}),()=>{ee.setFocusManagerState(null)}},[r,ee,u,T,w,f,b]),Je(()=>{if(!(r||!X))return CP(X,$),()=>{queueMicrotask(O2)}},[r,X,$]);const Pe=!r&&(u?!P:!0)&&(se||u);return M.jsxs(A.Fragment,{children:[Pe&&M.jsx(yf,{"data-type":"inside",ref:te,onFocus:ye=>{if(u){const De=he();yy(De[De.length-1])}else ee?.portalNode&&(V.current=!1,Gu(ye,ee.portalNode)?T2(b)?.focus():$i(v??ee.beforeOutsideRef)?.focus())}}),n,Pe&&M.jsx(yf,{"data-type":"inside",ref:re,onFocus:ye=>{u?yy(he()[0]):ee?.portalNode&&(f&&(V.current=!0),Gu(ye,ee.portalNode)?Bz(b)?.focus():$i(g??ee.afterOutsideRef)?.focus())}})]})}function e8(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:a=!0,ignoreMouse:c=!1,stickIfOpen:u=!0,touchOpenDelay:f=0}=t,h=A.useRef(void 0),p=Z0(),g=go(),v=A.useMemo(()=>({onPointerDown(y){h.current=y.pointerType},onMouseDown(y){const x=h.current,w=y.nativeEvent,T=n.select("open");if(y.button!==0||i==="click"||pf(x,!0)&&c)return;const b=r.current.openEvent,_=b?.type,S=n.select("domReferenceElement")!==y.currentTarget,C=T&&S||!(T&&a&&(!(b&&u)||_==="click"||_==="mousedown"));if(Rz(w.target)){const O=$t(Ha,w,w.target);C&&x==="touch"&&f>0?g.start(f,()=>{n.setOpen(!0,O)}):n.setOpen(C,O);return}const E=y.currentTarget;p.request(()=>{const O=$t(Ha,w,E);C&&x==="touch"&&f>0?g.start(f,()=>{n.setOpen(!0,O)}):n.setOpen(C,O)})},onClick(y){if(i==="mousedown-only")return;const x=h.current;if(i==="mousedown"&&x){h.current=void 0;return}if(pf(x,!0)&&c)return;const w=n.select("open"),T=r.current.openEvent,b=n.select("domReferenceElement")!==y.currentTarget,_=w&&b||!(w&&a&&(!(T&&u)||kz(T))),S=$t(Ha,y.nativeEvent,y.currentTarget);_&&x==="touch"&&f>0?g.start(f,()=>{n.setOpen(!0,S)}):n.setOpen(_,S)},onKeyDown(){h.current=void 0}}),[r,i,c,n,u,a,p,g,f]);return A.useMemo(()=>o?{reference:v}:Mr,[o,v])}function TP(e,t,n){let{reference:r,floating:o}=e;const i=cs(t),a=C2(t),c=_2(a),u=_o(t),f=i==="y",h=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,g=r[c]/2-o[c]/2;let v;switch(u){case"top":v={x:h,y:r.y-o.height};break;case"bottom":v={x:h,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-o.width,y:p};break;default:v={x:r.x,y:r.y}}switch(gl(t)){case"start":v[a]-=g*(n&&f?-1:1);break;case"end":v[a]+=g*(n&&f?-1:1);break}return v}const pbe=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:p}=TP(f,r,u),g=r,v={},y=0;for(let x=0;x<c.length;x++){const{name:w,fn:T}=c[x],{x:b,y:_,data:S,reset:C}=await T({x:h,y:p,initialPlacement:r,placement:g,strategy:o,middlewareData:v,rects:f,platform:a,elements:{reference:e,floating:t}});h=b??h,p=_??p,v={...v,[w]:{...v[w],...S}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(g=C.placement),C.rects&&(f=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:h,y:p}=TP(f,g,u)),x=-1)}return{x:h,y:p,placement:g,strategy:o,middlewareData:v}};async function Fh(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:c,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:g=!1,padding:v=0}=Hi(t,e),y=Mz(v),w=c[g?p==="floating"?"reference":"floating":p],T=Jy(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:f,rootBoundary:h,strategy:u})),b=p==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),S=await(i.isElement==null?void 0:i.isElement(_))?await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1}:{x:1,y:1},C=Jy(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:_,strategy:u}):b);return{top:(T.top-C.top+y.top)/S.y,bottom:(C.bottom-T.bottom+y.bottom)/S.y,left:(T.left-C.left+y.left)/S.x,right:(C.right-T.right+y.right)/S.x}}const mbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:c,platform:u,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:x=!0,...w}=Hi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const T=_o(o),b=cs(c),_=_o(c)===c,S=await(u.isRTL==null?void 0:u.isRTL(f.floating)),C=g||(_||!x?[Qy(c)]:kve(c)),E=y!=="none";!g&&E&&C.push(...Nve(c,x,y,S));const O=[c,...C],j=await Fh(t,w),P=[];let $=((r=i.flip)==null?void 0:r.overflows)||[];if(h&&P.push(j[T]),p){const J=Ave(o,a,S);P.push(j[J[0]],j[J[1]])}if($=[...$,{placement:o,overflows:P}],!P.every(J=>J<=0)){var I,L;const J=(((I=i.flip)==null?void 0:I.index)||0)+1,ee=O[J];if(ee&&(!(p==="alignment"?b!==cs(ee):!1)||$.every(V=>cs(V.placement)===b?V.overflows[0]>0:!0)))return{data:{index:J,overflows:$},reset:{placement:ee}};let Z=(L=$.filter(H=>H.overflows[0]<=0).sort((H,V)=>H.overflows[1]-V.overflows[1])[0])==null?void 0:L.placement;if(!Z)switch(v){case"bestFit":{var F;const H=(F=$.filter(V=>{if(E){const oe=cs(V.placement);return oe===b||oe==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(oe=>oe>0).reduce((oe,ne)=>oe+ne,0)]).sort((V,oe)=>V[1]-oe[1])[0])==null?void 0:F[0];H&&(Z=H);break}case"initialPlacement":Z=c;break}if(o!==Z)return{reset:{placement:Z}}}return{}}}};function RP(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function OP(e){return Cve.some(t=>e[t]>=0)}const gbe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Hi(e,t);switch(r){case"referenceHidden":{const i=await Fh(t,{...o,elementContext:"reference"}),a=RP(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:OP(a)}}}case"escaped":{const i=await Fh(t,{...o,altBoundary:!0}),a=RP(i,n.floating);return{data:{escapedOffsets:a,escaped:OP(a)}}}default:return{}}}}},t8=new Set(["left","top"]);async function ybe(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=_o(n),c=gl(n),u=cs(n)==="y",f=t8.has(a)?-1:1,h=i&&u?-1:1,p=Hi(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof y=="number"&&(v=c==="end"?y*-1:y),u?{x:v*h,y:g*f}:{x:g*f,y:v*h}}const vbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:c}=t,u=await ybe(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},bbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:w=>{let{x:T,y:b}=w;return{x:T,y:b}}},...u}=Hi(e,t),f={x:n,y:r},h=await Fh(t,u),p=cs(_o(o)),g=E2(p);let v=f[g],y=f[p];if(i){const w=g==="y"?"top":"left",T=g==="y"?"bottom":"right",b=v+h[w],_=v-h[T];v=Dx(b,v,_)}if(a){const w=p==="y"?"top":"left",T=p==="y"?"bottom":"right",b=y+h[w],_=y-h[T];y=Dx(b,y,_)}const x=c.fn({...t,[g]:v,[p]:y});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[g]:i,[p]:a}}}}}},Sbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:c=0,mainAxis:u=!0,crossAxis:f=!0}=Hi(e,t),h={x:n,y:r},p=cs(o),g=E2(p);let v=h[g],y=h[p];const x=Hi(c,t),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const _=g==="y"?"height":"width",S=i.reference[g]-i.floating[_]+w.mainAxis,C=i.reference[g]+i.reference[_]-w.mainAxis;v<S?v=S:v>C&&(v=C)}if(f){var T,b;const _=g==="y"?"width":"height",S=t8.has(_o(o)),C=i.reference[p]-i.floating[_]+(S&&((T=a.offset)==null?void 0:T[p])||0)+(S?0:w.crossAxis),E=i.reference[p]+i.reference[_]+(S?0:((b=a.offset)==null?void 0:b[p])||0)-(S?w.crossAxis:0);y<C?y=C:y>E&&(y=E)}return{[g]:v,[p]:y}}}},wbe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:c}=t,{apply:u=()=>{},...f}=Hi(e,t),h=await Fh(t,f),p=_o(o),g=gl(o),v=cs(o)==="y",{width:y,height:x}=i.floating;let w,T;p==="top"||p==="bottom"?(w=p,T=g===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(T=p,w=g==="end"?"top":"bottom");const b=x-h.top-h.bottom,_=y-h.left-h.right,S=mf(x-h[w],b),C=mf(y-h[T],_),E=!t.middlewareData.shift;let O=S,j=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=b),E&&!g){const $=Fo(h.left,0),I=Fo(h.right,0),L=Fo(h.top,0),F=Fo(h.bottom,0);v?j=y-2*($!==0||I!==0?$+I:Fo(h.left,h.right)):O=x-2*(L!==0||F!==0?L+F:Fo(h.top,h.bottom))}await u({...t,availableWidth:j,availableHeight:O});const P=await a.getDimensions(c.floating);return y!==P.width||x!==P.height?{reset:{rects:!0}}:{}}}};function n8(e){const t=Bo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Yn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=Xy(n)!==i||Xy(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function k2(e){return Cn(e)?e:e.contextElement}function Yu(e){const t=k2(e);if(!Yn(t))return ni(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=n8(t);let a=(i?Xy(n.width):n.width)/r,c=(i?Xy(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const xbe=ni(0);function r8(e){const t=wr(e);return!k0()||!t.visualViewport?xbe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ebe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==wr(e)?!1:t}function yc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=k2(e);let a=ni(1);t&&(r?Cn(r)&&(a=Yu(r)):a=Yu(e));const c=Ebe(i,n,r)?r8(i):ni(0);let u=(o.left+c.x)/a.x,f=(o.top+c.y)/a.y,h=o.width/a.x,p=o.height/a.y;if(i){const g=wr(i),v=r&&Cn(r)?wr(r):r;let y=g,x=zw(y);for(;x&&r&&v!==y;){const w=Yu(x),T=x.getBoundingClientRect(),b=Bo(x),_=T.left+(x.clientLeft+parseFloat(b.paddingLeft))*w.x,S=T.top+(x.clientTop+parseFloat(b.paddingTop))*w.y;u*=w.x,f*=w.y,h*=w.x,p*=w.y,u+=_,f+=S,y=wr(x),x=zw(y)}}return Jy({width:h,height:p,x:u,y:f})}function Y0(e,t){const n=M0(e).scrollLeft;return t?t.left+n:yc(li(e)).left+n}function o8(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Y0(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function _be(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=li(r),c=t?A0(t.floating):!1;if(r===a||c&&i)return n;let u={scrollLeft:0,scrollTop:0},f=ni(1);const h=ni(0),p=Yn(r);if((p||!p&&!i)&&((pl(r)!=="body"||Cc(a))&&(u=M0(r)),Yn(r))){const v=yc(r);f=Yu(r),h.x=v.x+r.clientLeft,h.y=v.y+r.clientTop}const g=a&&!p&&!i?o8(a,u):ni(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+h.x+g.x,y:n.y*f.y-u.scrollTop*f.y+h.y+g.y}}function Cbe(e){return Array.from(e.getClientRects())}function Tbe(e){const t=li(e),n=M0(e),r=e.ownerDocument.body,o=Fo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Fo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Y0(e);const c=-n.scrollTop;return Bo(r).direction==="rtl"&&(a+=Fo(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:c}}const AP=25;function Rbe(e,t){const n=wr(e),r=li(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,u=0;if(o){i=o.width,a=o.height;const h=k0();(!h||h&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const f=Y0(r);if(f<=0){const h=r.ownerDocument,p=h.body,g=getComputedStyle(p),v=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,y=Math.abs(r.clientWidth-p.clientWidth-v);y<=AP&&(i-=y)}else f<=AP&&(i+=f);return{width:i,height:a,x:c,y:u}}const Obe=new Set(["absolute","fixed"]);function Abe(e,t){const n=yc(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Yn(e)?Yu(e):ni(1),a=e.clientWidth*i.x,c=e.clientHeight*i.y,u=o*i.x,f=r*i.y;return{width:a,height:c,x:u,y:f}}function kP(e,t,n){let r;if(t==="viewport")r=Rbe(e,n);else if(t==="document")r=Tbe(li(e));else if(Cn(t))r=Abe(t,n);else{const o=r8(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Jy(r)}function s8(e,t){const n=Ui(e);return n===t||!Cn(n)||zi(n)?!1:Bo(n).position==="fixed"||s8(n,t)}function kbe(e,t){const n=t.get(e);if(n)return n;let r=Fa(e,[],!1).filter(c=>Cn(c)&&pl(c)!=="body"),o=null;const i=Bo(e).position==="fixed";let a=i?Ui(e):e;for(;Cn(a)&&!zi(a);){const c=Bo(a),u=i_(a);!u&&c.position==="fixed"&&(o=null),(i?!u&&!o:!u&&c.position==="static"&&!!o&&Obe.has(o.position)||Cc(a)&&!u&&s8(e,a))?r=r.filter(h=>h!==a):o=c,a=Ui(a)}return t.set(e,r),r}function Mbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?A0(t)?[]:kbe(t,this._c):[].concat(n),r],c=a[0],u=a.reduce((f,h)=>{const p=kP(t,h,o);return f.top=Fo(p.top,f.top),f.right=mf(p.right,f.right),f.bottom=mf(p.bottom,f.bottom),f.left=Fo(p.left,f.left),f},kP(t,c,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function jbe(e){const{width:t,height:n}=n8(e);return{width:t,height:n}}function Pbe(e,t,n){const r=Yn(t),o=li(t),i=n==="fixed",a=yc(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const u=ni(0);function f(){u.x=Y0(o)}if(r||!r&&!i)if((pl(t)!=="body"||Cc(o))&&(c=M0(t)),r){const v=yc(t,!0,i,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else o&&f();i&&!r&&o&&f();const h=o&&!r&&!i?o8(o,c):ni(0),p=a.left+c.scrollLeft-u.x-h.x,g=a.top+c.scrollTop-u.y-h.y;return{x:p,y:g,width:a.width,height:a.height}}function VS(e){return Bo(e).position==="static"}function MP(e,t){if(!Yn(e)||Bo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return li(e)===n&&(n=n.ownerDocument.body),n}function i8(e,t){const n=wr(e);if(A0(e))return n;if(!Yn(e)){let o=Ui(e);for(;o&&!zi(o);){if(Cn(o)&&!VS(o))return o;o=Ui(o)}return n}let r=MP(e,t);for(;r&&pre(r)&&VS(r);)r=MP(r,t);return r&&zi(r)&&VS(r)&&!i_(r)?n:r||bre(e)||n}const Nbe=async function(e){const t=this.getOffsetParent||i8,n=this.getDimensions,r=await n(e.floating);return{reference:Pbe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Dbe(e){return Bo(e).direction==="rtl"}const $be={convertOffsetParentRelativeRectToViewportRelativeRect:_be,getDocumentElement:li,getClippingRect:Mbe,getOffsetParent:i8,getElementRects:Nbe,getClientRects:Cbe,getDimensions:jbe,getScale:Yu,isElement:Cn,isRTL:Dbe};function a8(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ibe(e,t){let n=null,r;const o=li(e);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),i();const f=e.getBoundingClientRect(),{left:h,top:p,width:g,height:v}=f;if(c||t(),!g||!v)return;const y=Lu(p),x=Lu(o.clientWidth-(h+g)),w=Lu(o.clientHeight-(p+v)),T=Lu(h),_={rootMargin:-y+"px "+-x+"px "+-w+"px "+-T+"px",threshold:Fo(0,mf(1,u))||1};let S=!0;function C(E){const O=E[0].intersectionRatio;if(O!==u){if(!S)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!a8(f,e.getBoundingClientRect())&&a(),S=!1}try{n=new IntersectionObserver(C,{..._,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,_)}n.observe(e)}return a(!0),i}function jP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=k2(e),h=o||i?[...f?Fa(f):[],...Fa(t)]:[];h.forEach(T=>{o&&T.addEventListener("scroll",n,{passive:!0}),i&&T.addEventListener("resize",n)});const p=f&&c?Ibe(f,n):null;let g=-1,v=null;a&&(v=new ResizeObserver(T=>{let[b]=T;b&&b.target===f&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var _;(_=v)==null||_.observe(t)})),n()}),f&&!u&&v.observe(f),v.observe(t));let y,x=u?yc(e):null;u&&w();function w(){const T=yc(e);x&&!a8(x,T)&&n(),x=T,y=requestAnimationFrame(w)}return n(),()=>{var T;h.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),p?.(),(T=v)==null||T.disconnect(),v=null,u&&cancelAnimationFrame(y)}}const zbe=vbe,Lbe=bbe,Fbe=mbe,Ube=wbe,Vbe=gbe,qbe=Sbe,Bbe=(e,t,n)=>{const r=new Map,o={platform:$be,...n},i={...o.platform,_c:r};return pbe(e,t,{...o,platform:i})};var Hbe=typeof document<"u",Kbe=function(){},vy=Hbe?A.useLayoutEffect:Kbe;function o0(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 n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!o0(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!o0(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function l8(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function PP(e,t){const n=l8(e);return Math.round(t*n)/n}function qS(e){const t=A.useRef(e);return vy(()=>{t.current=e}),t}function Gbe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:c=!0,whileElementsMounted:u,open:f}=e,[h,p]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=A.useState(r);o0(g,r)||v(r);const[y,x]=A.useState(null),[w,T]=A.useState(null),b=A.useCallback(V=>{V!==E.current&&(E.current=V,x(V))},[]),_=A.useCallback(V=>{V!==O.current&&(O.current=V,T(V))},[]),S=i||y,C=a||w,E=A.useRef(null),O=A.useRef(null),j=A.useRef(h),P=u!=null,$=qS(u),I=qS(o),L=qS(f),F=A.useCallback(()=>{if(!E.current||!O.current)return;const V={placement:t,strategy:n,middleware:g};I.current&&(V.platform=I.current),Bbe(E.current,O.current,V).then(oe=>{const ne={...oe,isPositioned:L.current!==!1};J.current&&!o0(j.current,ne)&&(j.current=ne,gs.flushSync(()=>{p(ne)}))})},[g,t,n,I,L]);vy(()=>{f===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,p(V=>({...V,isPositioned:!1})))},[f]);const J=A.useRef(!1);vy(()=>(J.current=!0,()=>{J.current=!1}),[]),vy(()=>{if(S&&(E.current=S),C&&(O.current=C),S&&C){if($.current)return $.current(S,C,F);F()}},[S,C,F,$,P]);const ee=A.useMemo(()=>({reference:E,floating:O,setReference:b,setFloating:_}),[b,_]),Z=A.useMemo(()=>({reference:S,floating:C}),[S,C]),H=A.useMemo(()=>{const V={position:n,left:0,top:0};if(!Z.floating)return V;const oe=PP(Z.floating,h.x),ne=PP(Z.floating,h.y);return c?{...V,transform:"translate("+oe+"px, "+ne+"px)",...l8(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:oe,top:ne}},[n,c,Z.floating,h.x,h.y]);return A.useMemo(()=>({...h,update:F,refs:ee,elements:Z,floatingStyles:H}),[h,F,ee,Z,H])}const Zbe=(e,t)=>({...zbe(e),options:[e,t]}),Ybe=(e,t)=>({...Lbe(e),options:[e,t]}),Wbe=(e,t)=>({...qbe(e),options:[e,t]}),Xbe=(e,t)=>({...Fbe(e),options:[e,t]}),Qbe=(e,t)=>({...Ube(e),options:[e,t]}),Jbe=(e,t)=>({...Vbe(e),options:[e,t]}),e1e={intentional:"onClick",sloppy:"onPointerDown"};function t1e(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function M2(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("referenceElement"),a=n.useState("domReferenceElement"),{onOpenChange:c,dataRef:u}=n.context,{enabled:f=!0,escapeKey:h=!0,outsidePress:p=!0,outsidePressEvent:g="sloppy",referencePress:v=!1,referencePressEvent:y="sloppy",ancestorScroll:x=!1,bubbles:w,externalTree:T}=t,b=Mc(T),_=We(typeof p=="function"?p:()=>!1),S=typeof p=="function"?_:p,C=A.useRef(!1),{escapeKey:E,outsidePress:O}=t1e(w),j=A.useRef(null),P=go(),$=go(),I=We(()=>{$.clear(),u.current.insideReactTree=!1}),L=A.useRef(!1),F=A.useRef(""),J=We(X=>{F.current=X.pointerType}),ee=We(()=>{const X=F.current,fe=X==="pen"||!X?"mouse":X,he=typeof g=="function"?g():g;return typeof he=="string"?he:he[fe]}),Z=We(X=>{if(!r||!f||!h||X.key!=="Escape"||L.current)return;const fe=u.current.floatingContext?.nodeId,he=b?sc(b.nodesRef.current,fe):[];if(!E&&he.length>0){let De=!0;if(he.forEach(Ue=>{Ue.context?.open&&!Ue.context.dataRef.current.__escapeKeyBubbles&&(De=!1)}),!De)return}const Pe=_ve(X)?X.nativeEvent:X,ye=$t(vz,Pe);n.setOpen(!1,ye),!E&&!ye.isPropagationAllowed&&X.stopPropagation()}),H=We(X=>{const fe=ee();return fe==="intentional"&&X.type!=="click"||fe==="sloppy"&&X.type==="click"}),V=We(()=>{u.current.insideReactTree=!0,$.start(0,I)}),oe=We((X,fe=!1)=>{if(H(X)){I();return}if(u.current.insideReactTree){I();return}if(ee()==="intentional"&&fe||typeof S=="function"&&!S(X))return;const he=xo(X),Pe=`[${Lh("inert")}]`,ye=br(n.select("floatingElement")).querySelectorAll(Pe),De=n.context.triggerElements;if(he&&(De.hasElement(he)||De.hasMatchingElement(Ze=>Jt(Ze,he))))return;let Ue=Cn(he)?he:null;for(;Ue&&!zi(Ue);){const Ze=Ui(Ue);if(zi(Ze)||!Cn(Ze))break;Ue=Ze}if(ye.length&&Cn(he)&&!Eve(he)&&!Jt(he,n.select("floatingElement"))&&Array.from(ye).every(Ze=>!Jt(Ue,Ze)))return;if(Yn(he)&&!("touches"in X)){const Ze=zi(he),Oe=Bo(he),ze=/auto|scroll/,Be=Ze||ze.test(Oe.overflowX),dt=Ze||ze.test(Oe.overflowY),Ce=Be&&he.clientWidth>0&&he.scrollWidth>he.clientWidth,me=dt&&he.clientHeight>0&&he.scrollHeight>he.clientHeight,Me=Oe.direction==="rtl",Ve=me&&(Me?X.offsetX<=he.offsetWidth-he.clientWidth:X.offsetX>he.clientWidth),it=Ce&&X.offsetY>he.clientHeight;if(Ve||it)return}const ve=u.current.floatingContext?.nodeId,Fe=b&&sc(b.nodesRef.current,ve).some(Ze=>Rs(X,Ze.context?.elements.floating));if(Rs(X,n.select("floatingElement"))||Rs(X,n.select("domReferenceElement"))||Fe)return;const Le=b?sc(b.nodesRef.current,ve):[];if(Le.length>0){let Ze=!0;if(Le.forEach(Oe=>{Oe.context?.open&&!Oe.context.dataRef.current.__outsidePressBubbles&&(Ze=!1)}),!Ze)return}n.setOpen(!1,$t(S2,X)),I()}),ne=We(X=>{ee()!=="sloppy"||X.pointerType==="touch"||!n.select("open")||!f||Rs(X,n.select("floatingElement"))||Rs(X,n.select("domReferenceElement"))||oe(X)}),D=We(X=>{if(ee()!=="sloppy"||!n.select("open")||!f||Rs(X,n.select("floatingElement"))||Rs(X,n.select("domReferenceElement")))return;const fe=X.touches[0];fe&&(j.current={startTime:Date.now(),startX:fe.clientX,startY:fe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},P.start(1e3,()=>{j.current&&(j.current.dismissOnTouchEnd=!1,j.current.dismissOnMouseDown=!1)}))}),q=We(X=>{const fe=xo(X);function he(){D(X),fe?.removeEventListener(X.type,he)}fe?.addEventListener(X.type,he)}),U=We(X=>{const fe=C.current;if(C.current=!1,P.clear(),X.type==="mousedown"&&j.current&&!j.current.dismissOnMouseDown)return;const he=xo(X);function Pe(){X.type==="pointerdown"?ne(X):oe(X,fe),he?.removeEventListener(X.type,Pe)}he?.addEventListener(X.type,Pe)}),N=We(X=>{if(ee()!=="sloppy"||!j.current||Rs(X,n.select("floatingElement"))||Rs(X,n.select("domReferenceElement")))return;const fe=X.touches[0];if(!fe)return;const he=Math.abs(fe.clientX-j.current.startX),Pe=Math.abs(fe.clientY-j.current.startY),ye=Math.sqrt(he*he+Pe*Pe);ye>5&&(j.current.dismissOnTouchEnd=!0),ye>10&&(oe(X),P.clear(),j.current=null)}),G=We(X=>{const fe=xo(X);function he(){N(X),fe?.removeEventListener(X.type,he)}fe?.addEventListener(X.type,he)}),te=We(X=>{ee()!=="sloppy"||!j.current||Rs(X,n.select("floatingElement"))||Rs(X,n.select("domReferenceElement"))||(j.current.dismissOnTouchEnd&&oe(X),P.clear(),j.current=null)}),re=We(X=>{const fe=xo(X);function he(){te(X),fe?.removeEventListener(X.type,he)}fe?.addEventListener(X.type,he)});A.useEffect(()=>{if(!r||!f)return;u.current.__escapeKeyBubbles=E,u.current.__outsidePressBubbles=O;const X=new al;function fe(Ue){n.setOpen(!1,$t(il,Ue))}function he(){X.clear(),L.current=!0}function Pe(){X.start(k0()?5:0,()=>{L.current=!1})}const ye=br(o);ye.addEventListener("pointerdown",J,!0),h&&(ye.addEventListener("keydown",Z),ye.addEventListener("compositionstart",he),ye.addEventListener("compositionend",Pe)),S&&(ye.addEventListener("click",U,!0),ye.addEventListener("pointerdown",U,!0),ye.addEventListener("touchstart",q,!0),ye.addEventListener("touchmove",G,!0),ye.addEventListener("touchend",re,!0),ye.addEventListener("mousedown",U,!0));let De=[];return x&&(Cn(a)&&(De=Fa(a)),Cn(o)&&(De=De.concat(Fa(o))),!Cn(i)&&i&&i.contextElement&&(De=De.concat(Fa(i.contextElement)))),De=De.filter(Ue=>Ue!==ye.defaultView?.visualViewport),De.forEach(Ue=>{Ue.addEventListener("scroll",fe,{passive:!0})}),()=>{ye.removeEventListener("pointerdown",J,!0),h&&(ye.removeEventListener("keydown",Z),ye.removeEventListener("compositionstart",he),ye.removeEventListener("compositionend",Pe)),S&&(ye.removeEventListener("click",U,!0),ye.removeEventListener("pointerdown",U,!0),ye.removeEventListener("touchstart",q,!0),ye.removeEventListener("touchmove",G,!0),ye.removeEventListener("touchend",re,!0),ye.removeEventListener("mousedown",U,!0)),De.forEach(Ue=>{Ue.removeEventListener("scroll",fe)}),X.clear(),C.current=!1}},[u,o,i,a,h,S,r,c,x,f,E,O,Z,oe,U,ne,q,G,re,J,n]),A.useEffect(I,[S,I]);const de=A.useMemo(()=>({onKeyDown:Z,...v&&{[e1e[y]]:X=>{n.setOpen(!1,$t(Ha,X.nativeEvent))},...y!=="intentional"&&{onClick(X){n.setOpen(!1,$t(Ha,X.nativeEvent))}}}}),[Z,n,v,y]),we=We(X=>{const fe=xo(X.nativeEvent);!Jt(n.select("floatingElement"),fe)||X.button!==0||(C.current=!0)}),Ee=We(X=>{!r||!f||X.button!==0||(C.current=!0)}),se=A.useMemo(()=>({onKeyDown:Z,onPointerDown:we,onMouseDown:we,onMouseUp:we,onClickCapture:V,onMouseDownCapture(X){V(),Ee(X)},onPointerDownCapture(X){V(),Ee(X)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[Z,we,V,Ee]);return A.useMemo(()=>f?{reference:de,floating:se,trigger:de}:{},[f,de,se])}var s0=Symbol("NOT_FOUND");function n1e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function r1e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function o1e(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var NP=e=>Array.isArray(e)?e:[e];function s1e(e){const t=Array.isArray(e[0])?e[0]:e;return o1e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function i1e(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}function a1e(e){let t;return{get(n){return t&&e(t.key,n)?t.value:s0},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function l1e(e,t){let n=[];function r(c){const u=n.findIndex(f=>t(c,f.key));if(u>-1){const f=n[u];return u>0&&(n.splice(u,1),n.unshift(f)),f.value}return s0}function o(c,u){r(c)===s0&&(n.unshift({key:c,value:u}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var c1e=(e,t)=>e===t;function u1e(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function f1e(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=c1e,maxSize:o=1,resultEqualityCheck:i}=n,a=u1e(r);let c=0;const u=o<=1?a1e(a):l1e(o,a);function f(){let h=u.get(arguments);if(h===s0){if(h=e.apply(null,arguments),c++,i){const g=u.getEntries().find(v=>i(v.value,h));g&&(h=g.value,c!==0&&c--)}u.put(arguments,h)}return h}return f.clearCache=()=>{u.clear(),f.resetResultsCount()},f.resultsCount=()=>c,f.resetResultsCount=()=>{c=0},f}var d1e=class{constructor(e){this.value=e}deref(){return this.value}},h1e=typeof WeakRef<"u"?WeakRef:d1e,p1e=0,DP=1;function Gg(){return{s:p1e,v:void 0,o:null,p:null}}function c8(e,t={}){let n=Gg();const{resultEqualityCheck:r}=t;let o,i=0;function a(){let c=n;const{length:u}=arguments;for(let p=0,g=u;p<g;p++){const v=arguments[p];if(typeof v=="function"||typeof v=="object"&&v!==null){let y=c.o;y===null&&(c.o=y=new WeakMap);const x=y.get(v);x===void 0?(c=Gg(),y.set(v,c)):c=x}else{let y=c.p;y===null&&(c.p=y=new Map);const x=y.get(v);x===void 0?(c=Gg(),y.set(v,c)):c=x}}const f=c;let h;if(c.s===DP)h=c.v;else if(h=e.apply(null,arguments),i++,r){const p=o?.deref?.()??o;p!=null&&r(p,h)&&(h=p,i!==0&&i--),o=typeof h=="object"&&h!==null||typeof h=="function"?new h1e(h):h}return f.s=DP,f.v=h,h}return a.clearCache=()=>{n=Gg(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function u8(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,c,u={},f=o.pop();typeof f=="object"&&(u=f,f=o.pop()),n1e(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...u},{memoize:p,memoizeOptions:g=[],argsMemoize:v=c8,argsMemoizeOptions:y=[]}=h,x=NP(g),w=NP(y),T=s1e(o),b=p(function(){return i++,f.apply(null,arguments)},...x),_=v(function(){a++;const C=i1e(T,arguments);return c=b.apply(null,C),c},...w);return Object.assign(_,{resultFunc:f,memoizedResultFunc:b,dependencies:T,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>c,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:p,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var m1e=u8(c8),g1e=Object.assign((e,t=m1e)=>{r1e(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((a,c,u)=>(a[n[u]]=c,a),{}))},{withTypes:()=>g1e});u8({memoize:f1e,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Xe=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error(eo(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var BS={exports:{}},HS={};var $P;function y1e(){if($P)return HS;$P=1;var e=Sf();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function c(p,g){var v=g(),y=r({inst:{value:v,getSnapshot:g}}),x=y[0].inst,w=y[1];return i(function(){x.value=v,x.getSnapshot=g,u(x)&&w({inst:x})},[p,v,g]),o(function(){return u(x)&&w({inst:x}),p(function(){u(x)&&w({inst:x})})},[p]),a(v),v}function u(p){var g=p.getSnapshot;p=p.value;try{var v=g();return!n(p,v)}catch{return!0}}function f(p,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return HS.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,HS}var IP;function f8(){return IP||(IP=1,BS.exports=y1e()),BS.exports}var v1e=f8(),KS={exports:{}},GS={};var zP;function b1e(){if(zP)return GS;zP=1;var e=Sf(),t=f8();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,c=e.useMemo,u=e.useDebugValue;return GS.useSyncExternalStoreWithSelector=function(f,h,p,g,v){var y=i(null);if(y.current===null){var x={hasValue:!1,value:null};y.current=x}else x=y.current;y=c(function(){function T(E){if(!b){if(b=!0,_=E,E=g(E),v!==void 0&&x.hasValue){var O=x.value;if(v(O,E))return S=O}return S=E}if(O=S,r(_,E))return O;var j=g(E);return v!==void 0&&v(O,j)?(_=E,O):(_=E,S=j)}var b=!1,_,S,C=p===void 0?null:p;return[function(){return T(h())},C===null?void 0:function(){return T(C())}]},[h,p,g,v]);var w=o(f,y[0],y[1]);return a(function(){x.hasValue=!0,x.value=w},[w]),u(w),w},GS}var LP;function S1e(){return LP||(LP=1,KS.exports=b1e()),KS.exports}var w1e=S1e();const x1e=a_(19),E1e=x1e?_1e:C1e;function yt(e,t,n,r,o){return E1e(e,t,n,r,o)}function _1e(e,t,n,r,o){const i=A.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return v1e.useSyncExternalStore(e.subscribe,i,i)}function C1e(e,t,n,r,o){return w1e.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class Wu{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 n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){Wu.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Wu.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Wu.prototype.setState.call(this,t)}}class j2 extends Wu{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){A.useDebugValue(t),Je(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;Je(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);Je(()=>{n.update(t)},[n,...r])}useControlledProp(t,n,r){A.useDebugValue(t);const o=this,i=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,i),!i&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),Je(()=>{i&&!Object.is(o.state[t],n)&&super.setState({...o.state,[t]:n})},[o,t,n,r,i])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,o)=>{const i=this.selectors[t];return i(this.state,n,r,o)};useState=(t,n,r,o)=>{A.useDebugValue(t);const i=this.selectors[t];return yt(this,i,n,r,o)};useContextCallback(t,n){A.useDebugValue(t);const r=We(n??Uo);this.context[t]=r}useStateSetter(t){const n=A.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(i=>{const a=r(i);if(!Object.is(o,a)){const c=o;o=a,n(a,c,this)}})}}const T1e={open:Xe(e=>e.open),domReferenceElement:Xe(e=>e.domReferenceElement),referenceElement:Xe(e=>e.positionReference??e.referenceElement),floatingElement:Xe(e=>e.floatingElement),floatingId:Xe(e=>e.floatingId)};class P2 extends j2{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:i,...a}=t;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:Kz(),nested:n,noEmit:r,triggerElements:i},T1e)}setOpen=(t,n)=>{if((!t||!this.state.open||kz(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function W0(e,t=!1,n=!1){const[r,o]=A.useState(e&&t?"idle":void 0),[i,a]=A.useState(e);return e&&!i&&(a(!0),o("starting")),!e&&i&&r!=="ending"&&!n&&o("ending"),!e&&!i&&r==="ending"&&o(void 0),Je(()=>{if(!e&&i&&r!=="ending"&&n){const c=Zs.request(()=>{o("ending")});return()=>{Zs.cancel(c)}}},[e,i,r,n]),Je(()=>{if(!e||t)return;const c=Zs.request(()=>{o(void 0)});return()=>{Zs.cancel(c)}},[t,e]),Je(()=>{if(!e||!t)return;e&&i&&r!=="idle"&&o("starting");const c=Zs.request(()=>{o("idle")});return()=>{Zs.cancel(c)}},[t,e,i,o,r]),A.useMemo(()=>({mounted:i,setMounted:a,transitionStatus:r}),[i,r])}function d8(e,t=!1,n=!0){const r=Z0();return We((o,i=null)=>{r.cancel();function a(){gs.flushSync(o)}const c=$i(e);if(c==null)return;const u=c;if(typeof u.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let p=function(){const v=Ih.startingStyle;if(!u.hasAttribute(v)){r.request(g);return}const y=new MutationObserver(()=>{u.hasAttribute(v)||(y.disconnect(),g())});y.observe(u,{attributes:!0,attributeFilter:[v]}),i?.addEventListener("abort",()=>y.disconnect(),{once:!0})},g=function(){Promise.all(u.getAnimations().map(v=>v.finished)).then(()=>{i?.aborted||a()}).catch(()=>{const v=u.getAnimations();if(n){if(i?.aborted)return;a()}else v.length>0&&v.some(y=>y.pending||y.playState!=="finished")&&g()})};var f=p,h=g;if(t){p();return}r.request(g)}})}function jc(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=We(o),a=d8(r,n,!1);A.useEffect(()=>{if(!t)return;const c=new AbortController;return a(i,c.signal),()=>{c.abort()}},[t,n,i,a])}function R1e(e,t){const n=A.useRef(null),r=A.useRef(null);return A.useCallback(o=>{if(e!==void 0){if(n.current!==null){const i=n.current,a=r.current,c=t.context.triggerElements.getById(i);a&&c===a&&t.context.triggerElements.delete(i),n.current=null,r.current=null}o!==null&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o))}},[t,e])}function O1e(e,t,n,r){const o=n.useState("isMountedByTrigger",e),i=R1e(e,n),a=We(c=>{if(i(c),!c||!n.select("open"))return;const u=n.select("activeTriggerId");if(u===e){n.update({activeTriggerElement:c,...r});return}u==null&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return Je(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:o}}function h8(e){const t=e.useState("open");Je(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,o]=n.value;e.update({activeTriggerId:r,activeTriggerElement:o})}}},[t,e])}function p8(e,t,n){const{mounted:r,setMounted:o,transitionStatus:i}=W0(e);t.useSyncedValues({mounted:r,transitionStatus:i});const a=We(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),c=t.useState("preventUnmountingOnClose");return jc({enabled:!c,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:i}}class X0{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function A1e(){return new P2({open:!1,floatingElement:null,referenceElement:null,triggerElements:new X0,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function m8(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:A1e(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Mr,inactiveTriggerProps:Mr,popupProps:Mr}}const g8={open:Xe(e=>e.open),mounted:Xe(e=>e.mounted),transitionStatus:Xe(e=>e.transitionStatus),floatingRootContext:Xe(e=>e.floatingRootContext),preventUnmountingOnClose:Xe(e=>e.preventUnmountingOnClose),payload:Xe(e=>e.payload),activeTriggerId:Xe(e=>e.activeTriggerId),activeTriggerElement:Xe(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Xe((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:Xe((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:Xe((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:Xe((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Xe(e=>e.popupProps),popupElement:Xe(e=>e.popupElement),positionerElement:Xe(e=>e.positionerElement)};function y8(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=Ff(),i=yl()!=null,a=Co(()=>new P2({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new X0,floatingId:o,nested:i,noEmit:e.noEmit||!1})).current;return Je(()=>{const c={open:t,floatingId:o};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=Cn(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),a.update(c)},[t,o,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=i,a.context.noEmit=e.noEmit||!1,a}function k1e(e={}){const{nodeId:t,externalTree:n}=e,r=y8(e),o=e.rootContext||r,i={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[a,c]=A.useState(null),u=A.useRef(null),f=Mc(n);Je(()=>{i.domReference&&(u.current=i.domReference)},[i.domReference]);const h=Gbe({...e,elements:{...i,...a&&{reference:a}}}),p=A.useCallback(O=>{const j=Cn(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;c(j),h.refs.setReference(j)},[h.refs]),[g,v]=A.useState(null),[y,x]=A.useState(null);o.useSyncedValue("referenceElement",g),o.useSyncedValue("domReferenceElement",Cn(g)?g:null),o.useSyncedValue("floatingElement",y);const w=A.useCallback(O=>{(Cn(O)||O===null)&&(u.current=O,v(O)),(Cn(h.refs.reference.current)||h.refs.reference.current===null||O!==null&&!Cn(O))&&h.refs.setReference(O)},[h.refs,v]),T=A.useCallback(O=>{x(O),h.refs.setFloating(O)},[h.refs]),b=A.useMemo(()=>({...h.refs,setReference:w,setFloating:T,setPositionReference:p,domReference:u}),[h.refs,w,T,p]),_=A.useMemo(()=>({...h.elements,domReference:i.domReference}),[h.elements,i.domReference]),S=o.useState("open"),C=o.useState("floatingId"),E=A.useMemo(()=>({...h,dataRef:o.context.dataRef,open:S,onOpenChange:o.setOpen,events:o.context.events,floatingId:C,refs:b,elements:_,nodeId:t,rootStore:o}),[h,b,_,t,o,S,C]);return Je(()=>{o.context.dataRef.current.floatingContext=E;const O=f?.nodesRef.current.find(j=>j.id===t);O&&(O.context=E)}),A.useMemo(()=>({...h,context:E,refs:b,elements:_,rootStore:o}),[h,b,_,E,o])}function v8(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,i=Ff(),a=yl()!=null,c=t.useState("open"),u=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,p=Co(()=>new P2({open:c,referenceElement:u,floatingElement:f,triggerElements:h,onOpenChange:o,floatingId:i,nested:a,noEmit:n})).current;return Je(()=>{const g={open:c,floatingId:i,referenceElement:u,floatingElement:f};Cn(u)&&(g.domReferenceElement=u),p.state.positionReference===p.state.referenceElement&&(g.positionReference=u),p.update(g)},[c,i,u,f,p]),p.context.onOpenChange=o,p.context.nested=a,p.context.noEmit=n,p}const Fx=Lh("safe-polygon"),M1e=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${Tz}`;function j1e(e){return e?!!e.closest(M1e):!1}function b8(e){const t=A.useRef(void 0),n=A.useRef(!1),r=A.useRef(void 0),o=A.useRef(!0),i=A.useRef(!1),a=A.useRef(()=>{}),c=A.useRef(!1),u=go(),f=go(),h=A.useRef(void 0);return A.useMemo(()=>{const p=e.context.dataRef.current;return p.hoverInteractionState||(p.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:r,blockMouseMoveRef:o,performedPointerEventsMutationRef:i,unbindMouseMoveRef:a,restTimeoutPendingRef:c,openChangeTimeout:u,restTimeout:f,handleCloseOptionsRef:h}),p.hoverInteractionState},[e,t,n,r,o,i,a,c,u,f,h])}const P1e=new Set(["click","mousedown"]);function N1e(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),{dataRef:a}=n.context,{enabled:c=!0,closeDelay:u=0,externalTree:f}=t,{pointerTypeRef:h,interactedInsideRef:p,handlerRef:g,performedPointerEventsMutationRef:v,unbindMouseMoveRef:y,restTimeoutPendingRef:x,openChangeTimeout:w,handleCloseOptionsRef:T}=b8(n),b=Mc(f),_=yl(),S=We(()=>p.current?!0:a.current.openEvent?P1e.has(a.current.openEvent.type):!1),C=We(()=>{const $=a.current.openEvent?.type;return $?.includes("mouse")&&$!=="mousedown"}),E=A.useCallback(($,I=!0)=>{const L=D1e(u,h.current);L&&!g.current?w.start(L,()=>n.setOpen(!1,$t(Lo,$))):I&&(w.clear(),n.setOpen(!1,$t(Lo,$)))},[u,g,n,h,w]),O=We(()=>{y.current(),g.current=void 0}),j=We(()=>{if(v.current){const $=br(o).body;$.style.pointerEvents="",$.removeAttribute(Fx),v.current=!1}}),P=We($=>{const I=xo($);if(!j1e(I)){p.current=!1;return}p.current=!0});Je(()=>{r||(h.current=void 0,x.current=!1,p.current=!1,O(),j())},[r,h,x,p,O,j]),A.useEffect(()=>()=>{O()},[O]),A.useEffect(()=>j,[j]),Je(()=>{if(c&&r&&T.current?.blockPointerEvents&&C()&&Cn(i)&&o){v.current=!0;const $=br(o).body;$.setAttribute(Fx,"");const I=i,L=o,F=b?.nodesRef.current.find(J=>J.id===_)?.context?.elements.floating;return F&&(F.style.pointerEvents=""),$.style.pointerEvents="none",I.style.pointerEvents="auto",L.style.pointerEvents="auto",()=>{$.style.pointerEvents="",I.style.pointerEvents="",L.style.pointerEvents=""}}},[c,r,i,o,T,C,b,_,v]),A.useEffect(()=>{if(!c)return;function $(J){if(S()||!a.current.floatingContext||!n.select("open"))return;const ee=n.context.triggerElements;J.relatedTarget&&ee.hasElement(J.relatedTarget)||(j(),O(),S()||E(J))}function I(J){w.clear(),j(),g.current?.(J),O()}function L(J){S()||E(J,!1)}const F=o;return F&&(F.addEventListener("mouseleave",$),F.addEventListener("mouseenter",I),F.addEventListener("mouseleave",L),F.addEventListener("pointerdown",P,!0)),()=>{F&&(F.removeEventListener("mouseleave",$),F.removeEventListener("mouseenter",I),F.removeEventListener("mouseleave",L),F.removeEventListener("pointerdown",P,!0))}})}function D1e(e,t){return t&&!pf(t)?0:typeof e=="function"?e():e}function ZS(e){return typeof e=="function"?e():e}const $1e={current:null};function I1e(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:o}=n.context,{enabled:i=!0,delay:a=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:h=!0,triggerElementRef:p=$1e,externalTree:g,isActiveTrigger:v=!0}=t,y=Mc(g),{pointerTypeRef:x,interactedInsideRef:w,handlerRef:T,blockMouseMoveRef:b,performedPointerEventsMutationRef:_,unbindMouseMoveRef:S,restTimeoutPendingRef:C,openChangeTimeout:E,restTimeout:O,handleCloseOptionsRef:j}=b8(n),P=kr(c),$=kr(a),I=kr(f);v&&(j.current=P.current?.__options);const L=We(()=>w.current?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),F=A.useCallback((H,V=!0)=>{const oe=LS($.current,"close",x.current);oe&&!T.current?E.start(oe,()=>n.setOpen(!1,$t(Lo,H))):V&&(E.clear(),n.setOpen(!1,$t(Lo,H)))},[$,T,n,x,E]),J=We(()=>{S.current(),T.current=void 0}),ee=We(()=>{if(_.current){const H=br(n.select("domReferenceElement")).body;H.style.pointerEvents="",H.removeAttribute(Fx),_.current=!1}});A.useEffect(()=>{if(!i)return;function H(V){V.open||(E.clear(),O.clear(),b.current=!0,C.current=!1)}return o.on("openchange",H),()=>{o.off("openchange",H)}},[i,o,E,O,b,C]);const Z=We(H=>{if(L()||!r.current.floatingContext)return;const V=n.context.triggerElements;if(H.relatedTarget&&V.hasElement(H.relatedTarget))return;const oe=p.current;P.current?.({...r.current.floatingContext,tree:y,x:H.clientX,y:H.clientY,onClose(){ee(),J(),!L()&&oe===n.select("domReferenceElement")&&F(H)}})(H)});return A.useEffect(()=>{if(!i)return;const H=p.current??(v?n.select("domReferenceElement"):null);if(!Cn(H))return;function V(D){if(E.clear(),b.current=!1,u&&!pf(x.current)||ZS(I.current)>0&&!LS($.current,"open"))return;const q=LS($.current,"open",x.current),U=n.select("domReferenceElement"),N=n.context.triggerElements,G=(N.hasElement(D.target)||N.hasMatchingElement(we=>Jt(we,D.target)))&&(!U||!Jt(U,D.target)),te=D.currentTarget??null,re=n.select("open"),de=!re||G;G&&re?n.setOpen(!0,$t(Lo,D,te)):q?E.start(q,()=>{de&&n.setOpen(!0,$t(Lo,D,te))}):de&&n.setOpen(!0,$t(Lo,D,te))}function oe(D){if(L()){ee();return}S.current();const q=n.select("domReferenceElement"),U=br(q);O.clear(),C.current=!1;const N=n.context.triggerElements;if(D.relatedTarget&&N.hasElement(D.relatedTarget))return;if(P.current&&r.current.floatingContext){n.select("open")||E.clear();const te=p.current;T.current=P.current({...r.current.floatingContext,tree:y,x:D.clientX,y:D.clientY,onClose(){ee(),J(),!L()&&te===n.select("domReferenceElement")&&F(D,!0)}});const re=T.current;re(D),U.addEventListener("mousemove",re),S.current=()=>{U.removeEventListener("mousemove",re)};return}(x.current!=="touch"||!Jt(n.select("floatingElement"),D.relatedTarget))&&F(D)}function ne(D){Z(D)}return n.select("open")&&H.addEventListener("mouseleave",ne),h&&H.addEventListener("mousemove",V,{once:!0}),H.addEventListener("mouseenter",V),H.addEventListener("mouseleave",oe),()=>{H.removeEventListener("mouseleave",ne),h&&H.removeEventListener("mousemove",V),H.removeEventListener("mouseenter",V),H.removeEventListener("mouseleave",oe)}},[J,ee,b,r,$,F,n,i,P,Z,v,L,u,h,x,I,O,C,E,p,y,S,T]),A.useMemo(()=>{function H(V){x.current=V.pointerType}return{onPointerDown:H,onPointerEnter:H,onMouseMove(V){const{nativeEvent:oe}=V,ne=V.currentTarget,D=n.select("domReferenceElement"),q=n.context.triggerElements,U=n.select("open"),N=(q.hasElement(V.target)||q.hasMatchingElement(te=>Jt(te,V.target)))&&(!D||!Jt(D,V.target));if(u&&!pf(x.current)||U&&!N||ZS(I.current)===0||!N&&C.current&&V.movementX**2+V.movementY**2<2)return;O.clear();function G(){if(C.current=!1,L())return;const te=n.select("open");!b.current&&(!te||N)&&n.setOpen(!0,$t(Lo,oe,ne))}x.current==="touch"?gs.flushSync(()=>{G()}):N&&U?G():(C.current=!0,O.start(ZS(I.current),G))}}},[b,L,u,n,x,I,O,C])}function Q0(e=[]){const t=e.map(f=>f?.reference),n=e.map(f=>f?.floating),r=e.map(f=>f?.item),o=e.map(f=>f?.trigger),i=A.useCallback(f=>Zg(f,e,"reference"),t),a=A.useCallback(f=>Zg(f,e,"floating"),n),c=A.useCallback(f=>Zg(f,e,"item"),r),u=A.useCallback(f=>Zg(f,e,"trigger"),o);return A.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:c,getTriggerProps:u}),[i,a,c,u])}function Zg(e,t,n){const r=new Map,o=n==="item",i={};n==="floating"&&(i.tabIndex=-1,i[Px]="");for(const a in e)o&&e&&(a===_z||a===Cz)||(i[a]=e[a]);for(let a=0;a<t.length;a+=1){let c;const u=t[a]?.[n];typeof u=="function"?c=e?u(e):null:c=u,c&&FP(i,c,o,r)}return FP(i,e,o,r),i}function FP(e,t,n,r){for(const o in t){const i=t[o];n&&(o===_z||o===Cz)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof i=="function"&&(r.get(o)?.push(i),e[o]=(...a)=>r.get(o)?.map(c=>c(...a)).find(c=>c!==void 0))):e[o]=i)}}const z1e="Escape";function J0(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Yg(e,t){return J0(t,e===x2||e===wp,e===Ka||e===Ga)}function YS(e,t,n){return J0(t,e===wp,n?e===Ka:e===Ga)||e==="Enter"||e===" "||e===""}function L1e(e,t,n){return J0(t,n?e===Ka:e===Ga,e===wp)}function F1e(e,t,n,r){const o=n?e===Ga:e===Ka,i=e===x2;return t==="both"||t==="horizontal"&&r&&r>1?e===z1e:J0(t,o,i)}function U1e(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),i=n.useState("domReferenceElement"),a=n.context.dataRef,{listRef:c,activeIndex:u,onNavigate:f=()=>{},enabled:h=!0,selectedIndex:p=null,allowEscape:g=!1,loopFocus:v=!1,nested:y=!1,rtl:x=!1,virtual:w=!1,focusItemOnOpen:T="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:_=!0,disabledIndices:S=void 0,orientation:C="vertical",parentOrientation:E,cols:O=1,scrollItemIntoView:j=!0,itemSizes:P,dense:$=!1,id:I,resetOnPointerLeave:L=!0,externalTree:F}=t,J=zh(o),ee=kr(J),Z=yl(),H=Mc(F);Je(()=>{a.current.orientation=C},[a,C]);const V=Nx(i),oe=A.useRef(T),ne=A.useRef(p??-1),D=A.useRef(null),q=A.useRef(!0),U=We(Oe=>{f(ne.current===-1?null:ne.current,Oe)}),N=A.useRef(U),G=A.useRef(!!o),te=A.useRef(r),re=A.useRef(!1),de=A.useRef(!1),we=kr(S),Ee=kr(r),se=kr(j),X=kr(p),fe=kr(L),he=We(()=>{function Oe(Ce){w?H?.events.emit("virtualfocus",Ce):yy(Ce,{sync:re.current,preventScroll:!0})}const ze=c.current[ne.current],Be=de.current;ze&&Oe(ze),(re.current?Ce=>Ce():requestAnimationFrame)(()=>{const Ce=c.current[ne.current]||ze;if(!Ce)return;ze||Oe(Ce);const me=se.current;me&&ye&&(Be||!q.current)&&Ce.scrollIntoView?.(typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me)})});Je(()=>{h&&(r&&o?(ne.current=p??-1,oe.current&&p!=null&&(de.current=!0,U())):G.current&&(ne.current=-1,N.current()))},[h,r,o,p,U]),Je(()=>{if(h){if(!r){re.current=!1;return}if(o)if(u==null){if(re.current=!1,X.current!=null)return;if(G.current&&(ne.current=-1,he()),(!te.current||!G.current)&&oe.current&&(D.current!=null||oe.current===!0&&D.current==null)){let Oe=0;const ze=()=>{c.current[0]==null?(Oe<2&&(Oe?requestAnimationFrame:queueMicrotask)(ze),Oe+=1):(ne.current=D.current==null||YS(D.current,C,x)||y?gy(c):Ix(c),D.current=null,U())};ze()}}else Ku(c,u)||(ne.current=u,he(),de.current=!1)}},[h,r,o,u,X,y,c,C,x,U,he,we]),Je(()=>{if(!h||o||!H||w||!G.current)return;const Oe=H.nodesRef.current,ze=Oe.find(Ce=>Ce.id===Z)?.context?.elements.floating,Be=Ii(br(o)),dt=Oe.some(Ce=>Ce.context&&Jt(Ce.context.elements.floating,Be));ze&&!dt&&q.current&&ze.focus({preventScroll:!0})},[h,o,H,Z,w]),Je(()=>{N.current=U,te.current=r,G.current=!!o}),Je(()=>{r||(D.current=null,oe.current=T)},[r,T]);const Pe=u!=null,ye=A.useMemo(()=>{function Oe(Be){if(!Ee.current)return;const dt=c.current.indexOf(Be.currentTarget);dt!==-1&&ne.current!==dt&&(ne.current=dt,U(Be))}return{onFocus(Be){re.current=!0,Oe(Be)},onClick:({currentTarget:Be})=>Be.focus({preventScroll:!0}),onMouseMove(Be){re.current=!0,de.current=!1,b&&Oe(Be)},onPointerLeave(Be){if(!Ee.current||!q.current||Be.pointerType==="touch")return;re.current=!0;const dt=Be.relatedTarget;!b||c.current.includes(dt)||fe.current&&(ne.current=-1,U(Be),w||ee.current?.focus({preventScroll:!0}))}}},[Ee,ee,b,c,U,fe,w]),De=A.useCallback(()=>E??H?.nodesRef.current.find(Oe=>Oe.id===Z)?.context?.dataRef?.current.orientation,[Z,H,E]),Ue=We(Oe=>{if(q.current=!1,re.current=!0,Oe.which===229||!Ee.current&&Oe.currentTarget===ee.current)return;if(y&&F1e(Oe.key,C,x,O)){Yg(Oe.key,De())||no(Oe),n.setOpen(!1,$t(IS,Oe.nativeEvent)),Yn(i)&&(w?H?.events.emit("virtualfocus",i):i.focus());return}const ze=ne.current,Be=gy(c,S),dt=Ix(c,S);if(V||(Oe.key==="Home"&&(no(Oe),ne.current=Be,U(Oe)),Oe.key==="End"&&(no(Oe),ne.current=dt,U(Oe))),O>1){const Ce=P||Array.from({length:c.current.length},()=>({width:1,height:1})),me=Pz(Ce,O,$),Me=me.findIndex(Ct=>Ct!=null&&!Za(c,Ct,S)),Ve=me.reduce((Ct,Nt,vt)=>Nt!=null&&!Za(c,Nt,S)?vt:Ct,-1),it=me[jz({current:me.map(Ct=>Ct!=null?c.current[Ct]:null)},{event:Oe,orientation:C,loopFocus:v,rtl:x,cols:O,disabledIndices:Dz([...(typeof S!="function"?S:null)||c.current.map((Ct,Nt)=>Za(c,Nt,S)?Nt:void 0),void 0],me),minIndex:Me,maxIndex:Ve,prevIndex:Nz(ne.current>dt?Be:ne.current,Ce,me,O,Oe.key===wp?"bl":Oe.key===(x?Ka:Ga)?"tr":"tl"),stopEvent:!0})];if(it!=null&&(ne.current=it,U(Oe)),C==="both")return}if(Yg(Oe.key,C)){if(no(Oe),r&&!w&&Ii(Oe.currentTarget.ownerDocument)===Oe.currentTarget){ne.current=YS(Oe.key,C,x)?Be:dt,U(Oe);return}YS(Oe.key,C,x)?v?ze>=dt?g&&ze!==c.current.length?ne.current=-1:(re.current=!1,ne.current=Be):ne.current=Kr(c,{startingIndex:ze,disabledIndices:S}):ne.current=Math.min(dt,Kr(c,{startingIndex:ze,disabledIndices:S})):v?ze<=Be?g&&ze!==-1?ne.current=c.current.length:(re.current=!1,ne.current=dt):ne.current=Kr(c,{startingIndex:ze,decrement:!0,disabledIndices:S}):ne.current=Math.max(Be,Kr(c,{startingIndex:ze,decrement:!0,disabledIndices:S})),Ku(c,ne.current)&&(ne.current=-1),U(Oe)}}),ve=A.useMemo(()=>w&&r&&Pe&&{"aria-activedescendant":`${I}-${u}`},[w,r,Pe,I,u]),Fe=A.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...V?{}:ve,onKeyDown(Oe){if(Oe.key==="Tab"&&Oe.shiftKey&&r&&!w){const ze=xo(Oe.nativeEvent);if(ze&&!Jt(ee.current,ze))return;no(Oe),n.setOpen(!1,$t(gc,Oe.nativeEvent)),Yn(i)&&i.focus();return}Ue(Oe)},onPointerMove(){q.current=!0}}),[ve,Ue,ee,C,V,n,r,w,i]),Le=A.useMemo(()=>{function Oe(Be){T==="auto"&&Oz(Be.nativeEvent)&&(oe.current=!w)}function ze(Be){oe.current=T,T==="auto"&&Az(Be.nativeEvent)&&(oe.current=!0)}return{onKeyDown(Be){const dt=n.select("open");q.current=!1;const Ce=Be.key.startsWith("Arrow"),me=L1e(Be.key,De(),x),Me=Yg(Be.key,C),Ve=(y?me:Me)||Be.key==="Enter"||Be.key.trim()==="";if(w&&dt)return Ue(Be);if(!(!dt&&!_&&Ce)){if(Ve){const it=Yg(Be.key,De());D.current=y&&it?null:Be.key}if(y){me&&(no(Be),dt?(ne.current=gy(c,we.current),U(Be)):n.setOpen(!0,$t(IS,Be.nativeEvent,Be.currentTarget)));return}Me&&(X.current!=null&&(ne.current=X.current),no(Be),!dt&&_?n.setOpen(!0,$t(IS,Be.nativeEvent,Be.currentTarget)):Ue(Be),dt&&U(Be))}},onFocus(Be){n.select("open")&&!w&&(ne.current=-1,U(Be))},onPointerDown:ze,onPointerEnter:ze,onMouseDown:Oe,onClick:Oe}},[Ue,we,T,c,y,U,n,_,C,De,x,X,w]),Ze=A.useMemo(()=>({...ve,...Le}),[ve,Le]);return A.useMemo(()=>h?{reference:Ze,floating:Fe,item:ye,trigger:Le}:{},[h,Ze,Fe,Le,ye])}const V1e=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function S8(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingId"),i=n.useState("domReferenceElement"),a=n.useState("floatingElement"),{enabled:c=!0,role:u="dialog"}=t,f=Ff(),h=i?.id||f,p=A.useMemo(()=>zh(a)?.id||o,[a,o]),g=V1e.get(u)??u,y=yl()!=null,x=A.useMemo(()=>g==="tooltip"||u==="label"?Mr:{"aria-haspopup":g==="alertdialog"?"dialog":g,"aria-expanded":"false",...g==="listbox"&&{role:"combobox"},...g==="menu"&&y&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[g,y,u]),w=A.useMemo(()=>g==="tooltip"||u==="label"?{[`aria-${u==="label"?"labelledby":"describedby"}`]:r?p:void 0}:{...x,"aria-expanded":r?"true":"false","aria-controls":r?p:void 0,...g==="menu"&&{id:h}},[g,p,r,h,u,x]),T=A.useMemo(()=>{const _={id:p,...g&&{role:g}};return g==="tooltip"||u==="label"?_:{..._,...g==="menu"&&{"aria-labelledby":h}}},[g,p,h,u]),b=A.useCallback(({active:_,selected:S})=>{const C={role:"option",..._&&{id:`${p}-fui-option`}};switch(u){case"select":case"combobox":return{...C,"aria-selected":S}}return{}},[p,u]);return A.useMemo(()=>c?{reference:w,floating:T,item:b,trigger:x}:{},[c,w,T,x,b])}function q1e(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.context.dataRef,{listRef:i,activeIndex:a,onMatch:c,onTypingChange:u,enabled:f=!0,findMatch:h=null,resetMs:p=750,ignoreKeys:g=af,selectedIndex:v=null}=t,y=go(),x=A.useRef(""),w=A.useRef(v??a??-1),T=A.useRef(null);Je(()=>{r&&(y.clear(),T.current=null,x.current="")},[r,y]),Je(()=>{r&&x.current===""&&(w.current=v??a??-1)},[r,v,a]);const b=We(E=>{E?o.current.typing||(o.current.typing=E,u?.(E)):o.current.typing&&(o.current.typing=E,u?.(E))}),_=We(E=>{function O(L,F,J){const ee=h?h(F,J):F.find(Z=>Z?.toLocaleLowerCase().indexOf(J.toLocaleLowerCase())===0);return ee?L.indexOf(ee):-1}const j=i.current;if(x.current.length>0&&x.current[0]!==" "&&(O(j,j,x.current)===-1?b(!1):E.key===" "&&no(E)),j==null||g.includes(E.key)||E.key.length!==1||E.ctrlKey||E.metaKey||E.altKey)return;r&&E.key!==" "&&(no(E),b(!0)),j.every(L=>L?L[0]?.toLocaleLowerCase()!==L[1]?.toLocaleLowerCase():!0)&&x.current===E.key&&(x.current="",w.current=T.current),x.current+=E.key,y.start(p,()=>{x.current="",w.current=T.current,b(!1)});const $=w.current,I=O(j,[...j.slice(($||0)+1),...j.slice(0,($||0)+1)],x.current);I!==-1?(c?.(I),T.current=I):E.key!==" "&&(x.current="",b(!1))}),S=A.useMemo(()=>({onKeyDown:_}),[_]),C=A.useMemo(()=>({onKeyDown:_,onKeyUp(E){E.key===" "&&b(!1)}}),[_,b]);return A.useMemo(()=>f?{reference:S,floating:C}:{},[f,S,C])}function UP(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,c=i-1;a<i;c=a++){const[u,f]=t[a]||[0,0],[h,p]=t[c]||[0,0];f>=r!=p>=r&&n<=(h-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function B1e(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function H1e(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o=new al;let i=!1,a=null,c=null,u=typeof performance<"u"?performance.now():0;function f(p,g){const v=performance.now(),y=v-u;if(a===null||c===null||y===0)return a=p,c=g,u=v,null;const x=p-a,w=g-c,b=Math.sqrt(x*x+w*w)/y;return a=p,c=g,u=v,b}const h=({x:p,y:g,placement:v,elements:y,onClose:x,nodeId:w,tree:T})=>function(_){function S(){o.clear(),x()}if(o.clear(),!y.domReference||!y.floating||v==null||p==null||g==null)return;const{clientX:C,clientY:E}=_,O=[C,E],j=xo(_),P=_.type==="mouseleave",$=Jt(y.floating,j),I=Jt(y.domReference,j),L=y.domReference.getBoundingClientRect(),F=y.floating.getBoundingClientRect(),J=v.split("-")[0],ee=p>F.right-F.width/2,Z=g>F.bottom-F.height/2,H=B1e(O,L),V=F.width>L.width,oe=F.height>L.height,ne=(V?L:F).left,D=(V?L:F).right,q=(oe?L:F).top,U=(oe?L:F).bottom;if($&&(i=!0,!P))return;if(I&&(i=!1),I&&!P){i=!0;return}if(P&&Cn(_.relatedTarget)&&Jt(y.floating,_.relatedTarget)||T&&sc(T.nodesRef.current,w).some(({context:te})=>te?.open))return;if(J==="top"&&g>=L.bottom-1||J==="bottom"&&g<=L.top+1||J==="left"&&p>=L.right-1||J==="right"&&p<=L.left+1)return S();let N=[];switch(J){case"top":N=[[ne,L.top+1],[ne,F.bottom-1],[D,F.bottom-1],[D,L.top+1]];break;case"bottom":N=[[ne,F.top+1],[ne,L.bottom-1],[D,L.bottom-1],[D,F.top+1]];break;case"left":N=[[F.right-1,U],[F.right-1,q],[L.left+1,q],[L.left+1,U]];break;case"right":N=[[L.right-1,U],[L.right-1,q],[F.left+1,q],[F.left+1,U]];break}function G([te,re]){switch(J){case"top":{const de=[V?te+t/2:ee?te+t*4:te-t*4,re+t+1],we=[V?te-t/2:ee?te+t*4:te-t*4,re+t+1],Ee=[[F.left,ee||V?F.bottom-t:F.top],[F.right,ee?V?F.bottom-t:F.top:F.bottom-t]];return[de,we,...Ee]}case"bottom":{const de=[V?te+t/2:ee?te+t*4:te-t*4,re-t],we=[V?te-t/2:ee?te+t*4:te-t*4,re-t],Ee=[[F.left,ee||V?F.top+t:F.bottom],[F.right,ee?V?F.top+t:F.bottom:F.top+t]];return[de,we,...Ee]}case"left":{const de=[te+t+1,oe?re+t/2:Z?re+t*4:re-t*4],we=[te+t+1,oe?re-t/2:Z?re+t*4:re-t*4];return[...[[Z||oe?F.right-t:F.left,F.top],[Z?oe?F.right-t:F.left:F.right-t,F.bottom]],de,we]}case"right":{const de=[te-t,oe?re+t/2:Z?re+t*4:re-t*4],we=[te-t,oe?re-t/2:Z?re+t*4:re-t*4],Ee=[[Z||oe?F.left+t:F.right,F.top],[Z?oe?F.left+t:F.right:F.left+t,F.bottom]];return[de,we,...Ee]}default:return[]}}if(!UP([C,E],N)){if(i&&!H)return S();if(!P&&r){const te=f(_.clientX,_.clientY);if(te!==null&&te<.1)return S()}UP([C,E],G([p,g]))?!i&&r&&o.start(40,S):S()}};return h.__options={blockPointerEvents:n},h}let K1e=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),G1e=(function(e){return e[e.open=ec.open]="open",e[e.closed=ec.closed]="closed",e[e.startingStyle=ec.startingStyle]="startingStyle",e[e.endingStyle=ec.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const w8=A.createContext(void 0);function Z1e(){const e=A.useContext(w8);if(e===void 0)throw new Error(eo(26));return e}const Xu="ArrowUp",tc="ArrowDown",Uh="ArrowLeft",Qu="ArrowRight",Ep="Home",_p="End",x8=new Set([Uh,Qu]),Y1e=new Set([Uh,Qu,Ep,_p]),E8=new Set([Xu,tc]),W1e=new Set([Xu,tc,Ep,_p]),_8=new Set([...x8,...E8]),X1e=new Set([..._8,Ep,_p]),N2=new Set([Xu,tc,Uh,Qu,Ep,_p]),Q1e="Shift",J1e="Control",eSe="Alt",tSe="Meta",nSe=new Set([Q1e,J1e,eSe,tSe]);function rSe(e){return Yn(e)&&e.tagName==="INPUT"}function VP(e){return!!(rSe(e)&&e.selectionStart!=null||Yn(e)&&e.tagName==="TEXTAREA")}function qP(e,t,n,r){if(!e||!t||!t.scrollTo)return;let o=e.scrollLeft,i=e.scrollTop;const a=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(a&&r!=="vertical"){const u=BP(e,t,"left"),f=Wg(e),h=Wg(t);n==="ltr"&&(u+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight?o=u+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight:u-h.scrollMarginLeft<e.scrollLeft+f.scrollPaddingLeft&&(o=u-h.scrollMarginLeft-f.scrollPaddingLeft)),n==="rtl"&&(u-h.scrollMarginRight<e.scrollLeft+f.scrollPaddingLeft?o=u-h.scrollMarginLeft-f.scrollPaddingLeft:u+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight&&(o=u+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight))}if(c&&r!=="horizontal"){const u=BP(e,t,"top"),f=Wg(e),h=Wg(t);u-h.scrollMarginTop<e.scrollTop+f.scrollPaddingTop?i=u-h.scrollMarginTop-f.scrollPaddingTop:u+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-f.scrollPaddingBottom&&(i=u+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+f.scrollPaddingBottom)}e.scrollTo({left:o,top:i,behavior:"auto"})}function BP(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);)t=t.offsetParent;return o}function Wg(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 oSe={...Lf,...Sp,nestedDialogOpen(e){return e?{[G1e.nestedDialogOpen]:""}:null}},sSe=A.forwardRef(function(t,n){const{className:r,finalFocus:o,initialFocus:i,render:a,...c}=t,{store:u}=zf(),f=u.useState("descriptionElementId"),h=u.useState("disablePointerDismissal"),p=u.useState("floatingRootContext"),g=u.useState("popupProps"),v=u.useState("modal"),y=u.useState("mounted"),x=u.useState("nested"),w=u.useState("nestedOpenDialogCount"),T=u.useState("open"),b=u.useState("openMethod"),_=u.useState("titleElementId"),S=u.useState("transitionStatus"),C=u.useState("role");Z1e(),jc({open:T,ref:u.context.popupRef,onComplete(){T&&u.context.onOpenChangeComplete?.(!0)}});function E(I){return I==="touch"?u.context.popupRef.current:!0}const O=i===void 0?E:i,j=w>0,P=A.useMemo(()=>({open:T,nested:x,transitionStatus:S,nestedDialogOpen:j}),[T,x,S,j]),$=Mn("div",t,{state:P,props:[g,{"aria-labelledby":_??void 0,"aria-describedby":f??void 0,role:C,tabIndex:-1,hidden:!y,onKeyDown(I){N2.has(I.key)&&I.stopPropagation()},style:{[K1e.nestedDialogs]:w}},c],ref:[n,u.context.popupRef,u.useStateSetter("popupElement")],stateAttributesMapping:oSe});return M.jsx(A2,{context:p,openInteractionType:b,disabled:!y,closeOnFocusOut:!h,initialFocus:O,returnFocus:o,modal:v!==!1,restoreFocus:"popup",children:$})});function D2(e){return a_(19)?e:e?"true":void 0}const $2=A.forwardRef(function(t,n){const{cutout:r,...o}=t;let i;if(r){const a=r?.getBoundingClientRect();i=`polygon(
|
|
141
|
+
0% 0%,
|
|
142
|
+
100% 0%,
|
|
143
|
+
100% 100%,
|
|
144
|
+
0% 100%,
|
|
145
|
+
0% 0%,
|
|
146
|
+
${a.left}px ${a.top}px,
|
|
147
|
+
${a.left}px ${a.bottom}px,
|
|
148
|
+
${a.right}px ${a.bottom}px,
|
|
149
|
+
${a.right}px ${a.top}px,
|
|
150
|
+
${a.left}px ${a.top}px
|
|
151
|
+
)`}return M.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})}),iSe=A.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=zf(),a=i.useState("mounted"),c=i.useState("modal"),u=i.useState("open");return a||r?M.jsx(w8.Provider,{value:r,children:M.jsxs(R2,{ref:n,...o,children:[a&&c===!0&&M.jsx($2,{ref:i.context.internalBackdropRef,inert:D2(!u)}),t.children]})}):null});let HP={},KP={},GP="";function aSe(e){if(typeof document>"u")return!1;const t=ys(e);return wr(t).innerWidth-t.documentElement.clientWidth>0}function lSe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=ys(e).documentElement,o={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY};r.style.scrollbarGutter="stable",r.style.overflowY="scroll";const i=r.offsetWidth;r.style.overflowY="hidden";const a=r.offsetWidth;return Object.assign(r.style,o),i===a}function cSe(e){const t=ys(e),n=t.documentElement,r=t.body,o=Cc(n)?n:r,i=o.style.overflow;return o.style.overflow="hidden",()=>{o.style.overflow=i}}function uSe(e){const t=ys(e),n=t.documentElement,r=t.body,o=wr(n);let i=0,a=0,c=!1;const u=Zs.create();if(xz&&(o.visualViewport?.scale??1)!==1)return()=>{};function f(){const g=o.getComputedStyle(n),v=o.getComputedStyle(r),w=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,a=n.scrollLeft,HP={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},GP=n.style.scrollBehavior,KP={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const T=n.scrollHeight>n.clientHeight,b=n.scrollWidth>n.clientWidth,_=g.overflowY==="scroll"||v.overflowY==="scroll",S=g.overflowX==="scroll"||v.overflowX==="scroll",C=Math.max(0,o.innerWidth-r.clientWidth),E=Math.max(0,o.innerHeight-r.clientHeight),O=parseFloat(v.marginTop)+parseFloat(v.marginBottom),j=parseFloat(v.marginLeft)+parseFloat(v.marginRight),P=Cc(n)?n:r;if(c=lSe(e),c){n.style.scrollbarGutter=w,P.style.overflowY="hidden",P.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:w,overflowY:"hidden",overflowX:"hidden"}),(T||_)&&(n.style.overflowY="scroll"),(b||S)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:O||E?`calc(100dvh - ${O+E}px)`:"100dvh",width:j||C?`calc(100vw - ${j+C}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,HP),Object.assign(r.style,KP),c||(n.scrollTop=i,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=GP)}function p(){h(),u.request(f)}return f(),o.addEventListener("resize",p),()=>{u.cancel(),h(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",p)}}class fSe{lockCount=0;restore=null;timeoutLock=al.create();timeoutUnlock=al.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 r=ys(t).documentElement,o=wr(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=Uo;return}const i=Ez||!aSe(t);this.restore=i?cSe(t):uSe(t)}}const dSe=new fSe;function I2(e=!0,t=null){Je(()=>{if(e)return dSe.acquire(t)},[e,t])}function hSe(e){const t=A.useRef(""),n=A.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:A.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o&&e(o,o.pointerType),e(o,t.current),t.current=""},[e]),onPointerDown:n}}function z2(e){const[t,n]=A.useState(null),r=We((c,u)=>{e||n(u||(Ez?"touch":""))}),o=A.useCallback(()=>{n(null)},[]),{onClick:i,onPointerDown:a}=hSe(r);return A.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:i,onPointerDown:a}}),[t,o,i,a])}function pSe(e){const{store:t,parentContext:n,actionsRef:r}=e,o=t.useState("open"),i=t.useState("disablePointerDismissal"),a=t.useState("modal"),c=t.useState("popupElement"),{openMethod:u,triggerProps:f,reset:h}=z2(o);h8(t);const{forceUnmount:p}=p8(o,t,()=>{h()}),g=We($=>{const I=$t($);return I.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},I}),v=A.useCallback(()=>{t.setOpen(!1,g(bz))},[t,g]);A.useImperativeHandle(r,()=>({unmount:p,close:v}),[p,v]);const y=v8({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[x,w]=A.useState(0),T=x===0,b=S8(y),_=M2(y,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress($){if("button"in $&&$.button!==0||"touches"in $&&$.touches.length!==1)return!1;const I=xo($);if(T&&!i){const L=I;return a&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===L||t.context.backdropRef.current===L||Jt(L,c)&&!L?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:T});I2(o&&a===!0,c);const{getReferenceProps:S,getFloatingProps:C,getTriggerProps:E}=Q0([b,_]);t.useContextCallback("onNestedDialogOpen",$=>{w($+1)}),t.useContextCallback("onNestedDialogClose",()=>{w(0)}),A.useEffect(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(x),n?.onNestedDialogClose&&!o&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&o&&n.onNestedDialogClose()}),[o,n,x]);const O=A.useMemo(()=>S(f),[S,f]),j=A.useMemo(()=>E(f),[E,f]),P=A.useMemo(()=>C(),[C]);t.useSyncedValues({openMethod:u,activeTriggerProps:O,inactiveTriggerProps:j,popupProps:P,floatingRootContext:y,nestedOpenDialogCount:x})}const mSe={...g8,modal:Xe(e=>e.modal),nested:Xe(e=>e.nested),nestedOpenDialogCount:Xe(e=>e.nestedOpenDialogCount),disablePointerDismissal:Xe(e=>e.disablePointerDismissal),openMethod:Xe(e=>e.openMethod),descriptionElementId:Xe(e=>e.descriptionElementId),titleElementId:Xe(e=>e.titleElementId),viewportElement:Xe(e=>e.viewportElement),role:Xe(e=>e.role)};class gSe extends j2{constructor(t){super(ySe(t),{popupRef:A.createRef(),backdropRef:A.createRef(),internalBackdropRef:A.createRef(),triggerElements:new X0,onOpenChange:void 0,onOpenChangeComplete:void 0},mSe)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const o={open:t},i=n.trigger?.id??null;(i||t)&&(o.activeTriggerId=i,o.activeTriggerElement=n.trigger??null),this.update(o)}}function ySe(e={}){return{...m8(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function vSe(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,disablePointerDismissal:a=!1,modal:c=!0,actionsRef:u,handle:f,triggerId:h,defaultTriggerId:p=null}=e,g=zf(!0),v=!!g,y=Co(()=>f?.store??new gSe({open:n??r,activeTriggerId:h!==void 0?h:p,modal:c,disablePointerDismissal:a,nested:v})).current;y.useControlledProp("open",n,r),y.useControlledProp("activeTriggerId",h,p),y.useSyncedValues({disablePointerDismissal:a,nested:v,modal:c}),y.useContextCallback("onOpenChange",o),y.useContextCallback("onOpenChangeComplete",i);const x=y.useState("payload");pSe({store:y,actionsRef:u,parentContext:g?.store.context});const w=A.useMemo(()=>({store:y}),[y]);return M.jsx(mz.Provider,{value:w,children:typeof t=="function"?t({payload:x}):t})}const bSe=A.forwardRef(function(t,n){const{render:r,className:o,id:i,...a}=t,{store:c}=zf(),u=Uf(i);return c.useSyncedValueWithCleanup("titleElementId",u),Mn("h2",t,{ref:n,props:[{id:u},a]})});function SSe({...e}){return M.jsx(vSe,{"data-slot":"dialog",...e})}function wSe({...e}){return M.jsx(iSe,{"data-slot":"dialog-portal",...e})}function xSe({className:e,...t}){return M.jsx(cve,{"data-slot":"dialog-overlay",className:St("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 ESe({className:e,children:t,showCloseButton:n=!0,...r}){return M.jsxs(wSe,{children:[M.jsx(xSe,{}),M.jsxs(sSe,{"data-slot":"dialog-content",className:St("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),...r,children:[t,n&&M.jsxs(hve,{"data-slot":"dialog-close",render:M.jsx(Ja,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[M.jsx(fre,{}),M.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function _Se({className:e,...t}){return M.jsx(bSe,{"data-slot":"dialog-title",className:St("text-sm font-medium",e),...t})}const CSe=()=>{const e=hl(),[t,n]=A.useState(!1);return e._meta&&Object.keys(e._meta).length>0?M.jsxs(M.Fragment,{children:[M.jsxs(Ja,{variant:"ghost",size:"default",onClick:()=>n(!0),"aria-label":"View tool metadata",title:"View tool metadata",children:[M.jsx(Xne,{className:"h-4 w-4"}),"Metadata"]}),M.jsx(SSe,{open:t,onOpenChange:n,children:M.jsxs(ESe,{className:"sm:max-w-2xl",children:[M.jsx(_Se,{children:"Tool Metadata"}),M.jsx("div",{className:"text-xs",children:M.jsx(K0,{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},TSe={"ui:submitButtonOptions":{norender:!0}},RSe=({schema:e,formData:t,setFormData:n,ref:r})=>!e||!e.properties||Object.keys(e.properties).length===0?M.jsx("div",{className:"flex items-center justify-center h-full",children:M.jsx("p",{className:"text-sm text-muted-foreground",children:"This tool requires no input"})}):M.jsx(N0e,{children:M.jsx(D0e,{children:M.jsx(P0e,{ref:r,schema:e??{},validator:epe,uiSchema:TSe,formData:t,onChange:i=>n(i.formData),showErrorList:!1,templates:{FieldTemplate:i=>{const{id:a,classNames:c,style:u,label:f,required:h,errors:p,children:g}=i;return M.jsxs("div",{className:St("flex flex-col gap-2",c),style:u,children:[M.jsxs("label",{htmlFor:a,className:"text-sm text-foreground",children:[f,h&&M.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),M.jsxs("div",{className:"flex flex-col gap-2",children:[g,p]})]})},FieldErrorTemplate:i=>i.errors&&i.errors.length>0?M.jsx("div",{className:"text-sm text-destructive mt-1 flex items-center gap-1",children:M.jsx("span",{children:i.errors.join(", ")})}):null}})})}),OSe=()=>{const e=A.useRef(null),t=hl(),{setToolData:n}=_f(),o=Cf(t.name)?.input??{},i=a=>{n(t.name,{input:a??{}})};return M.jsxs("div",{className:St("flex flex-col h-full overflow-hidden border-r border-border"),children:[M.jsxs("div",{className:"shrink-0 border-b border-border px-6 py-4 flex items-center justify-between h-[72px]",children:[M.jsx("h2",{className:"font-semibold text-foreground",children:t.name}),M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx(CSe,{}),M.jsx(X0e,{validateForm:async()=>e.current===null?!0:await e.current.validateForm(),formData:o})]})]}),M.jsx("div",{className:"flex-1 overflow-auto px-6 py-6 bg-muted/50",children:M.jsx(RSe,{schema:t.inputSchema,formData:o,setFormData:i,ref:e},t.name)})]})},ASe=Wi("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 kSe({className:e,orientation:t,...n}){return M.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:St(ASe({orientation:t}),e),...n})}function MSe({className:e,...t}){return M.jsx("label",{"data-slot":"label",className:St("gap-2 text-xs leading-none group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",e),...t})}function jSe({className:e,...t}){return M.jsx("fieldset",{"data-slot":"field-set",className:St("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",e),...t})}const PSe=Wi("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 Oa({className:e,orientation:t="vertical",...n}){return M.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:St(PSe({orientation:t}),e),...n})}function Aa({className:e,...t}){return M.jsx(MSe,{"data-slot":"field-label",className:St("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 ZP=(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 NSe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},L2={valid(e){return e===null?null:e?{[ZP.valid]:""}:{[ZP.invalid]:""}}},DSe=A.createContext({invalid:void 0,name:void 0,validityData:{state:NSe,errors:[],error:"",value:"",initialValue:null},setValidityData:Uo,disabled:void 0,touched:!1,setTouched:Uo,dirty:!1,setDirty:Uo,filled:!1,setFilled:Uo,focused:!1,setFocused:Uo,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Mr)=>e,getInputValidationProps:(e=Mr)=>e,inputRef:{current:null},commit:async()=>{}}});function vc(e=!0){const t=A.useContext(DSe);if(t.setValidityData===Uo&&!e)throw new Error(eo(28));return t}const $Se=A.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Uo,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function F2(){return A.useContext($Se)}const ISe=A.createContext({controlId:void 0,setControlId:Uo,labelId:void 0,setLabelId:Uo,messageIds:[],setMessageIds:Uo,getDescriptionProps:e=>e});function ev(){return A.useContext(ISe)}function zSe(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function Vh({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=A.useRef(e!==void 0),[i,a]=A.useState(t),c=o?e:i,u=A.useCallback(f=>{o||a(f)},[]);return[c,u]}function tv(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,setControlId:i}=ev(),a=Uf(t);return Je(()=>{if(!(!n&&!t||i===Uo)){if(n){const c=r?.current;Cn(c)&&c.closest("label")!=null?i(t??null):i(o??a)}else t&&i(t);return()=>{t&&i(void 0)}}},[t,r,o,i,n,a]),o??a}function U2(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:a}=e,{formRef:c}=F2(),{invalid:u,markedDirtyRef:f,validityData:h,setValidityData:p}=vc(),g=We(e.getValue);Je(()=>{if(!t)return;let v=n;v===void 0&&(v=g()),h.initialValue===null&&v!==null&&p(y=>({...y,initialValue:v}))},[t,p,n,h.initialValue,g]),Je(()=>{!t||!r||c.current.fields.set(r,{getValue:g,name:o,controlRef:i,validityData:zSe(h,u),validate(v=!0){let y=n;y===void 0&&(y=g()),f.current=!0,v?gs.flushSync(()=>a(y)):a(y)}})},[a,i,t,c,g,r,u,f,o,h,n]),Je(()=>{const v=c.current.fields;return()=>{r&&v.delete(r)}},[c,r])}const LSe=A.forwardRef(function(t,n){const{render:r,className:o,id:i,name:a,value:c,disabled:u=!1,onValueChange:f,defaultValue:h,...p}=t,{state:g,name:v,disabled:y}=vc(),x=y||u,w=v??a,T=A.useMemo(()=>({...g,disabled:x}),[g,x]),{setTouched:b,setDirty:_,validityData:S,setFocused:C,setFilled:E,validationMode:O,validation:j}=vc(),{labelId:P}=ev(),$=tv({id:i});Je(()=>{const Z=c!=null;j.inputRef.current?.value||Z&&c!==""?E(!0):Z&&c===""&&E(!1)},[j.inputRef,E,c]);const[I,L]=Vh({controlled:c,default:h,name:"FieldControl",state:"value"}),F=c!==void 0,J=We((Z,H)=>{f?.(Z,H),!H.isCanceled&&L(Z)});return U2({id:$,name:w,commit:j.commit,value:I,getValue:()=>j.inputRef.current?.value,controlRef:j.inputRef}),Mn("input",t,{ref:n,state:T,props:[{id:$,disabled:x,name:w,ref:j.inputRef,"aria-labelledby":P,...F?{value:I}:{defaultValue:h},onChange(Z){const H=Z.currentTarget.value;J(H,$t(il,Z.nativeEvent)),_(H!==S.initialValue),E(H!=="")},onFocus(){C(!0)},onBlur(Z){b(!0),C(!1),O==="onBlur"&&j.commit(Z.currentTarget.value)},onKeyDown(Z){Z.currentTarget.tagName==="INPUT"&&Z.key==="Enter"&&(b(!0),j.commit(Z.currentTarget.value))}},j.getInputValidationProps(),p],stateAttributesMapping:L2})}),FSe=A.forwardRef(function(t,n){return M.jsx(LSe,{ref:n,...t})});function WS({className:e,type:t,...n}){return M.jsx(FSe,{type:t,"data-slot":"input",className:St("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),...n})}function USe(e){const t=A.useRef(!0);t.current&&(t.current=!1,e())}const C8=A.createContext(null),T8=A.createContext(null);function fi(){const e=A.useContext(C8);if(e===null)throw new Error(eo(60));return e}function R8(){const e=A.useContext(T8);if(e===null)throw new Error(eo(61));return e}const VSe=(e,t)=>Object.is(e,t);function vf(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function XS(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:vf(r,t,n))}function Ux(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:vf(r,t,n))}function qSe(e,t,n){return e.filter(r=>!vf(r,t,n))}function Vx(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function O8(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function BSe(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(O8(e)){for(const t of e)for(const n of t.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(const t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function HSe(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 Vx(e)}function Ru(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Vx(e.value):Vx(e)}function A8(e,t,n){function r(){return HSe(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const o=O8(t)?t.flatMap(i=>i.items):t;if(e==null||typeof e!="object"){const i=o.find(a=>a.value===e);return i&&i.label!=null?i.label:r()}if("value"in e){const i=o.find(a=>a&&a.value===e.value);if(i&&i.label!=null)return i.label}}return r()}function KSe(e,t,n){return e.reduce((r,o,i)=>(i>0&&r.push(", "),r.push(M.jsx(A.Fragment,{children:A8(o,t,n)},i)),r),[])}const mt={id:Xe(e=>e.id),modal:Xe(e=>e.modal),multiple:Xe(e=>e.multiple),items:Xe(e=>e.items),itemToStringLabel:Xe(e=>e.itemToStringLabel),itemToStringValue:Xe(e=>e.itemToStringValue),isItemEqualToValue:Xe(e=>e.isItemEqualToValue),value:Xe(e=>e.value),hasSelectedValue:Xe(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Ru(t,r)!==""}),hasNullItemLabel:Xe((e,t)=>t?BSe(e.items):!1),open:Xe(e=>e.open),mounted:Xe(e=>e.mounted),forceMount:Xe(e=>e.forceMount),transitionStatus:Xe(e=>e.transitionStatus),openMethod:Xe(e=>e.openMethod),activeIndex:Xe(e=>e.activeIndex),selectedIndex:Xe(e=>e.selectedIndex),isActive:Xe((e,t)=>e.activeIndex===t),isSelected:Xe((e,t,n)=>{const r=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(i=>vf(i,n,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:vf(o,n,r)}),isSelectedByFocus:Xe((e,t)=>e.selectedIndex===t),popupProps:Xe(e=>e.popupProps),triggerProps:Xe(e=>e.triggerProps),triggerElement:Xe(e=>e.triggerElement),positionerElement:Xe(e=>e.positionerElement),listElement:Xe(e=>e.listElement),scrollUpArrowVisible:Xe(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Xe(e=>e.scrollDownArrowVisible),hasScrollArrows:Xe(e=>e.hasScrollArrows)};function k8(e,t){const n=A.useRef(e),r=We(t);Je(()=>{n.current!==e&&r(n.current)},[e,r]),Je(()=>{n.current=e},[e])}function GSe(e){const{id:t,value:n,defaultValue:r=null,onValueChange:o,open:i,defaultOpen:a=!1,onOpenChange:c,name:u,disabled:f=!1,readOnly:h=!1,required:p=!1,modal:g=!0,actionsRef:v,inputRef:y,onOpenChangeComplete:x,items:w,multiple:T=!1,itemToStringLabel:b,itemToStringValue:_,isItemEqualToValue:S=VSe,highlightItemOnHover:C=!0,children:E}=e,{clearErrors:O}=F2(),{setDirty:j,setTouched:P,setFocused:$,shouldValidateOnChange:I,validityData:L,setFilled:F,name:J,disabled:ee,validation:Z,validationMode:H}=vc(),V=tv({id:t}),oe=ee||f,ne=J??u,[D,q]=Vh({controlled:n,default:T?r??af:r,name:"Select",state:"value"}),[U,N]=Vh({controlled:i,default:a,name:"Select",state:"open"}),G=A.useRef([]),te=A.useRef([]),re=A.useRef(null),de=A.useRef(null),we=A.useRef(0),Ee=A.useRef(null),se=A.useRef([]),X=A.useRef(!1),fe=A.useRef(!1),he=A.useRef(null),Pe=A.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),ye=A.useRef(!1),{mounted:De,setMounted:Ue,transitionStatus:ve}=W0(U),{openMethod:Fe,triggerProps:Le,reset:Ze}=z2(U),Oe=Co(()=>new Wu({id:V,modal:g,multiple:T,itemToStringLabel:b,itemToStringValue:_,isItemEqualToValue:S,value:D,open:U,mounted:De,transitionStatus:ve,items:w,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ze=yt(Oe,mt.activeIndex),Be=yt(Oe,mt.selectedIndex),dt=yt(Oe,mt.triggerElement),Ce=yt(Oe,mt.positionerElement),me=A.useMemo(()=>T&&Array.isArray(D)&&D.length===0?"":Ru(D,_),[T,D,_]),Me=A.useMemo(()=>T&&Array.isArray(D)?D.map(at=>Ru(at,_)):Ru(D,_),[T,D,_]),Ve=kr(Oe.state.triggerElement);U2({id:V,commit:Z.commit,value:D,controlRef:Ve,name:ne,getValue:()=>Me});const it=A.useRef(D);Je(()=>{D!==it.current&&Oe.set("forceMount",!0)},[Oe,D]),Je(()=>{F(T?Array.isArray(D)&&D.length>0:D!=null)},[T,D,F]),Je(function(){if(U)return;const Mt=se.current;if(T){const Lt=Array.isArray(D)?D:[];if(Lt.length===0){Oe.set("selectedIndex",null);return}const tn=Lt[Lt.length-1],Rt=Ux(Mt,tn,S);Oe.set("selectedIndex",Rt===-1?null:Rt);return}const Rn=Ux(Mt,D,S);Oe.set("selectedIndex",Rn===-1?null:Rn)},[T,U,D,se,S,Oe]),k8(D,()=>{O(ne),j(D!==L.initialValue),I()?Z.commit(D):Z.commit(D,!0)});const Ct=We((at,Mt)=>{if(c?.(at,Mt),!Mt.isCanceled&&(N(at),!at&&(Mt.reason===gc||Mt.reason===S2)&&(P(!0),$(!1),H==="onBlur"&&Z.commit(D)),!at&&Oe.state.activeIndex!==null)){const Rn=G.current[Oe.state.activeIndex];queueMicrotask(()=>{Rn?.setAttribute("tabindex","-1")})}}),Nt=We(()=>{Ue(!1),Oe.set("activeIndex",null),Ze(),x?.(!1)});jc({enabled:!v,open:U,ref:re,onComplete(){U||Nt()}}),A.useImperativeHandle(v,()=>({unmount:Nt}),[Nt]);const vt=We((at,Mt)=>{o?.(at,Mt),!Mt.isCanceled&&q(at)}),Gt=We(()=>{const at=Oe.state.listElement||re.current;if(!at)return;const Mt=at.scrollTop,Rn=at.scrollTop+at.clientHeight,Lt=Mt>1,tn=Rn<at.scrollHeight-1;Oe.state.scrollUpArrowVisible!==Lt&&Oe.set("scrollUpArrowVisible",Lt),Oe.state.scrollDownArrowVisible!==tn&&Oe.set("scrollDownArrowVisible",tn)}),kt=y8({open:U,onOpenChange:Ct,elements:{reference:dt,floating:Ce}}),Tt=e8(kt,{enabled:!h&&!oe,event:"mousedown"}),Xt=M2(kt,{bubbles:!1}),wt=U1e(kt,{enabled:!h&&!oe,listRef:G,activeIndex:ze,selectedIndex:Be,disabledIndices:af,onNavigate(at){at===null&&!U||Oe.set("activeIndex",at)},focusItemOnHover:!1}),sn=q1e(kt,{enabled:!h&&!oe&&(U||!T),listRef:te,activeIndex:ze,selectedIndex:Be,onMatch(at){U?Oe.set("activeIndex",at):vt(se.current[at],$t("none"))},onTypingChange(at){X.current=at}}),{getReferenceProps:rn,getFloatingProps:vn,getItemProps:xt}=Q0([Tt,Xt,wt,sn]),on=A.useMemo(()=>cp(rn(),Le,V?{id:V}:Mr),[rn,Le,V]);USe(()=>{Oe.update({popupProps:vn(),triggerProps:on})}),Je(()=>{Oe.update({id:V,modal:g,multiple:T,value:D,open:U,mounted:De,transitionStatus:ve,popupProps:vn(),triggerProps:on,items:w,itemToStringLabel:b,itemToStringValue:_,isItemEqualToValue:S,openMethod:Fe})},[Oe,V,g,T,D,U,De,ve,vn,on,w,b,_,S,Fe]);const zt=A.useMemo(()=>({store:Oe,name:ne,required:p,disabled:oe,readOnly:h,multiple:T,itemToStringLabel:b,itemToStringValue:_,highlightItemOnHover:C,setValue:vt,setOpen:Ct,listRef:G,popupRef:re,scrollHandlerRef:de,handleScrollArrowVisibility:Gt,scrollArrowsMountedCountRef:we,getItemProps:xt,events:kt.context.events,valueRef:Ee,valuesRef:se,labelsRef:te,typingRef:X,selectionRef:Pe,selectedItemTextRef:he,validation:Z,onOpenChangeComplete:x,keyboardActiveRef:fe,alignItemWithTriggerActiveRef:ye,initialValueRef:it}),[Oe,ne,p,oe,h,T,b,_,C,vt,Ct,xt,kt.context.events,Z,x,Gt]),$n=Vi(y,Z.inputRef),tr=T&&Array.isArray(D)&&D.length>0,xr=A.useMemo(()=>!T||!Array.isArray(D)||!ne?null:D.map(at=>{const Mt=Ru(at,_);return M.jsx("input",{type:"hidden",name:ne,value:Mt},Mt)}),[T,D,ne,_]);return M.jsx(C8.Provider,{value:zt,children:M.jsxs(T8.Provider,{value:kt,children:[E,M.jsx("input",{...Z.getInputValidationProps({onFocus(){Oe.state.triggerElement?.focus({focusVisible:!0})},onChange(at){if(at.nativeEvent.defaultPrevented)return;const Mt=at.target.value,Rn=$t(il,at.nativeEvent);function Lt(){if(T)return;const tn=se.current.find(Rt=>Ru(Rt,_).toLowerCase()===Mt.toLowerCase());tn!=null&&(j(tn!==L.initialValue),vt(tn,Rn),I()&&Z.commit(tn))}Oe.set("forceMount",!0),queueMicrotask(Lt)}}),name:T?void 0:ne,value:me,disabled:oe,required:p&&!tr,readOnly:h,ref:$n,style:ne?Wz:G0,tabIndex:-1,"aria-hidden":!0}),xr]})})}function ZSe(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,c=parseFloat(r.width)||0,u=parseFloat(r.height)||0,f=Math.max(t.width,i,c),h=Math.max(t.height,a,u),p=f-t.width,g=h-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-g/2,bottom:t.bottom+g/2}}const Xg=2,YSe=400,YP=200,WSe={...yz,...L2,value:()=>null},XSe=A.forwardRef(function(t,n){const{render:r,className:o,id:i,disabled:a=!1,nativeButton:c=!0,...u}=t,{setTouched:f,setFocused:h,validationMode:p,state:g,disabled:v}=vc(),{labelId:y}=ev(),{store:x,setOpen:w,selectionRef:T,validation:b,readOnly:_,required:S,alignItemWithTriggerActiveRef:C,disabled:E,keyboardActiveRef:O}=fi(),j=v||E||a,P=yt(x,mt.open),$=yt(x,mt.value),I=yt(x,mt.triggerProps),L=yt(x,mt.positionerElement),F=yt(x,mt.listElement),J=yt(x,mt.id),ee=yt(x,mt.hasSelectedValue),Z=!ee&&P,H=yt(x,mt.hasNullItemLabel,Z),V=i??J;tv({id:V});const oe=kr(L),ne=A.useRef(null),{getButtonProps:D,buttonRef:q}=Tc({disabled:j,native:c}),U=We(X=>{x.set("triggerElement",X)}),N=Vi(n,ne,q,U),G=go(),te=go(),re=go(),de=go();A.useEffect(()=>{if(P)return!(ee||H)?re.start(YSe,()=>{T.current.allowUnselectedMouseUp=!0,T.current.allowSelectedMouseUp=!0}):de.start(YP,()=>{T.current.allowUnselectedMouseUp=!0,re.start(YP,()=>{T.current.allowSelectedMouseUp=!0})}),()=>{re.clear(),de.clear()};T.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},te.clear()},[P,ee,H,T,te,re,de]);const we=A.useMemo(()=>F?.id??zh(L)?.id,[F,L]),Ee=cp(I,{id:V,role:"combobox","aria-expanded":P?"true":"false","aria-haspopup":"listbox","aria-controls":P?we:void 0,"aria-labelledby":y,"aria-readonly":_||void 0,"aria-required":S||void 0,tabIndex:j?-1:0,ref:N,onFocus(X){h(!0),P&&C.current&&w(!1,$t(il,X.nativeEvent)),G.start(0,()=>{x.set("forceMount",!0)})},onBlur(X){Jt(L,X.relatedTarget)||(f(!0),h(!1),p==="onBlur"&&b.commit($))},onPointerMove(){O.current=!1},onKeyDown(){O.current=!0},onMouseDown(X){if(P)return;const fe=ys(X.currentTarget);function he(Pe){if(!ne.current)return;const ye=Pe.target;if(Jt(ne.current,ye)||Jt(oe.current,ye)||ye===ne.current)return;const De=ZSe(ne.current);Pe.clientX>=De.left-Xg&&Pe.clientX<=De.right+Xg&&Pe.clientY>=De.top-Xg&&Pe.clientY<=De.bottom+Xg||w(!1,$t(fve,Pe))}te.start(0,()=>{fe.addEventListener("mouseup",he,{once:!0})})}},b.getValidationProps,u,D);Ee.role="combobox";const se=A.useMemo(()=>({...g,open:P,disabled:j,value:$,readOnly:_,placeholder:!ee}),[g,P,j,$,_,ee]);return Mn("button",t,{ref:[n,ne],state:se,stateAttributesMapping:WSe,props:Ee})}),QSe={value:()=>null},JSe=A.forwardRef(function(t,n){const{className:r,render:o,children:i,placeholder:a,...c}=t,{store:u,valueRef:f}=fi(),h=yt(u,mt.value),p=yt(u,mt.items),g=yt(u,mt.itemToStringLabel),v=yt(u,mt.hasSelectedValue),y=!v&&a!=null&&i==null,x=yt(u,mt.hasNullItemLabel,y),w=A.useMemo(()=>({value:h,placeholder:!v}),[h,v]);let T=null;return typeof i=="function"?T=i(h):i!=null?T=i:!v&&a!=null&&!x?T=a:Array.isArray(h)?T=KSe(h,p,g):T=A8(h,p,g),Mn("span",t,{state:w,ref:[n,f],props:[{children:T},c],stateAttributesMapping:QSe})}),ewe=A.forwardRef(function(t,n){const{className:r,render:o,...i}=t,{store:a}=fi(),c=yt(a,mt.open),u=A.useMemo(()=>({open:c}),[c]);return Mn("span",t,{state:u,ref:n,props:[{"aria-hidden":!0,children:"▼"},i],stateAttributesMapping:gz})}),twe=A.createContext(void 0),nwe=A.forwardRef(function(t,n){const{store:r}=fi(),o=yt(r,mt.mounted),i=yt(r,mt.forceMount);return o||i?M.jsx(twe.Provider,{value:!0,children:M.jsx(R2,{ref:n,...t})}):null}),M8=A.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function rwe(){return A.useContext(M8)}function V2(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=We(o),a=A.useRef(0),c=Co(swe).current,u=Co(owe).current,[f,h]=A.useState(0),p=A.useRef(f),g=We((T,b)=>{u.set(T,b??null),p.current+=1,h(p.current)}),v=We(T=>{u.delete(T),p.current+=1,h(p.current)}),y=A.useMemo(()=>{const T=new Map;return Array.from(u.keys()).filter(_=>_.isConnected).sort(iwe).forEach((_,S)=>{const C=u.get(_)??{};T.set(_,{...C,index:S})}),T},[u,f]);Je(()=>{if(typeof MutationObserver!="function"||y.size===0)return;const T=new MutationObserver(b=>{const _=new Set,S=C=>_.has(C)?_.delete(C):_.add(C);b.forEach(C=>{C.removedNodes.forEach(S),C.addedNodes.forEach(S)}),_.size===0&&(p.current+=1,h(p.current))});return y.forEach((b,_)=>{_.parentElement&&T.observe(_.parentElement,{childList:!0})}),()=>{T.disconnect()}},[y]),Je(()=>{p.current===f&&(n.current.length!==y.size&&(n.current.length=y.size),r&&r.current.length!==y.size&&(r.current.length=y.size),a.current=y.size),i(y)},[i,y,n,r,f]),Je(()=>()=>{n.current=[]},[n]),Je(()=>()=>{r&&(r.current=[])},[r]);const x=We(T=>(c.add(T),()=>{c.delete(T)}));Je(()=>{c.forEach(T=>T(y))},[c,y]);const w=A.useMemo(()=>({register:g,unregister:v,subscribeMapChange:x,elementsRef:n,labelsRef:r,nextIndexRef:a}),[g,v,x,n,r,a]);return M.jsx(M8.Provider,{value:w,children:t})}function owe(){return new Map}function swe(){return new Set}function iwe(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const awe=A.createContext(void 0);function q2(){return A.useContext(awe)?.direction??"ltr"}const lwe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:c,middlewareData:u}=t,{element:f,padding:h=0,offsetParent:p="real"}=Hi(e,t)||{};if(f==null)return{};const g=Mz(h),v={x:n,y:r},y=C2(o),x=_2(y),w=await a.getDimensions(f),T=y==="y",b=T?"top":"left",_=T?"bottom":"right",S=T?"clientHeight":"clientWidth",C=i.reference[x]+i.reference[y]-v[y]-i.floating[x],E=v[y]-i.reference[y],O=p==="real"?await a.getOffsetParent?.(f):c.floating;let j=c.floating[S]||i.floating[x];(!j||!await a.isElement?.(O))&&(j=c.floating[S]||i.floating[x]);const P=C/2-E/2,$=j/2-w[x]/2-1,I=Math.min(g[b],$),L=Math.min(g[_],$),F=I,J=j-w[x]-L,ee=j/2-w[x]/2+P,Z=Dx(F,ee,J),H=!u.arrow&&gl(o)!=null&&ee!==Z&&i.reference[x]/2-(ee<F?I:L)-w[x]/2<0,V=H?ee<F?ee-F:ee-J:0;return{[y]:v[y]+V,data:{[y]:Z,centerOffset:ee-Z-V,...H&&{alignmentOffset:V}},reset:H}}}),cwe=(e,t)=>({...lwe(e),options:[e,t]}),uwe={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await Jbe().fn(e)).data?.referenceHidden||i}}}},by={sideX:"left",sideY:"top"},fwe={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:i,strategy:a,placement:c}=e,u=wr(o),f=u.getComputedStyle(o);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:by};const p=await i.getOffsetParent?.(o);let g={width:0,height:0};if(a==="fixed"&&u?.visualViewport)g={width:u.visualViewport.width,height:u.visualViewport.height};else if(p===u){const b=ys(o);g={width:b.documentElement.clientWidth,height:b.documentElement.clientHeight}}else await i.isElement?.(p)&&(g=await i.getDimensions(p));const v=_o(c);let y=t,x=n;v==="left"&&(y=g.width-(t+r.width)),v==="top"&&(x=g.height-(n+r.height));const w=v==="left"?"right":by.sideX,T=v==="top"?"bottom":by.sideY;return{x:y,y:x,data:{sideX:w,sideY:T}}}};function j8(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function WP(e,t,n){const{rects:r,placement:o}=e;return{side:j8(t,_o(o),n),align:gl(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function P8(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,collisionBoundary:c,collisionPadding:u=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:g=!1,floatingRootContext:v,mounted:y,collisionAvoidance:x,shiftCrossAxis:w=!1,nodeId:T,adaptiveOrigin:b,lazyFlip:_=!1,externalTree:S}=e,[C,E]=A.useState(null);!y&&C!==null&&E(null);const O=x.side||"flip",j=x.align||"flip",P=x.fallbackAxisSide||"end",$=typeof t=="function"?t:void 0,I=We($),L=$?I:t,F=kr(t),ee=q2()==="rtl",Z=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":ee?"left":"right","inline-start":ee?"right":"left"}[r],H=i==="center"?Z:`${Z}-${i}`;let V=u;const oe=1,ne=r==="bottom"?oe:0,D=r==="top"?oe:0,q=r==="right"?oe:0,U=r==="left"?oe:0;typeof V=="number"?V={top:V+ne,right:V+U,bottom:V+D,left:V+q}:V&&(V={top:(V.top||0)+ne,right:(V.right||0)+U,bottom:(V.bottom||0)+D,left:(V.left||0)+q});const N={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:V},G=A.useRef(null),te=kr(o),re=kr(a),Ee=[Zbe(Tt=>{const Xt=WP(Tt,r,ee),wt=typeof te.current=="function"?te.current(Xt):te.current,sn=typeof re.current=="function"?re.current(Xt):re.current;return{mainAxis:wt,crossAxis:sn,alignmentAxis:sn}},[typeof o!="function"?o:0,typeof a!="function"?a:0,ee,r])],se=j==="none"&&O!=="shift",X=!se&&(f||w||O==="shift"),fe=O==="none"?null:Xbe({...N,padding:{top:V.top+oe,right:V.right+oe,bottom:V.bottom+oe,left:V.left+oe},mainAxis:!w&&O==="flip",crossAxis:j==="flip"?"alignment":!1,fallbackAxisSideDirection:P}),he=se?null:Ybe(Tt=>{const Xt=ys(Tt.elements.floating).documentElement;return{...N,rootBoundary:w?{x:0,y:0,width:Xt.clientWidth,height:Xt.clientHeight}:void 0,mainAxis:j!=="none",crossAxis:X,limiter:f||w?void 0:Wbe(wt=>{if(!G.current)return{};const{width:sn,height:rn}=G.current.getBoundingClientRect(),vn=cs(_o(wt.placement)),xt=vn==="y"?sn:rn,on=vn==="y"?V.left+V.right:V.top+V.bottom;return{offset:xt/2+on/2}})}},[N,f,w,V,j]);O==="shift"||j==="shift"||i==="center"?Ee.push(he,fe):Ee.push(fe,he),Ee.push(Qbe({...N,apply({elements:{floating:Tt},rects:{reference:Xt},availableWidth:wt,availableHeight:sn}){Object.entries({"--available-width":`${wt}px`,"--available-height":`${sn}px`,"--anchor-width":`${Xt.width}px`,"--anchor-height":`${Xt.height}px`}).forEach(([rn,vn])=>{Tt.style.setProperty(rn,vn)})}}),cwe(()=>({element:G.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(Tt){const{elements:Xt,middlewareData:wt,placement:sn,rects:rn,y:vn}=Tt,xt=_o(sn),on=cs(xt),zt=G.current,$n=wt.arrow?.x||0,tr=wt.arrow?.y||0,xr=zt?.clientWidth||0,at=zt?.clientHeight||0,Mt=$n+xr/2,Rn=tr+at/2,Lt=Math.abs(wt.shift?.y||0),tn=rn.reference.height/2,Rt=typeof o=="function"?o(WP(Tt,r,ee)):o,Er=Lt>Rt,ir={top:`${Mt}px calc(100% + ${Rt}px)`,bottom:`${Mt}px ${-Rt}px`,left:`calc(100% + ${Rt}px) ${Rn}px`,right:`${-Rt}px ${Rn}px`}[xt],oo=`${Mt}px ${rn.reference.y+tn-vn}px`;return Xt.floating.style.setProperty("--transform-origin",X&&on==="y"&&Er?oo:ir),{}}},uwe,b),Je(()=>{!y&&v&&v.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[y,v]);const Pe=A.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:ye,elements:De,x:Ue,y:ve,middlewareData:Fe,update:Le,placement:Ze,context:Oe,isPositioned:ze,floatingStyles:Be}=k1e({rootContext:v,placement:H,middleware:Ee,strategy:n,whileElementsMounted:g?void 0:(...Tt)=>jP(...Tt,Pe),nodeId:T,externalTree:S}),{sideX:dt,sideY:Ce}=Fe.adaptiveOrigin||by,me=ze?n:"fixed",Me=A.useMemo(()=>b?{position:me,[dt]:Ue,[Ce]:ve}:{position:me,...Be},[b,me,dt,Ue,Ce,ve,Be]),Ve=A.useRef(null);Je(()=>{if(!y)return;const Tt=F.current,Xt=typeof Tt=="function"?Tt():Tt,sn=(XP(Xt)?Xt.current:Xt)||null||null;sn!==Ve.current&&(ye.setPositionReference(sn),Ve.current=sn)},[y,ye,L,F]),A.useEffect(()=>{if(!y)return;const Tt=F.current;typeof Tt!="function"&&XP(Tt)&&Tt.current!==Ve.current&&(ye.setPositionReference(Tt.current),Ve.current=Tt.current)},[y,ye,L,F]),A.useEffect(()=>{if(g&&y&&De.domReference&&De.floating)return jP(De.domReference,De.floating,Le,Pe)},[g,y,De,Le,Pe]);const it=_o(Ze),Ct=j8(r,it,ee),Nt=gl(Ze)||"center",vt=!!Fe.hide?.referenceHidden;Je(()=>{_&&y&&ze&&E(it)},[_,y,ze,it]);const Gt=A.useMemo(()=>({position:"absolute",top:Fe.arrow?.y,left:Fe.arrow?.x}),[Fe.arrow]),kt=Fe.arrow?.centerOffset!==0;return A.useMemo(()=>({positionerStyles:Me,arrowStyles:Gt,arrowRef:G,arrowUncentered:kt,side:Ct,align:Nt,physicalSide:it,anchorHidden:vt,refs:ye,context:Oe,isPositioned:ze,update:Le}),[Me,Gt,G,kt,Ct,Nt,it,vt,ye,Oe,ze,Le])}function XP(e){return e!=null&&"current"in e}const N8=A.createContext(void 0);function B2(){const e=A.useContext(N8);if(!e)throw new Error(eo(59));return e}function i0(e,t){e&&Object.assign(e.style,t)}const D8={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},dwe={position:"fixed"},hwe=A.forwardRef(function(t,n){const{anchor:r,positionMethod:o="absolute",className:i,render:a,side:c="bottom",align:u="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:p="clipping-ancestors",collisionPadding:g,arrowPadding:v=5,sticky:y=!1,disableAnchorTracking:x,alignItemWithTrigger:w=!0,collisionAvoidance:T=Ure,...b}=t,{store:_,listRef:S,labelsRef:C,alignItemWithTriggerActiveRef:E,selectedItemTextRef:O,valuesRef:j,initialValueRef:P,popupRef:$,setValue:I}=fi(),L=R8(),F=yt(_,mt.open),J=yt(_,mt.mounted),ee=yt(_,mt.modal),Z=yt(_,mt.value),H=yt(_,mt.openMethod),V=yt(_,mt.positionerElement),oe=yt(_,mt.triggerElement),ne=yt(_,mt.isItemEqualToValue),D=A.useRef(null),q=A.useRef(null),[U,N]=A.useState(w),G=J&&U&&H!=="touch";!J&&U!==w&&N(w),Je(()=>{J||(mt.scrollUpArrowVisible(_.state)&&_.set("scrollUpArrowVisible",!1),mt.scrollDownArrowVisible(_.state)&&_.set("scrollDownArrowVisible",!1))},[_,J]),A.useImperativeHandle(E,()=>G),I2((G||ee)&&F&&H!=="touch",oe);const te=P8({anchor:r,floatingRootContext:L,positionMethod:o,mounted:J,side:c,sideOffset:f,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:p,collisionPadding:g,sticky:y,disableAnchorTracking:x??G,collisionAvoidance:T,keepMounted:!0}),re=G?"none":te.side,de=G?dwe:te.positionerStyles,we=A.useMemo(()=>{const ye={};return F||(ye.pointerEvents="none"),{role:"presentation",hidden:!J,style:{...de,...ye}}},[F,J,de]),Ee=A.useMemo(()=>({open:F,side:re,align:te.align,anchorHidden:te.anchorHidden}),[F,re,te.align,te.anchorHidden]),se=We(ye=>{_.set("positionerElement",ye)}),X=Mn("div",t,{ref:[n,se],state:Ee,stateAttributesMapping:Lf,props:[we,b]}),fe=A.useRef(0),he=We(ye=>{if(ye.size===0&&fe.current===0||j.current.length===0)return;const De=fe.current;if(fe.current=ye.size,ye.size===De)return;const Ue=$t(il);if(De!==0&&!_.state.multiple&&Z!==null&&Ux(j.current,Z,ne)===-1){const Fe=P.current,Ze=Fe!=null&&XS(j.current,Fe,ne)?Fe:null;I(Ze,Ue),Ze===null&&(_.set("selectedIndex",null),O.current=null)}if(De!==0&&_.state.multiple&&Array.isArray(Z)){const ve=Z.filter(Fe=>XS(j.current,Fe,ne));(ve.length!==Z.length||ve.some(Fe=>!XS(Z,Fe,ne)))&&(I(ve,Ue),ve.length===0&&(_.set("selectedIndex",null),O.current=null))}if(F&&G){_.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ve={height:""};i0(V,ve),i0($.current,ve)}}),Pe=A.useMemo(()=>({...te,side:re,alignItemWithTriggerActive:G,setControlledAlignItemWithTrigger:N,scrollUpArrowRef:D,scrollDownArrowRef:q}),[te,re,G,N]);return M.jsx(V2,{elementsRef:S,labelsRef:C,onMapChange:he,children:M.jsxs(N8.Provider,{value:Pe,children:[J&&ee&&M.jsx($2,{inert:D2(!F),cutout:oe}),X]})})});function $8(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 Qg="base-ui-disable-scrollbar",qx={className:Qg,getElement(e){return M.jsx("style",{nonce:e,href:Qg,precedence:"base-ui:low",children:`.${Qg}{scrollbar-width:none}.${Qg}::-webkit-scrollbar{display:none}`})}},pwe=A.createContext(void 0);function I8(e){return A.useContext(pwe)}function H2(e){return e==="starting"?Fre:Mr}function mwe(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const gwe=A.createContext(void 0),ywe={disableStyleElements:!1};function vwe(){return A.useContext(gwe)??ywe}const bwe={...Lf,...Sp},Swe=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{store:a,popupRef:c,onOpenChangeComplete:u,setOpen:f,valueRef:h,selectedItemTextRef:p,keyboardActiveRef:g,multiple:v,handleScrollArrowVisibility:y,scrollHandlerRef:x,highlightItemOnHover:w}=fi(),{side:T,align:b,alignItemWithTriggerActive:_,setControlledAlignItemWithTrigger:S,scrollDownArrowRef:C,scrollUpArrowRef:E}=B2(),O=I8()!=null,j=R8(),{nonce:P,disableStyleElements:$}=vwe(),I=go(),L=yt(a,mt.id),F=yt(a,mt.open),J=yt(a,mt.mounted),ee=yt(a,mt.popupProps),Z=yt(a,mt.transitionStatus),H=yt(a,mt.triggerElement),V=yt(a,mt.positionerElement),oe=yt(a,mt.listElement),ne=A.useRef(0),D=A.useRef(!1),q=A.useRef(0),U=A.useRef(!1),N=A.useRef({}),G=Z0(),te=We(Ee=>{if(!V||!c.current||!U.current)return;if(D.current||!_){y();return}const se=V.style.top==="0px",X=V.style.bottom==="0px",fe=V.getBoundingClientRect().height,he=ys(V),Pe=getComputedStyle(V),ye=parseFloat(Pe.marginTop),De=parseFloat(Pe.marginBottom),Ue=QP(getComputedStyle(c.current)),ve=he.documentElement.clientHeight-ye-De,Fe=Ee.scrollTop,Le=Ee.scrollHeight,Ze=Ee.clientHeight,Oe=Le-Ze;let ze=0,Be=null,dt=!1;if(se){const Ce=Oe-Fe,me=fe+Ce,Me=Math.min(me,ve);ze=Me,Me!==ve?Be=Oe:dt=!0}else if(X){const Ce=Fe-0,me=fe+Ce,Me=Math.min(me,ve),Ve=me-ve;ze=Me,Me!==ve?Be=0:(dt=!0,Fe<Oe&&(Be=Fe-(Ce-Ve)))}ze!==0&&(V.style.height=`${ze}px`),Be!=null&&(Ee.scrollTop=Be),(dt||ze>=Ue)&&(D.current=!0),y()});A.useImperativeHandle(x,()=>te,[te]),jc({open:F,ref:c,onComplete(){F&&u?.(!0)}});const re=A.useMemo(()=>({open:F,transitionStatus:Z,side:T,align:b}),[F,Z,T,b]);Je(()=>{!V||!c.current||Object.keys(N.current).length||(N.current={top:V.style.top||"0",left:V.style.left||"0",right:V.style.right,height:V.style.height,bottom:V.style.bottom,minHeight:V.style.minHeight,maxHeight:V.style.maxHeight,marginTop:V.style.marginTop,marginBottom:V.style.marginBottom})},[c,V]),Je(()=>{F||_||(U.current=!1,D.current=!1,ne.current=0,q.current=0,i0(V,N.current))},[F,_,V,c]),Je(()=>{const Ee=c.current;if(!(!F||!H||!V||!Ee||a.state.transitionStatus==="ending")){if(!_){U.current=!0,G.request(y),Ee.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{const se=xwe(Ee);Ee.style.removeProperty("--transform-origin");try{const X=getComputedStyle(V),fe=getComputedStyle(Ee),he=ys(H),Pe=wr(V),ye=H.getBoundingClientRect(),De=V.getBoundingClientRect(),Ue=ye.left,ve=ye.height,Fe=oe||Ee,Le=Fe.scrollHeight,Ze=parseFloat(fe.borderBottomWidth),Oe=parseFloat(X.marginTop)||10,ze=parseFloat(X.marginBottom)||10,Be=parseFloat(X.minHeight)||100,dt=QP(fe),Ce=5,me=5,Me=20,Ve=he.documentElement.clientHeight-Oe-ze,it=he.documentElement.clientWidth,Ct=Ve-ye.bottom+ve,Nt=p.current,vt=h.current;let Gt,kt=0,Tt=0;if(Nt&&vt){const at=vt.getBoundingClientRect();Gt=Nt.getBoundingClientRect();const Mt=at.left-Ue,Rn=Gt.left-De.left,Lt=at.top-ye.top+at.height/2,tn=Gt.top-De.top+Gt.height/2;kt=Mt-Rn,Tt=tn-Lt}const Xt=Ct+Tt+ze+Ze;let wt=Math.min(Ve,Xt);const sn=Ve-Oe-ze,rn=Xt-wt,vn=Math.max(Ce,Ue+kt),xt=it-me,on=Math.max(0,vn+De.width-xt);V.style.left=`${vn-on}px`,V.style.height=`${wt}px`,V.style.maxHeight="auto",V.style.marginTop=`${Oe}px`,V.style.marginBottom=`${ze}px`,Ee.style.height="100%";const zt=Fe.scrollHeight-Fe.clientHeight,$n=rn>=zt;$n&&(wt=Math.min(Ve,De.height)-(rn-zt));const tr=ye.top<Me||ye.bottom>Ve-Me||wt<Math.min(Le,Be),xr=(Pe.visualViewport?.scale??1)!==1&&xz;if(tr||xr){U.current=!0,i0(V,N.current),gs.flushSync(()=>S(!1));return}if($n){const at=Math.max(0,Ve-Xt);V.style.top=De.height>=sn?"0":`${at}px`,V.style.height=`${wt}px`,Fe.scrollTop=Fe.scrollHeight-Fe.clientHeight,ne.current=Math.max(Be,wt)}else V.style.bottom="0",ne.current=Math.max(Be,wt),Fe.scrollTop=rn;if(Gt){const at=De.top,Mt=De.height,Rn=Gt.top+Gt.height/2,Lt=Mt>0?(Rn-at)/Mt*100:50,tn=mwe(Lt,0,100);Ee.style.setProperty("--transform-origin",`50% ${tn}%`)}(ne.current===Ve||wt>=dt)&&(D.current=!0),y(),setTimeout(()=>{U.current=!0})}finally{se()}})}},[a,F,V,H,h,p,c,y,_,S,G,C,E,oe]),A.useEffect(()=>{if(!_||!V||!F)return;const Ee=wr(V);function se(X){f(!1,$t(dve,X))}return Ee.addEventListener("resize",se),()=>{Ee.removeEventListener("resize",se)}},[f,_,V,F]);const de={...oe?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":v||void 0,id:`${L}-list`},onKeyDown(Ee){g.current=!0,O&&N2.has(Ee.key)&&Ee.stopPropagation()},onMouseMove(){g.current=!1},onPointerLeave(Ee){if(!w||$8(Ee)||Ee.pointerType==="touch")return;const se=Ee.currentTarget;I.start(0,()=>{a.set("activeIndex",null),se.focus({preventScroll:!0})})},onScroll(Ee){oe||x.current?.(Ee.currentTarget)},..._&&{style:oe?{height:"100%"}:D8}},we=Mn("div",t,{ref:[n,c],state:re,stateAttributesMapping:bwe,props:[ee,de,H2(Z),{className:!oe&&_?qx.className:void 0},i]});return M.jsxs(A.Fragment,{children:[!$&&qx.getElement(P),M.jsx(A2,{context:j,modal:!1,disabled:!J,restoreFocus:!0,children:we})]})});function QP(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}const JP={transform:"none",scale:"1",translate:"0 0"};function wwe(e,t,n){n?e.setProperty(t,n):e.removeProperty(t)}function xwe(e){const{style:t}=e,n={},r=Object.keys(JP);for(const o of r)n[o]=t.getPropertyValue(o),t.setProperty(o,JP[o]);return()=>{for(const o of r)wwe(t,o,n[o])}}const Ewe=A.forwardRef(function(t,n){const{className:r,render:o,...i}=t,{store:a,scrollHandlerRef:c}=fi(),{alignItemWithTriggerActive:u}=B2(),f=yt(a,mt.hasScrollArrows),h=yt(a,mt.openMethod),p=yt(a,mt.multiple),v={id:`${yt(a,mt.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(x){c.current?.(x.currentTarget)},...u&&{style:D8},className:f&&h!=="touch"?qx.className:void 0},y=We(x=>{a.set("listElement",x)});return Mn("div",t,{ref:[n,y],props:[v,i]})});let z8=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function K2(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:a,unregister:c,subscribeMapChange:u,elementsRef:f,labelsRef:h,nextIndexRef:p}=rwe(),g=A.useRef(-1),[v,y]=A.useState(i??(o===z8.GuessFromOrder?()=>{if(g.current===-1){const T=p.current;p.current+=1,g.current=T}return g.current}:-1)),x=A.useRef(null),w=A.useCallback(T=>{if(x.current=T,v!==-1&&T!==null&&(f.current[v]=T,h)){const b=t!==void 0;h.current[v]=b?t:r?.current?.textContent??T.textContent}},[v,f,h,t,r]);return Je(()=>{if(i!=null)return;const T=x.current;if(T)return a(T,n),()=>{c(T)}},[i,a,c,n]),Je(()=>{if(i==null)return u(T=>{const b=x.current?T.get(x.current)?.index:null;b!=null&&y(b)})},[i,u,y]),A.useMemo(()=>({ref:w,index:v}),[v,w])}const L8=A.createContext(void 0);function G2(){const e=A.useContext(L8);if(!e)throw new Error(eo(57));return e}const _we=A.memo(A.forwardRef(function(t,n){const{render:r,className:o,value:i=null,label:a,disabled:c=!1,nativeButton:u=!1,...f}=t,h=A.useRef(null),p=K2({label:a,textRef:h,indexGuessBehavior:z8.GuessFromOrder}),{store:g,getItemProps:v,setOpen:y,setValue:x,selectionRef:w,typingRef:T,valuesRef:b,keyboardActiveRef:_,multiple:S,highlightItemOnHover:C}=fi(),E=go(),O=yt(g,mt.isActive,p.index),j=yt(g,mt.isSelected,p.index,i),P=yt(g,mt.isSelectedByFocus,p.index),$=yt(g,mt.isItemEqualToValue),I=p.index,L=I!==-1,F=A.useRef(null),J=kr(I);Je(()=>{if(!L)return;const te=b.current;return te[I]=i,()=>{delete te[I]}},[L,I,i,b]),Je(()=>{if(!L)return;const te=g.state.value;let re=te;S&&Array.isArray(te)&&te.length>0&&(re=te[te.length-1]),re!==void 0&&vf(re,i,$)&&g.set("selectedIndex",I)},[L,I,S,$,g,i]);const ee=A.useMemo(()=>({disabled:c,selected:j,highlighted:O}),[c,j,O]),Z=v({active:O,selected:j});Z.onFocus=void 0,Z.id=void 0;const H=A.useRef(null),V=A.useRef("mouse"),oe=A.useRef(!1),{getButtonProps:ne,buttonRef:D}=Tc({disabled:c,focusableWhenDisabled:!0,native:u});function q(te){const re=g.state.value;if(S){const de=Array.isArray(re)?re:[],we=j?qSe(de,i,$):[...de,i];x(we,$t($S,te))}else x(i,$t($S,te)),y(!1,$t($S,te))}const U={role:"option","aria-selected":j,tabIndex:O?0:-1,onFocus(){g.set("activeIndex",I)},onMouseEnter(){!_.current&&g.state.selectedIndex===null&&g.set("activeIndex",I)},onMouseMove(){C&&g.set("activeIndex",I)},onMouseLeave(te){!C||_.current||$8(te)||E.start(0,()=>{g.state.activeIndex===I&&g.set("activeIndex",null)})},onTouchStart(){w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(te){H.current=te.key,g.set("activeIndex",I)},onClick(te){oe.current=!1,!(te.type==="keydown"&&H.current===null)&&(c||H.current===" "&&T.current||V.current!=="touch"&&!O||(H.current=null,q(te.nativeEvent)))},onPointerEnter(te){V.current=te.pointerType},onPointerDown(te){V.current=te.pointerType,oe.current=!0},onMouseUp(te){if(c)return;if(oe.current){oe.current=!1;return}const re=!w.current.allowSelectedMouseUp&&j,de=!w.current.allowUnselectedMouseUp&&!j;re||de||V.current!=="touch"&&!O||q(te.nativeEvent)}},N=Mn("div",t,{ref:[D,n,p.ref,F],state:ee,props:[Z,U,f,ne]}),G=A.useMemo(()=>({selected:j,indexRef:J,textRef:h,selectedByFocus:P,hasRegistered:L}),[j,J,h,P,L]);return M.jsx(L8.Provider,{value:G,children:N})})),Cwe=A.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:o}=G2();return r||o?M.jsx(Twe,{...t,ref:n}):null}),Twe=A.memo(A.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:o,...i}=e,{selected:a}=G2(),c=A.useRef(null),{transitionStatus:u,setMounted:f}=W0(a),h=A.useMemo(()=>({selected:a,transitionStatus:u}),[a,u]),p=Mn("span",e,{ref:[t,c],state:h,props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:Sp});return jc({open:a,ref:c,onComplete(){a||f(!1)}}),p})),Rwe=A.memo(A.forwardRef(function(t,n){const{indexRef:r,textRef:o,selectedByFocus:i,hasRegistered:a}=G2(),{selectedItemTextRef:c}=fi(),{className:u,render:f,...h}=t,p=A.useCallback(v=>{if(!v||!a)return;const y=c.current===null||!c.current.isConnected;(i||y&&r.current===0)&&(c.current=v)},[c,r,i,a]);return Mn("div",t,{ref:[p,n,o],props:h})})),F8=A.forwardRef(function(t,n){const{render:r,className:o,direction:i,keepMounted:a=!1,...c}=t,{store:u,popupRef:f,listRef:h,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:g}=fi(),{side:v,scrollDownArrowRef:y,scrollUpArrowRef:x}=B2(),w=i==="up"?mt.scrollUpArrowVisible:mt.scrollDownArrowVisible,T=yt(u,w),b=yt(u,mt.openMethod),_=T&&b!=="touch",S=go(),C=i==="up"?x:y,{transitionStatus:E,setMounted:O}=W0(_);Je(()=>(g.current+=1,u.state.hasScrollArrows||u.set("hasScrollArrows",!0),()=>{g.current=Math.max(0,g.current-1),g.current===0&&u.state.hasScrollArrows&&u.set("hasScrollArrows",!1)}),[u,g]),jc({open:_,ref:C,onComplete(){_||O(!1)}});const j=A.useMemo(()=>({direction:i,visible:_,side:v,transitionStatus:E}),[i,_,v,E]),$=Mn("div",t,{ref:[n,C],state:j,props:[{"aria-hidden":!0,children:i==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(L){if(L.movementX===0&&L.movementY===0||S.isStarted())return;u.set("activeIndex",null);function F(){const J=u.state.listElement??f.current;if(!J)return;u.set("activeIndex",null),p();const ee=J.scrollTop===0,Z=Math.round(J.scrollTop+J.clientHeight)>=J.scrollHeight;if(h.current.length===0&&(i==="up"?u.set("scrollUpArrowVisible",!ee):u.set("scrollDownArrowVisible",!Z)),i==="up"&&ee||i==="down"&&Z){S.clear();return}if((u.state.listElement||f.current)&&h.current&&h.current.length>0){const V=h.current,oe=C.current?.offsetHeight||0;if(i==="up"){let ne=0;const D=J.scrollTop+oe;for(let U=0;U<V.length;U+=1){const N=V[U];if(N&&N.offsetTop>=D){ne=U;break}}const q=Math.max(0,ne-1);if(q<ne){const U=V[q];U&&(J.scrollTop=Math.max(0,U.offsetTop-oe))}else J.scrollTop=0}else{let ne=V.length-1;const D=J.scrollTop+J.clientHeight-oe;for(let U=0;U<V.length;U+=1){const N=V[U];if(N&&N.offsetTop+N.offsetHeight>D){ne=Math.max(0,U-1);break}}const q=Math.min(V.length-1,ne+1);if(q>ne){const U=V[q];U&&(J.scrollTop=U.offsetTop+U.offsetHeight-J.clientHeight+oe)}else J.scrollTop=J.scrollHeight-J.clientHeight}}S.start(40,F)}S.start(40,F)},onMouseLeave(){S.clear()}},c]});return _||a?$:null}),Owe=A.forwardRef(function(t,n){return M.jsx(F8,{...t,ref:n,direction:"down"})}),Awe=A.forwardRef(function(t,n){return M.jsx(F8,{...t,ref:n,direction:"up"})}),kwe=A.createContext(void 0),Mwe=A.forwardRef(function(t,n){const{className:r,render:o,...i}=t,[a,c]=A.useState(),u=A.useMemo(()=>({labelId:a,setLabelId:c}),[a,c]),f=Mn("div",t,{ref:n,props:[{role:"group","aria-labelledby":a},i]});return M.jsx(kwe.Provider,{value:u,children:f})}),e3=GSe;function t3({className:e,...t}){return M.jsx(Mwe,{"data-slot":"select-group",className:St("scroll-my-1",e),...t})}function n3({className:e,...t}){return M.jsx(JSe,{"data-slot":"select-value",className:St("flex flex-1 text-left",e),...t})}function r3({className:e,size:t="default",children:n,...r}){return M.jsxs(XSe,{"data-slot":"select-trigger","data-size":t,className:St("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),...r,children:[n,M.jsx(ewe,{render:M.jsx(bD,{className:"text-muted-foreground size-4 pointer-events-none"})})]})}function o3({className:e,children:t,side:n="bottom",sideOffset:r=4,align:o="center",alignOffset:i=0,alignItemWithTrigger:a=!0,...c}){return M.jsx(nwe,{children:M.jsx(hwe,{side:n,sideOffset:r,align:o,alignOffset:i,alignItemWithTrigger:a,className:"isolate z-50",children:M.jsxs(Swe,{"data-slot":"select-content",className:St("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),...c,children:[M.jsx(jwe,{}),M.jsx(Ewe,{children:t}),M.jsx(Pwe,{})]})})})}function Eu({className:e,children:t,...n}){return M.jsxs(_we,{"data-slot":"select-item",className:St("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),...n,children:[M.jsx(Rwe,{className:"flex flex-1 gap-2 shrink-0 whitespace-nowrap",children:t}),M.jsx(Cwe,{render:M.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:M.jsx(o_,{className:"pointer-events-none"})})]})}function jwe({className:e,...t}){return M.jsx(Awe,{"data-slot":"select-scroll-up-button",className:St("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:M.jsx(qne,{})})}function Pwe({className:e,...t}){return M.jsx(Owe,{"data-slot":"select-scroll-down-button",className:St("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:M.jsx(bD,{})})}const U8=A.createContext(void 0);function Nwe(){const e=A.useContext(U8);if(e===void 0)throw new Error(eo(63));return e}let s3=(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 V8={...L2,checked(e){return e?{[s3.checked]:""}:{[s3.unchecked]:""}}},Dwe=A.forwardRef(function(t,n){const{checked:r,className:o,defaultChecked:i,id:a,inputRef:c,name:u,nativeButton:f=!1,onCheckedChange:h,readOnly:p=!1,required:g=!1,disabled:v=!1,render:y,uncheckedValue:x,value:w,...T}=t,{clearErrors:b}=F2(),{state:_,setTouched:S,setDirty:C,validityData:E,setFilled:O,setFocused:j,shouldValidateOnChange:P,validationMode:$,disabled:I,name:L,validation:F}=vc(),{labelId:J}=ev(),ee=I||v,Z=L??u,H=We(h),V=A.useRef(null),oe=Vi(V,c,F.inputRef),ne=A.useRef(null),D=Uf(),q=tv({id:a,implicit:!1,controlRef:ne}),U=f?void 0:q,[N,G]=Vh({controlled:r,default:!!i,name:"Switch",state:"checked"});U2({id:D,commit:F.commit,value:N,controlRef:ne,name:Z,getValue:()=>N}),Je(()=>{V.current&&O(V.current.checked)},[V,O]),k8(N,()=>{b(Z),C(N!==E.initialValue),O(N),P()?F.commit(N):F.commit(N,!0)});const{getButtonProps:te,buttonRef:re}=Tc({disabled:ee,native:f}),de={id:f?q:D,role:"switch","aria-checked":N,"aria-readonly":p||void 0,"aria-required":g||void 0,"aria-labelledby":J,onFocus(){ee||j(!0)},onBlur(){const X=V.current;!X||ee||(S(!0),j(!1),$==="onBlur"&&F.commit(X.checked))},onClick(X){p||ee||(X.preventDefault(),V?.current?.click())}},we=A.useMemo(()=>cp({checked:N,disabled:ee,id:U,name:Z,required:g,style:Z?Wz:G0,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:oe,onChange(X){if(X.nativeEvent.defaultPrevented)return;const fe=X.target.checked,he=$t(il,X.nativeEvent);H?.(fe,he),!he.isCanceled&&G(fe)},onFocus(){ne.current?.focus()}},F.getInputValidationProps,w!==void 0?{value:w}:Mr),[N,ee,oe,U,Z,H,g,G,F,w]),Ee=A.useMemo(()=>({..._,checked:N,disabled:ee,readOnly:p,required:g}),[_,N,ee,p,g]),se=Mn("span",t,{state:Ee,ref:[n,ne,re],props:[de,F.getValidationProps,T,te],stateAttributesMapping:V8});return M.jsxs(U8.Provider,{value:Ee,children:[se,!N&&Z&&x!==void 0&&M.jsx("input",{type:"hidden",name:Z,value:x}),M.jsx("input",{...we})]})}),$we=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:a}=vc(),c=Nwe(),u={...a,...c};return Mn("span",t,{state:u,ref:n,stateAttributesMapping:V8,props:i})});function i3({className:e,size:t="default",...n}){return M.jsx(Dwe,{"data-slot":"switch","data-size":t,className:St("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),...n,children:M.jsx($we,{"data-slot":"switch-thumb",className:"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform"})})}const q8=A.createContext(void 0);function Z2(){const e=A.useContext(q8);if(e===void 0)throw new Error(eo(64));return e}let Iwe=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const Y2={tabActivationDirection:e=>({[Iwe.activationDirection]:e})},zwe=A.forwardRef(function(t,n){const{className:r,defaultValue:o=0,onValueChange:i,orientation:a="horizontal",render:c,value:u,...f}=t,h=q2(),p=Object.hasOwn(t,"defaultValue"),g=A.useRef([]),[v,y]=A.useState(()=>new Map),[x,w]=Vh({controlled:u,default:o,name:"Tabs",state:"value"}),T=u!==void 0,[b,_]=A.useState(()=>new Map),[S,C]=A.useState("none"),E=We((H,V)=>{i?.(H,V),!V.isCanceled&&(w(H),C(V.activationDirection))}),O=We((H,V)=>{y(oe=>{if(oe.get(H)===V)return oe;const ne=new Map(oe);return ne.set(H,V),ne})}),j=We((H,V)=>{y(oe=>{if(!oe.has(H)||oe.get(H)!==V)return oe;const ne=new Map(oe);return ne.delete(H),ne})}),P=A.useCallback(H=>v.get(H),[v]),$=A.useCallback(H=>{for(const V of b.values())if(H===V?.value)return V?.id},[b]),I=A.useCallback(H=>{if(H===void 0)return null;for(const[V,oe]of b.entries())if(oe!=null&&H===(oe.value??oe.index))return V;return null},[b]),L=A.useMemo(()=>({direction:h,getTabElementBySelectedValue:I,getTabIdByPanelValue:$,getTabPanelIdByValue:P,onValueChange:E,orientation:a,registerMountedTabPanel:O,setTabMap:_,unregisterMountedTabPanel:j,tabActivationDirection:S,value:x}),[h,I,$,P,E,a,O,_,j,S,x]),F=A.useMemo(()=>{for(const H of b.values())if(H!=null&&H.value===x)return H},[b,x]),J=A.useMemo(()=>{for(const H of b.values())if(H!=null&&!H.disabled)return H.value},[b]);Je(()=>{if(T||b.size===0)return;const H=F?.disabled,V=F==null&&x!==null;if(p&&H&&x===o||!H&&!V)return;const ne=J??null;x!==ne&&(w(ne),C("none"))},[o,J,p,T,F,C,w,b,x]);const Z=Mn("div",t,{state:{orientation:a,tabActivationDirection:S},ref:n,props:f,stateAttributesMapping:Y2});return M.jsx(q8.Provider,{value:L,children:M.jsx(V2,{elementsRef:g,children:Z})})}),B8="data-composite-item-active";function Lwe(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=_D(),{ref:o,index:i}=K2(e),a=n===i,c=A.useRef(null),u=Vi(o,c);return{compositeProps:A.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(i)},onMouseMove(){const h=c.current;if(!t||!h)return;const p=h.hasAttribute("disabled")||h.ariaDisabled==="true";!a&&!p&&h.focus()}}),[a,r,i,t]),compositeRef:u,index:i}}const H8=A.createContext(void 0);function Fwe(){const e=A.useContext(H8);if(e===void 0)throw new Error(eo(65));return e}const Uwe=A.forwardRef(function(t,n){const{className:r,disabled:o=!1,render:i,value:a,id:c,nativeButton:u=!0,...f}=t,{value:h,getTabPanelIdByValue:p,orientation:g}=Z2(),{activateOnFocus:v,highlightedTabIndex:y,onTabActivation:x,setHighlightedTabIndex:w,tabsListElement:T}=Fwe(),b=Uf(c),_=A.useMemo(()=>({disabled:o,id:b,value:a}),[o,b,a]),{compositeProps:S,compositeRef:C,index:E}=Lwe({metadata:_}),O=a===h,j=A.useRef(!1);Je(()=>{if(j.current){j.current=!1;return}if(!(O&&E>-1&&y!==E))return;const oe=T;if(oe!=null){const ne=Ii(ys(oe));if(ne&&Jt(oe,ne))return}o||w(E)},[O,E,y,w,o,T]);const{getButtonProps:P,buttonRef:$}=Tc({disabled:o,native:u,focusableWhenDisabled:!0}),I=p(a),L=A.useRef(!1),F=A.useRef(!1);function J(oe){O||o||x(a,$t(il,oe.nativeEvent,void 0,{activationDirection:"none"}))}function ee(oe){O||(E>-1&&!o&&w(E),!o&&v&&(!L.current||L.current&&F.current)&&x(a,$t(il,oe.nativeEvent,void 0,{activationDirection:"none"})))}function Z(oe){if(O||o)return;L.current=!0;function ne(){L.current=!1,F.current=!1}(!oe.button||oe.button===0)&&(F.current=!0,ys(oe.currentTarget).addEventListener("pointerup",ne,{once:!0}))}const H=A.useMemo(()=>({disabled:o,active:O,orientation:g}),[o,O,g]);return Mn("button",t,{state:H,ref:[n,$,C],props:[S,{role:"tab","aria-controls":I,"aria-selected":O,id:b,onClick:J,onFocus:ee,onPointerDown:Z,[B8]:O?"":void 0,onKeyDownCapture(){j.current=!0}},f,P]})});let Vwe=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const qwe=A.forwardRef(function(t,n){const{className:r,value:o,render:i,keepMounted:a=!1,...c}=t,{value:u,getTabIdByPanelValue:f,orientation:h,tabActivationDirection:p,registerMountedTabPanel:g,unregisterMountedTabPanel:v}=Z2(),y=Uf(),x=A.useMemo(()=>({id:y,value:o}),[y,o]),{ref:w,index:T}=K2({metadata:x}),b=o!==u,_=f(o),S=A.useMemo(()=>({hidden:b,orientation:h,tabActivationDirection:p}),[b,h,p]),C=Mn("div",t,{state:S,ref:[n,w],props:[{"aria-labelledby":_,hidden:b,id:y??void 0,role:"tabpanel",tabIndex:b?-1:0,[Vwe.index]:T},c],stateAttributesMapping:Y2});return Je(()=>{if(!(b&&!a)&&y!=null)return g(o,y),()=>{v(o,y)}},[b,a,o,y,g,v]),!b||a?C:null});function Bwe(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const Hwe=[];function Kwe(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:o=!1,orientation:i="both",direction:a,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:f,enableHomeAndEndKeys:h=!1,stopEventPropagation:p=!1,disabledIndices:g,modifierKeys:v=Hwe}=e,[y,x]=A.useState(0),w=n>1,T=A.useRef(null),b=Vi(T,f),_=A.useRef([]),S=A.useRef(!1),C=c??y,E=We((P,$=!1)=>{if((u??x)(P),$){const I=_.current[P];qP(T.current,I,a,i)}}),O=We(P=>{if(P.size===0||S.current)return;S.current=!0;const $=Array.from(P.keys()),I=$.find(F=>F?.hasAttribute(B8))??null,L=I?$.indexOf(I):-1;L!==-1&&E(L),qP(T.current,I,a,i)}),j=A.useMemo(()=>({"aria-orientation":i==="both"?void 0:i,ref:b,onFocus(P){!T.current||!VP(P.target)||P.target.setSelectionRange(0,P.target.value.length??0)},onKeyDown(P){const $=h?X1e:_8;if(!$.has(P.key)||Gwe(P,v)||!T.current)return;const L=a==="rtl",F=L?Uh:Qu,J={horizontal:F,vertical:tc,both:F}[i],ee=L?Qu:Uh,Z={horizontal:ee,vertical:Xu,both:ee}[i];if(VP(P.target)&&!Bwe(P.target)){const U=P.target.selectionStart,N=P.target.selectionEnd,G=P.target.value??"";if(U==null||P.shiftKey||U!==N||P.key!==Z&&U<G.length||P.key!==J&&U>0)return}let H=C;const V=gy(_,g),oe=Ix(_,g);if(w){const U=t||Array.from({length:_.current.length},()=>({width:1,height:1})),N=Pz(U,n,o),G=N.findIndex(re=>re!=null&&!Za(_,re,g)),te=N.reduce((re,de,we)=>de!=null&&!Za(_,de,g)?we:re,-1);H=N[jz({current:N.map(re=>re?_.current[re]:null)},{event:P,orientation:i,loopFocus:r,cols:n,disabledIndices:Dz([...g||_.current.map((re,de)=>Za(_,de)?de:void 0),void 0],N),minIndex:G,maxIndex:te,prevIndex:Nz(C>oe?V:C,U,N,n,P.key===tc?"bl":P.key===Qu?"tr":"tl"),rtl:L})]}const ne={horizontal:[F],vertical:[tc],both:[F,tc]}[i],D={horizontal:[ee],vertical:[Xu],both:[ee,Xu]}[i],q=w?$:{horizontal:h?Y1e:x8,vertical:h?W1e:E8,both:$}[i];h&&(P.key===Ep?H=V:P.key===_p&&(H=oe)),H===C&&(ne.includes(P.key)||D.includes(P.key))&&(r&&H===oe&&ne.includes(P.key)?H=V:r&&H===V&&D.includes(P.key)?H=oe:H=Kr(_,{startingIndex:H,decrement:D.includes(P.key),disabledIndices:g})),H!==C&&!Ku(_,H)&&(p&&P.stopPropagation(),q.has(P.key)&&P.preventDefault(),E(H,!0),queueMicrotask(()=>{_.current[H]?.focus()}))}}),[n,o,a,g,_,h,C,w,t,r,b,v,E,i,p]);return A.useMemo(()=>({props:j,highlightedIndex:C,onHighlightedIndexChange:E,elementsRef:_,disabledIndices:g,onMapChange:O,relayKeyboardEvent:j.onKeyDown}),[j,C,E,_,g,O])}function Gwe(e,t){for(const n of nSe.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Zwe(e){const{render:t,className:n,refs:r=af,props:o=af,state:i=Mr,stateAttributesMapping:a,highlightedIndex:c,onHighlightedIndexChange:u,orientation:f,dense:h,itemSizes:p,loopFocus:g,cols:v,enableHomeAndEndKeys:y,onMapChange:x,stopEventPropagation:w=!0,rootRef:T,disabledIndices:b,modifierKeys:_,highlightItemOnHover:S=!1,tag:C="div",...E}=e,O=q2(),{props:j,highlightedIndex:P,onHighlightedIndexChange:$,elementsRef:I,onMapChange:L,relayKeyboardEvent:F}=Kwe({itemSizes:p,cols:v,loopFocus:g,dense:h,orientation:f,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:T,stopEventPropagation:w,enableHomeAndEndKeys:y,direction:O,disabledIndices:b,modifierKeys:_}),J=Mn(C,e,{state:i,ref:r,props:[j,...o,E],stateAttributesMapping:a}),ee=A.useMemo(()=>({highlightedIndex:P,onHighlightedIndexChange:$,highlightItemOnHover:S,relayKeyboardEvent:F}),[P,$,S,F]);return M.jsx(ED.Provider,{value:ee,children:M.jsx(V2,{elementsRef:I,onMapChange:Z=>{x?.(Z),L(Z)},children:J})})}const Ywe=A.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:o,loopFocus:i=!0,render:a,...c}=t,{getTabElementBySelectedValue:u,onValueChange:f,orientation:h,value:p,setTabMap:g,tabActivationDirection:v}=Z2(),[y,x]=A.useState(0),[w,T]=A.useState(null),b=Wwe(p,h,w,u),_=We((O,j)=>{if(O!==p){const P=b(O);j.activationDirection=P,f(O,j)}}),S=A.useMemo(()=>({orientation:h,tabActivationDirection:v}),[h,v]),C={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},E=A.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:y,onTabActivation:_,setHighlightedTabIndex:x,tabsListElement:w,value:p}),[r,y,_,x,w,p]);return M.jsx(H8.Provider,{value:E,children:M.jsx(Zwe,{render:a,className:o,state:S,refs:[n,T],props:[C,c],stateAttributesMapping:Y2,highlightedIndex:y,enableHomeAndEndKeys:!0,loopFocus:i,orientation:h,onHighlightedIndexChange:x,onMapChange:g,disabledIndices:af})})});function a3(e,t){const{left:n,top:r}=e.getBoundingClientRect(),{left:o,top:i}=t.getBoundingClientRect(),a=n-o,c=r-i;return{left:a,top:c}}function Wwe(e,t,n,r){const[o,i]=A.useState(null);return Je(()=>{if(e==null||n==null){i(null);return}const a=r(e);if(a==null){i(null);return}const{left:c,top:u}=a3(a,n);i(t==="horizontal"?c:u)},[t,r,n,e]),A.useCallback(a=>{if(a===e)return"none";if(a==null)return i(null),"none";if(a!=null&&n!=null){const c=r(a);if(c!=null){const{left:u,top:f}=a3(c,n);if(o==null)return i(t==="horizontal"?u:f),"none";if(t==="horizontal"){if(u<o)return i(u),"left";if(u>o)return i(u),"right"}else{if(f<o)return i(f),"up";if(f>o)return i(f),"down"}}}return"none"},[r,t,o,n,e])}function Xwe({className:e,orientation:t="horizontal",...n}){return M.jsx(zwe,{"data-slot":"tabs","data-orientation":t,className:St("gap-2 group/tabs flex data-[orientation=horizontal]:flex-col",e),...n})}const Qwe=Wi("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 Jwe({className:e,variant:t="default",...n}){return M.jsx(Ywe,{"data-slot":"tabs-list","data-variant":t,className:St(Qwe({variant:t}),e),...n})}function QS({className:e,...t}){return M.jsx(Uwe,{"data-slot":"tabs-trigger",className:St("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 JS({className:e,...t}){return M.jsx(qwe,{"data-slot":"tabs-content",className:St("text-xs/relaxed flex-1 outline-none",e),...t})}function exe({className:e,...t}){return M.jsx("div",{"data-slot":"input-group",role:"group",className:St("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 txe=Wi("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 nxe({className:e,align:t="inline-start",...n}){return M.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:St(txe({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function rxe({className:e,...t}){return M.jsx(Go,{"data-slot":"command",className:St("bg-popover text-popover-foreground rounded-none flex size-full flex-col overflow-hidden",e),...t})}function oxe({className:e,...t}){return M.jsx("div",{"data-slot":"command-input-wrapper",className:"border-b pb-0",children:M.jsxs(exe,{className:"bg-input/30 border-input/30 h-8 border-none shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[M.jsx(Go.Input,{"data-slot":"command-input",className:St("w-full text-xs outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),M.jsx(nxe,{children:M.jsx(sre,{className:"size-4 shrink-0 opacity-50"})})]})})}function sxe({className:e,...t}){return M.jsx(Go.List,{"data-slot":"command-list",className:St("no-scrollbar max-h-72 scroll-py-0 outline-none overflow-x-hidden overflow-y-auto",e),...t})}function ixe({className:e,...t}){return M.jsx(Go.Empty,{"data-slot":"command-empty",className:St("py-6 text-center text-xs",e),...t})}function axe({className:e,...t}){return M.jsx(Go.Group,{"data-slot":"command-group",className:St("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 lxe({className:e,children:t,...n}){return M.jsxs(Go.Item,{"data-slot":"command-item",className:St("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),...n,children:[t,M.jsx(o_,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}const K8=A.createContext(void 0);function Cp(e){const t=A.useContext(K8);if(t===void 0&&!e)throw new Error(eo(47));return t}function cxe(){return{...m8(),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 uxe={...g8,disabled:Xe(e=>e.disabled),instantType:Xe(e=>e.instantType),openMethod:Xe(e=>e.openMethod),openChangeReason:Xe(e=>e.openChangeReason),modal:Xe(e=>e.modal),stickIfOpen:Xe(e=>e.stickIfOpen),titleElementId:Xe(e=>e.titleElementId),descriptionElementId:Xe(e=>e.descriptionElementId),openOnHover:Xe(e=>e.openOnHover),closeDelay:Xe(e=>e.closeDelay),hasViewport:Xe(e=>e.hasViewport)};class W2 extends j2{constructor(t){const n={...cxe(),...t};n.open&&t?.mounted===void 0&&(n.mounted=!0),super(n,{popupRef:A.createRef(),backdropRef:A.createRef(),internalBackdropRef:A.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:A.createRef(),beforeContentFocusGuardRef:A.createRef(),stickIfOpenTimeout:new al,triggerElements:new X0},uxe)}setOpen=(t,n)=>{const r=n.reason===Lo,o=n.reason===Ha&&n.event.detail===0,i=!t&&(n.reason===vz||n.reason==null);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const a={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested,triggerElement:n.trigger};this.state.floatingRootContext.context.events?.emit("openchange",a);const u=()=>{const f={open:t,openChangeReason:n.reason},h=n.trigger?.id??null;(h||t)&&(f.activeTriggerId=h,f.activeTriggerElement=n.trigger??null),this.update(f)};r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(Lre,()=>{this.set("stickIfOpen",!1)}),gs.flushSync(u)):u(),o||i?this.set("instantType",o?"click":"dismiss"):n.reason===gc?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(t,n){const r=Co(()=>new W2(n)).current,o=t??r;return w2(r.disposeEffect),o}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function l3({props:e}){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:i,modal:a=!1,handle:c,triggerId:u,defaultTriggerId:f=null}=e,h=W2.useStore(c?.store,{open:n??r,modal:a,activeTriggerId:u!==void 0?u:f});h.useControlledProp("open",n,r),h.useControlledProp("activeTriggerId",u,f);const p=h.useState("open"),g=h.useState("positionerElement"),v=h.useState("payload"),y=h.useState("openChangeReason");h.useContextCallback("onOpenChange",o),h.useContextCallback("onOpenChangeComplete",i);const{openMethod:x,triggerProps:w,reset:T}=z2(p);h8(h);const{forceUnmount:b}=p8(p,h,()=>{h.update({stickIfOpen:!0,openChangeReason:null}),T()});I2(p&&a===!0&&y!==Lo&&x!=="touch",g),A.useEffect(()=>{p||h.context.stickIfOpenTimeout.clear()},[h,p]);const _=A.useCallback(ee=>{const Z=$t(ee);return Z.preventUnmountOnClose=()=>{h.set("preventUnmountingOnClose",!0)},Z},[h]),S=A.useCallback(()=>{h.setOpen(!1,_(bz))},[h,_]);A.useImperativeHandle(e.actionsRef,()=>({unmount:b,close:S}),[b,S]);const C=v8({popupStore:h,onOpenChange:h.setOpen}),E=M2(C,{outsidePressEvent:{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),O=S8(C),{getReferenceProps:j,getFloatingProps:P,getTriggerProps:$}=Q0([E,O]),I=A.useMemo(()=>j(w),[j,w]),L=A.useMemo(()=>$(w),[$,w]),F=A.useMemo(()=>P(),[P]);h.useSyncedValues({modal:a,openMethod:x,activeTriggerProps:I,inactiveTriggerProps:L,popupProps:F,floatingRootContext:C,nested:yl()!=null});const J=A.useMemo(()=>({store:h}),[h]);return M.jsx(K8.Provider,{value:J,children:typeof t=="function"?t({payload:v}):t})}function fxe(e){return Cp(!0)?M.jsx(l3,{props:e}):M.jsx(rbe,{children:M.jsx(l3,{props:e})})}const dxe=300,hxe=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,nativeButton:a=!0,handle:c,payload:u,openOnHover:f=!1,delay:h=dxe,closeDelay:p=0,id:g,...v}=t,y=Cp(!0),x=c?.store??y?.store;if(!x)throw new Error(eo(74));const w=Uf(g),T=x.useState("isTriggerActive",w),b=x.useState("floatingRootContext"),_=x.useState("isOpenedByTrigger",w),S=A.useRef(null),{registerTrigger:C,isMountedByThisTrigger:E}=O1e(w,S,x,{payload:u,disabled:i,openOnHover:f,closeDelay:p}),O=x.useState("openChangeReason"),j=x.useState("stickIfOpen"),P=x.useState("openMethod"),$=I1e(b,{enabled:b!=null&&f&&(P!=="touch"||O!==Ha),mouseOnly:!0,move:!1,handleClose:H1e(),restMs:h,delay:{close:p},triggerElementRef:S,isActiveTrigger:T}),I=e8(b,{enabled:b!=null,stickIfOpen:j}),L=Q0([I]),F=x.useState("triggerProps",E),J=A.useMemo(()=>({disabled:i,open:_}),[i,_]),{getButtonProps:ee,buttonRef:Z}=Tc({disabled:i,native:a}),H=A.useMemo(()=>({open(q){return q&&O===Ha?yz.open(q):gz.open(q)}}),[O]),V=Mn("button",t,{state:J,ref:[Z,n,C,S],props:[L.getReferenceProps(),$,F,{[RD]:"",id:w},v,ee],stateAttributesMapping:H}),oe=A.useRef(null),ne=We(q=>{gs.flushSync(()=>{x.setOpen(!1,$t(gc,q.nativeEvent,q.currentTarget))}),Qve(oe.current)?.focus()}),D=We(q=>{const U=x.select("positionerElement");if(U&&Gu(q,U))x.context.beforeContentFocusGuardRef.current?.focus();else{gs.flushSync(()=>{x.setOpen(!1,$t(gc,q.nativeEvent,q.currentTarget))});let N=Xve(x.context.triggerFocusTargetRef.current||S.current);for(;N!==null&&Jt(U,N);){const G=N;if(N=T2(N),N===G)break}N?.focus()}});return T?M.jsxs(A.Fragment,{children:[M.jsx(yf,{ref:oe,onFocus:ne}),M.jsx(A.Fragment,{children:V},w),M.jsx(yf,{ref:x.context.triggerFocusTargetRef,onFocus:D})]}):M.jsx(A.Fragment,{children:V},w)}),G8=A.createContext(void 0);function pxe(){const e=A.useContext(G8);if(e===void 0)throw new Error(eo(45));return e}const mxe=A.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:i}=Cp();return i.useState("mounted")||r?M.jsx(G8.Provider,{value:r,children:M.jsx(R2,{ref:n,...o,renderGuards:!1})}):null}),Z8=A.createContext(void 0);function gxe(){const e=A.useContext(Z8);if(!e)throw new Error(eo(46));return e}const yxe=A.forwardRef(function(t,n){const{render:r,className:o,anchor:i,positionMethod:a="absolute",side:c="bottom",align:u="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:p="clipping-ancestors",collisionPadding:g=5,arrowPadding:v=5,sticky:y=!1,disableAnchorTracking:x=!1,collisionAvoidance:w=Vre,...T}=t,{store:b}=Cp(),_=pxe(),S=tbe(),C=b.useState("floatingRootContext"),E=b.useState("mounted"),O=b.useState("open"),j=b.useState("openChangeReason"),P=b.useState("activeTriggerElement"),$=b.useState("modal"),I=b.useState("positionerElement"),L=b.useState("instantType"),F=b.useState("transitionStatus"),J=b.useState("hasViewport"),ee=A.useRef(null),Z=d8(I,!1,!1),H=P8({anchor:i,floatingRootContext:C,positionMethod:a,mounted:E,side:c,sideOffset:f,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:p,collisionPadding:g,sticky:y,disableAnchorTracking:x,keepMounted:_,nodeId:S,collisionAvoidance:w,adaptiveOrigin:J?fwe:void 0}),V=A.useMemo(()=>{const N={};return O||(N.pointerEvents="none"),{role:"presentation",hidden:!E,style:{...H.positionerStyles,...N}}},[O,E,H.positionerStyles]),oe=A.useMemo(()=>({props:V,...H}),[V,H]),ne=C?.select("domReferenceElement");Je(()=>{const N=ne,G=ee.current;if(N&&(ee.current=N),G&&N&&N!==G){b.set("instantType",void 0);const te=new AbortController;return Z(()=>{b.set("instantType","trigger-change")},te.signal),()=>{te.abort()}}},[ne,Z,b]);const D=A.useMemo(()=>({open:O,side:oe.side,align:oe.align,anchorHidden:oe.anchorHidden,instant:L}),[O,oe.side,oe.align,oe.anchorHidden,L]),q=A.useCallback(N=>{b.set("positionerElement",N)},[b]),U=Mn("div",t,{state:D,props:[oe.props,H2(F),T],ref:[n,q],stateAttributesMapping:Lf});return M.jsxs(Z8.Provider,{value:oe,children:[E&&$===!0&&j!==Lo&&M.jsx($2,{ref:b.context.internalBackdropRef,inert:D2(!O),cutout:P}),M.jsx(nbe,{id:S,children:U})]})}),vxe={...Lf,...Sp},bxe=A.forwardRef(function(t,n){const{className:r,render:o,initialFocus:i,finalFocus:a,...c}=t,{store:u}=Cp(),f=gxe(),h=I8()!=null,p=u.useState("open"),g=u.useState("openMethod"),v=u.useState("instantType"),y=u.useState("transitionStatus"),x=u.useState("popupProps"),w=u.useState("titleElementId"),T=u.useState("descriptionElementId"),b=u.useState("modal"),_=u.useState("mounted"),S=u.useState("openChangeReason"),C=u.useState("activeTriggerElement"),E=u.useState("floatingRootContext");jc({open:p,ref:u.context.popupRef,onComplete(){p&&u.context.onOpenChangeComplete?.(!0)}});const O=u.useState("disabled"),j=u.useState("openOnHover"),P=u.useState("closeDelay");N1e(E,{enabled:j&&!O,closeDelay:P});function $(ee){return ee==="touch"?u.context.popupRef.current:!0}const I=i===void 0?$:i,L=A.useMemo(()=>({open:p,side:f.side,align:f.align,instant:v,transitionStatus:y}),[p,f.side,f.align,v,y]),F=A.useCallback(ee=>{u.set("popupElement",ee)},[u]),J=Mn("div",t,{state:L,ref:[n,u.context.popupRef,F],props:[x,{"aria-labelledby":w,"aria-describedby":T,onKeyDown(ee){h&&N2.has(ee.key)&&ee.stopPropagation()}},H2(y),c],stateAttributesMapping:vxe});return M.jsx(A2,{context:E,openInteractionType:g,modal:b==="trap-focus",disabled:!_||S===Lo,initialFocus:I,returnFocus:a,restoreFocus:"popup",previousFocusableElement:Yn(C)?C:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:J})});function Sxe({...e}){return M.jsx(fxe,{"data-slot":"popover",...e})}function wxe({...e}){return M.jsx(hxe,{"data-slot":"popover-trigger",...e})}function xxe({className:e,align:t="center",alignOffset:n=0,side:r="bottom",sideOffset:o=4,...i}){return M.jsx(mxe,{children:M.jsx(yxe,{align:t,alignOffset:n,side:r,sideOffset:o,className:"isolate z-50",children:M.jsx(bxe,{"data-slot":"popover-content",className:St("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),...i})})})}const c3=[{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:"繁體中文(台灣)"}],Exe=({value:e,onValueChange:t})=>{const[n,r]=A.useState(!1),o=c3.find(i=>i.value===e);return M.jsxs(Sxe,{open:n,onOpenChange:r,children:[M.jsx(wxe,{children:M.jsxs(Ja,{variant:"outline",role:"combobox","aria-expanded":n,className:"w-full justify-between",children:[o?M.jsxs("span",{children:[o.value,M.jsxs("span",{className:"text-muted-foreground",children:[" ","- ",o.label]})]}):"Select locale...",M.jsx(Hne,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),M.jsx(xxe,{className:"w-full p-0",children:M.jsxs(rxe,{children:[M.jsx(oxe,{placeholder:"Search locale..."}),M.jsxs(sxe,{children:[M.jsx(ixe,{children:"No locale found."}),M.jsx(axe,{children:c3.map(i=>M.jsxs(lxe,{value:i.value,onSelect:a=>{t(a===e?"":a),r(!1)},children:[M.jsxs("span",{children:[i.label," ",M.jsxs("span",{className:"text-muted-foreground",children:["(",i.value,")"]})]}),M.jsx(o_,{className:St("ml-auto h-4 w-4",e===i.value?"opacity-100":"opacity-0")})]},i.value))})]})]})})]})};function _xe({resourceUri:e}){const{data:t}=yD(e);return t?M.jsx("div",{className:"text-xs",children:M.jsx(K0,{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 Cxe=()=>{const e=hl(),{openaiRef:t,openaiObject:n,openInAppUrl:r}=Cf(e.name),{setToolData:o}=_f(),i=e._meta?.["openai/outputTemplate"],a=(c,u)=>{const f=t?.current?.contentWindow?.openai;f&&n&&(f[c]=u,o(e.name,{openaiObject:{...n,[c]:u}}))};return n?M.jsx("div",{className:"overflow-auto max-h-full min-h-0",children:M.jsxs(Xwe,{defaultValue:"widget-state",className:"gap-0",children:[M.jsxs(Jwe,{className:"border-b border-border w-full",children:[M.jsx(QS,{value:"properties",children:"Properties"}),M.jsx(QS,{value:"widget-state",children:"Widget State"}),i&&M.jsx(QS,{value:"resource",children:"Resource"})]}),M.jsx(JS,{value:"properties",className:"p-4",children:M.jsxs(jSe,{children:[M.jsxs(Oa,{children:[M.jsx(Aa,{children:"Display Mode"}),M.jsxs(e3,{value:n.displayMode,onValueChange:c=>a("displayMode",c),"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:[M.jsx(r3,{children:M.jsx(n3,{})}),M.jsx(o3,{children:M.jsxs(t3,{children:[M.jsx(Eu,{value:"inline",children:"Inline"}),M.jsx(Eu,{value:"fullscreen",children:"Fullscreen"}),M.jsx(Eu,{value:"pip",children:"Pip"}),M.jsx(Eu,{value:"modal",children:"Modal"})]})})]})]}),M.jsxs(Oa,{children:[M.jsx(Aa,{children:"Theme"}),M.jsxs(kSe,{children:[M.jsx(Ja,{variant:n.theme==="light"?"default":"outline",onClick:()=>a("theme","light"),children:M.jsx(are,{})}),M.jsx(Ja,{variant:n.theme==="dark"?"default":"outline",onClick:()=>a("theme","dark"),children:M.jsx(tre,{})})]})]}),M.jsxs(Oa,{children:[M.jsx(Aa,{children:"Locale"}),M.jsx(Exe,{value:n.locale,onValueChange:c=>a("locale",c)})]}),M.jsxs(Oa,{children:[M.jsx(Aa,{children:"Max Height"}),M.jsx(WS,{type:"number",value:n.maxHeight!==void 0?String(n.maxHeight):"",onChange:c=>{const u=c.target.value.trim();a("maxHeight",u===""?void 0:Number(u))}})]}),M.jsxs(Oa,{children:[M.jsx(Aa,{children:"Safe Area Insets"}),M.jsx("div",{className:"grid grid-cols-2 gap-4",children:["top","bottom","left","right"].map(c=>{const u=c.charAt(0).toUpperCase()+c.slice(1);return M.jsxs("div",{children:[M.jsx("label",{htmlFor:`safeArea-${c}`,className:"text-xs text-muted-foreground block mb-1",children:u}),M.jsx(WS,{id:`safeArea-${c}`,type:"number",value:n.safeArea?.insets?.[c]!==void 0?String(n.safeArea.insets[c]):"0",onChange:f=>{const h=f.target.value.trim();a("safeArea",{...n.safeArea,insets:{...n.safeArea?.insets,[c]:h===""?0:Number(h)}})}})]},c)})})]}),M.jsxs(Oa,{children:[M.jsx(Aa,{children:"Device Type"}),M.jsxs(e3,{value:n.userAgent?.device?.type??"desktop",onValueChange:c=>a("userAgent",{...n.userAgent,device:{...n.userAgent?.device,type:c}}),"aria-label":"Select device type",items:[{label:"Mobile",value:"mobile"},{label:"Desktop",value:"desktop"}],name:"deviceType",required:!0,children:[M.jsx(r3,{children:M.jsx(n3,{})}),M.jsx(o3,{children:M.jsxs(t3,{children:[M.jsx(Eu,{value:"mobile",children:"Mobile"}),M.jsx(Eu,{value:"desktop",children:"Desktop"})]})})]})]}),M.jsxs(Oa,{children:[M.jsx(Aa,{children:"Capabilities"}),M.jsxs("div",{className:"flex gap-8",children:[M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("label",{htmlFor:"hover",className:"text-xs text-muted-foreground cursor-pointer",children:"Hover"}),M.jsx(i3,{id:"hover",checked:n.userAgent?.capabilities?.hover??!1,onCheckedChange:c=>a("userAgent",{...n.userAgent,capabilities:{...n.userAgent?.capabilities,hover:c}})})]}),M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("label",{htmlFor:"touch",className:"text-xs text-muted-foreground cursor-pointer",children:"Touch"}),M.jsx(i3,{id:"touch",checked:n.userAgent?.capabilities?.touch??!1,onCheckedChange:c=>a("userAgent",{...n.userAgent,capabilities:{...n.userAgent?.capabilities,touch:c}})})]})]})]}),M.jsxs(Oa,{children:[M.jsx(Aa,{children:"Open in App URL"}),M.jsx(WS,{type:"text",value:r??"",readOnly:!0,placeholder:"Not set",className:"font-mono text-xs"})]})]})}),M.jsx(JS,{value:"widget-state",className:"p-4",children:M.jsx(K0,{src:n.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",collapsed:3,collapseStringsAfterLength:80})}),i&&M.jsx(JS,{value:"resource",className:"p-4",children:M.jsx(A.Suspense,{fallback:M.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading resource..."}),children:M.jsx(_xe,{resourceUri:i})})})]})}):null};function u3(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function Txe(e,t=60){const n=JSON.stringify(e);return n.length>t?`${n.slice(0,t)}…`:n}function Rxe({log:e}){const[t,n]=A.useState(!1),r=Object.keys(e.args).length>0,o=r?Txe(e.args):null;return M.jsxs(M.Fragment,{children:[r?M.jsxs("button",{type:"button",onClick:()=>n(!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:[M.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:u3(e.timestamp)}),M.jsx("span",{className:St("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}),M.jsx("span",{className:"text-gray-500 dark:text-gray-600 mr-1",children:t?"▼":"▶"}),M.jsx("span",{className:"text-gray-600 dark:text-gray-400 truncate flex-1 min-w-0",children:o})]}):M.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:[M.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:u3(e.timestamp)}),M.jsx("span",{className:"text-blue-600 dark:text-blue-400 font-semibold shrink-0 min-w-[120px]",children:e.command})]}),t&&r&&M.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:M.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 Oxe(){const e=hl(),{setToolData:t}=_f(),{openaiLogs:n}=Cf(e.name),r=A.useRef(null),o=()=>{t(e.name,{openaiLogs:[]})};return A.useEffect(()=>{const i=r.current;i&&(i.scrollTop=i.scrollHeight)},[]),M.jsxs("div",{className:"flex flex-col h-full overflow-hidden min-h-0",children:[M.jsxs("div",{className:"flex items-center justify-between mb-3 h-8 flex-none",children:[M.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-200",children:"OpenAI API Logs"}),M.jsx("div",{className:"flex items-center gap-2",children:n.length>0&&M.jsxs(Ja,{variant:"ghost",size:"sm",onClick:o,children:[M.jsx(cre,{className:"w-3 h-3"}),"Clear"]})})]}),M.jsx("div",{ref:r,className:"overflow-auto flex-1 bg-gray-50 rounded-lg border border-gray-200 min-h-0",children:n.map(i=>M.jsx(Rxe,{log:i},i.id))})]})}const Axe=Wi("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 kxe({className:e,variant:t,...n}){return M.jsx("div",{className:St(Axe({variant:t}),e),"data-slot":"alert",role:"alert",...n})}function Mxe({className:e,...t}){return M.jsx("div",{className:St("font-medium [svg~&]:col-start-2",e),"data-slot":"alert-title",...t})}function jxe({className:e,...t}){return M.jsx("div",{className:St("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2",e),"data-slot":"alert-description",...t})}const Pxe=()=>{const e=hl(),t=Cf(e.name);if(!t)return null;const n=()=>{const r=[];return t.response.content.forEach(o=>{o.type==="text"&&r.push(o.text)}),r.join(`
|
|
152
|
+
`)};return M.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-card",children:M.jsx("div",{className:"p-4 overflow-auto",children:t.response?t.response.isError?M.jsxs(kxe,{variant:"error",children:[M.jsx(Gne,{}),M.jsx(Mxe,{children:"Error"}),M.jsx(jxe,{children:n()})]}):M.jsx("div",{className:"text-xs",children:M.jsx(K0,{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})})},Y8="openai:set_globals";class Nxe extends CustomEvent{type=Y8}var f3;(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"})(f3||(f3={}));class Dxe{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,n){this.keyToValue.set(t,n),this.valueToKey.set(n,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class W8{constructor(t){this.generateIdentifier=t,this.kv=new Dxe}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class $xe extends W8{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,n){typeof n=="object"?(n.allowProps&&this.classToAllowedProps.set(t,n.allowProps),super.register(t,n.identifier)):super.register(t,n)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function Ixe(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function zxe(e,t){const n=Ixe(e);if("find"in n)return n.find(t);const r=n;for(let o=0;o<r.length;o++){const i=r[o];if(t(i))return i}}function bf(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Sy(e,t){return e.indexOf(t)!==-1}function d3(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}class Lxe{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return zxe(this.transfomers,n=>n.isApplicable(t))}findByName(t){return this.transfomers[t]}}const Fxe=e=>Object.prototype.toString.call(e).slice(8,-1),X8=e=>typeof e>"u",Uxe=e=>e===null,qh=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,Bx=e=>qh(e)&&Object.keys(e).length===0,ll=e=>Array.isArray(e),Vxe=e=>typeof e=="string",qxe=e=>typeof e=="number"&&!isNaN(e),Bxe=e=>typeof e=="boolean",Hxe=e=>e instanceof RegExp,Bh=e=>e instanceof Map,Hh=e=>e instanceof Set,Q8=e=>Fxe(e)==="Symbol",Kxe=e=>e instanceof Date&&!isNaN(e.valueOf()),J8=e=>e instanceof Error,h3=e=>typeof e=="number"&&isNaN(e),Gxe=e=>Bxe(e)||Uxe(e)||X8(e)||qxe(e)||Vxe(e)||Q8(e),Zxe=e=>typeof e=="bigint",Yxe=e=>e===1/0||e===-1/0,Wxe=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Xxe=e=>e instanceof URL,Hx=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),ew=e=>e.map(String).map(Hx).join("."),mh=(e,t)=>{const n=[];let r="";for(let i=0;i<e.length;i++){let a=e.charAt(i);if(!t&&a==="\\"){const f=e.charAt(i+1);if(f==="\\"){r+="\\",i++;continue}else if(f!==".")throw Error("invalid path")}if(a==="\\"&&e.charAt(i+1)==="."){r+=".",i++;continue}if(a==="."){n.push(r),r="";continue}r+=a}const o=r;return n.push(o),n};function qs(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const eL=[qs(X8,"undefined",()=>null,()=>{}),qs(Zxe,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),qs(Kxe,"Date",e=>e.toISOString(),e=>new Date(e)),qs(J8,"Error",(e,t)=>{const n={name:e.name,message:e.message};return"cause"in e&&(n.cause=e.cause),t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message,{cause:e.cause});return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),qs(Hxe,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),qs(Hh,"set",e=>[...e.values()],e=>new Set(e)),qs(Bh,"map",e=>[...e.entries()],e=>new Map(e)),qs(e=>h3(e)||Yxe(e),"number",e=>h3(e)?"NaN":e>0?"Infinity":"-Infinity",Number),qs(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),qs(Xxe,"URL",e=>e.toString(),e=>new URL(e))];function nv(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const tL=nv((e,t)=>Q8(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),Qxe=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),nL=nv(Wxe,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=Qxe[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function rL(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const oL=nv(rL,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(o=>{r[o]=e[o]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)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(r.prototype),e)}),sL=nv((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),Jxe=[oL,tL,sL,nL],p3=(e,t)=>{const n=d3(Jxe,o=>o.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=d3(eL,o=>o.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},iL={};eL.forEach(e=>{iL[e.annotation]=e});const eEe=(e,t,n)=>{if(ll(t))switch(t[0]){case"symbol":return tL.untransform(e,t,n);case"class":return oL.untransform(e,t,n);case"custom":return sL.untransform(e,t,n);case"typed-array":return nL.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=iL[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},Fu=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function aL(e){if(Sy(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Sy(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Sy(e,"constructor"))throw new Error("constructor is not allowed as a property")}const tEe=(e,t)=>{aL(t);for(let n=0;n<t.length;n++){const r=t[n];if(Hh(e))e=Fu(e,+r);else if(Bh(e)){const o=+r,i=+t[++n]==0?"key":"value",a=Fu(e,o);switch(i){case"key":e=a;break;case"value":e=e.get(a);break}}else e=e[r]}return e},Kx=(e,t,n)=>{if(aL(t),t.length===0)return n(e);let r=e;for(let i=0;i<t.length-1;i++){const a=t[i];if(ll(r)){const c=+a;r=r[c]}else if(qh(r))r=r[a];else if(Hh(r)){const c=+a;r=Fu(r,c)}else if(Bh(r)){if(i===t.length-2)break;const u=+a,f=+t[++i]==0?"key":"value",h=Fu(r,u);switch(f){case"key":r=h;break;case"value":r=r.get(h);break}}}const o=t[t.length-1];if(ll(r)?r[+o]=n(r[+o]):qh(r)&&(r[o]=n(r[o])),Hh(r)){const i=Fu(r,+o),a=n(i);i!==a&&(r.delete(i),r.add(a))}if(Bh(r)){const i=+t[t.length-2],a=Fu(r,i);switch(+o==0?"key":"value"){case"key":{const u=n(a);r.set(u,r.get(a)),u!==a&&r.delete(a);break}case"value":{r.set(a,n(r.get(a)));break}}}return e},lL=e=>e<1;function Gx(e,t,n,r=[]){if(!e)return;const o=lL(n);if(!ll(e)){bf(e,(c,u)=>Gx(c,t,n,[...r,...mh(u,o)]));return}const[i,a]=e;a&&bf(a,(c,u)=>{Gx(c,t,n,[...r,...mh(u,o)])}),t(i,r)}function nEe(e,t,n,r){return Gx(t,(o,i)=>{e=Kx(e,i,a=>eEe(a,o,r))},n),e}function rEe(e,t,n){const r=lL(n);function o(i,a){const c=tEe(e,mh(a,r));i.map(u=>mh(u,r)).forEach(u=>{e=Kx(e,u,()=>c)})}if(ll(t)){const[i,a]=t;i.forEach(c=>{e=Kx(e,mh(c,r),()=>e)}),a&&bf(a,o)}else bf(t,o);return e}const oEe=(e,t)=>qh(e)||ll(e)||Bh(e)||Hh(e)||J8(e)||rL(e,t);function sEe(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function iEe(e,t){const n={};let r;return e.forEach(o=>{if(o.length<=1)return;t||(o=o.map(c=>c.map(String)).sort((c,u)=>c.length-u.length));const[i,...a]=o;i.length===0?r=a.map(ew):n[ew(i)]=a.map(ew)}),r?Bx(n)?[r]:[r,n]:Bx(n)?void 0:n}const cL=(e,t,n,r,o=[],i=[],a=new Map)=>{const c=Gxe(e);if(!c){sEe(e,o,t);const v=a.get(e);if(v)return r?{transformedValue:null}:v}if(!oEe(e,n)){const v=p3(e,n),y=v?{transformedValue:v.value,annotations:[v.type]}:{transformedValue:e};return c||a.set(e,y),y}if(Sy(i,e))return{transformedValue:null};const u=p3(e,n),f=u?.value??e,h=ll(f)?[]:{},p={};bf(f,(v,y)=>{if(y==="__proto__"||y==="constructor"||y==="prototype")throw new Error(`Detected property ${y}. This is a prototype pollution risk, please remove it from your object.`);const x=cL(v,t,n,r,[...o,y],[...i,e],a);h[y]=x.transformedValue,ll(x.annotations)?p[Hx(y)]=x.annotations:qh(x.annotations)&&bf(x.annotations,(w,T)=>{p[Hx(y)+"."+T]=w})});const g=Bx(p)?{transformedValue:h,annotations:u?[u.type]:void 0}:{transformedValue:h,annotations:u?[u.type,p]:p};return c||a.set(e,g),g};function uL(e){return Object.prototype.toString.call(e).slice(8,-1)}function m3(e){return uL(e)==="Array"}function aEe(e){if(uL(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function lEe(e,t,n,r,o){const i={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";i==="enumerable"&&(e[t]=n),o&&i==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function Zx(e,t={}){if(m3(e))return e.map(o=>Zx(o,t));if(!aEe(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((o,i)=>{if(i==="__proto__"||m3(t.props)&&!t.props.includes(i))return o;const a=e[i],c=Zx(a,t);return lEe(o,i,c,e,t.nonenumerable),o},{})}class Dn{constructor({dedupe:t=!1}={}){this.classRegistry=new $xe,this.symbolRegistry=new W8(n=>n.description??""),this.customTransformerRegistry=new Lxe,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const n=new Map,r=cL(t,n,this,this.dedupe),o={json:r.transformedValue};r.annotations&&(o.meta={...o.meta,values:r.annotations});const i=iEe(n,this.dedupe);return i&&(o.meta={...o.meta,referentialEqualities:i}),o.meta&&(o.meta.v=1),o}deserialize(t,n){const{json:r,meta:o}=t;let i=n?.inPlace?r:Zx(r);return o?.values&&(i=nEe(i,o.values,o.v??0,this)),o?.referentialEqualities&&(i=rEe(i,o.referentialEqualities,o.v??0)),i}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t),{inPlace:!0})}registerClass(t,n){this.classRegistry.register(t,n)}registerSymbol(t,n){this.symbolRegistry.register(t,n)}registerCustom(t,n){this.customTransformerRegistry.register({name:n,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}Dn.defaultInstance=new Dn;Dn.serialize=Dn.defaultInstance.serialize.bind(Dn.defaultInstance);Dn.deserialize=Dn.defaultInstance.deserialize.bind(Dn.defaultInstance);Dn.stringify=Dn.defaultInstance.stringify.bind(Dn.defaultInstance);Dn.parse=Dn.defaultInstance.parse.bind(Dn.defaultInstance);Dn.registerClass=Dn.defaultInstance.registerClass.bind(Dn.defaultInstance);Dn.registerSymbol=Dn.defaultInstance.registerSymbol.bind(Dn.defaultInstance);Dn.registerCustom=Dn.defaultInstance.registerCustom.bind(Dn.defaultInstance);Dn.allowErrorProps=Dn.defaultInstance.allowErrorProps.bind(Dn.defaultInstance);A.createContext(null);function cEe(e,t,n,r,o){return{callTool:async(a,c)=>{t("callTool",{name:a,args:c});const u=await r(a,c??{});return t("← callTool response",u,"response"),u},sendFollowUpMessage:async a=>{t("sendFollowUpMessage",a)},openExternal:a=>{t("openExternal",a)},requestDisplayMode:async a=>(t("requestDisplayMode",a),e.displayMode=a.mode,n("displayMode",a.mode),{mode:a.mode}),setWidgetState:async a=>{t("setWidgetState",a),e.widgetState=a,n("widgetState",a)},requestModal:async a=>{t("requestModal",a),e.displayMode="modal",e.view={mode:"modal"},n("displayMode","modal")},uploadFile:async a=>(t("uploadFile",{name:a.name,size:a.size}),{fileId:"123"}),getFileDownloadUrl:async a=>(t("getFileDownloadUrl",a),{downloadUrl:"https://example.com/file.pdf"}),setOpenInAppUrl:async a=>{t("setOpenInAppUrl",a),o(a.href)}}}function uEe(e,t){const n=["theme","userAgent","locale","maxHeight","displayMode","safeArea","toolInput","toolOutput","toolResponseMetadata","view","widgetState"];return new Proxy(e||{},{set(r,o,i,a){const c=Reflect.set(r,o,i,a);if(n.includes(o)){const u=new Nxe(Y8,{detail:{globals:{[o]:i}}});t.dispatchEvent(u)}return c}})}function fEe(e,t,n,r,o,i){const a=tp(t),c=uEe(a,e),u=cEe(c,n,r,o,i);Gq(c,u),e.openai=c}function dEe(e){const t=new DOMParser().parseFromString(e,"text/html"),n=t.querySelector('script[type="module"]#dev-widget-entry');if(!n)throw new Error("dev-widget-entry script not found");const r=`
|
|
153
|
+
const waitForOpenAI = () => new Promise((resolve, reject) => {
|
|
154
|
+
if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
|
|
155
|
+
if ("openai" in window && window.openai != null) { resolve(); return; }
|
|
156
|
+
Object.defineProperty(window, "openai", {
|
|
157
|
+
configurable: true,
|
|
158
|
+
enumerable: true,
|
|
159
|
+
get() { return undefined; },
|
|
160
|
+
set(value) {
|
|
161
|
+
Object.defineProperty(window, "openai", {
|
|
162
|
+
configurable: true,
|
|
163
|
+
enumerable: true,
|
|
164
|
+
writable: true,
|
|
165
|
+
value,
|
|
166
|
+
});
|
|
167
|
+
resolve();
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
`;return n.textContent=`
|
|
172
|
+
${r}
|
|
173
|
+
await waitForOpenAI();
|
|
174
|
+
${n.textContent}
|
|
175
|
+
`,t.head.innerHTML+t.body.innerHTML}const hEe=()=>{const e=hl(),t=Cf(e.name),{openaiObject:n}=t??{},{data:r}=yD(e._meta?.["openai/outputTemplate"]),{setToolData:o,pushOpenAiLog:i,updateOpenaiObject:a,setOpenInAppUrl:c}=_f(),u=A.useRef(null),f=A.useRef(null),h=A.useRef(!1),p=r.contents[0].text,g=A.useCallback(()=>{if(h.current)return;const v=u.current;if(!v||!v.contentWindow||!v.contentDocument)return;h.current=!0;const y=r.contents[0]._meta?.["openai/widgetDomain"];y&&typeof y=="string"&&c(e.name,y),fEe(v.contentWindow,n,(x,w,T="default")=>{i(e.name,{timestamp:Date.now(),command:x,args:w,type:T})},(x,w)=>{a(e.name,x,w)},(x,w)=>Of.callTool(x,w),x=>{c(e.name,x)}),v.contentDocument.open(),v.contentDocument.write(dEe(p)),v.contentDocument.close(),o(e.name,{openaiRef:u})},[n,i,o,a,c,e.name,p,r]);return A.useEffect(()=>{g()},[g]),M.jsx("div",{ref:f,className:"relative overflow-auto",style:{width:"100%",height:"100%"},children:M.jsx("iframe",{ref:u,src:"about:blank",onLoad:g,style:{width:"100%",height:"100%",border:"none",display:"block"},sandbox:"allow-scripts allow-same-origin allow-forms",title:"html-preview"})})},pEe=()=>{const e=hl(),t=Cf(e.name),{defaultLayout:n,onLayoutChange:r}=Zd({id:"skybridge-devtools-input-column",storage:localStorage}),{defaultLayout:o,onLayoutChange:i}=Zd({id:"skybridge-devtools-widget-section",storage:localStorage}),{defaultLayout:a,onLayoutChange:c}=Zd({id:"skybridge-devtools-inspector-section",storage:localStorage}),{defaultLayout:u,onLayoutChange:f}=Zd({id:"skybridge-devtools-main-section",storage:localStorage}),h=!!(e._meta?.["openai/outputTemplate"]&&t?.response&&!t.response.isError);return M.jsx("div",{className:"flex-1 flex flex-col overflow-hidden relative z-10",children:M.jsxs(Au,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:u,onLayoutChange:f,children:[M.jsx(As,{id:"top-section",minSize:"30",children:M.jsxs(Au,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:n,onLayoutChange:r,children:[M.jsx(As,{id:"input-column",minSize:"20",maxSize:"60",children:M.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:M.jsx(OSe,{})})}),M.jsx(ku,{className:"w-px bg-border"}),M.jsx(As,{id:"output-column",minSize:"30",children:M.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:M.jsx(Pxe,{})})})]})}),h&&M.jsxs(M.Fragment,{children:[M.jsx(ku,{className:"h-px bg-border"}),M.jsx(As,{id:"widget-section",minSize:"20",children:M.jsxs(Au,{orientation:"horizontal",className:"flex-1 overflow-hidden bg-card",defaultLayout:a,onLayoutChange:c,children:[M.jsx(As,{id:"widget-logs-panel",minSize:"30",children:M.jsx("div",{className:"flex flex-col h-full overflow-hidden",children:M.jsxs(Au,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:o,onLayoutChange:i,children:[M.jsx(As,{id:"widget-panel",minSize:"20",maxSize:"80",children:M.jsx("div",{className:"h-full overflow-hidden",children:M.jsx(A.Suspense,{children:M.jsx(hEe,{})})})}),M.jsx(ku,{className:"h-px bg-border"}),M.jsx(As,{id:"logs-panel",minSize:"20",children:M.jsx("div",{className:"p-4 flex flex-col h-full min-h-0",children:M.jsx(Oxe,{})})})]})})}),M.jsx(ku,{className:"w-px bg-border"}),M.jsx(As,{id:"inspector-panel",minSize:"20",maxSize:"50",defaultSize:30,children:M.jsx("div",{className:"flex flex-col overflow-hidden h-full min-h-0",children:M.jsx("div",{className:"overflow-auto",children:M.jsx(Cxe,{})})})})]})})]})]})})};function mEe(){const e=gD(),[,t]=_E(),n=r_();return M.jsx("div",{className:"h-full border-r border-border bg-card flex flex-col",children:M.jsxs("aside",{className:"h-full flex flex-col",children:[M.jsxs("div",{className:"p-4 border-b border-border h-[72px] flex flex-col justify-center",children:[M.jsx("h2",{className:"text-sm font-semibold text-foreground mb-1",children:"Tools"}),M.jsxs("p",{className:"text-xs text-muted-foreground",children:[e?.length," ",e?.length===1?"tool":"tools"]})]}),M.jsx("div",{className:"flex-1 overflow-y-auto",children:M.jsx("div",{className:"p-2",children:e?.length===0?M.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No tools registered yet."}):M.jsx("div",{className:"space-y-1",children:e?.map(r=>{const o=r.name===n?.name;return M.jsxs("button",{type:"button",onClick:()=>t(r.name),className:St("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",o&&"bg-accent text-accent-foreground"),children:[M.jsxs("div",{className:"pr-6 flex flex-col gap-1",children:[M.jsx("div",{className:St("font-semibold text-sm leading-tight truncate",o&&"text-accent-foreground"),children:r.name}),r.description&&M.jsx("div",{className:St("text-xs leading-snug text-muted-foreground","line-clamp-2",o&&"text-accent-foreground/80"),children:r.description})]}),o&&M.jsx("div",{className:"absolute top-3 right-3 w-1.5 h-1.5 rounded-full bg-primary"})]},r.name)})})})})]})})}function gEe(){const e=r_(),{defaultLayout:t,onLayoutChange:n}=Zd({id:"skybridge-devtools-tools-list",storage:localStorage});return M.jsxs("div",{className:"flex h-screen w-full flex-col overflow-hidden bg-background",children:[M.jsx($oe,{}),M.jsxs(Au,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:t,onLayoutChange:n,children:[M.jsx(As,{id:"tools-list",minSize:"15",maxSize:"40",children:M.jsx(mEe,{})}),M.jsx(ku,{className:"w-px bg-border"}),M.jsx(As,{id:"main-content",minSize:"30",children:M.jsx("div",{className:"flex flex-1 flex-col overflow-hidden relative h-full",children:e?M.jsx(pEe,{}):M.jsx(gce,{})})})]})]})}const yEe=new K7;function vEe(){return M.jsx(G7,{client:yEe,children:M.jsx(AU,{children:M.jsx(gEe,{})})})}x7.createRoot(document.getElementById("root")).render(M.jsx(A.StrictMode,{children:M.jsx(vEe,{})}))});export default bEe();
|