apigrip 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,75 @@
1
+ (function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function u(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function s(c){if(c.ep)return;c.ep=!0;const f=u(c);fetch(c.href,f)}})();function Ny(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Kc={exports:{}},su={};var op;function My(){if(op)return su;op=1;var i=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function u(s,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var g in c)g!=="key"&&(f[g]=c[g])}else f=c;return c=f.ref,{$$typeof:i,type:s,key:d,ref:c!==void 0?c:null,props:f}}return su.Fragment=a,su.jsx=u,su.jsxs=u,su}var fp;function Ry(){return fp||(fp=1,Kc.exports=My()),Kc.exports}var b=Ry(),Jc={exports:{}},ru={},$c={exports:{}},Fc={};var hp;function Cy(){return hp||(hp=1,(function(i){function a(k,P){var fe=k.length;k.push(P);e:for(;0<fe;){var Be=fe-1>>>1,He=k[Be];if(0<c(He,P))k[Be]=P,k[fe]=He,fe=Be;else break e}}function u(k){return k.length===0?null:k[0]}function s(k){if(k.length===0)return null;var P=k[0],fe=k.pop();if(fe!==P){k[0]=fe;e:for(var Be=0,He=k.length,E=He>>>1;Be<E;){var G=2*(Be+1)-1,te=k[G],ne=G+1,me=k[ne];if(0>c(te,fe))ne<He&&0>c(me,te)?(k[Be]=me,k[ne]=fe,Be=ne):(k[Be]=te,k[G]=fe,Be=G);else if(ne<He&&0>c(me,fe))k[Be]=me,k[ne]=fe,Be=ne;else break e}}return P}function c(k,P){var fe=k.sortIndex-P.sortIndex;return fe!==0?fe:k.id-P.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;i.unstable_now=function(){return f.now()}}else{var d=Date,g=d.now();i.unstable_now=function(){return d.now()-g}}var p=[],y=[],v=1,A=null,w=3,D=!1,V=!1,Q=!1,Z=!1,J=typeof setTimeout=="function"?setTimeout:null,ce=typeof clearTimeout=="function"?clearTimeout:null,le=typeof setImmediate<"u"?setImmediate:null;function ve(k){for(var P=u(y);P!==null;){if(P.callback===null)s(y);else if(P.startTime<=k)s(y),P.sortIndex=P.expirationTime,a(p,P);else break;P=u(y)}}function ee(k){if(Q=!1,ve(k),!V)if(u(p)!==null)V=!0,re||(re=!0,be());else{var P=u(y);P!==null&&et(ee,P.startTime-k)}}var re=!1,L=-1,X=5,ie=-1;function $e(){return Z?!0:!(i.unstable_now()-ie<X)}function I(){if(Z=!1,re){var k=i.unstable_now();ie=k;var P=!0;try{e:{V=!1,Q&&(Q=!1,ce(L),L=-1),D=!0;var fe=w;try{t:{for(ve(k),A=u(p);A!==null&&!(A.expirationTime>k&&$e());){var Be=A.callback;if(typeof Be=="function"){A.callback=null,w=A.priorityLevel;var He=Be(A.expirationTime<=k);if(k=i.unstable_now(),typeof He=="function"){A.callback=He,ve(k),P=!0;break t}A===u(p)&&s(p),ve(k)}else s(p);A=u(p)}if(A!==null)P=!0;else{var E=u(y);E!==null&&et(ee,E.startTime-k),P=!1}}break e}finally{A=null,w=fe,D=!1}P=void 0}}finally{P?be():re=!1}}}var be;if(typeof le=="function")be=function(){le(I)};else if(typeof MessageChannel<"u"){var lt=new MessageChannel,Me=lt.port2;lt.port1.onmessage=I,be=function(){Me.postMessage(null)}}else be=function(){J(I,0)};function et(k,P){L=J(function(){k(i.unstable_now())},P)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(k){k.callback=null},i.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<k?Math.floor(1e3/k):5},i.unstable_getCurrentPriorityLevel=function(){return w},i.unstable_next=function(k){switch(w){case 1:case 2:case 3:var P=3;break;default:P=w}var fe=w;w=P;try{return k()}finally{w=fe}},i.unstable_requestPaint=function(){Z=!0},i.unstable_runWithPriority=function(k,P){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var fe=w;w=k;try{return P()}finally{w=fe}},i.unstable_scheduleCallback=function(k,P,fe){var Be=i.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?Be+fe:Be):fe=Be,k){case 1:var He=-1;break;case 2:He=250;break;case 5:He=1073741823;break;case 4:He=1e4;break;default:He=5e3}return He=fe+He,k={id:v++,callback:P,priorityLevel:k,startTime:fe,expirationTime:He,sortIndex:-1},fe>Be?(k.sortIndex=fe,a(y,k),u(p)===null&&k===u(y)&&(Q?(ce(L),L=-1):Q=!0,et(ee,fe-Be))):(k.sortIndex=He,a(p,k),V||D||(V=!0,re||(re=!0,be()))),k},i.unstable_shouldYield=$e,i.unstable_wrapCallback=function(k){var P=w;return function(){var fe=w;w=P;try{return k.apply(this,arguments)}finally{w=fe}}}})(Fc)),Fc}var dp;function zy(){return dp||(dp=1,$c.exports=Cy()),$c.exports}var Wc={exports:{}},xe={};var pp;function wy(){if(pp)return xe;pp=1;var i=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),w=Symbol.iterator;function D(E){return E===null||typeof E!="object"?null:(E=w&&E[w]||E["@@iterator"],typeof E=="function"?E:null)}var V={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q=Object.assign,Z={};function J(E,G,te){this.props=E,this.context=G,this.refs=Z,this.updater=te||V}J.prototype.isReactComponent={},J.prototype.setState=function(E,G){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,G,"setState")},J.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function ce(){}ce.prototype=J.prototype;function le(E,G,te){this.props=E,this.context=G,this.refs=Z,this.updater=te||V}var ve=le.prototype=new ce;ve.constructor=le,Q(ve,J.prototype),ve.isPureReactComponent=!0;var ee=Array.isArray;function re(){}var L={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function ie(E,G,te){var ne=te.ref;return{$$typeof:i,type:E,key:G,ref:ne!==void 0?ne:null,props:te}}function $e(E,G){return ie(E.type,G,E.props)}function I(E){return typeof E=="object"&&E!==null&&E.$$typeof===i}function be(E){var G={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(te){return G[te]})}var lt=/\/+/g;function Me(E,G){return typeof E=="object"&&E!==null&&E.key!=null?be(""+E.key):G.toString(36)}function et(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(re,re):(E.status="pending",E.then(function(G){E.status==="pending"&&(E.status="fulfilled",E.value=G)},function(G){E.status==="pending"&&(E.status="rejected",E.reason=G)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function k(E,G,te,ne,me){var Se=typeof E;(Se==="undefined"||Se==="boolean")&&(E=null);var we=!1;if(E===null)we=!0;else switch(Se){case"bigint":case"string":case"number":we=!0;break;case"object":switch(E.$$typeof){case i:case a:we=!0;break;case v:return we=E._init,k(we(E._payload),G,te,ne,me)}}if(we)return me=me(E),we=ne===""?"."+Me(E,0):ne,ee(me)?(te="",we!=null&&(te=we.replace(lt,"$&/")+"/"),k(me,G,te,"",function(Yt){return Yt})):me!=null&&(I(me)&&(me=$e(me,te+(me.key==null||E&&E.key===me.key?"":(""+me.key).replace(lt,"$&/")+"/")+we)),G.push(me)),1;we=0;var Tt=ne===""?".":ne+":";if(ee(E))for(var Fe=0;Fe<E.length;Fe++)ne=E[Fe],Se=Tt+Me(ne,Fe),we+=k(ne,G,te,Se,me);else if(Fe=D(E),typeof Fe=="function")for(E=Fe.call(E),Fe=0;!(ne=E.next()).done;)ne=ne.value,Se=Tt+Me(ne,Fe++),we+=k(ne,G,te,Se,me);else if(Se==="object"){if(typeof E.then=="function")return k(et(E),G,te,ne,me);throw G=String(E),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return we}function P(E,G,te){if(E==null)return E;var ne=[],me=0;return k(E,ne,"","",function(Se){return G.call(te,Se,me++)}),ne}function fe(E){if(E._status===-1){var G=E._result;G=G(),G.then(function(te){(E._status===0||E._status===-1)&&(E._status=1,E._result=te)},function(te){(E._status===0||E._status===-1)&&(E._status=2,E._result=te)}),E._status===-1&&(E._status=0,E._result=G)}if(E._status===1)return E._result.default;throw E._result}var Be=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof E=="object"&&E!==null&&typeof E.message=="string"?String(E.message):String(E),error:E});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},He={map:P,forEach:function(E,G,te){P(E,function(){G.apply(this,arguments)},te)},count:function(E){var G=0;return P(E,function(){G++}),G},toArray:function(E){return P(E,function(G){return G})||[]},only:function(E){if(!I(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return xe.Activity=A,xe.Children=He,xe.Component=J,xe.Fragment=u,xe.Profiler=c,xe.PureComponent=le,xe.StrictMode=s,xe.Suspense=p,xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,xe.__COMPILER_RUNTIME={__proto__:null,c:function(E){return L.H.useMemoCache(E)}},xe.cache=function(E){return function(){return E.apply(null,arguments)}},xe.cacheSignal=function(){return null},xe.cloneElement=function(E,G,te){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var ne=Q({},E.props),me=E.key;if(G!=null)for(Se in G.key!==void 0&&(me=""+G.key),G)!X.call(G,Se)||Se==="key"||Se==="__self"||Se==="__source"||Se==="ref"&&G.ref===void 0||(ne[Se]=G[Se]);var Se=arguments.length-2;if(Se===1)ne.children=te;else if(1<Se){for(var we=Array(Se),Tt=0;Tt<Se;Tt++)we[Tt]=arguments[Tt+2];ne.children=we}return ie(E.type,me,ne)},xe.createContext=function(E){return E={$$typeof:d,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:f,_context:E},E},xe.createElement=function(E,G,te){var ne,me={},Se=null;if(G!=null)for(ne in G.key!==void 0&&(Se=""+G.key),G)X.call(G,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(me[ne]=G[ne]);var we=arguments.length-2;if(we===1)me.children=te;else if(1<we){for(var Tt=Array(we),Fe=0;Fe<we;Fe++)Tt[Fe]=arguments[Fe+2];me.children=Tt}if(E&&E.defaultProps)for(ne in we=E.defaultProps,we)me[ne]===void 0&&(me[ne]=we[ne]);return ie(E,Se,me)},xe.createRef=function(){return{current:null}},xe.forwardRef=function(E){return{$$typeof:g,render:E}},xe.isValidElement=I,xe.lazy=function(E){return{$$typeof:v,_payload:{_status:-1,_result:E},_init:fe}},xe.memo=function(E,G){return{$$typeof:y,type:E,compare:G===void 0?null:G}},xe.startTransition=function(E){var G=L.T,te={};L.T=te;try{var ne=E(),me=L.S;me!==null&&me(te,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(re,Be)}catch(Se){Be(Se)}finally{G!==null&&te.types!==null&&(G.types=te.types),L.T=G}},xe.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},xe.use=function(E){return L.H.use(E)},xe.useActionState=function(E,G,te){return L.H.useActionState(E,G,te)},xe.useCallback=function(E,G){return L.H.useCallback(E,G)},xe.useContext=function(E){return L.H.useContext(E)},xe.useDebugValue=function(){},xe.useDeferredValue=function(E,G){return L.H.useDeferredValue(E,G)},xe.useEffect=function(E,G){return L.H.useEffect(E,G)},xe.useEffectEvent=function(E){return L.H.useEffectEvent(E)},xe.useId=function(){return L.H.useId()},xe.useImperativeHandle=function(E,G,te){return L.H.useImperativeHandle(E,G,te)},xe.useInsertionEffect=function(E,G){return L.H.useInsertionEffect(E,G)},xe.useLayoutEffect=function(E,G){return L.H.useLayoutEffect(E,G)},xe.useMemo=function(E,G){return L.H.useMemo(E,G)},xe.useOptimistic=function(E,G){return L.H.useOptimistic(E,G)},xe.useReducer=function(E,G,te){return L.H.useReducer(E,G,te)},xe.useRef=function(E){return L.H.useRef(E)},xe.useState=function(E){return L.H.useState(E)},xe.useSyncExternalStore=function(E,G,te){return L.H.useSyncExternalStore(E,G,te)},xe.useTransition=function(){return L.H.useTransition()},xe.version="19.2.4",xe}var gp;function bo(){return gp||(gp=1,Wc.exports=wy()),Wc.exports}var Ic={exports:{}},qt={};var mp;function Dy(){if(mp)return qt;mp=1;var i=bo();function a(p){var y="https://react.dev/errors/"+p;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)y+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(){}var s={d:{f:u,r:function(){throw Error(a(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(p,y,v){var A=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:A==null?null:""+A,children:p,containerInfo:y,implementation:v}}var d=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(p,y){if(p==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,qt.createPortal=function(p,y){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(a(299));return f(p,y,null,v)},qt.flushSync=function(p){var y=d.T,v=s.p;try{if(d.T=null,s.p=2,p)return p()}finally{d.T=y,s.p=v,s.d.f()}},qt.preconnect=function(p,y){typeof p=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,s.d.C(p,y))},qt.prefetchDNS=function(p){typeof p=="string"&&s.d.D(p)},qt.preinit=function(p,y){if(typeof p=="string"&&y&&typeof y.as=="string"){var v=y.as,A=g(v,y.crossOrigin),w=typeof y.integrity=="string"?y.integrity:void 0,D=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;v==="style"?s.d.S(p,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:A,integrity:w,fetchPriority:D}):v==="script"&&s.d.X(p,{crossOrigin:A,integrity:w,fetchPriority:D,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},qt.preinitModule=function(p,y){if(typeof p=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var v=g(y.as,y.crossOrigin);s.d.M(p,{crossOrigin:v,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&s.d.M(p)},qt.preload=function(p,y){if(typeof p=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var v=y.as,A=g(v,y.crossOrigin);s.d.L(p,v,{crossOrigin:A,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},qt.preloadModule=function(p,y){if(typeof p=="string")if(y){var v=g(y.as,y.crossOrigin);s.d.m(p,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:v,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else s.d.m(p)},qt.requestFormReset=function(p){s.d.r(p)},qt.unstable_batchedUpdates=function(p,y){return p(y)},qt.useFormState=function(p,y,v){return d.H.useFormState(p,y,v)},qt.useFormStatus=function(){return d.H.useHostTransitionStatus()},qt.version="19.2.4",qt}var yp;function ky(){if(yp)return Ic.exports;yp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(a){console.error(a)}}return i(),Ic.exports=Dy(),Ic.exports}var bp;function By(){if(bp)return ru;bp=1;var i=zy(),a=bo(),u=ky();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(f(e)!==e)throw Error(s(188))}function y(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(s(188));return t!==e?null:e}for(var l=e,n=t;;){var r=l.return;if(r===null)break;var o=r.alternate;if(o===null){if(n=r.return,n!==null){l=n;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===l)return p(r),e;if(o===n)return p(r),t;o=o.sibling}throw Error(s(188))}if(l.return!==n.return)l=r,n=o;else{for(var h=!1,m=r.child;m;){if(m===l){h=!0,l=r,n=o;break}if(m===n){h=!0,n=r,l=o;break}m=m.sibling}if(!h){for(m=o.child;m;){if(m===l){h=!0,l=o,n=r;break}if(m===n){h=!0,n=o,l=r;break}m=m.sibling}if(!h)throw Error(s(189))}}if(l.alternate!==n)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var A=Object.assign,w=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),V=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),ce=Symbol.for("react.consumer"),le=Symbol.for("react.context"),ve=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),$e=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function be(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var lt=Symbol.for("react.client.reference");function Me(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===lt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Q:return"Fragment";case J:return"Profiler";case Z:return"StrictMode";case ee:return"Suspense";case re:return"SuspenseList";case ie:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case V:return"Portal";case le:return e.displayName||"Context";case ce:return(e._context.displayName||"Context")+".Consumer";case ve:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case L:return t=e.displayName||null,t!==null?t:Me(e.type)||"Memo";case X:t=e._payload,e=e._init;try{return Me(e(t))}catch{}}return null}var et=Array.isArray,k=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},Be=[],He=-1;function E(e){return{current:e}}function G(e){0>He||(e.current=Be[He],Be[He]=null,He--)}function te(e,t){He++,Be[He]=e.current,e.current=t}var ne=E(null),me=E(null),Se=E(null),we=E(null);function Tt(e,t){switch(te(Se,t),te(me,e),te(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=wd(t),e=Dd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(ne),te(ne,e)}function Fe(){G(ne),G(me),G(Se)}function Yt(e){e.memoizedState!==null&&te(we,e);var t=ne.current,l=Dd(t,e.type);t!==l&&(te(me,e),te(ne,l))}function vn(e){me.current===e&&(G(ne),G(me)),we.current===e&&(G(we),nu._currentValue=fe)}var Rl,ja;function rl(e){if(Rl===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Rl=t&&t[1]||"",ja=-1<l.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Rl+e+ja}var xn=!1;function Ql(e,t){if(!e||xn)return"";xn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(C){var M=C}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(C){M=C}e.call(Y.prototype)}}else{try{throw Error()}catch(C){M=C}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(C){if(C&&M&&typeof C.stack=="string")return[C.stack,M.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=n.DetermineComponentFrameRoot(),h=o[0],m=o[1];if(h&&m){var x=h.split(`
4
+ `),O=m.split(`
5
+ `);for(r=n=0;n<x.length&&!x[n].includes("DetermineComponentFrameRoot");)n++;for(;r<O.length&&!O[r].includes("DetermineComponentFrameRoot");)r++;if(n===x.length||r===O.length)for(n=x.length-1,r=O.length-1;1<=n&&0<=r&&x[n]!==O[r];)r--;for(;1<=n&&0<=r;n--,r--)if(x[n]!==O[r]){if(n!==1||r!==1)do if(n--,r--,0>r||x[n]!==O[r]){var B=`
6
+ `+x[n].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=n&&0<=r);break}}}finally{xn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?rl(l):""}function ea(e,t){switch(e.tag){case 26:case 27:case 5:return rl(e.type);case 16:return rl("Lazy");case 13:return e.child!==t&&t!==null?rl("Suspense Fallback"):rl("Suspense");case 19:return rl("SuspenseList");case 0:case 15:return Ql(e.type,!1);case 11:return Ql(e.type.render,!1);case 1:return Ql(e.type,!0);case 31:return rl("Activity");default:return""}}function El(e){try{var t="",l=null;do t+=ea(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
7
+ Error generating stack: `+n.message+`
8
+ `+n.stack}}var Sn=Object.prototype.hasOwnProperty,Cl=i.unstable_scheduleCallback,zl=i.unstable_cancelCallback,cl=i.unstable_shouldYield,Zl=i.unstable_requestPaint,ct=i.unstable_now,_n=i.unstable_getCurrentPriorityLevel,ol=i.unstable_ImmediatePriority,wl=i.unstable_UserBlockingPriority,jt=i.unstable_NormalPriority,Dl=i.unstable_LowPriority,ta=i.unstable_IdlePriority,hi=i.log,Vl=i.unstable_setDisableYieldValue,Kl=null,Nt=null;function fl(e){if(typeof hi=="function"&&Vl(e),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(Kl,e)}catch{}}var pt=Math.clz32?Math.clz32:Oa,di=Math.log,la=Math.LN2;function Oa(e){return e>>>=0,e===0?32:31-(di(e)/la|0)|0}var Jl=256,En=262144,$l=4194304;function kt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function S(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var m=n&134217727;return m!==0?(n=m&~o,n!==0?r=kt(n):(h&=m,h!==0?r=kt(h):l||(l=m&~e,l!==0&&(r=kt(l))))):(m=n&~o,m!==0?r=kt(m):h!==0?r=kt(h):l||(l=n&~e,l!==0&&(r=kt(l)))),r===0?0:t!==0&&t!==r&&(t&o)===0&&(o=r&-r,l=t&-t,o>=l||o===32&&(l&4194048)!==0)?t:r}function q(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 de(){var e=$l;return $l<<=1,($l&62914560)===0&&($l=4194304),e}function Le(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Xe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function N(e,t,l,n,r,o){var h=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var m=e.entanglements,x=e.expirationTimes,O=e.hiddenUpdates;for(l=h&~l;0<l;){var B=31-pt(l),Y=1<<B;m[B]=0,x[B]=-1;var M=O[B];if(M!==null)for(O[B]=null,B=0;B<M.length;B++){var C=M[B];C!==null&&(C.lane&=-536870913)}l&=~Y}n!==0&&R(e,n,0),o!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=o&~(h&~t))}function R(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-pt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function W(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-pt(l),r=1<<n;r&t|e[n]&t&&(e[n]|=t),l&=~r}}function Ee(e,t){var l=t&-t;return l=(l&42)!==0?1:Ye(l),(l&(e.suspendedLanes|t))!==0?0:l}function Ye(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Xt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Na(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:np(e.type))}function Ma(e,t){var l=P.p;try{return P.p=e,t()}finally{P.p=l}}var kl=Math.random().toString(36).slice(2),gt="__reactFiber$"+kl,Bt="__reactProps$"+kl,An="__reactContainer$"+kl,pi="__reactEvents$"+kl,yu="__reactListeners$"+kl,Ra="__reactHandles$"+kl,bu="__reactResources$"+kl,na="__reactMarker$"+kl;function gi(e){delete e[gt],delete e[Bt],delete e[pi],delete e[yu],delete e[Ra]}function Ht(e){var t=e[gt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[An]||l[gt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Gd(e);e!==null;){if(l=e[gt])return l;e=Gd(e)}return t}e=l,l=e.parentNode}return null}function Fl(e){if(e=e[gt]||e[An]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Tn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function jn(e){var t=e[bu];return t||(t=e[bu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function vt(e){e[na]=!0}var vu=new Set,aa={};function Wl(e,t){K(e,t),K(e+"Capture",t)}function K(e,t){for(aa[e]=t,e=0;e<t.length;e++)vu.add(t[e])}var oe=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]*$"),je={},Qe={};function mt(e){return Sn.call(Qe,e)?!0:Sn.call(je,e)?!1:oe.test(e)?Qe[e]=!0:(je[e]=!0,!1)}function Ut(e,t,l){if(mt(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function It(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Qt(e,t,l,n){if(n===null)e.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+n)}}function nt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xu(e,t,l){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(h){l=""+h,o.call(this,h)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(h){l=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ca(e){if(!e._valueTracker){var t=Pt(e)?"checked":"value";e._valueTracker=xu(e,t,""+e[t])}}function mi(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=Pt(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}function za(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Vs=/[\n"\\]/g;function Zt(e){return e.replace(Vs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function yi(e,t,l,n,r,o,h,m){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+nt(t)):e.value!==""+nt(t)&&(e.value=""+nt(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?wa(e,h,nt(t)):l!=null?wa(e,h,nt(l)):n!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+nt(m):e.removeAttribute("name")}function ia(e,t,l,n,r,o,h,m){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||l!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Ca(e);return}l=l!=null?""+nt(l):"",t=t!=null?""+nt(t):l,m||t===e.value||(e.value=t),e.defaultValue=t}n=n??r,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=m?e.checked:!!n,e.defaultChecked=!!n,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Ca(e)}function wa(e,t,l){t==="number"&&za(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Rt(e,t,l,n){if(e=e.options,t){t={};for(var r=0;r<l.length;r++)t["$"+l[r]]=!0;for(l=0;l<e.length;l++)r=t.hasOwnProperty("$"+e[l].value),e[l].selected!==r&&(e[l].selected=r),r&&n&&(e[l].defaultSelected=!0)}else{for(l=""+nt(l),t=null,r=0;r<e.length;r++){if(e[r].value===l){e[r].selected=!0,n&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Su(e,t,l){if(t!=null&&(t=""+nt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+nt(l):""}function Da(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(s(92));if(et(n)){if(1<n.length)throw Error(s(93));n=n[0]}l=n}l==null&&(l=""),t=l}l=nt(t),e.defaultValue=l,n=e.textContent,n===l&&n!==""&&n!==null&&(e.value=n),Ca(e)}function ge(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var _u=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 xt(e,t,l){var n=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,l):typeof l!="number"||l===0||_u.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Ze(e,t,l){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var r in t)n=t[r],t.hasOwnProperty(r)&&l[r]!==n&&xt(e,r,n)}else for(var o in t)t.hasOwnProperty(o)&&xt(e,o,t[o])}function On(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Il=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"]]),bi=/^[\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 Nn(e){return bi.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function F(){}var ue=null;function _e(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Re=null,ft=null;function hl(e){var t=Fl(e);if(t&&(e=t.stateNode)){var l=e[Bt]||null;e:switch(e=t.stateNode,t.type){case"input":if(yi(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Zt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var n=l[t];if(n!==e&&n.form===e.form){var r=n[Bt]||null;if(!r)throw Error(s(90));yi(n,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&mi(n)}break e;case"textarea":Su(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Rt(e,!!l.multiple,t,!1)}}}var vi=!1;function Eu(e,t,l){if(vi)return e(t,l);vi=!0;try{var n=e(t);return n}finally{if(vi=!1,(Re!==null||ft!==null)&&(os(),Re&&(t=Re,e=ft,ft=Re=null,hl(t),e)))for(t=0;t<e.length;t++)hl(e[t])}}function xi(e,t){var l=e.stateNode;if(l===null)return null;var n=l[Bt]||null;if(n===null)return null;l=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(s(231,t,typeof l));return l}var Pl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ks=!1;if(Pl)try{var Si={};Object.defineProperty(Si,"passive",{get:function(){Ks=!0}}),window.addEventListener("test",Si,Si),window.removeEventListener("test",Si,Si)}catch{Ks=!1}var Mn=null,Js=null,Au=null;function wo(){if(Au)return Au;var e,t=Js,l=t.length,n,r="value"in Mn?Mn.value:Mn.textContent,o=r.length;for(e=0;e<l&&t[e]===r[e];e++);var h=l-e;for(n=1;n<=h&&t[l-n]===r[o-n];n++);return Au=r.slice(e,1<n?1-n:void 0)}function Tu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ju(){return!0}function Do(){return!1}function Vt(e){function t(l,n,r,o,h){this._reactName=l,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=h,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(l=e[m],this[m]=l?l(o):o[m]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ju:Do,this.isPropagationStopped=Do,this}return A(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ju)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ju)},persist:function(){},isPersistent:ju}),t}var ua={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ou=Vt(ua),_i=A({},ua,{view:0,detail:0}),jg=Vt(_i),$s,Fs,Ei,Nu=A({},_i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Is,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ei&&(Ei&&e.type==="mousemove"?($s=e.screenX-Ei.screenX,Fs=e.screenY-Ei.screenY):Fs=$s=0,Ei=e),$s)},movementY:function(e){return"movementY"in e?e.movementY:Fs}}),ko=Vt(Nu),Og=A({},Nu,{dataTransfer:0}),Ng=Vt(Og),Mg=A({},_i,{relatedTarget:0}),Ws=Vt(Mg),Rg=A({},ua,{animationName:0,elapsedTime:0,pseudoElement:0}),Cg=Vt(Rg),zg=A({},ua,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wg=Vt(zg),Dg=A({},ua,{data:0}),Bo=Vt(Dg),kg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bg={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"},Ug={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ug[e])?!!t[e]:!1}function Is(){return qg}var Hg=A({},_i,{key:function(e){if(e.key){var t=kg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Tu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Bg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Is,charCode:function(e){return e.type==="keypress"?Tu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Tu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Lg=Vt(Hg),Gg=A({},Nu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Uo=Vt(Gg),Yg=A({},_i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Is}),Xg=Vt(Yg),Qg=A({},ua,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zg=Vt(Qg),Vg=A({},Nu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Kg=Vt(Vg),Jg=A({},ua,{newState:0,oldState:0}),$g=Vt(Jg),Fg=[9,13,27,32],Ps=Pl&&"CompositionEvent"in window,Ai=null;Pl&&"documentMode"in document&&(Ai=document.documentMode);var Wg=Pl&&"TextEvent"in window&&!Ai,qo=Pl&&(!Ps||Ai&&8<Ai&&11>=Ai),Ho=" ",Lo=!1;function Go(e,t){switch(e){case"keyup":return Fg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ka=!1;function Ig(e,t){switch(e){case"compositionend":return Yo(t);case"keypress":return t.which!==32?null:(Lo=!0,Ho);case"textInput":return e=t.data,e===Ho&&Lo?null:e;default:return null}}function Pg(e,t){if(ka)return e==="compositionend"||!Ps&&Go(e,t)?(e=wo(),Au=Js=Mn=null,ka=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return qo&&t.locale!=="ko"?null:t.data;default:return null}}var em={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 Xo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!em[e.type]:t==="textarea"}function Qo(e,t,l,n){Re?ft?ft.push(n):ft=[n]:Re=n,t=ys(t,"onChange"),0<t.length&&(l=new Ou("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var Ti=null,ji=null;function tm(e){Od(e,0)}function Mu(e){var t=Tn(e);if(mi(t))return e}function Zo(e,t){if(e==="change")return t}var Vo=!1;if(Pl){var er;if(Pl){var tr="oninput"in document;if(!tr){var Ko=document.createElement("div");Ko.setAttribute("oninput","return;"),tr=typeof Ko.oninput=="function"}er=tr}else er=!1;Vo=er&&(!document.documentMode||9<document.documentMode)}function Jo(){Ti&&(Ti.detachEvent("onpropertychange",$o),ji=Ti=null)}function $o(e){if(e.propertyName==="value"&&Mu(ji)){var t=[];Qo(t,ji,e,_e(e)),Eu(tm,t)}}function lm(e,t,l){e==="focusin"?(Jo(),Ti=t,ji=l,Ti.attachEvent("onpropertychange",$o)):e==="focusout"&&Jo()}function nm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mu(ji)}function am(e,t){if(e==="click")return Mu(t)}function im(e,t){if(e==="input"||e==="change")return Mu(t)}function um(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var el=typeof Object.is=="function"?Object.is:um;function Oi(e,t){if(el(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),n=Object.keys(t);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var r=l[n];if(!Sn.call(t,r)||!el(e[r],t[r]))return!1}return!0}function Fo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wo(e,t){var l=Fo(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Fo(l)}}function Io(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Io(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Po(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=za(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=za(e.document)}return t}function lr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var sm=Pl&&"documentMode"in document&&11>=document.documentMode,Ba=null,nr=null,Ni=null,ar=!1;function ef(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ar||Ba==null||Ba!==za(n)||(n=Ba,"selectionStart"in n&&lr(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ni&&Oi(Ni,n)||(Ni=n,n=ys(nr,"onSelect"),0<n.length&&(t=new Ou("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=Ba)))}function sa(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Ua={animationend:sa("Animation","AnimationEnd"),animationiteration:sa("Animation","AnimationIteration"),animationstart:sa("Animation","AnimationStart"),transitionrun:sa("Transition","TransitionRun"),transitionstart:sa("Transition","TransitionStart"),transitioncancel:sa("Transition","TransitionCancel"),transitionend:sa("Transition","TransitionEnd")},ir={},tf={};Pl&&(tf=document.createElement("div").style,"AnimationEvent"in window||(delete Ua.animationend.animation,delete Ua.animationiteration.animation,delete Ua.animationstart.animation),"TransitionEvent"in window||delete Ua.transitionend.transition);function ra(e){if(ir[e])return ir[e];if(!Ua[e])return e;var t=Ua[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in tf)return ir[e]=t[l];return e}var lf=ra("animationend"),nf=ra("animationiteration"),af=ra("animationstart"),rm=ra("transitionrun"),cm=ra("transitionstart"),om=ra("transitioncancel"),uf=ra("transitionend"),sf=new Map,ur="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(" ");ur.push("scrollEnd");function Al(e,t){sf.set(e,t),Wl(t,[e])}var Ru=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},dl=[],qa=0,sr=0;function Cu(){for(var e=qa,t=sr=qa=0;t<e;){var l=dl[t];dl[t++]=null;var n=dl[t];dl[t++]=null;var r=dl[t];dl[t++]=null;var o=dl[t];if(dl[t++]=null,n!==null&&r!==null){var h=n.pending;h===null?r.next=r:(r.next=h.next,h.next=r),n.pending=r}o!==0&&rf(l,r,o)}}function zu(e,t,l,n){dl[qa++]=e,dl[qa++]=t,dl[qa++]=l,dl[qa++]=n,sr|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function rr(e,t,l,n){return zu(e,t,l,n),wu(e)}function ca(e,t){return zu(e,null,null,t),wu(e)}function rf(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var r=!1,o=e.return;o!==null;)o.childLanes|=l,n=o.alternate,n!==null&&(n.childLanes|=l),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(r=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,r&&t!==null&&(r=31-pt(l),e=o.hiddenUpdates,n=e[r],n===null?e[r]=[t]:n.push(t),t.lane=l|536870912),o):null}function wu(e){if(50<Fi)throw Fi=0,yc=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ha={};function fm(e,t,l,n){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tl(e,t,l,n){return new fm(e,t,l,n)}function cr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function en(e,t){var l=e.alternate;return l===null?(l=tl(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function cf(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Du(e,t,l,n,r,o){var h=0;if(n=e,typeof e=="function")cr(e)&&(h=1);else if(typeof e=="string")h=my(e,l,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ie:return e=tl(31,l,t,r),e.elementType=ie,e.lanes=o,e;case Q:return oa(l.children,r,o,t);case Z:h=8,r|=24;break;case J:return e=tl(12,l,t,r|2),e.elementType=J,e.lanes=o,e;case ee:return e=tl(13,l,t,r),e.elementType=ee,e.lanes=o,e;case re:return e=tl(19,l,t,r),e.elementType=re,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case le:h=10;break e;case ce:h=9;break e;case ve:h=11;break e;case L:h=14;break e;case X:h=16,n=null;break e}h=29,l=Error(s(130,e===null?"null":typeof e,"")),n=null}return t=tl(h,l,t,r),t.elementType=e,t.type=n,t.lanes=o,t}function oa(e,t,l,n){return e=tl(7,e,n,t),e.lanes=l,e}function or(e,t,l){return e=tl(6,e,null,t),e.lanes=l,e}function of(e){var t=tl(18,null,null,0);return t.stateNode=e,t}function fr(e,t,l){return t=tl(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ff=new WeakMap;function pl(e,t){if(typeof e=="object"&&e!==null){var l=ff.get(e);return l!==void 0?l:(t={value:e,source:t,stack:El(t)},ff.set(e,t),t)}return{value:e,source:t,stack:El(t)}}var La=[],Ga=0,ku=null,Mi=0,gl=[],ml=0,Rn=null,Bl=1,Ul="";function tn(e,t){La[Ga++]=Mi,La[Ga++]=ku,ku=e,Mi=t}function hf(e,t,l){gl[ml++]=Bl,gl[ml++]=Ul,gl[ml++]=Rn,Rn=e;var n=Bl;e=Ul;var r=32-pt(n)-1;n&=~(1<<r),l+=1;var o=32-pt(t)+r;if(30<o){var h=r-r%5;o=(n&(1<<h)-1).toString(32),n>>=h,r-=h,Bl=1<<32-pt(t)+r|l<<r|n,Ul=o+e}else Bl=1<<o|l<<r|n,Ul=e}function hr(e){e.return!==null&&(tn(e,1),hf(e,1,0))}function dr(e){for(;e===ku;)ku=La[--Ga],La[Ga]=null,Mi=La[--Ga],La[Ga]=null;for(;e===Rn;)Rn=gl[--ml],gl[ml]=null,Ul=gl[--ml],gl[ml]=null,Bl=gl[--ml],gl[ml]=null}function df(e,t){gl[ml++]=Bl,gl[ml++]=Ul,gl[ml++]=Rn,Bl=t.id,Ul=t.overflow,Rn=e}var Ct=null,it=null,De=!1,Cn=null,yl=!1,pr=Error(s(519));function zn(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ri(pl(t,e)),pr}function pf(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[gt]=e,t[Bt]=n,l){case"dialog":Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":case"embed":Ne("load",t);break;case"video":case"audio":for(l=0;l<Ii.length;l++)Ne(Ii[l],t);break;case"source":Ne("error",t);break;case"img":case"image":case"link":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"input":Ne("invalid",t),ia(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Ne("invalid",t);break;case"textarea":Ne("invalid",t),Da(t,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||n.suppressHydrationWarning===!0||Cd(t.textContent,l)?(n.popover!=null&&(Ne("beforetoggle",t),Ne("toggle",t)),n.onScroll!=null&&Ne("scroll",t),n.onScrollEnd!=null&&Ne("scrollend",t),n.onClick!=null&&(t.onclick=F),t=!0):t=!1,t||zn(e,!0)}function gf(e){for(Ct=e.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:yl=!1;return;case 27:case 3:yl=!0;return;default:Ct=Ct.return}}function Ya(e){if(e!==Ct)return!1;if(!De)return gf(e),De=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||zc(e.type,e.memoizedProps)),l=!l),l&&it&&zn(e),gf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));it=Ld(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));it=Ld(e)}else t===27?(t=it,Vn(e.type)?(e=Uc,Uc=null,it=e):it=t):it=Ct?vl(e.stateNode.nextSibling):null;return!0}function fa(){it=Ct=null,De=!1}function gr(){var e=Cn;return e!==null&&(Ft===null?Ft=e:Ft.push.apply(Ft,e),Cn=null),e}function Ri(e){Cn===null?Cn=[e]:Cn.push(e)}var mr=E(null),ha=null,ln=null;function wn(e,t,l){te(mr,t._currentValue),t._currentValue=l}function nn(e){e._currentValue=mr.current,G(mr)}function yr(e,t,l){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===l)break;e=e.return}}function br(e,t,l,n){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){var h=r.child;o=o.firstContext;e:for(;o!==null;){var m=o;o=r;for(var x=0;x<t.length;x++)if(m.context===t[x]){o.lanes|=l,m=o.alternate,m!==null&&(m.lanes|=l),yr(o.return,l,e),n||(h=null);break e}o=m.next}}else if(r.tag===18){if(h=r.return,h===null)throw Error(s(341));h.lanes|=l,o=h.alternate,o!==null&&(o.lanes|=l),yr(h,l,e),h=null}else h=r.child;if(h!==null)h.return=r;else for(h=r;h!==null;){if(h===e){h=null;break}if(r=h.sibling,r!==null){r.return=h.return,h=r;break}h=h.return}r=h}}function Xa(e,t,l,n){e=null;for(var r=t,o=!1;r!==null;){if(!o){if((r.flags&524288)!==0)o=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var h=r.alternate;if(h===null)throw Error(s(387));if(h=h.memoizedProps,h!==null){var m=r.type;el(r.pendingProps.value,h.value)||(e!==null?e.push(m):e=[m])}}else if(r===we.current){if(h=r.alternate,h===null)throw Error(s(387));h.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(nu):e=[nu])}r=r.return}e!==null&&br(t,e,l,n),t.flags|=262144}function Bu(e){for(e=e.firstContext;e!==null;){if(!el(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function da(e){ha=e,ln=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function zt(e){return mf(ha,e)}function Uu(e,t){return ha===null&&da(e),mf(e,t)}function mf(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},ln===null){if(e===null)throw Error(s(308));ln=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ln=ln.next=t;return l}var hm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},dm=i.unstable_scheduleCallback,pm=i.unstable_NormalPriority,St={$$typeof:le,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vr(){return{controller:new hm,data:new Map,refCount:0}}function Ci(e){e.refCount--,e.refCount===0&&dm(pm,function(){e.controller.abort()})}var zi=null,xr=0,Qa=0,Za=null;function gm(e,t){if(zi===null){var l=zi=[];xr=0,Qa=Ec(),Za={status:"pending",value:void 0,then:function(n){l.push(n)}}}return xr++,t.then(yf,yf),t}function yf(){if(--xr===0&&zi!==null){Za!==null&&(Za.status="fulfilled");var e=zi;zi=null,Qa=0,Za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function mm(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(r){l.push(r)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var r=0;r<l.length;r++)(0,l[r])(t)},function(r){for(n.status="rejected",n.reason=r,r=0;r<l.length;r++)(0,l[r])(void 0)}),n}var bf=k.S;k.S=function(e,t){td=ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&gm(e,t),bf!==null&&bf(e,t)};var pa=E(null);function Sr(){var e=pa.current;return e!==null?e:tt.pooledCache}function qu(e,t){t===null?te(pa,pa.current):te(pa,t.pool)}function vf(){var e=Sr();return e===null?null:{parent:St._currentValue,pool:e}}var Va=Error(s(460)),_r=Error(s(474)),Hu=Error(s(542)),Lu={then:function(){}};function xf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sf(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(F,F),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ef(e),e;default:if(typeof t.status=="string")t.then(F,F);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=n}},function(n){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ef(e),e}throw ma=t,Va}}function ga(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ma=l,Va):l}}var ma=null;function _f(){if(ma===null)throw Error(s(459));var e=ma;return ma=null,e}function Ef(e){if(e===Va||e===Hu)throw Error(s(483))}var Ka=null,wi=0;function Gu(e){var t=wi;return wi+=1,Ka===null&&(Ka=[]),Sf(Ka,e,t)}function Di(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Yu(e,t){throw t.$$typeof===w?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Af(e){function t(T,_){if(e){var j=T.deletions;j===null?(T.deletions=[_],T.flags|=16):j.push(_)}}function l(T,_){if(!e)return null;for(;_!==null;)t(T,_),_=_.sibling;return null}function n(T){for(var _=new Map;T!==null;)T.key!==null?_.set(T.key,T):_.set(T.index,T),T=T.sibling;return _}function r(T,_){return T=en(T,_),T.index=0,T.sibling=null,T}function o(T,_,j){return T.index=j,e?(j=T.alternate,j!==null?(j=j.index,j<_?(T.flags|=67108866,_):j):(T.flags|=67108866,_)):(T.flags|=1048576,_)}function h(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function m(T,_,j,H){return _===null||_.tag!==6?(_=or(j,T.mode,H),_.return=T,_):(_=r(_,j),_.return=T,_)}function x(T,_,j,H){var he=j.type;return he===Q?B(T,_,j.props.children,H,j.key):_!==null&&(_.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===X&&ga(he)===_.type)?(_=r(_,j.props),Di(_,j),_.return=T,_):(_=Du(j.type,j.key,j.props,null,T.mode,H),Di(_,j),_.return=T,_)}function O(T,_,j,H){return _===null||_.tag!==4||_.stateNode.containerInfo!==j.containerInfo||_.stateNode.implementation!==j.implementation?(_=fr(j,T.mode,H),_.return=T,_):(_=r(_,j.children||[]),_.return=T,_)}function B(T,_,j,H,he){return _===null||_.tag!==7?(_=oa(j,T.mode,H,he),_.return=T,_):(_=r(_,j),_.return=T,_)}function Y(T,_,j){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return _=or(""+_,T.mode,j),_.return=T,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case D:return j=Du(_.type,_.key,_.props,null,T.mode,j),Di(j,_),j.return=T,j;case V:return _=fr(_,T.mode,j),_.return=T,_;case X:return _=ga(_),Y(T,_,j)}if(et(_)||be(_))return _=oa(_,T.mode,j,null),_.return=T,_;if(typeof _.then=="function")return Y(T,Gu(_),j);if(_.$$typeof===le)return Y(T,Uu(T,_),j);Yu(T,_)}return null}function M(T,_,j,H){var he=_!==null?_.key:null;if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return he!==null?null:m(T,_,""+j,H);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case D:return j.key===he?x(T,_,j,H):null;case V:return j.key===he?O(T,_,j,H):null;case X:return j=ga(j),M(T,_,j,H)}if(et(j)||be(j))return he!==null?null:B(T,_,j,H,null);if(typeof j.then=="function")return M(T,_,Gu(j),H);if(j.$$typeof===le)return M(T,_,Uu(T,j),H);Yu(T,j)}return null}function C(T,_,j,H,he){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return T=T.get(j)||null,m(_,T,""+H,he);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case D:return T=T.get(H.key===null?j:H.key)||null,x(_,T,H,he);case V:return T=T.get(H.key===null?j:H.key)||null,O(_,T,H,he);case X:return H=ga(H),C(T,_,j,H,he)}if(et(H)||be(H))return T=T.get(j)||null,B(_,T,H,he,null);if(typeof H.then=="function")return C(T,_,j,Gu(H),he);if(H.$$typeof===le)return C(T,_,j,Uu(_,H),he);Yu(_,H)}return null}function ae(T,_,j,H){for(var he=null,Ue=null,se=_,Te=_=0,ze=null;se!==null&&Te<j.length;Te++){se.index>Te?(ze=se,se=null):ze=se.sibling;var qe=M(T,se,j[Te],H);if(qe===null){se===null&&(se=ze);break}e&&se&&qe.alternate===null&&t(T,se),_=o(qe,_,Te),Ue===null?he=qe:Ue.sibling=qe,Ue=qe,se=ze}if(Te===j.length)return l(T,se),De&&tn(T,Te),he;if(se===null){for(;Te<j.length;Te++)se=Y(T,j[Te],H),se!==null&&(_=o(se,_,Te),Ue===null?he=se:Ue.sibling=se,Ue=se);return De&&tn(T,Te),he}for(se=n(se);Te<j.length;Te++)ze=C(se,T,Te,j[Te],H),ze!==null&&(e&&ze.alternate!==null&&se.delete(ze.key===null?Te:ze.key),_=o(ze,_,Te),Ue===null?he=ze:Ue.sibling=ze,Ue=ze);return e&&se.forEach(function(Wn){return t(T,Wn)}),De&&tn(T,Te),he}function pe(T,_,j,H){if(j==null)throw Error(s(151));for(var he=null,Ue=null,se=_,Te=_=0,ze=null,qe=j.next();se!==null&&!qe.done;Te++,qe=j.next()){se.index>Te?(ze=se,se=null):ze=se.sibling;var Wn=M(T,se,qe.value,H);if(Wn===null){se===null&&(se=ze);break}e&&se&&Wn.alternate===null&&t(T,se),_=o(Wn,_,Te),Ue===null?he=Wn:Ue.sibling=Wn,Ue=Wn,se=ze}if(qe.done)return l(T,se),De&&tn(T,Te),he;if(se===null){for(;!qe.done;Te++,qe=j.next())qe=Y(T,qe.value,H),qe!==null&&(_=o(qe,_,Te),Ue===null?he=qe:Ue.sibling=qe,Ue=qe);return De&&tn(T,Te),he}for(se=n(se);!qe.done;Te++,qe=j.next())qe=C(se,T,Te,qe.value,H),qe!==null&&(e&&qe.alternate!==null&&se.delete(qe.key===null?Te:qe.key),_=o(qe,_,Te),Ue===null?he=qe:Ue.sibling=qe,Ue=qe);return e&&se.forEach(function(Oy){return t(T,Oy)}),De&&tn(T,Te),he}function Pe(T,_,j,H){if(typeof j=="object"&&j!==null&&j.type===Q&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case D:e:{for(var he=j.key;_!==null;){if(_.key===he){if(he=j.type,he===Q){if(_.tag===7){l(T,_.sibling),H=r(_,j.props.children),H.return=T,T=H;break e}}else if(_.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===X&&ga(he)===_.type){l(T,_.sibling),H=r(_,j.props),Di(H,j),H.return=T,T=H;break e}l(T,_);break}else t(T,_);_=_.sibling}j.type===Q?(H=oa(j.props.children,T.mode,H,j.key),H.return=T,T=H):(H=Du(j.type,j.key,j.props,null,T.mode,H),Di(H,j),H.return=T,T=H)}return h(T);case V:e:{for(he=j.key;_!==null;){if(_.key===he)if(_.tag===4&&_.stateNode.containerInfo===j.containerInfo&&_.stateNode.implementation===j.implementation){l(T,_.sibling),H=r(_,j.children||[]),H.return=T,T=H;break e}else{l(T,_);break}else t(T,_);_=_.sibling}H=fr(j,T.mode,H),H.return=T,T=H}return h(T);case X:return j=ga(j),Pe(T,_,j,H)}if(et(j))return ae(T,_,j,H);if(be(j)){if(he=be(j),typeof he!="function")throw Error(s(150));return j=he.call(j),pe(T,_,j,H)}if(typeof j.then=="function")return Pe(T,_,Gu(j),H);if(j.$$typeof===le)return Pe(T,_,Uu(T,j),H);Yu(T,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,_!==null&&_.tag===6?(l(T,_.sibling),H=r(_,j),H.return=T,T=H):(l(T,_),H=or(j,T.mode,H),H.return=T,T=H),h(T)):l(T,_)}return function(T,_,j,H){try{wi=0;var he=Pe(T,_,j,H);return Ka=null,he}catch(se){if(se===Va||se===Hu)throw se;var Ue=tl(29,se,null,T.mode);return Ue.lanes=H,Ue.return=T,Ue}}}var ya=Af(!0),Tf=Af(!1),Dn=!1;function Er(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ar(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function kn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Bn(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ge&2)!==0){var r=n.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),n.pending=t,t=wu(e),rf(e,null,l),t}return zu(e,n,t,l),wu(e)}function ki(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,W(e,l)}}function Tr(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var r=null,o=null;if(l=l.firstBaseUpdate,l!==null){do{var h={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};o===null?r=o=h:o=o.next=h,l=l.next}while(l!==null);o===null?r=o=t:o=o.next=t}else r=o=t;l={baseState:n.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var jr=!1;function Bi(){if(jr){var e=Za;if(e!==null)throw e}}function Ui(e,t,l,n){jr=!1;var r=e.updateQueue;Dn=!1;var o=r.firstBaseUpdate,h=r.lastBaseUpdate,m=r.shared.pending;if(m!==null){r.shared.pending=null;var x=m,O=x.next;x.next=null,h===null?o=O:h.next=O,h=x;var B=e.alternate;B!==null&&(B=B.updateQueue,m=B.lastBaseUpdate,m!==h&&(m===null?B.firstBaseUpdate=O:m.next=O,B.lastBaseUpdate=x))}if(o!==null){var Y=r.baseState;h=0,B=O=x=null,m=o;do{var M=m.lane&-536870913,C=M!==m.lane;if(C?(Ce&M)===M:(n&M)===M){M!==0&&M===Qa&&(jr=!0),B!==null&&(B=B.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var ae=e,pe=m;M=t;var Pe=l;switch(pe.tag){case 1:if(ae=pe.payload,typeof ae=="function"){Y=ae.call(Pe,Y,M);break e}Y=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=pe.payload,M=typeof ae=="function"?ae.call(Pe,Y,M):ae,M==null)break e;Y=A({},Y,M);break e;case 2:Dn=!0}}M=m.callback,M!==null&&(e.flags|=64,C&&(e.flags|=8192),C=r.callbacks,C===null?r.callbacks=[M]:C.push(M))}else C={lane:M,tag:m.tag,payload:m.payload,callback:m.callback,next:null},B===null?(O=B=C,x=Y):B=B.next=C,h|=M;if(m=m.next,m===null){if(m=r.shared.pending,m===null)break;C=m,m=C.next,C.next=null,r.lastBaseUpdate=C,r.shared.pending=null}}while(!0);B===null&&(x=Y),r.baseState=x,r.firstBaseUpdate=O,r.lastBaseUpdate=B,o===null&&(r.shared.lanes=0),Gn|=h,e.lanes=h,e.memoizedState=Y}}function jf(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function Of(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)jf(l[e],t)}var Ja=E(null),Xu=E(0);function Nf(e,t){e=dn,te(Xu,e),te(Ja,t),dn=e|t.baseLanes}function Or(){te(Xu,dn),te(Ja,Ja.current)}function Nr(){dn=Xu.current,G(Ja),G(Xu)}var ll=E(null),bl=null;function Un(e){var t=e.alternate;te(yt,yt.current&1),te(ll,e),bl===null&&(t===null||Ja.current!==null||t.memoizedState!==null)&&(bl=e)}function Mr(e){te(yt,yt.current),te(ll,e),bl===null&&(bl=e)}function Mf(e){e.tag===22?(te(yt,yt.current),te(ll,e),bl===null&&(bl=e)):qn()}function qn(){te(yt,yt.current),te(ll,ll.current)}function nl(e){G(ll),bl===e&&(bl=null),G(yt)}var yt=E(0);function Qu(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||kc(l)||Bc(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var an=0,Ae=null,We=null,_t=null,Zu=!1,$a=!1,ba=!1,Vu=0,qi=0,Fa=null,ym=0;function ht(){throw Error(s(321))}function Rr(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!el(e[l],t[l]))return!1;return!0}function Cr(e,t,l,n,r,o){return an=o,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?hh:Vr,ba=!1,o=l(n,r),ba=!1,$a&&(o=Cf(t,l,n,r)),Rf(e),o}function Rf(e){k.H=Gi;var t=We!==null&&We.next!==null;if(an=0,_t=We=Ae=null,Zu=!1,qi=0,Fa=null,t)throw Error(s(300));e===null||Et||(e=e.dependencies,e!==null&&Bu(e)&&(Et=!0))}function Cf(e,t,l,n){Ae=e;var r=0;do{if($a&&(Fa=null),qi=0,$a=!1,25<=r)throw Error(s(301));if(r+=1,_t=We=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}k.H=dh,o=t(l,n)}while($a);return o}function bm(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?Hi(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(Ae.flags|=1024),t}function zr(){var e=Vu!==0;return Vu=0,e}function wr(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Dr(e){if(Zu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Zu=!1}an=0,_t=We=Ae=null,$a=!1,qi=Vu=0,Fa=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?Ae.memoizedState=_t=e:_t=_t.next=e,_t}function bt(){if(We===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=_t===null?Ae.memoizedState:_t.next;if(t!==null)_t=t,We=e;else{if(e===null)throw Ae.alternate===null?Error(s(467)):Error(s(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},_t===null?Ae.memoizedState=_t=e:_t=_t.next=e}return _t}function Ku(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hi(e){var t=qi;return qi+=1,Fa===null&&(Fa=[]),e=Sf(Fa,e,t),t=Ae,(_t===null?t.memoizedState:_t.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?hh:Vr),e}function Ju(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Hi(e);if(e.$$typeof===le)return zt(e)}throw Error(s(438,String(e)))}function kr(e){var t=null,l=Ae.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=Ae.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Ku(),Ae.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),n=0;n<e;n++)l[n]=$e;return t.index++,l}function un(e,t){return typeof t=="function"?t(e):t}function $u(e){var t=bt();return Br(t,We,e)}function Br(e,t,l){var n=e.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=l;var r=e.baseQueue,o=n.pending;if(o!==null){if(r!==null){var h=r.next;r.next=o.next,o.next=h}t.baseQueue=r=o,n.pending=null}if(o=e.baseState,r===null)e.memoizedState=o;else{t=r.next;var m=h=null,x=null,O=t,B=!1;do{var Y=O.lane&-536870913;if(Y!==O.lane?(Ce&Y)===Y:(an&Y)===Y){var M=O.revertLane;if(M===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),Y===Qa&&(B=!0);else if((an&M)===M){O=O.next,M===Qa&&(B=!0);continue}else Y={lane:0,revertLane:O.revertLane,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},x===null?(m=x=Y,h=o):x=x.next=Y,Ae.lanes|=M,Gn|=M;Y=O.action,ba&&l(o,Y),o=O.hasEagerState?O.eagerState:l(o,Y)}else M={lane:Y,revertLane:O.revertLane,gesture:O.gesture,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},x===null?(m=x=M,h=o):x=x.next=M,Ae.lanes|=Y,Gn|=Y;O=O.next}while(O!==null&&O!==t);if(x===null?h=o:x.next=m,!el(o,e.memoizedState)&&(Et=!0,B&&(l=Za,l!==null)))throw l;e.memoizedState=o,e.baseState=h,e.baseQueue=x,n.lastRenderedState=o}return r===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Ur(e){var t=bt(),l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=e;var n=l.dispatch,r=l.pending,o=t.memoizedState;if(r!==null){l.pending=null;var h=r=r.next;do o=e(o,h.action),h=h.next;while(h!==r);el(o,t.memoizedState)||(Et=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),l.lastRenderedState=o}return[o,n]}function zf(e,t,l){var n=Ae,r=bt(),o=De;if(o){if(l===void 0)throw Error(s(407));l=l()}else l=t();var h=!el((We||r).memoizedState,l);if(h&&(r.memoizedState=l,Et=!0),r=r.queue,Lr(kf.bind(null,n,r,e),[e]),r.getSnapshot!==t||h||_t!==null&&_t.memoizedState.tag&1){if(n.flags|=2048,Wa(9,{destroy:void 0},Df.bind(null,n,r,l,t),null),tt===null)throw Error(s(349));o||(an&127)!==0||wf(n,t,l)}return l}function wf(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Ae.updateQueue,t===null?(t=Ku(),Ae.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Df(e,t,l,n){t.value=l,t.getSnapshot=n,Bf(t)&&Uf(e)}function kf(e,t,l){return l(function(){Bf(t)&&Uf(e)})}function Bf(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!el(e,l)}catch{return!0}}function Uf(e){var t=ca(e,2);t!==null&&Wt(t,e,2)}function qr(e){var t=Lt();if(typeof e=="function"){var l=e;if(e=l(),ba){fl(!0);try{l()}finally{fl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:un,lastRenderedState:e},t}function qf(e,t,l,n){return e.baseState=l,Br(e,We,typeof n=="function"?n:un)}function vm(e,t,l,n,r){if(Iu(e))throw Error(s(485));if(e=t.action,e!==null){var o={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){o.listeners.push(h)}};k.T!==null?l(!0):o.isTransition=!1,n(o),l=t.pending,l===null?(o.next=t.pending=o,Hf(t,o)):(o.next=l.next,t.pending=l.next=o)}}function Hf(e,t){var l=t.action,n=t.payload,r=e.state;if(t.isTransition){var o=k.T,h={};k.T=h;try{var m=l(r,n),x=k.S;x!==null&&x(h,m),Lf(e,t,m)}catch(O){Hr(e,t,O)}finally{o!==null&&h.types!==null&&(o.types=h.types),k.T=o}}else try{o=l(r,n),Lf(e,t,o)}catch(O){Hr(e,t,O)}}function Lf(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){Gf(e,t,n)},function(n){return Hr(e,t,n)}):Gf(e,t,l)}function Gf(e,t,l){t.status="fulfilled",t.value=l,Yf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Hf(e,l)))}function Hr(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,Yf(t),t=t.next;while(t!==n)}e.action=null}function Yf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xf(e,t){return t}function Qf(e,t){if(De){var l=tt.formState;if(l!==null){e:{var n=Ae;if(De){if(it){t:{for(var r=it,o=yl;r.nodeType!==8;){if(!o){r=null;break t}if(r=vl(r.nextSibling),r===null){r=null;break t}}o=r.data,r=o==="F!"||o==="F"?r:null}if(r){it=vl(r.nextSibling),n=r.data==="F!";break e}}zn(n)}n=!1}n&&(t=l[0])}}return l=Lt(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xf,lastRenderedState:t},l.queue=n,l=ch.bind(null,Ae,n),n.dispatch=l,n=qr(!1),o=Zr.bind(null,Ae,!1,n.queue),n=Lt(),r={state:t,dispatch:null,action:e,pending:null},n.queue=r,l=vm.bind(null,Ae,r,o,l),r.dispatch=l,n.memoizedState=e,[t,l,!1]}function Zf(e){var t=bt();return Vf(t,We,e)}function Vf(e,t,l){if(t=Br(e,t,Xf)[0],e=$u(un)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Hi(t)}catch(h){throw h===Va?Hu:h}else n=t;t=bt();var r=t.queue,o=r.dispatch;return l!==t.memoizedState&&(Ae.flags|=2048,Wa(9,{destroy:void 0},xm.bind(null,r,l),null)),[n,o,e]}function xm(e,t){e.action=t}function Kf(e){var t=bt(),l=We;if(l!==null)return Vf(t,l,e);bt(),t=t.memoizedState,l=bt();var n=l.queue.dispatch;return l.memoizedState=e,[t,n,!1]}function Wa(e,t,l,n){return e={tag:e,create:l,deps:n,inst:t,next:null},t=Ae.updateQueue,t===null&&(t=Ku(),Ae.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(n=l.next,l.next=e,e.next=n,t.lastEffect=e),e}function Jf(){return bt().memoizedState}function Fu(e,t,l,n){var r=Lt();Ae.flags|=e,r.memoizedState=Wa(1|t,{destroy:void 0},l,n===void 0?null:n)}function Wu(e,t,l,n){var r=bt();n=n===void 0?null:n;var o=r.memoizedState.inst;We!==null&&n!==null&&Rr(n,We.memoizedState.deps)?r.memoizedState=Wa(t,o,l,n):(Ae.flags|=e,r.memoizedState=Wa(1|t,o,l,n))}function $f(e,t){Fu(8390656,8,e,t)}function Lr(e,t){Wu(2048,8,e,t)}function Sm(e){Ae.flags|=4;var t=Ae.updateQueue;if(t===null)t=Ku(),Ae.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Ff(e){var t=bt().memoizedState;return Sm({ref:t,nextImpl:e}),function(){if((Ge&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Wf(e,t){return Wu(4,2,e,t)}function If(e,t){return Wu(4,4,e,t)}function Pf(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function eh(e,t,l){l=l!=null?l.concat([e]):null,Wu(4,4,Pf.bind(null,t,e),l)}function Gr(){}function th(e,t){var l=bt();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&Rr(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function lh(e,t){var l=bt();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&Rr(t,n[1]))return n[0];if(n=e(),ba){fl(!0);try{e()}finally{fl(!1)}}return l.memoizedState=[n,t],n}function Yr(e,t,l){return l===void 0||(an&1073741824)!==0&&(Ce&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=nd(),Ae.lanes|=e,Gn|=e,l)}function nh(e,t,l,n){return el(l,t)?l:Ja.current!==null?(e=Yr(e,l,n),el(e,t)||(Et=!0),e):(an&42)===0||(an&1073741824)!==0&&(Ce&261930)===0?(Et=!0,e.memoizedState=l):(e=nd(),Ae.lanes|=e,Gn|=e,t)}function ah(e,t,l,n,r){var o=P.p;P.p=o!==0&&8>o?o:8;var h=k.T,m={};k.T=m,Zr(e,!1,t,l);try{var x=r(),O=k.S;if(O!==null&&O(m,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var B=mm(x,n);Li(e,t,B,ul(e))}else Li(e,t,n,ul(e))}catch(Y){Li(e,t,{then:function(){},status:"rejected",reason:Y},ul())}finally{P.p=o,h!==null&&m.types!==null&&(h.types=m.types),k.T=h}}function _m(){}function Xr(e,t,l,n){if(e.tag!==5)throw Error(s(476));var r=ih(e).queue;ah(e,r,t,fe,l===null?_m:function(){return uh(e),l(n)})}function ih(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:un,lastRenderedState:fe},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:un,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function uh(e){var t=ih(e);t.next===null&&(t=e.alternate.memoizedState),Li(e,t.next.queue,{},ul())}function Qr(){return zt(nu)}function sh(){return bt().memoizedState}function rh(){return bt().memoizedState}function Em(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=ul();e=kn(l);var n=Bn(t,e,l);n!==null&&(Wt(n,t,l),ki(n,t,l)),t={cache:vr()},e.payload=t;return}t=t.return}}function Am(e,t,l){var n=ul();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Iu(e)?oh(t,l):(l=rr(e,t,l,n),l!==null&&(Wt(l,e,n),fh(l,t,n)))}function ch(e,t,l){var n=ul();Li(e,t,l,n)}function Li(e,t,l,n){var r={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Iu(e))oh(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var h=t.lastRenderedState,m=o(h,l);if(r.hasEagerState=!0,r.eagerState=m,el(m,h))return zu(e,t,r,0),tt===null&&Cu(),!1}catch{}if(l=rr(e,t,r,n),l!==null)return Wt(l,e,n),fh(l,t,n),!0}return!1}function Zr(e,t,l,n){if(n={lane:2,revertLane:Ec(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Iu(e)){if(t)throw Error(s(479))}else t=rr(e,l,n,2),t!==null&&Wt(t,e,2)}function Iu(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function oh(e,t){$a=Zu=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function fh(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,W(e,l)}}var Gi={readContext:zt,use:Ju,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useLayoutEffect:ht,useInsertionEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useSyncExternalStore:ht,useId:ht,useHostTransitionStatus:ht,useFormState:ht,useActionState:ht,useOptimistic:ht,useMemoCache:ht,useCacheRefresh:ht};Gi.useEffectEvent=ht;var hh={readContext:zt,use:Ju,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:$f,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Fu(4194308,4,Pf.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Fu(4194308,4,e,t)},useInsertionEffect:function(e,t){Fu(4,2,e,t)},useMemo:function(e,t){var l=Lt();t=t===void 0?null:t;var n=e();if(ba){fl(!0);try{e()}finally{fl(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=Lt();if(l!==void 0){var r=l(t);if(ba){fl(!0);try{l(t)}finally{fl(!1)}}}else r=t;return n.memoizedState=n.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},n.queue=e,e=e.dispatch=Am.bind(null,Ae,e),[n.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=qr(e);var t=e.queue,l=ch.bind(null,Ae,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Gr,useDeferredValue:function(e,t){var l=Lt();return Yr(l,e,t)},useTransition:function(){var e=qr(!1);return e=ah.bind(null,Ae,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=Ae,r=Lt();if(De){if(l===void 0)throw Error(s(407));l=l()}else{if(l=t(),tt===null)throw Error(s(349));(Ce&127)!==0||wf(n,t,l)}r.memoizedState=l;var o={value:l,getSnapshot:t};return r.queue=o,$f(kf.bind(null,n,o,e),[e]),n.flags|=2048,Wa(9,{destroy:void 0},Df.bind(null,n,o,l,t),null),l},useId:function(){var e=Lt(),t=tt.identifierPrefix;if(De){var l=Ul,n=Bl;l=(n&~(1<<32-pt(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Vu++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=ym++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qr,useFormState:Qf,useActionState:Qf,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Zr.bind(null,Ae,!0,l),l.dispatch=t,[e,t]},useMemoCache:kr,useCacheRefresh:function(){return Lt().memoizedState=Em.bind(null,Ae)},useEffectEvent:function(e){var t=Lt(),l={impl:e};return t.memoizedState=l,function(){if((Ge&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},Vr={readContext:zt,use:Ju,useCallback:th,useContext:zt,useEffect:Lr,useImperativeHandle:eh,useInsertionEffect:Wf,useLayoutEffect:If,useMemo:lh,useReducer:$u,useRef:Jf,useState:function(){return $u(un)},useDebugValue:Gr,useDeferredValue:function(e,t){var l=bt();return nh(l,We.memoizedState,e,t)},useTransition:function(){var e=$u(un)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:Hi(e),t]},useSyncExternalStore:zf,useId:sh,useHostTransitionStatus:Qr,useFormState:Zf,useActionState:Zf,useOptimistic:function(e,t){var l=bt();return qf(l,We,e,t)},useMemoCache:kr,useCacheRefresh:rh};Vr.useEffectEvent=Ff;var dh={readContext:zt,use:Ju,useCallback:th,useContext:zt,useEffect:Lr,useImperativeHandle:eh,useInsertionEffect:Wf,useLayoutEffect:If,useMemo:lh,useReducer:Ur,useRef:Jf,useState:function(){return Ur(un)},useDebugValue:Gr,useDeferredValue:function(e,t){var l=bt();return We===null?Yr(l,e,t):nh(l,We.memoizedState,e,t)},useTransition:function(){var e=Ur(un)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:Hi(e),t]},useSyncExternalStore:zf,useId:sh,useHostTransitionStatus:Qr,useFormState:Kf,useActionState:Kf,useOptimistic:function(e,t){var l=bt();return We!==null?qf(l,We,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:kr,useCacheRefresh:rh};dh.useEffectEvent=Ff;function Kr(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:A({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Jr={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=ul(),r=kn(n);r.payload=t,l!=null&&(r.callback=l),t=Bn(e,r,n),t!==null&&(Wt(t,e,n),ki(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=ul(),r=kn(n);r.tag=1,r.payload=t,l!=null&&(r.callback=l),t=Bn(e,r,n),t!==null&&(Wt(t,e,n),ki(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=ul(),n=kn(l);n.tag=2,t!=null&&(n.callback=t),t=Bn(e,n,l),t!==null&&(Wt(t,e,l),ki(t,e,l))}};function ph(e,t,l,n,r,o,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,h):t.prototype&&t.prototype.isPureReactComponent?!Oi(l,n)||!Oi(r,o):!0}function gh(e,t,l,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,n),t.state!==e&&Jr.enqueueReplaceState(t,t.state,null)}function va(e,t){var l=t;if("ref"in t){l={};for(var n in t)n!=="ref"&&(l[n]=t[n])}if(e=e.defaultProps){l===t&&(l=A({},l));for(var r in e)l[r]===void 0&&(l[r]=e[r])}return l}function mh(e){Ru(e)}function yh(e){console.error(e)}function bh(e){Ru(e)}function Pu(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function vh(e,t,l){try{var n=e.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function $r(e,t,l){return l=kn(l),l.tag=3,l.payload={element:null},l.callback=function(){Pu(e,t)},l}function xh(e){return e=kn(e),e.tag=3,e}function Sh(e,t,l,n){var r=l.type.getDerivedStateFromError;if(typeof r=="function"){var o=n.value;e.payload=function(){return r(o)},e.callback=function(){vh(t,l,n)}}var h=l.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){vh(t,l,n),typeof r!="function"&&(Yn===null?Yn=new Set([this]):Yn.add(this));var m=n.stack;this.componentDidCatch(n.value,{componentStack:m!==null?m:""})})}function Tm(e,t,l,n,r){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&Xa(t,l,r,!0),l=ll.current,l!==null){switch(l.tag){case 31:case 13:return bl===null?fs():l.alternate===null&&dt===0&&(dt=3),l.flags&=-257,l.flags|=65536,l.lanes=r,n===Lu?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),xc(e,n,r)),!1;case 22:return l.flags|=65536,n===Lu?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([n]):l.add(n)),xc(e,n,r)),!1}throw Error(s(435,l.tag))}return xc(e,n,r),fs(),!1}if(De)return t=ll.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,n!==pr&&(e=Error(s(422),{cause:n}),Ri(pl(e,l)))):(n!==pr&&(t=Error(s(423),{cause:n}),Ri(pl(t,l))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,n=pl(n,l),r=$r(e.stateNode,n,r),Tr(e,r),dt!==4&&(dt=2)),!1;var o=Error(s(520),{cause:n});if(o=pl(o,l),$i===null?$i=[o]:$i.push(o),dt!==4&&(dt=2),t===null)return!0;n=pl(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=r&-r,l.lanes|=e,e=$r(l.stateNode,n,e),Tr(l,e),!1;case 1:if(t=l.type,o=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(Yn===null||!Yn.has(o))))return l.flags|=65536,r&=-r,l.lanes|=r,r=xh(r),Sh(r,e,l,n),Tr(l,r),!1}l=l.return}while(l!==null);return!1}var Fr=Error(s(461)),Et=!1;function wt(e,t,l,n){t.child=e===null?Tf(t,null,l,n):ya(t,e.child,l,n)}function _h(e,t,l,n,r){l=l.render;var o=t.ref;if("ref"in n){var h={};for(var m in n)m!=="ref"&&(h[m]=n[m])}else h=n;return da(t),n=Cr(e,t,l,h,o,r),m=zr(),e!==null&&!Et?(wr(e,t,r),sn(e,t,r)):(De&&m&&hr(t),t.flags|=1,wt(e,t,n,r),t.child)}function Eh(e,t,l,n,r){if(e===null){var o=l.type;return typeof o=="function"&&!cr(o)&&o.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=o,Ah(e,t,o,n,r)):(e=Du(l.type,null,n,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!ac(e,r)){var h=o.memoizedProps;if(l=l.compare,l=l!==null?l:Oi,l(h,n)&&e.ref===t.ref)return sn(e,t,r)}return t.flags|=1,e=en(o,n),e.ref=t.ref,e.return=t,t.child=e}function Ah(e,t,l,n,r){if(e!==null){var o=e.memoizedProps;if(Oi(o,n)&&e.ref===t.ref)if(Et=!1,t.pendingProps=n=o,ac(e,r))(e.flags&131072)!==0&&(Et=!0);else return t.lanes=e.lanes,sn(e,t,r)}return Wr(e,t,l,n,r)}function Th(e,t,l,n){var r=n.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|l:l,e!==null){for(n=t.child=e.child,r=0;n!==null;)r=r|n.lanes|n.childLanes,n=n.sibling;n=r&~o}else n=0,t.child=null;return jh(e,t,o,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&qu(t,o!==null?o.cachePool:null),o!==null?Nf(t,o):Or(),Mf(t);else return n=t.lanes=536870912,jh(e,t,o!==null?o.baseLanes|l:l,l,n)}else o!==null?(qu(t,o.cachePool),Nf(t,o),qn(),t.memoizedState=null):(e!==null&&qu(t,null),Or(),qn());return wt(e,t,r,l),t.child}function Yi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function jh(e,t,l,n,r){var o=Sr();return o=o===null?null:{parent:St._currentValue,pool:o},t.memoizedState={baseLanes:l,cachePool:o},e!==null&&qu(t,null),Or(),Mf(t),e!==null&&Xa(e,t,n,!0),t.childLanes=r,null}function es(e,t){return t=ls({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Oh(e,t,l){return ya(t,e.child,null,l),e=es(t,t.pendingProps),e.flags|=2,nl(t),t.memoizedState=null,e}function jm(e,t,l){var n=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(De){if(n.mode==="hidden")return e=es(t,n),t.lanes=536870912,Yi(null,e);if(Mr(t),(e=it)?(e=Hd(e,yl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Rn!==null?{id:Bl,overflow:Ul}:null,retryLane:536870912,hydrationErrors:null},l=of(e),l.return=t,t.child=l,Ct=t,it=null)):e=null,e===null)throw zn(t);return t.lanes=536870912,null}return es(t,n)}var o=e.memoizedState;if(o!==null){var h=o.dehydrated;if(Mr(t),r)if(t.flags&256)t.flags&=-257,t=Oh(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(Et||Xa(e,t,l,!1),r=(l&e.childLanes)!==0,Et||r){if(n=tt,n!==null&&(h=Ee(n,l),h!==0&&h!==o.retryLane))throw o.retryLane=h,ca(e,h),Wt(n,e,h),Fr;fs(),t=Oh(e,t,l)}else e=o.treeContext,it=vl(h.nextSibling),Ct=t,De=!0,Cn=null,yl=!1,e!==null&&df(t,e),t=es(t,n),t.flags|=4096;return t}return e=en(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ts(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Wr(e,t,l,n,r){return da(t),l=Cr(e,t,l,n,void 0,r),n=zr(),e!==null&&!Et?(wr(e,t,r),sn(e,t,r)):(De&&n&&hr(t),t.flags|=1,wt(e,t,l,r),t.child)}function Nh(e,t,l,n,r,o){return da(t),t.updateQueue=null,l=Cf(t,n,l,r),Rf(e),n=zr(),e!==null&&!Et?(wr(e,t,o),sn(e,t,o)):(De&&n&&hr(t),t.flags|=1,wt(e,t,l,o),t.child)}function Mh(e,t,l,n,r){if(da(t),t.stateNode===null){var o=Ha,h=l.contextType;typeof h=="object"&&h!==null&&(o=zt(h)),o=new l(n,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Jr,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=n,o.state=t.memoizedState,o.refs={},Er(t),h=l.contextType,o.context=typeof h=="object"&&h!==null?zt(h):Ha,o.state=t.memoizedState,h=l.getDerivedStateFromProps,typeof h=="function"&&(Kr(t,l,h,n),o.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(h=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),h!==o.state&&Jr.enqueueReplaceState(o,o.state,null),Ui(t,n,o,r),Bi(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){o=t.stateNode;var m=t.memoizedProps,x=va(l,m);o.props=x;var O=o.context,B=l.contextType;h=Ha,typeof B=="object"&&B!==null&&(h=zt(B));var Y=l.getDerivedStateFromProps;B=typeof Y=="function"||typeof o.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,B||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(m||O!==h)&&gh(t,o,n,h),Dn=!1;var M=t.memoizedState;o.state=M,Ui(t,n,o,r),Bi(),O=t.memoizedState,m||M!==O||Dn?(typeof Y=="function"&&(Kr(t,l,Y,n),O=t.memoizedState),(x=Dn||ph(t,l,x,n,M,O,h))?(B||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=O),o.props=n,o.state=O,o.context=h,n=x):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Ar(e,t),h=t.memoizedProps,B=va(l,h),o.props=B,Y=t.pendingProps,M=o.context,O=l.contextType,x=Ha,typeof O=="object"&&O!==null&&(x=zt(O)),m=l.getDerivedStateFromProps,(O=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(h!==Y||M!==x)&&gh(t,o,n,x),Dn=!1,M=t.memoizedState,o.state=M,Ui(t,n,o,r),Bi();var C=t.memoizedState;h!==Y||M!==C||Dn||e!==null&&e.dependencies!==null&&Bu(e.dependencies)?(typeof m=="function"&&(Kr(t,l,m,n),C=t.memoizedState),(B=Dn||ph(t,l,B,n,M,C,x)||e!==null&&e.dependencies!==null&&Bu(e.dependencies))?(O||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,C,x),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,C,x)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=C),o.props=n,o.state=C,o.context=x,n=B):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),n=!1)}return o=n,ts(e,t),n=(t.flags&128)!==0,o||n?(o=t.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&n?(t.child=ya(t,e.child,null,r),t.child=ya(t,null,l,r)):wt(e,t,l,r),t.memoizedState=o.state,e=t.child):e=sn(e,t,r),e}function Rh(e,t,l,n){return fa(),t.flags|=256,wt(e,t,l,n),t.child}var Ir={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pr(e){return{baseLanes:e,cachePool:vf()}}function ec(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=il),e}function Ch(e,t,l){var n=t.pendingProps,r=!1,o=(t.flags&128)!==0,h;if((h=o)||(h=e!==null&&e.memoizedState===null?!1:(yt.current&2)!==0),h&&(r=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(De){if(r?Un(t):qn(),(e=it)?(e=Hd(e,yl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Rn!==null?{id:Bl,overflow:Ul}:null,retryLane:536870912,hydrationErrors:null},l=of(e),l.return=t,t.child=l,Ct=t,it=null)):e=null,e===null)throw zn(t);return Bc(e)?t.lanes=32:t.lanes=536870912,null}var m=n.children;return n=n.fallback,r?(qn(),r=t.mode,m=ls({mode:"hidden",children:m},r),n=oa(n,r,l,null),m.return=t,n.return=t,m.sibling=n,t.child=m,n=t.child,n.memoizedState=Pr(l),n.childLanes=ec(e,h,l),t.memoizedState=Ir,Yi(null,n)):(Un(t),tc(t,m))}var x=e.memoizedState;if(x!==null&&(m=x.dehydrated,m!==null)){if(o)t.flags&256?(Un(t),t.flags&=-257,t=lc(e,t,l)):t.memoizedState!==null?(qn(),t.child=e.child,t.flags|=128,t=null):(qn(),m=n.fallback,r=t.mode,n=ls({mode:"visible",children:n.children},r),m=oa(m,r,l,null),m.flags|=2,n.return=t,m.return=t,n.sibling=m,t.child=n,ya(t,e.child,null,l),n=t.child,n.memoizedState=Pr(l),n.childLanes=ec(e,h,l),t.memoizedState=Ir,t=Yi(null,n));else if(Un(t),Bc(m)){if(h=m.nextSibling&&m.nextSibling.dataset,h)var O=h.dgst;h=O,n=Error(s(419)),n.stack="",n.digest=h,Ri({value:n,source:null,stack:null}),t=lc(e,t,l)}else if(Et||Xa(e,t,l,!1),h=(l&e.childLanes)!==0,Et||h){if(h=tt,h!==null&&(n=Ee(h,l),n!==0&&n!==x.retryLane))throw x.retryLane=n,ca(e,n),Wt(h,e,n),Fr;kc(m)||fs(),t=lc(e,t,l)}else kc(m)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,it=vl(m.nextSibling),Ct=t,De=!0,Cn=null,yl=!1,e!==null&&df(t,e),t=tc(t,n.children),t.flags|=4096);return t}return r?(qn(),m=n.fallback,r=t.mode,x=e.child,O=x.sibling,n=en(x,{mode:"hidden",children:n.children}),n.subtreeFlags=x.subtreeFlags&65011712,O!==null?m=en(O,m):(m=oa(m,r,l,null),m.flags|=2),m.return=t,n.return=t,n.sibling=m,t.child=n,Yi(null,n),n=t.child,m=e.child.memoizedState,m===null?m=Pr(l):(r=m.cachePool,r!==null?(x=St._currentValue,r=r.parent!==x?{parent:x,pool:x}:r):r=vf(),m={baseLanes:m.baseLanes|l,cachePool:r}),n.memoizedState=m,n.childLanes=ec(e,h,l),t.memoizedState=Ir,Yi(e.child,n)):(Un(t),l=e.child,e=l.sibling,l=en(l,{mode:"visible",children:n.children}),l.return=t,l.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=l,t.memoizedState=null,l)}function tc(e,t){return t=ls({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ls(e,t){return e=tl(22,e,null,t),e.lanes=0,e}function lc(e,t,l){return ya(t,e.child,null,l),e=tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zh(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),yr(e.return,t,l)}function nc(e,t,l,n,r,o){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:r,treeForkCount:o}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=n,h.tail=l,h.tailMode=r,h.treeForkCount=o)}function wh(e,t,l){var n=t.pendingProps,r=n.revealOrder,o=n.tail;n=n.children;var h=yt.current,m=(h&2)!==0;if(m?(h=h&1|2,t.flags|=128):h&=1,te(yt,h),wt(e,t,n,l),n=De?Mi:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zh(e,l,t);else if(e.tag===19)zh(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(l=t.child,r=null;l!==null;)e=l.alternate,e!==null&&Qu(e)===null&&(r=l),l=l.sibling;l=r,l===null?(r=t.child,t.child=null):(r=l.sibling,l.sibling=null),nc(t,!1,r,l,o,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Qu(e)===null){t.child=r;break}e=r.sibling,r.sibling=l,l=r,r=e}nc(t,!0,l,null,o,n);break;case"together":nc(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function sn(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Gn|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Xa(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,l=en(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=en(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function ac(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Bu(e)))}function Om(e,t,l){switch(t.tag){case 3:Tt(t,t.stateNode.containerInfo),wn(t,St,e.memoizedState.cache),fa();break;case 27:case 5:Yt(t);break;case 4:Tt(t,t.stateNode.containerInfo);break;case 10:wn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mr(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Un(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Ch(e,t,l):(Un(t),e=sn(e,t,l),e!==null?e.sibling:null);Un(t);break;case 19:var r=(e.flags&128)!==0;if(n=(l&t.childLanes)!==0,n||(Xa(e,t,l,!1),n=(l&t.childLanes)!==0),r){if(n)return wh(e,t,l);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),te(yt,yt.current),n)break;return null;case 22:return t.lanes=0,Th(e,t,l,t.pendingProps);case 24:wn(t,St,e.memoizedState.cache)}return sn(e,t,l)}function Dh(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Et=!0;else{if(!ac(e,l)&&(t.flags&128)===0)return Et=!1,Om(e,t,l);Et=(e.flags&131072)!==0}else Et=!1,De&&(t.flags&1048576)!==0&&hf(t,Mi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=ga(t.elementType),t.type=e,typeof e=="function")cr(e)?(n=va(e,n),t.tag=1,t=Mh(null,t,e,n,l)):(t.tag=0,t=Wr(null,t,e,n,l));else{if(e!=null){var r=e.$$typeof;if(r===ve){t.tag=11,t=_h(null,t,e,n,l);break e}else if(r===L){t.tag=14,t=Eh(null,t,e,n,l);break e}}throw t=Me(e)||e,Error(s(306,t,""))}}return t;case 0:return Wr(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,r=va(n,t.pendingProps),Mh(e,t,n,r,l);case 3:e:{if(Tt(t,t.stateNode.containerInfo),e===null)throw Error(s(387));n=t.pendingProps;var o=t.memoizedState;r=o.element,Ar(e,t),Ui(t,n,null,l);var h=t.memoizedState;if(n=h.cache,wn(t,St,n),n!==o.cache&&br(t,[St],l,!0),Bi(),n=h.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Rh(e,t,n,l);break e}else if(n!==r){r=pl(Error(s(424)),t),Ri(r),t=Rh(e,t,n,l);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,it=vl(e.firstChild),Ct=t,De=!0,Cn=null,yl=!0,l=Tf(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(fa(),n===r){t=sn(e,t,l);break e}wt(e,t,n,l)}t=t.child}return t;case 26:return ts(e,t),e===null?(l=Zd(t.type,null,t.pendingProps,null))?t.memoizedState=l:De||(l=t.type,e=t.pendingProps,n=bs(Se.current).createElement(l),n[gt]=t,n[Bt]=e,Dt(n,l,e),vt(n),t.stateNode=n):t.memoizedState=Zd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Yt(t),e===null&&De&&(n=t.stateNode=Yd(t.type,t.pendingProps,Se.current),Ct=t,yl=!0,r=it,Vn(t.type)?(Uc=r,it=vl(n.firstChild)):it=r),wt(e,t,t.pendingProps.children,l),ts(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&De&&((r=n=it)&&(n=ny(n,t.type,t.pendingProps,yl),n!==null?(t.stateNode=n,Ct=t,it=vl(n.firstChild),yl=!1,r=!0):r=!1),r||zn(t)),Yt(t),r=t.type,o=t.pendingProps,h=e!==null?e.memoizedProps:null,n=o.children,zc(r,o)?n=null:h!==null&&zc(r,h)&&(t.flags|=32),t.memoizedState!==null&&(r=Cr(e,t,bm,null,null,l),nu._currentValue=r),ts(e,t),wt(e,t,n,l),t.child;case 6:return e===null&&De&&((e=l=it)&&(l=ay(l,t.pendingProps,yl),l!==null?(t.stateNode=l,Ct=t,it=null,e=!0):e=!1),e||zn(t)),null;case 13:return Ch(e,t,l);case 4:return Tt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ya(t,null,n,l):wt(e,t,n,l),t.child;case 11:return _h(e,t,t.type,t.pendingProps,l);case 7:return wt(e,t,t.pendingProps,l),t.child;case 8:return wt(e,t,t.pendingProps.children,l),t.child;case 12:return wt(e,t,t.pendingProps.children,l),t.child;case 10:return n=t.pendingProps,wn(t,t.type,n.value),wt(e,t,n.children,l),t.child;case 9:return r=t.type._context,n=t.pendingProps.children,da(t),r=zt(r),n=n(r),t.flags|=1,wt(e,t,n,l),t.child;case 14:return Eh(e,t,t.type,t.pendingProps,l);case 15:return Ah(e,t,t.type,t.pendingProps,l);case 19:return wh(e,t,l);case 31:return jm(e,t,l);case 22:return Th(e,t,l,t.pendingProps);case 24:return da(t),n=zt(St),e===null?(r=Sr(),r===null&&(r=tt,o=vr(),r.pooledCache=o,o.refCount++,o!==null&&(r.pooledCacheLanes|=l),r=o),t.memoizedState={parent:n,cache:r},Er(t),wn(t,St,r)):((e.lanes&l)!==0&&(Ar(e,t),Ui(t,null,null,l),Bi()),r=e.memoizedState,o=t.memoizedState,r.parent!==n?(r={parent:n,cache:n},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),wn(t,St,n)):(n=o.cache,wn(t,St,n),n!==r.cache&&br(t,[St],l,!0))),wt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function rn(e){e.flags|=4}function ic(e,t,l,n,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(sd())e.flags|=8192;else throw ma=Lu,_r}else e.flags&=-16777217}function kh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Fd(t))if(sd())e.flags|=8192;else throw ma=Lu,_r}function ns(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?de():536870912,e.lanes|=t,ti|=t)}function Xi(e,t){if(!De)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var r=e.child;r!==null;)l|=r.lanes|r.childLanes,n|=r.subtreeFlags&65011712,n|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)l|=r.lanes|r.childLanes,n|=r.subtreeFlags,n|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function Nm(e,t,l){var n=t.pendingProps;switch(dr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return ut(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),nn(St),Fe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ya(t)?rn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,gr())),ut(t),null;case 26:var r=t.type,o=t.memoizedState;return e===null?(rn(t),o!==null?(ut(t),kh(t,o)):(ut(t),ic(t,r,null,n,l))):o?o!==e.memoizedState?(rn(t),ut(t),kh(t,o)):(ut(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&rn(t),ut(t),ic(t,r,e,n,l)),null;case 27:if(vn(t),l=Se.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&rn(t);else{if(!n){if(t.stateNode===null)throw Error(s(166));return ut(t),null}e=ne.current,Ya(t)?pf(t):(e=Yd(r,n,l),t.stateNode=e,rn(t))}return ut(t),null;case 5:if(vn(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&rn(t);else{if(!n){if(t.stateNode===null)throw Error(s(166));return ut(t),null}if(o=ne.current,Ya(t))pf(t);else{var h=bs(Se.current);switch(o){case 1:o=h.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:o=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":o=h.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":o=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":o=h.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof n.is=="string"?h.createElement("select",{is:n.is}):h.createElement("select"),n.multiple?o.multiple=!0:n.size&&(o.size=n.size);break;default:o=typeof n.is=="string"?h.createElement(r,{is:n.is}):h.createElement(r)}}o[gt]=t,o[Bt]=n;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)o.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=o;e:switch(Dt(o,r,n),r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&rn(t)}}return ut(t),ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&rn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(s(166));if(e=Se.current,Ya(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,r=Ct,r!==null)switch(r.tag){case 27:case 5:n=r.memoizedProps}e[gt]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||Cd(e.nodeValue,l)),e||zn(t,!0)}else e=bs(e).createTextNode(n),e[gt]=t,t.stateNode=e}return ut(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=Ya(t),l!==null){if(e===null){if(!n)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[gt]=t}else fa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),e=!1}else l=gr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(nl(t),t):(nl(t),null);if((t.flags&128)!==0)throw Error(s(558))}return ut(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ya(t),n!==null&&n.dehydrated!==null){if(e===null){if(!r)throw Error(s(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(s(317));r[gt]=t}else fa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),r=!1}else r=gr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(nl(t),t):(nl(t),null)}return nl(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,r=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(r=n.alternate.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==r&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),ns(t,t.updateQueue),ut(t),null);case 4:return Fe(),e===null&&Oc(t.stateNode.containerInfo),ut(t),null;case 10:return nn(t.type),ut(t),null;case 19:if(G(yt),n=t.memoizedState,n===null)return ut(t),null;if(r=(t.flags&128)!==0,o=n.rendering,o===null)if(r)Xi(n,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Qu(e),o!==null){for(t.flags|=128,Xi(n,!1),e=o.updateQueue,t.updateQueue=e,ns(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)cf(l,e),l=l.sibling;return te(yt,yt.current&1|2),De&&tn(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&ct()>rs&&(t.flags|=128,r=!0,Xi(n,!1),t.lanes=4194304)}else{if(!r)if(e=Qu(o),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,ns(t,e),Xi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!De)return ut(t),null}else 2*ct()-n.renderingStartTime>rs&&l!==536870912&&(t.flags|=128,r=!0,Xi(n,!1),t.lanes=4194304);n.isBackwards?(o.sibling=t.child,t.child=o):(e=n.last,e!==null?e.sibling=o:t.child=o,n.last=o)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=ct(),e.sibling=null,l=yt.current,te(yt,r?l&1|2:l&1),De&&tn(t,n.treeForkCount),e):(ut(t),null);case 22:case 23:return nl(t),Nr(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(l&536870912)!==0&&(t.flags&128)===0&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),l=t.updateQueue,l!==null&&ns(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&G(pa),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),nn(St),ut(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Mm(e,t){switch(dr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nn(St),Fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return vn(t),null;case 31:if(t.memoizedState!==null){if(nl(t),t.alternate===null)throw Error(s(340));fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(nl(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(yt),null;case 4:return Fe(),null;case 10:return nn(t.type),null;case 22:case 23:return nl(t),Nr(),e!==null&&G(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return nn(St),null;case 25:return null;default:return null}}function Bh(e,t){switch(dr(t),t.tag){case 3:nn(St),Fe();break;case 26:case 27:case 5:vn(t);break;case 4:Fe();break;case 31:t.memoizedState!==null&&nl(t);break;case 13:nl(t);break;case 19:G(yt);break;case 10:nn(t.type);break;case 22:case 23:nl(t),Nr(),e!==null&&G(pa);break;case 24:nn(St)}}function Qi(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var r=n.next;l=r;do{if((l.tag&e)===e){n=void 0;var o=l.create,h=l.inst;n=o(),h.destroy=n}l=l.next}while(l!==r)}}catch(m){Ke(t,t.return,m)}}function Hn(e,t,l){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var o=r.next;n=o;do{if((n.tag&e)===e){var h=n.inst,m=h.destroy;if(m!==void 0){h.destroy=void 0,r=t;var x=l,O=m;try{O()}catch(B){Ke(r,x,B)}}}n=n.next}while(n!==o)}}catch(B){Ke(t,t.return,B)}}function Uh(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Of(t,l)}catch(n){Ke(e,e.return,n)}}}function qh(e,t,l){l.props=va(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){Ke(e,t,n)}}function Zi(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(r){Ke(e,t,r)}}function ql(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(r){Ke(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(r){Ke(e,t,r)}else l.current=null}function Hh(e){var t=e.type,l=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break e;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(r){Ke(e,e.return,r)}}function uc(e,t,l){try{var n=e.stateNode;Wm(n,e.type,l,t),n[Bt]=t}catch(r){Ke(e,e.return,r)}}function Lh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Vn(e.type)||e.tag===4}function sc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Vn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rc(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=F));else if(n!==4&&(n===27&&Vn(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(rc(e,t,l),e=e.sibling;e!==null;)rc(e,t,l),e=e.sibling}function as(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(n!==4&&(n===27&&Vn(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(as(e,t,l),e=e.sibling;e!==null;)as(e,t,l),e=e.sibling}function Gh(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Dt(t,n,l),t[gt]=e,t[Bt]=l}catch(o){Ke(e,e.return,o)}}var cn=!1,At=!1,cc=!1,Yh=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function Rm(e,t){if(e=e.containerInfo,Rc=Ts,e=Po(e),lr(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var r=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{l.nodeType,o.nodeType}catch{l=null;break e}var h=0,m=-1,x=-1,O=0,B=0,Y=e,M=null;t:for(;;){for(var C;Y!==l||r!==0&&Y.nodeType!==3||(m=h+r),Y!==o||n!==0&&Y.nodeType!==3||(x=h+n),Y.nodeType===3&&(h+=Y.nodeValue.length),(C=Y.firstChild)!==null;)M=Y,Y=C;for(;;){if(Y===e)break t;if(M===l&&++O===r&&(m=h),M===o&&++B===n&&(x=h),(C=Y.nextSibling)!==null)break;Y=M,M=Y.parentNode}Y=C}l=m===-1||x===-1?null:{start:m,end:x}}else l=null}l=l||{start:0,end:0}}else l=null;for(Cc={focusedElem:e,selectionRange:l},Ts=!1,Mt=t;Mt!==null;)if(t=Mt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Mt=e;else for(;Mt!==null;){switch(t=Mt,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)r=e[l],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,l=t,r=o.memoizedProps,o=o.memoizedState,n=l.stateNode;try{var ae=va(l.type,r);e=n.getSnapshotBeforeUpdate(ae,o),n.__reactInternalSnapshotBeforeUpdate=e}catch(pe){Ke(l,l.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Dc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Dc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=t.sibling,e!==null){e.return=t.return,Mt=e;break}Mt=t.return}}function Xh(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:fn(e,l),n&4&&Qi(5,l);break;case 1:if(fn(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(h){Ke(l,l.return,h)}else{var r=va(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Ke(l,l.return,h)}}n&64&&Uh(l),n&512&&Zi(l,l.return);break;case 3:if(fn(e,l),n&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Of(e,t)}catch(h){Ke(l,l.return,h)}}break;case 27:t===null&&n&4&&Gh(l);case 26:case 5:fn(e,l),t===null&&n&4&&Hh(l),n&512&&Zi(l,l.return);break;case 12:fn(e,l);break;case 31:fn(e,l),n&4&&Vh(e,l);break;case 13:fn(e,l),n&4&&Kh(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Hm.bind(null,l),iy(e,l))));break;case 22:if(n=l.memoizedState!==null||cn,!n){t=t!==null&&t.memoizedState!==null||At,r=cn;var o=At;cn=n,(At=t)&&!o?hn(e,l,(l.subtreeFlags&8772)!==0):fn(e,l),cn=r,At=o}break;case 30:break;default:fn(e,l)}}function Qh(e){var t=e.alternate;t!==null&&(e.alternate=null,Qh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&gi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ot=null,Kt=!1;function on(e,t,l){for(l=l.child;l!==null;)Zh(e,t,l),l=l.sibling}function Zh(e,t,l){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(Kl,l)}catch{}switch(l.tag){case 26:At||ql(l,t),on(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:At||ql(l,t);var n=ot,r=Kt;Vn(l.type)&&(ot=l.stateNode,Kt=!1),on(e,t,l),eu(l.stateNode),ot=n,Kt=r;break;case 5:At||ql(l,t);case 6:if(n=ot,r=Kt,ot=null,on(e,t,l),ot=n,Kt=r,ot!==null)if(Kt)try{(ot.nodeType===9?ot.body:ot.nodeName==="HTML"?ot.ownerDocument.body:ot).removeChild(l.stateNode)}catch(o){Ke(l,t,o)}else try{ot.removeChild(l.stateNode)}catch(o){Ke(l,t,o)}break;case 18:ot!==null&&(Kt?(e=ot,Ud(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ci(e)):Ud(ot,l.stateNode));break;case 4:n=ot,r=Kt,ot=l.stateNode.containerInfo,Kt=!0,on(e,t,l),ot=n,Kt=r;break;case 0:case 11:case 14:case 15:Hn(2,l,t),At||Hn(4,l,t),on(e,t,l);break;case 1:At||(ql(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&qh(l,t,n)),on(e,t,l);break;case 21:on(e,t,l);break;case 22:At=(n=At)||l.memoizedState!==null,on(e,t,l),At=n;break;default:on(e,t,l)}}function Vh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ci(e)}catch(l){Ke(t,t.return,l)}}}function Kh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ci(e)}catch(l){Ke(t,t.return,l)}}function Cm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Yh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Yh),t;default:throw Error(s(435,e.tag))}}function is(e,t){var l=Cm(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var r=Lm.bind(null,e,n);n.then(r,r)}})}function Jt(e,t){var l=t.deletions;if(l!==null)for(var n=0;n<l.length;n++){var r=l[n],o=e,h=t,m=h;e:for(;m!==null;){switch(m.tag){case 27:if(Vn(m.type)){ot=m.stateNode,Kt=!1;break e}break;case 5:ot=m.stateNode,Kt=!1;break e;case 3:case 4:ot=m.stateNode.containerInfo,Kt=!0;break e}m=m.return}if(ot===null)throw Error(s(160));Zh(o,h,r),ot=null,Kt=!1,o=r.alternate,o!==null&&(o.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Jh(t,e),t=t.sibling}var Tl=null;function Jh(e,t){var l=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Jt(t,e),$t(e),n&4&&(Hn(3,e,e.return),Qi(3,e),Hn(5,e,e.return));break;case 1:Jt(t,e),$t(e),n&512&&(At||l===null||ql(l,l.return)),n&64&&cn&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var r=Tl;if(Jt(t,e),$t(e),n&512&&(At||l===null||ql(l,l.return)),n&4){var o=l!==null?l.memoizedState:null;if(n=e.memoizedState,l===null)if(n===null)if(e.stateNode===null){e:{n=e.type,l=e.memoizedProps,r=r.ownerDocument||r;t:switch(n){case"title":o=r.getElementsByTagName("title")[0],(!o||o[na]||o[gt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=r.createElement(n),r.head.insertBefore(o,r.querySelector("head > title"))),Dt(o,n,l),o[gt]=e,vt(o),n=o;break e;case"link":var h=Jd("link","href",r).get(n+(l.href||""));if(h){for(var m=0;m<h.length;m++)if(o=h[m],o.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&o.getAttribute("rel")===(l.rel==null?null:l.rel)&&o.getAttribute("title")===(l.title==null?null:l.title)&&o.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){h.splice(m,1);break t}}o=r.createElement(n),Dt(o,n,l),r.head.appendChild(o);break;case"meta":if(h=Jd("meta","content",r).get(n+(l.content||""))){for(m=0;m<h.length;m++)if(o=h[m],o.getAttribute("content")===(l.content==null?null:""+l.content)&&o.getAttribute("name")===(l.name==null?null:l.name)&&o.getAttribute("property")===(l.property==null?null:l.property)&&o.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&o.getAttribute("charset")===(l.charSet==null?null:l.charSet)){h.splice(m,1);break t}}o=r.createElement(n),Dt(o,n,l),r.head.appendChild(o);break;default:throw Error(s(468,n))}o[gt]=e,vt(o),n=o}e.stateNode=n}else $d(r,e.type,e.stateNode);else e.stateNode=Kd(r,n,e.memoizedProps);else o!==n?(o===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):o.count--,n===null?$d(r,e.type,e.stateNode):Kd(r,n,e.memoizedProps)):n===null&&e.stateNode!==null&&uc(e,e.memoizedProps,l.memoizedProps)}break;case 27:Jt(t,e),$t(e),n&512&&(At||l===null||ql(l,l.return)),l!==null&&n&4&&uc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Jt(t,e),$t(e),n&512&&(At||l===null||ql(l,l.return)),e.flags&32){r=e.stateNode;try{ge(r,"")}catch(ae){Ke(e,e.return,ae)}}n&4&&e.stateNode!=null&&(r=e.memoizedProps,uc(e,r,l!==null?l.memoizedProps:r)),n&1024&&(cc=!0);break;case 6:if(Jt(t,e),$t(e),n&4){if(e.stateNode===null)throw Error(s(162));n=e.memoizedProps,l=e.stateNode;try{l.nodeValue=n}catch(ae){Ke(e,e.return,ae)}}break;case 3:if(Ss=null,r=Tl,Tl=vs(t.containerInfo),Jt(t,e),Tl=r,$t(e),n&4&&l!==null&&l.memoizedState.isDehydrated)try{ci(t.containerInfo)}catch(ae){Ke(e,e.return,ae)}cc&&(cc=!1,$h(e));break;case 4:n=Tl,Tl=vs(e.stateNode.containerInfo),Jt(t,e),$t(e),Tl=n;break;case 12:Jt(t,e),$t(e);break;case 31:Jt(t,e),$t(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,is(e,n)));break;case 13:Jt(t,e),$t(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ss=ct()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,is(e,n)));break;case 22:r=e.memoizedState!==null;var x=l!==null&&l.memoizedState!==null,O=cn,B=At;if(cn=O||r,At=B||x,Jt(t,e),At=B,cn=O,$t(e),n&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(l===null||x||cn||At||xa(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){x=l=t;try{if(o=x.stateNode,r)h=o.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{m=x.stateNode;var Y=x.memoizedProps.style,M=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;m.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(ae){Ke(x,x.return,ae)}}}else if(t.tag===6){if(l===null){x=t;try{x.stateNode.nodeValue=r?"":x.memoizedProps}catch(ae){Ke(x,x.return,ae)}}}else if(t.tag===18){if(l===null){x=t;try{var C=x.stateNode;r?qd(C,!0):qd(x.stateNode,!1)}catch(ae){Ke(x,x.return,ae)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,is(e,l))));break;case 19:Jt(t,e),$t(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,is(e,n)));break;case 30:break;case 21:break;default:Jt(t,e),$t(e)}}function $t(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(Lh(n)){l=n;break}n=n.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var r=l.stateNode,o=sc(e);as(e,o,r);break;case 5:var h=l.stateNode;l.flags&32&&(ge(h,""),l.flags&=-33);var m=sc(e);as(e,m,h);break;case 3:case 4:var x=l.stateNode.containerInfo,O=sc(e);rc(e,O,x);break;default:throw Error(s(161))}}catch(B){Ke(e,e.return,B)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $h(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;$h(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Xh(e,t.alternate,t),t=t.sibling}function xa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hn(4,t,t.return),xa(t);break;case 1:ql(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&qh(t,t.return,l),xa(t);break;case 27:eu(t.stateNode);case 26:case 5:ql(t,t.return),xa(t);break;case 22:t.memoizedState===null&&xa(t);break;case 30:xa(t);break;default:xa(t)}e=e.sibling}}function hn(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,r=e,o=t,h=o.flags;switch(o.tag){case 0:case 11:case 15:hn(r,o,l),Qi(4,o);break;case 1:if(hn(r,o,l),n=o,r=n.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(O){Ke(n,n.return,O)}if(n=o,r=n.updateQueue,r!==null){var m=n.stateNode;try{var x=r.shared.hiddenCallbacks;if(x!==null)for(r.shared.hiddenCallbacks=null,r=0;r<x.length;r++)jf(x[r],m)}catch(O){Ke(n,n.return,O)}}l&&h&64&&Uh(o),Zi(o,o.return);break;case 27:Gh(o);case 26:case 5:hn(r,o,l),l&&n===null&&h&4&&Hh(o),Zi(o,o.return);break;case 12:hn(r,o,l);break;case 31:hn(r,o,l),l&&h&4&&Vh(r,o);break;case 13:hn(r,o,l),l&&h&4&&Kh(r,o);break;case 22:o.memoizedState===null&&hn(r,o,l),Zi(o,o.return);break;case 30:break;default:hn(r,o,l)}t=t.sibling}}function oc(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Ci(l))}function fc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ci(e))}function jl(e,t,l,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Fh(e,t,l,n),t=t.sibling}function Fh(e,t,l,n){var r=t.flags;switch(t.tag){case 0:case 11:case 15:jl(e,t,l,n),r&2048&&Qi(9,t);break;case 1:jl(e,t,l,n);break;case 3:jl(e,t,l,n),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ci(e)));break;case 12:if(r&2048){jl(e,t,l,n),e=t.stateNode;try{var o=t.memoizedProps,h=o.id,m=o.onPostCommit;typeof m=="function"&&m(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){Ke(t,t.return,x)}}else jl(e,t,l,n);break;case 31:jl(e,t,l,n);break;case 13:jl(e,t,l,n);break;case 23:break;case 22:o=t.stateNode,h=t.alternate,t.memoizedState!==null?o._visibility&2?jl(e,t,l,n):Vi(e,t):o._visibility&2?jl(e,t,l,n):(o._visibility|=2,Ia(e,t,l,n,(t.subtreeFlags&10256)!==0||!1)),r&2048&&oc(h,t);break;case 24:jl(e,t,l,n),r&2048&&fc(t.alternate,t);break;default:jl(e,t,l,n)}}function Ia(e,t,l,n,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,h=t,m=l,x=n,O=h.flags;switch(h.tag){case 0:case 11:case 15:Ia(o,h,m,x,r),Qi(8,h);break;case 23:break;case 22:var B=h.stateNode;h.memoizedState!==null?B._visibility&2?Ia(o,h,m,x,r):Vi(o,h):(B._visibility|=2,Ia(o,h,m,x,r)),r&&O&2048&&oc(h.alternate,h);break;case 24:Ia(o,h,m,x,r),r&&O&2048&&fc(h.alternate,h);break;default:Ia(o,h,m,x,r)}t=t.sibling}}function Vi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,r=n.flags;switch(n.tag){case 22:Vi(l,n),r&2048&&oc(n.alternate,n);break;case 24:Vi(l,n),r&2048&&fc(n.alternate,n);break;default:Vi(l,n)}t=t.sibling}}var Ki=8192;function Pa(e,t,l){if(e.subtreeFlags&Ki)for(e=e.child;e!==null;)Wh(e,t,l),e=e.sibling}function Wh(e,t,l){switch(e.tag){case 26:Pa(e,t,l),e.flags&Ki&&e.memoizedState!==null&&yy(l,Tl,e.memoizedState,e.memoizedProps);break;case 5:Pa(e,t,l);break;case 3:case 4:var n=Tl;Tl=vs(e.stateNode.containerInfo),Pa(e,t,l),Tl=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ki,Ki=16777216,Pa(e,t,l),Ki=n):Pa(e,t,l));break;default:Pa(e,t,l)}}function Ih(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ji(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];Mt=n,ed(n,e)}Ih(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ph(e),e=e.sibling}function Ph(e){switch(e.tag){case 0:case 11:case 15:Ji(e),e.flags&2048&&Hn(9,e,e.return);break;case 3:Ji(e);break;case 12:Ji(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,us(e)):Ji(e);break;default:Ji(e)}}function us(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];Mt=n,ed(n,e)}Ih(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hn(8,t,t.return),us(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,us(t));break;default:us(t)}e=e.sibling}}function ed(e,t){for(;Mt!==null;){var l=Mt;switch(l.tag){case 0:case 11:case 15:Hn(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Ci(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,Mt=n;else e:for(l=e;Mt!==null;){n=Mt;var r=n.sibling,o=n.return;if(Qh(n),n===l){Mt=null;break e}if(r!==null){r.return=o,Mt=r;break e}Mt=o}}}var zm={getCacheForType:function(e){var t=zt(St),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return zt(St).controller.signal}},wm=typeof WeakMap=="function"?WeakMap:Map,Ge=0,tt=null,Oe=null,Ce=0,Ve=0,al=null,Ln=!1,ei=!1,hc=!1,dn=0,dt=0,Gn=0,Sa=0,dc=0,il=0,ti=0,$i=null,Ft=null,pc=!1,ss=0,td=0,rs=1/0,cs=null,Yn=null,Ot=0,Xn=null,li=null,pn=0,gc=0,mc=null,ld=null,Fi=0,yc=null;function ul(){return(Ge&2)!==0&&Ce!==0?Ce&-Ce:k.T!==null?Ec():Na()}function nd(){if(il===0)if((Ce&536870912)===0||De){var e=En;En<<=1,(En&3932160)===0&&(En=262144),il=e}else il=536870912;return e=ll.current,e!==null&&(e.flags|=32),il}function Wt(e,t,l){(e===tt&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(ni(e,0),Qn(e,Ce,il,!1)),Xe(e,l),((Ge&2)===0||e!==tt)&&(e===tt&&((Ge&2)===0&&(Sa|=l),dt===4&&Qn(e,Ce,il,!1)),Hl(e))}function ad(e,t,l){if((Ge&6)!==0)throw Error(s(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||q(e,t),r=n?Bm(e,t):vc(e,t,!0),o=n;do{if(r===0){ei&&!n&&Qn(e,t,0,!1);break}else{if(l=e.current.alternate,o&&!Dm(l)){r=vc(e,t,!1),o=!1;continue}if(r===2){if(o=t,e.errorRecoveryDisabledLanes&o)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var m=e;r=$i;var x=m.current.memoizedState.isDehydrated;if(x&&(ni(m,h).flags|=256),h=vc(m,h,!1),h!==2){if(hc&&!x){m.errorRecoveryDisabledLanes|=o,Sa|=o,r=4;break e}o=Ft,Ft=r,o!==null&&(Ft===null?Ft=o:Ft.push.apply(Ft,o))}r=h}if(o=!1,r!==2)continue}}if(r===1){ni(e,0),Qn(e,t,0,!0);break}e:{switch(n=e,o=r,o){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Qn(n,t,il,!Ln);break e;case 2:Ft=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(r=ss+300-ct(),10<r)){if(Qn(n,t,il,!Ln),S(n,0,!0)!==0)break e;pn=t,n.timeoutHandle=kd(id.bind(null,n,l,Ft,cs,pc,t,il,Sa,ti,Ln,o,"Throttled",-0,0),r);break e}id(n,l,Ft,cs,pc,t,il,Sa,ti,Ln,o,null,-0,0)}}break}while(!0);Hl(e)}function id(e,t,l,n,r,o,h,m,x,O,B,Y,M,C){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:F},Wh(t,o,Y);var ae=(o&62914560)===o?ss-ct():(o&4194048)===o?td-ct():0;if(ae=by(Y,ae),ae!==null){pn=o,e.cancelPendingCommit=ae(dd.bind(null,e,t,o,l,n,r,h,m,x,B,Y,null,M,C)),Qn(e,o,h,!O);return}}dd(e,t,o,l,n,r,h,m,x)}function Dm(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var r=l[n],o=r.getSnapshot;r=r.value;try{if(!el(o(),r))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Qn(e,t,l,n){t&=~dc,t&=~Sa,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var r=t;0<r;){var o=31-pt(r),h=1<<o;n[o]=-1,r&=~h}l!==0&&R(e,l,t)}function os(){return(Ge&6)===0?(Wi(0),!1):!0}function bc(){if(Oe!==null){if(Ve===0)var e=Oe.return;else e=Oe,ln=ha=null,Dr(e),Ka=null,wi=0,e=Oe;for(;e!==null;)Bh(e.alternate,e),e=e.return;Oe=null}}function ni(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,ey(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),pn=0,bc(),tt=e,Oe=l=en(e.current,null),Ce=t,Ve=0,al=null,Ln=!1,ei=q(e,t),hc=!1,ti=il=dc=Sa=Gn=dt=0,Ft=$i=null,pc=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-pt(n),o=1<<r;t|=e[r],n&=~o}return dn=t,Cu(),l}function ud(e,t){Ae=null,k.H=Gi,t===Va||t===Hu?(t=_f(),Ve=3):t===_r?(t=_f(),Ve=4):Ve=t===Fr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,al=t,Oe===null&&(dt=1,Pu(e,pl(t,e.current)))}function sd(){var e=ll.current;return e===null?!0:(Ce&4194048)===Ce?bl===null:(Ce&62914560)===Ce||(Ce&536870912)!==0?e===bl:!1}function rd(){var e=k.H;return k.H=Gi,e===null?Gi:e}function cd(){var e=k.A;return k.A=zm,e}function fs(){dt=4,Ln||(Ce&4194048)!==Ce&&ll.current!==null||(ei=!0),(Gn&134217727)===0&&(Sa&134217727)===0||tt===null||Qn(tt,Ce,il,!1)}function vc(e,t,l){var n=Ge;Ge|=2;var r=rd(),o=cd();(tt!==e||Ce!==t)&&(cs=null,ni(e,t)),t=!1;var h=dt;e:do try{if(Ve!==0&&Oe!==null){var m=Oe,x=al;switch(Ve){case 8:bc(),h=6;break e;case 3:case 2:case 9:case 6:ll.current===null&&(t=!0);var O=Ve;if(Ve=0,al=null,ai(e,m,x,O),l&&ei){h=0;break e}break;default:O=Ve,Ve=0,al=null,ai(e,m,x,O)}}km(),h=dt;break}catch(B){ud(e,B)}while(!0);return t&&e.shellSuspendCounter++,ln=ha=null,Ge=n,k.H=r,k.A=o,Oe===null&&(tt=null,Ce=0,Cu()),h}function km(){for(;Oe!==null;)od(Oe)}function Bm(e,t){var l=Ge;Ge|=2;var n=rd(),r=cd();tt!==e||Ce!==t?(cs=null,rs=ct()+500,ni(e,t)):ei=q(e,t);e:do try{if(Ve!==0&&Oe!==null){t=Oe;var o=al;t:switch(Ve){case 1:Ve=0,al=null,ai(e,t,o,1);break;case 2:case 9:if(xf(o)){Ve=0,al=null,fd(t);break}t=function(){Ve!==2&&Ve!==9||tt!==e||(Ve=7),Hl(e)},o.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:xf(o)?(Ve=0,al=null,fd(t)):(Ve=0,al=null,ai(e,t,o,7));break;case 5:var h=null;switch(Oe.tag){case 26:h=Oe.memoizedState;case 5:case 27:var m=Oe;if(h?Fd(h):m.stateNode.complete){Ve=0,al=null;var x=m.sibling;if(x!==null)Oe=x;else{var O=m.return;O!==null?(Oe=O,hs(O)):Oe=null}break t}}Ve=0,al=null,ai(e,t,o,5);break;case 6:Ve=0,al=null,ai(e,t,o,6);break;case 8:bc(),dt=6;break e;default:throw Error(s(462))}}Um();break}catch(B){ud(e,B)}while(!0);return ln=ha=null,k.H=n,k.A=r,Ge=l,Oe!==null?0:(tt=null,Ce=0,Cu(),dt)}function Um(){for(;Oe!==null&&!cl();)od(Oe)}function od(e){var t=Dh(e.alternate,e,dn);e.memoizedProps=e.pendingProps,t===null?hs(e):Oe=t}function fd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Nh(l,t,t.pendingProps,t.type,void 0,Ce);break;case 11:t=Nh(l,t,t.pendingProps,t.type.render,t.ref,Ce);break;case 5:Dr(t);default:Bh(l,t),t=Oe=cf(t,dn),t=Dh(l,t,dn)}e.memoizedProps=e.pendingProps,t===null?hs(e):Oe=t}function ai(e,t,l,n){ln=ha=null,Dr(t),Ka=null,wi=0;var r=t.return;try{if(Tm(e,r,t,l,Ce)){dt=1,Pu(e,pl(l,e.current)),Oe=null;return}}catch(o){if(r!==null)throw Oe=r,o;dt=1,Pu(e,pl(l,e.current)),Oe=null;return}t.flags&32768?(De||n===1?e=!0:ei||(Ce&536870912)!==0?e=!1:(Ln=e=!0,(n===2||n===9||n===3||n===6)&&(n=ll.current,n!==null&&n.tag===13&&(n.flags|=16384))),hd(t,e)):hs(t)}function hs(e){var t=e;do{if((t.flags&32768)!==0){hd(t,Ln);return}e=t.return;var l=Nm(t.alternate,t,dn);if(l!==null){Oe=l;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);dt===0&&(dt=5)}function hd(e,t){do{var l=Mm(e.alternate,e);if(l!==null){l.flags&=32767,Oe=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Oe=e;return}Oe=e=l}while(e!==null);dt=6,Oe=null}function dd(e,t,l,n,r,o,h,m,x){e.cancelPendingCommit=null;do ds();while(Ot!==0);if((Ge&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(o=t.lanes|t.childLanes,o|=sr,N(e,l,o,h,m,x),e===tt&&(Oe=tt=null,Ce=0),li=t,Xn=e,pn=l,gc=o,mc=r,ld=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Gm(jt,function(){return bd(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=k.T,k.T=null,r=P.p,P.p=2,h=Ge,Ge|=4;try{Rm(e,t,l)}finally{Ge=h,P.p=r,k.T=n}}Ot=1,pd(),gd(),md()}}function pd(){if(Ot===1){Ot=0;var e=Xn,t=li,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var n=P.p;P.p=2;var r=Ge;Ge|=4;try{Jh(t,e);var o=Cc,h=Po(e.containerInfo),m=o.focusedElem,x=o.selectionRange;if(h!==m&&m&&m.ownerDocument&&Io(m.ownerDocument.documentElement,m)){if(x!==null&&lr(m)){var O=x.start,B=x.end;if(B===void 0&&(B=O),"selectionStart"in m)m.selectionStart=O,m.selectionEnd=Math.min(B,m.value.length);else{var Y=m.ownerDocument||document,M=Y&&Y.defaultView||window;if(M.getSelection){var C=M.getSelection(),ae=m.textContent.length,pe=Math.min(x.start,ae),Pe=x.end===void 0?pe:Math.min(x.end,ae);!C.extend&&pe>Pe&&(h=Pe,Pe=pe,pe=h);var T=Wo(m,pe),_=Wo(m,Pe);if(T&&_&&(C.rangeCount!==1||C.anchorNode!==T.node||C.anchorOffset!==T.offset||C.focusNode!==_.node||C.focusOffset!==_.offset)){var j=Y.createRange();j.setStart(T.node,T.offset),C.removeAllRanges(),pe>Pe?(C.addRange(j),C.extend(_.node,_.offset)):(j.setEnd(_.node,_.offset),C.addRange(j))}}}}for(Y=[],C=m;C=C.parentNode;)C.nodeType===1&&Y.push({element:C,left:C.scrollLeft,top:C.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<Y.length;m++){var H=Y[m];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}Ts=!!Rc,Cc=Rc=null}finally{Ge=r,P.p=n,k.T=l}}e.current=t,Ot=2}}function gd(){if(Ot===2){Ot=0;var e=Xn,t=li,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var n=P.p;P.p=2;var r=Ge;Ge|=4;try{Xh(e,t.alternate,t)}finally{Ge=r,P.p=n,k.T=l}}Ot=3}}function md(){if(Ot===4||Ot===3){Ot=0,Zl();var e=Xn,t=li,l=pn,n=ld;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ot=5:(Ot=0,li=Xn=null,yd(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Yn=null),Xt(l),t=t.stateNode,Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(Kl,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=k.T,r=P.p,P.p=2,k.T=null;try{for(var o=e.onRecoverableError,h=0;h<n.length;h++){var m=n[h];o(m.value,{componentStack:m.stack})}}finally{k.T=t,P.p=r}}(pn&3)!==0&&ds(),Hl(e),r=e.pendingLanes,(l&261930)!==0&&(r&42)!==0?e===yc?Fi++:(Fi=0,yc=e):Fi=0,Wi(0)}}function yd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ci(t)))}function ds(){return pd(),gd(),md(),bd()}function bd(){if(Ot!==5)return!1;var e=Xn,t=gc;gc=0;var l=Xt(pn),n=k.T,r=P.p;try{P.p=32>l?32:l,k.T=null,l=mc,mc=null;var o=Xn,h=pn;if(Ot=0,li=Xn=null,pn=0,(Ge&6)!==0)throw Error(s(331));var m=Ge;if(Ge|=4,Ph(o.current),Fh(o,o.current,h,l),Ge=m,Wi(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Kl,o)}catch{}return!0}finally{P.p=r,k.T=n,yd(e,t)}}function vd(e,t,l){t=pl(l,t),t=$r(e.stateNode,t,2),e=Bn(e,t,2),e!==null&&(Xe(e,2),Hl(e))}function Ke(e,t,l){if(e.tag===3)vd(e,e,l);else for(;t!==null;){if(t.tag===3){vd(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Yn===null||!Yn.has(n))){e=pl(l,e),l=xh(2),n=Bn(t,l,2),n!==null&&(Sh(l,n,t,e),Xe(n,2),Hl(n));break}}t=t.return}}function xc(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new wm;var r=new Set;n.set(t,r)}else r=n.get(t),r===void 0&&(r=new Set,n.set(t,r));r.has(l)||(hc=!0,r.add(l),e=qm.bind(null,e,t,l),t.then(e,e))}function qm(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,tt===e&&(Ce&l)===l&&(dt===4||dt===3&&(Ce&62914560)===Ce&&300>ct()-ss?(Ge&2)===0&&ni(e,0):dc|=l,ti===Ce&&(ti=0)),Hl(e)}function xd(e,t){t===0&&(t=de()),e=ca(e,t),e!==null&&(Xe(e,t),Hl(e))}function Hm(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),xd(e,l)}function Lm(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,r=e.memoizedState;r!==null&&(l=r.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(s(314))}n!==null&&n.delete(t),xd(e,l)}function Gm(e,t){return Cl(e,t)}var ps=null,ii=null,Sc=!1,gs=!1,_c=!1,Zn=0;function Hl(e){e!==ii&&e.next===null&&(ii===null?ps=ii=e:ii=ii.next=e),gs=!0,Sc||(Sc=!0,Xm())}function Wi(e,t){if(!_c&&gs){_c=!0;do for(var l=!1,n=ps;n!==null;){if(e!==0){var r=n.pendingLanes;if(r===0)var o=0;else{var h=n.suspendedLanes,m=n.pingedLanes;o=(1<<31-pt(42|e)+1)-1,o&=r&~(h&~m),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(l=!0,Ad(n,o))}else o=Ce,o=S(n,n===tt?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(o&3)===0||q(n,o)||(l=!0,Ad(n,o));n=n.next}while(l);_c=!1}}function Ym(){Sd()}function Sd(){gs=Sc=!1;var e=0;Zn!==0&&Pm()&&(e=Zn);for(var t=ct(),l=null,n=ps;n!==null;){var r=n.next,o=_d(n,t);o===0?(n.next=null,l===null?ps=r:l.next=r,r===null&&(ii=l)):(l=n,(e!==0||(o&3)!==0)&&(gs=!0)),n=r}Ot!==0&&Ot!==5||Wi(e),Zn!==0&&(Zn=0)}function _d(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var h=31-pt(o),m=1<<h,x=r[h];x===-1?((m&l)===0||(m&n)!==0)&&(r[h]=$(m,t)):x<=t&&(e.expiredLanes|=m),o&=~m}if(t=tt,l=Ce,l=S(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&zl(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||q(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&zl(n),Xt(l)){case 2:case 8:l=wl;break;case 32:l=jt;break;case 268435456:l=ta;break;default:l=jt}return n=Ed.bind(null,e),l=Cl(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&zl(n),e.callbackPriority=2,e.callbackNode=null,2}function Ed(e,t){if(Ot!==0&&Ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(ds()&&e.callbackNode!==l)return null;var n=Ce;return n=S(e,e===tt?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(ad(e,n,t),_d(e,ct()),e.callbackNode!=null&&e.callbackNode===l?Ed.bind(null,e):null)}function Ad(e,t){if(ds())return null;ad(e,t,!0)}function Xm(){ty(function(){(Ge&6)!==0?Cl(ol,Ym):Sd()})}function Ec(){if(Zn===0){var e=Qa;e===0&&(e=Jl,Jl<<=1,(Jl&261888)===0&&(Jl=256)),Zn=e}return Zn}function Td(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Nn(""+e)}function jd(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Qm(e,t,l,n,r){if(t==="submit"&&l&&l.stateNode===r){var o=Td((r[Bt]||null).action),h=n.submitter;h&&(t=(t=h[Bt]||null)?Td(t.formAction):h.getAttribute("formAction"),t!==null&&(o=t,h=null));var m=new Ou("action","action",null,n,r);e.push({event:m,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Zn!==0){var x=h?jd(r,h):new FormData(r);Xr(l,{pending:!0,data:x,method:r.method,action:o},null,x)}}else typeof o=="function"&&(m.preventDefault(),x=h?jd(r,h):new FormData(r),Xr(l,{pending:!0,data:x,method:r.method,action:o},o,x))},currentTarget:r}]})}}for(var Ac=0;Ac<ur.length;Ac++){var Tc=ur[Ac],Zm=Tc.toLowerCase(),Vm=Tc[0].toUpperCase()+Tc.slice(1);Al(Zm,"on"+Vm)}Al(lf,"onAnimationEnd"),Al(nf,"onAnimationIteration"),Al(af,"onAnimationStart"),Al("dblclick","onDoubleClick"),Al("focusin","onFocus"),Al("focusout","onBlur"),Al(rm,"onTransitionRun"),Al(cm,"onTransitionStart"),Al(om,"onTransitionCancel"),Al(uf,"onTransitionEnd"),K("onMouseEnter",["mouseout","mouseover"]),K("onMouseLeave",["mouseout","mouseover"]),K("onPointerEnter",["pointerout","pointerover"]),K("onPointerLeave",["pointerout","pointerover"]),Wl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Wl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Wl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Wl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Wl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Wl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ii="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(" "),Km=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ii));function Od(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],r=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var h=n.length-1;0<=h;h--){var m=n[h],x=m.instance,O=m.currentTarget;if(m=m.listener,x!==o&&r.isPropagationStopped())break e;o=m,r.currentTarget=O;try{o(r)}catch(B){Ru(B)}r.currentTarget=null,o=x}else for(h=0;h<n.length;h++){if(m=n[h],x=m.instance,O=m.currentTarget,m=m.listener,x!==o&&r.isPropagationStopped())break e;o=m,r.currentTarget=O;try{o(r)}catch(B){Ru(B)}r.currentTarget=null,o=x}}}}function Ne(e,t){var l=t[pi];l===void 0&&(l=t[pi]=new Set);var n=e+"__bubble";l.has(n)||(Nd(t,e,2,!1),l.add(n))}function jc(e,t,l){var n=0;t&&(n|=4),Nd(l,e,n,t)}var ms="_reactListening"+Math.random().toString(36).slice(2);function Oc(e){if(!e[ms]){e[ms]=!0,vu.forEach(function(l){l!=="selectionchange"&&(Km.has(l)||jc(l,!1,e),jc(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ms]||(t[ms]=!0,jc("selectionchange",!1,t))}}function Nd(e,t,l,n){switch(np(t)){case 2:var r=Sy;break;case 8:r=_y;break;default:r=Yc}l=r.bind(null,t,l,e),r=void 0,!Ks||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),n?r!==void 0?e.addEventListener(t,l,{capture:!0,passive:r}):e.addEventListener(t,l,!0):r!==void 0?e.addEventListener(t,l,{passive:r}):e.addEventListener(t,l,!1)}function Nc(e,t,l,n,r){var o=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var h=n.tag;if(h===3||h===4){var m=n.stateNode.containerInfo;if(m===r)break;if(h===4)for(h=n.return;h!==null;){var x=h.tag;if((x===3||x===4)&&h.stateNode.containerInfo===r)return;h=h.return}for(;m!==null;){if(h=Ht(m),h===null)return;if(x=h.tag,x===5||x===6||x===26||x===27){n=o=h;continue e}m=m.parentNode}}n=n.return}Eu(function(){var O=o,B=_e(l),Y=[];e:{var M=sf.get(e);if(M!==void 0){var C=Ou,ae=e;switch(e){case"keypress":if(Tu(l)===0)break e;case"keydown":case"keyup":C=Lg;break;case"focusin":ae="focus",C=Ws;break;case"focusout":ae="blur",C=Ws;break;case"beforeblur":case"afterblur":C=Ws;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":C=ko;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":C=Ng;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":C=Xg;break;case lf:case nf:case af:C=Cg;break;case uf:C=Zg;break;case"scroll":case"scrollend":C=jg;break;case"wheel":C=Kg;break;case"copy":case"cut":case"paste":C=wg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":C=Uo;break;case"toggle":case"beforetoggle":C=$g}var pe=(t&4)!==0,Pe=!pe&&(e==="scroll"||e==="scrollend"),T=pe?M!==null?M+"Capture":null:M;pe=[];for(var _=O,j;_!==null;){var H=_;if(j=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||j===null||T===null||(H=xi(_,T),H!=null&&pe.push(Pi(_,H,j))),Pe)break;_=_.return}0<pe.length&&(M=new C(M,ae,null,l,B),Y.push({event:M,listeners:pe}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",C=e==="mouseout"||e==="pointerout",M&&l!==ue&&(ae=l.relatedTarget||l.fromElement)&&(Ht(ae)||ae[An]))break e;if((C||M)&&(M=B.window===B?B:(M=B.ownerDocument)?M.defaultView||M.parentWindow:window,C?(ae=l.relatedTarget||l.toElement,C=O,ae=ae?Ht(ae):null,ae!==null&&(Pe=f(ae),pe=ae.tag,ae!==Pe||pe!==5&&pe!==27&&pe!==6)&&(ae=null)):(C=null,ae=O),C!==ae)){if(pe=ko,H="onMouseLeave",T="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(pe=Uo,H="onPointerLeave",T="onPointerEnter",_="pointer"),Pe=C==null?M:Tn(C),j=ae==null?M:Tn(ae),M=new pe(H,_+"leave",C,l,B),M.target=Pe,M.relatedTarget=j,H=null,Ht(B)===O&&(pe=new pe(T,_+"enter",ae,l,B),pe.target=j,pe.relatedTarget=Pe,H=pe),Pe=H,C&&ae)t:{for(pe=Jm,T=C,_=ae,j=0,H=T;H;H=pe(H))j++;H=0;for(var he=_;he;he=pe(he))H++;for(;0<j-H;)T=pe(T),j--;for(;0<H-j;)_=pe(_),H--;for(;j--;){if(T===_||_!==null&&T===_.alternate){pe=T;break t}T=pe(T),_=pe(_)}pe=null}else pe=null;C!==null&&Md(Y,M,C,pe,!1),ae!==null&&Pe!==null&&Md(Y,Pe,ae,pe,!0)}}e:{if(M=O?Tn(O):window,C=M.nodeName&&M.nodeName.toLowerCase(),C==="select"||C==="input"&&M.type==="file")var Ue=Zo;else if(Xo(M))if(Vo)Ue=im;else{Ue=nm;var se=lm}else C=M.nodeName,!C||C.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?O&&On(O.elementType)&&(Ue=Zo):Ue=am;if(Ue&&(Ue=Ue(e,O))){Qo(Y,Ue,l,B);break e}se&&se(e,M,O),e==="focusout"&&O&&M.type==="number"&&O.memoizedProps.value!=null&&wa(M,"number",M.value)}switch(se=O?Tn(O):window,e){case"focusin":(Xo(se)||se.contentEditable==="true")&&(Ba=se,nr=O,Ni=null);break;case"focusout":Ni=nr=Ba=null;break;case"mousedown":ar=!0;break;case"contextmenu":case"mouseup":case"dragend":ar=!1,ef(Y,l,B);break;case"selectionchange":if(sm)break;case"keydown":case"keyup":ef(Y,l,B)}var Te;if(Ps)e:{switch(e){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else ka?Go(e,l)&&(ze="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ze="onCompositionStart");ze&&(qo&&l.locale!=="ko"&&(ka||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&ka&&(Te=wo()):(Mn=B,Js="value"in Mn?Mn.value:Mn.textContent,ka=!0)),se=ys(O,ze),0<se.length&&(ze=new Bo(ze,e,null,l,B),Y.push({event:ze,listeners:se}),Te?ze.data=Te:(Te=Yo(l),Te!==null&&(ze.data=Te)))),(Te=Wg?Ig(e,l):Pg(e,l))&&(ze=ys(O,"onBeforeInput"),0<ze.length&&(se=new Bo("onBeforeInput","beforeinput",null,l,B),Y.push({event:se,listeners:ze}),se.data=Te)),Qm(Y,e,O,l,B)}Od(Y,t)})}function Pi(e,t,l){return{instance:e,listener:t,currentTarget:l}}function ys(e,t){for(var l=t+"Capture",n=[];e!==null;){var r=e,o=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||o===null||(r=xi(e,l),r!=null&&n.unshift(Pi(e,r,o)),r=xi(e,t),r!=null&&n.push(Pi(e,r,o))),e.tag===3)return n;e=e.return}return[]}function Jm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Md(e,t,l,n,r){for(var o=t._reactName,h=[];l!==null&&l!==n;){var m=l,x=m.alternate,O=m.stateNode;if(m=m.tag,x!==null&&x===n)break;m!==5&&m!==26&&m!==27||O===null||(x=O,r?(O=xi(l,o),O!=null&&h.unshift(Pi(l,O,x))):r||(O=xi(l,o),O!=null&&h.push(Pi(l,O,x)))),l=l.return}h.length!==0&&e.push({event:t,listeners:h})}var $m=/\r\n?/g,Fm=/\u0000|\uFFFD/g;function Rd(e){return(typeof e=="string"?e:""+e).replace($m,`
9
+ `).replace(Fm,"")}function Cd(e,t){return t=Rd(t),Rd(e)===t}function Ie(e,t,l,n,r,o){switch(l){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||ge(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&ge(e,""+n);break;case"className":It(e,"class",n);break;case"tabIndex":It(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":It(e,l,n);break;case"style":Ze(e,n,o);break;case"data":if(t!=="object"){It(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=Nn(""+n),e.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(l,"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 o=="function"&&(l==="formAction"?(t!=="input"&&Ie(e,t,"name",r.name,r,null),Ie(e,t,"formEncType",r.formEncType,r,null),Ie(e,t,"formMethod",r.formMethod,r,null),Ie(e,t,"formTarget",r.formTarget,r,null)):(Ie(e,t,"encType",r.encType,r,null),Ie(e,t,"method",r.method,r,null),Ie(e,t,"target",r.target,r,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=Nn(""+n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=F);break;case"onScroll":n!=null&&Ne("scroll",e);break;case"onScrollEnd":n!=null&&Ne("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(s(61));if(l=n.__html,l!=null){if(r.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}l=Nn(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""+n):e.removeAttribute(l);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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":n===!0?e.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(l,n):e.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(l):e.setAttribute(l,n);break;case"popover":Ne("beforetoggle",e),Ne("toggle",e),Ut(e,"popover",n);break;case"xlinkActuate":Qt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Qt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Qt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Qt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Qt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Qt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Ut(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Il.get(l)||l,Ut(e,l,n))}}function Mc(e,t,l,n,r,o){switch(l){case"style":Ze(e,n,o);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(s(61));if(l=n.__html,l!=null){if(r.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"children":typeof n=="string"?ge(e,n):(typeof n=="number"||typeof n=="bigint")&&ge(e,""+n);break;case"onScroll":n!=null&&Ne("scroll",e);break;case"onScrollEnd":n!=null&&Ne("scrollend",e);break;case"onClick":n!=null&&(e.onclick=F);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!aa.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(r=l.endsWith("Capture"),t=l.slice(2,r?l.length-7:void 0),o=e[Bt]||null,o=o!=null?o[l]:null,typeof o=="function"&&e.removeEventListener(t,o,r),typeof n=="function")){typeof o!="function"&&o!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,n,r);break e}l in e?e[l]=n:n===!0?e.setAttribute(l,""):Ut(e,l,n)}}}function Dt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",e),Ne("load",e);var n=!1,r=!1,o;for(o in l)if(l.hasOwnProperty(o)){var h=l[o];if(h!=null)switch(o){case"src":n=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ie(e,t,o,h,l,null)}}r&&Ie(e,t,"srcSet",l.srcSet,l,null),n&&Ie(e,t,"src",l.src,l,null);return;case"input":Ne("invalid",e);var m=o=h=r=null,x=null,O=null;for(n in l)if(l.hasOwnProperty(n)){var B=l[n];if(B!=null)switch(n){case"name":r=B;break;case"type":h=B;break;case"checked":x=B;break;case"defaultChecked":O=B;break;case"value":o=B;break;case"defaultValue":m=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,t));break;default:Ie(e,t,n,B,l,null)}}ia(e,o,m,x,O,h,r,!1);return;case"select":Ne("invalid",e),n=h=o=null;for(r in l)if(l.hasOwnProperty(r)&&(m=l[r],m!=null))switch(r){case"value":o=m;break;case"defaultValue":h=m;break;case"multiple":n=m;default:Ie(e,t,r,m,l,null)}t=o,l=h,e.multiple=!!n,t!=null?Rt(e,!!n,t,!1):l!=null&&Rt(e,!!n,l,!0);return;case"textarea":Ne("invalid",e),o=r=n=null;for(h in l)if(l.hasOwnProperty(h)&&(m=l[h],m!=null))switch(h){case"value":n=m;break;case"defaultValue":r=m;break;case"children":o=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(s(91));break;default:Ie(e,t,h,m,l,null)}Da(e,n,r,o);return;case"option":for(x in l)l.hasOwnProperty(x)&&(n=l[x],n!=null)&&(x==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":Ie(e,t,x,n,l,null));return;case"dialog":Ne("beforetoggle",e),Ne("toggle",e),Ne("cancel",e),Ne("close",e);break;case"iframe":case"object":Ne("load",e);break;case"video":case"audio":for(n=0;n<Ii.length;n++)Ne(Ii[n],e);break;case"image":Ne("error",e),Ne("load",e);break;case"details":Ne("toggle",e);break;case"embed":case"source":case"link":Ne("error",e),Ne("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(O in l)if(l.hasOwnProperty(O)&&(n=l[O],n!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ie(e,t,O,n,l,null)}return;default:if(On(t)){for(B in l)l.hasOwnProperty(B)&&(n=l[B],n!==void 0&&Mc(e,t,B,n,l,void 0));return}}for(m in l)l.hasOwnProperty(m)&&(n=l[m],n!=null&&Ie(e,t,m,n,l,null))}function Wm(e,t,l,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,o=null,h=null,m=null,x=null,O=null,B=null;for(C in l){var Y=l[C];if(l.hasOwnProperty(C)&&Y!=null)switch(C){case"checked":break;case"value":break;case"defaultValue":x=Y;default:n.hasOwnProperty(C)||Ie(e,t,C,null,n,Y)}}for(var M in n){var C=n[M];if(Y=l[M],n.hasOwnProperty(M)&&(C!=null||Y!=null))switch(M){case"type":o=C;break;case"name":r=C;break;case"checked":O=C;break;case"defaultChecked":B=C;break;case"value":h=C;break;case"defaultValue":m=C;break;case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(s(137,t));break;default:C!==Y&&Ie(e,t,M,C,n,Y)}}yi(e,h,m,x,O,B,o,r);return;case"select":C=h=m=M=null;for(o in l)if(x=l[o],l.hasOwnProperty(o)&&x!=null)switch(o){case"value":break;case"multiple":C=x;default:n.hasOwnProperty(o)||Ie(e,t,o,null,n,x)}for(r in n)if(o=n[r],x=l[r],n.hasOwnProperty(r)&&(o!=null||x!=null))switch(r){case"value":M=o;break;case"defaultValue":m=o;break;case"multiple":h=o;default:o!==x&&Ie(e,t,r,o,n,x)}t=m,l=h,n=C,M!=null?Rt(e,!!l,M,!1):!!n!=!!l&&(t!=null?Rt(e,!!l,t,!0):Rt(e,!!l,l?[]:"",!1));return;case"textarea":C=M=null;for(m in l)if(r=l[m],l.hasOwnProperty(m)&&r!=null&&!n.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Ie(e,t,m,null,n,r)}for(h in n)if(r=n[h],o=l[h],n.hasOwnProperty(h)&&(r!=null||o!=null))switch(h){case"value":M=r;break;case"defaultValue":C=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(s(91));break;default:r!==o&&Ie(e,t,h,r,n,o)}Su(e,M,C);return;case"option":for(var ae in l)M=l[ae],l.hasOwnProperty(ae)&&M!=null&&!n.hasOwnProperty(ae)&&(ae==="selected"?e.selected=!1:Ie(e,t,ae,null,n,M));for(x in n)M=n[x],C=l[x],n.hasOwnProperty(x)&&M!==C&&(M!=null||C!=null)&&(x==="selected"?e.selected=M&&typeof M!="function"&&typeof M!="symbol":Ie(e,t,x,M,n,C));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 pe in l)M=l[pe],l.hasOwnProperty(pe)&&M!=null&&!n.hasOwnProperty(pe)&&Ie(e,t,pe,null,n,M);for(O in n)if(M=n[O],C=l[O],n.hasOwnProperty(O)&&M!==C&&(M!=null||C!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(s(137,t));break;default:Ie(e,t,O,M,n,C)}return;default:if(On(t)){for(var Pe in l)M=l[Pe],l.hasOwnProperty(Pe)&&M!==void 0&&!n.hasOwnProperty(Pe)&&Mc(e,t,Pe,void 0,n,M);for(B in n)M=n[B],C=l[B],!n.hasOwnProperty(B)||M===C||M===void 0&&C===void 0||Mc(e,t,B,M,n,C);return}}for(var T in l)M=l[T],l.hasOwnProperty(T)&&M!=null&&!n.hasOwnProperty(T)&&Ie(e,t,T,null,n,M);for(Y in n)M=n[Y],C=l[Y],!n.hasOwnProperty(Y)||M===C||M==null&&C==null||Ie(e,t,Y,M,n,C)}function zd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Im(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var r=l[n],o=r.transferSize,h=r.initiatorType,m=r.duration;if(o&&m&&zd(h)){for(h=0,m=r.responseEnd,n+=1;n<l.length;n++){var x=l[n],O=x.startTime;if(O>m)break;var B=x.transferSize,Y=x.initiatorType;B&&zd(Y)&&(x=x.responseEnd,h+=B*(x<m?1:(m-O)/(x-O)))}if(--n,t+=8*(o+h)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Rc=null,Cc=null;function bs(e){return e.nodeType===9?e:e.ownerDocument}function wd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Dd(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function zc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wc=null;function Pm(){var e=window.event;return e&&e.type==="popstate"?e===wc?!1:(wc=e,!0):(wc=null,!1)}var kd=typeof setTimeout=="function"?setTimeout:void 0,ey=typeof clearTimeout=="function"?clearTimeout:void 0,Bd=typeof Promise=="function"?Promise:void 0,ty=typeof queueMicrotask=="function"?queueMicrotask:typeof Bd<"u"?function(e){return Bd.resolve(null).then(e).catch(ly)}:kd;function ly(e){setTimeout(function(){throw e})}function Vn(e){return e==="head"}function Ud(e,t){var l=t,n=0;do{var r=l.nextSibling;if(e.removeChild(l),r&&r.nodeType===8)if(l=r.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(r),ci(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")eu(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,eu(l);for(var o=l.firstChild;o;){var h=o.nextSibling,m=o.nodeName;o[na]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&o.rel.toLowerCase()==="stylesheet"||l.removeChild(o),o=h}}else l==="body"&&eu(e.ownerDocument.body);l=r}while(l);ci(t)}function qd(e,t){var l=e;e=0;do{var n=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=n}while(l)}function Dc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Dc(l),gi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function ny(e,t,l,n){for(;e.nodeType===1;){var r=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[na])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=vl(e.nextSibling),e===null)break}return null}function ay(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=vl(e.nextSibling),e===null))return null;return e}function Hd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=vl(e.nextSibling),e===null))return null;return e}function kc(e){return e.data==="$?"||e.data==="$~"}function Bc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function iy(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var n=function(){t(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function vl(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Uc=null;function Ld(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return vl(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Gd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function Yd(e,t,l){switch(t=bs(l),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function eu(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gi(e)}var xl=new Map,Xd=new Set;function vs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var gn=P.d;P.d={f:uy,r:sy,D:ry,C:cy,L:oy,m:fy,X:dy,S:hy,M:py};function uy(){var e=gn.f(),t=os();return e||t}function sy(e){var t=Fl(e);t!==null&&t.tag===5&&t.type==="form"?uh(t):gn.r(e)}var ui=typeof document>"u"?null:document;function Qd(e,t,l){var n=ui;if(n&&typeof t=="string"&&t){var r=Zt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof l=="string"&&(r+='[crossorigin="'+l+'"]'),Xd.has(r)||(Xd.add(r),e={rel:e,crossOrigin:l,href:t},n.querySelector(r)===null&&(t=n.createElement("link"),Dt(t,"link",e),vt(t),n.head.appendChild(t)))}}function ry(e){gn.D(e),Qd("dns-prefetch",e,null)}function cy(e,t){gn.C(e,t),Qd("preconnect",e,t)}function oy(e,t,l){gn.L(e,t,l);var n=ui;if(n&&e&&t){var r='link[rel="preload"][as="'+Zt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(r+='[imagesrcset="'+Zt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(r+='[imagesizes="'+Zt(l.imageSizes)+'"]')):r+='[href="'+Zt(e)+'"]';var o=r;switch(t){case"style":o=si(e);break;case"script":o=ri(e)}xl.has(o)||(e=A({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),xl.set(o,e),n.querySelector(r)!==null||t==="style"&&n.querySelector(tu(o))||t==="script"&&n.querySelector(lu(o))||(t=n.createElement("link"),Dt(t,"link",e),vt(t),n.head.appendChild(t)))}}function fy(e,t){gn.m(e,t);var l=ui;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Zt(n)+'"][href="'+Zt(e)+'"]',o=r;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=ri(e)}if(!xl.has(o)&&(e=A({rel:"modulepreload",href:e},t),xl.set(o,e),l.querySelector(r)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(lu(o)))return}n=l.createElement("link"),Dt(n,"link",e),vt(n),l.head.appendChild(n)}}}function hy(e,t,l){gn.S(e,t,l);var n=ui;if(n&&e){var r=jn(n).hoistableStyles,o=si(e);t=t||"default";var h=r.get(o);if(!h){var m={loading:0,preload:null};if(h=n.querySelector(tu(o)))m.loading=5;else{e=A({rel:"stylesheet",href:e,"data-precedence":t},l),(l=xl.get(o))&&qc(e,l);var x=h=n.createElement("link");vt(x),Dt(x,"link",e),x._p=new Promise(function(O,B){x.onload=O,x.onerror=B}),x.addEventListener("load",function(){m.loading|=1}),x.addEventListener("error",function(){m.loading|=2}),m.loading|=4,xs(h,t,n)}h={type:"stylesheet",instance:h,count:1,state:m},r.set(o,h)}}}function dy(e,t){gn.X(e,t);var l=ui;if(l&&e){var n=jn(l).hoistableScripts,r=ri(e),o=n.get(r);o||(o=l.querySelector(lu(r)),o||(e=A({src:e,async:!0},t),(t=xl.get(r))&&Hc(e,t),o=l.createElement("script"),vt(o),Dt(o,"link",e),l.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(r,o))}}function py(e,t){gn.M(e,t);var l=ui;if(l&&e){var n=jn(l).hoistableScripts,r=ri(e),o=n.get(r);o||(o=l.querySelector(lu(r)),o||(e=A({src:e,async:!0,type:"module"},t),(t=xl.get(r))&&Hc(e,t),o=l.createElement("script"),vt(o),Dt(o,"link",e),l.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(r,o))}}function Zd(e,t,l,n){var r=(r=Se.current)?vs(r):null;if(!r)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=si(l.href),l=jn(r).hoistableStyles,n=l.get(t),n||(n={type:"style",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=si(l.href);var o=jn(r).hoistableStyles,h=o.get(e);if(h||(r=r.ownerDocument||r,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,h),(o=r.querySelector(tu(e)))&&!o._p&&(h.instance=o,h.state.loading=5),xl.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},xl.set(e,l),o||gy(r,e,l,h.state))),t&&n===null)throw Error(s(528,""));return h}if(t&&n!==null)throw Error(s(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ri(l),l=jn(r).hoistableScripts,n=l.get(t),n||(n={type:"script",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function si(e){return'href="'+Zt(e)+'"'}function tu(e){return'link[rel="stylesheet"]['+e+"]"}function Vd(e){return A({},e,{"data-precedence":e.precedence,precedence:null})}function gy(e,t,l,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Dt(t,"link",l),vt(t),e.head.appendChild(t))}function ri(e){return'[src="'+Zt(e)+'"]'}function lu(e){return"script[async]"+e}function Kd(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Zt(l.href)+'"]');if(n)return t.instance=n,vt(n),n;var r=A({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),vt(n),Dt(n,"style",r),xs(n,l.precedence,e),t.instance=n;case"stylesheet":r=si(l.href);var o=e.querySelector(tu(r));if(o)return t.state.loading|=4,t.instance=o,vt(o),o;n=Vd(l),(r=xl.get(r))&&qc(n,r),o=(e.ownerDocument||e).createElement("link"),vt(o);var h=o;return h._p=new Promise(function(m,x){h.onload=m,h.onerror=x}),Dt(o,"link",n),t.state.loading|=4,xs(o,l.precedence,e),t.instance=o;case"script":return o=ri(l.src),(r=e.querySelector(lu(o)))?(t.instance=r,vt(r),r):(n=l,(r=xl.get(o))&&(n=A({},l),Hc(n,r)),e=e.ownerDocument||e,r=e.createElement("script"),vt(r),Dt(r,"link",n),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,xs(n,l.precedence,e));return t.instance}function xs(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=n.length?n[n.length-1]:null,o=r,h=0;h<n.length;h++){var m=n[h];if(m.dataset.precedence===t)o=m;else if(o!==r)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function qc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Hc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ss=null;function Jd(e,t,l){if(Ss===null){var n=new Map,r=Ss=new Map;r.set(l,n)}else r=Ss,n=r.get(l),n||(n=new Map,r.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),r=0;r<l.length;r++){var o=l[r];if(!(o[na]||o[gt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var h=o.getAttribute(t)||"";h=e+h;var m=n.get(h);m?m.push(o):n.set(h,[o])}}return n}function $d(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function my(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Fd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function yy(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var r=si(n.href),o=t.querySelector(tu(r));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=_s.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=o,vt(o);return}o=t.ownerDocument||t,n=Vd(n),(r=xl.get(r))&&qc(n,r),o=o.createElement("link"),vt(o);var h=o;h._p=new Promise(function(m,x){h.onload=m,h.onerror=x}),Dt(o,"link",n),l.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=_s.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Lc=0;function by(e,t){return e.stylesheets&&e.count===0&&As(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&As(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Lc===0&&(Lc=62500*Im());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&As(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Lc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(r)}}:null}function _s(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)As(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Es=null;function As(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Es=new Map,t.forEach(vy,e),Es=null,_s.call(e))}function vy(e,t){if(!(t.state.loading&4)){var l=Es.get(e);if(l)var n=l.get(null);else{l=new Map,Es.set(e,l);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<r.length;o++){var h=r[o];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(l.set(h.dataset.precedence,h),n=h)}n&&l.set(null,n)}r=t.instance,h=r.getAttribute("data-precedence"),o=l.get(h)||n,o===n&&l.set(null,r),l.set(h,r),this.count++,n=_s.bind(this),r.addEventListener("load",n),r.addEventListener("error",n),o?o.parentNode.insertBefore(r,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var nu={$$typeof:le,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function xy(e,t,l,n,r,o,h,m,x){this.tag=1,this.containerInfo=e,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=Le(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Le(0),this.hiddenUpdates=Le(null),this.identifierPrefix=n,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Wd(e,t,l,n,r,o,h,m,x,O,B,Y){return e=new xy(e,t,l,h,x,O,B,Y,m),t=1,o===!0&&(t|=24),o=tl(3,null,null,t),e.current=o,o.stateNode=e,t=vr(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:n,isDehydrated:l,cache:t},Er(o),e}function Id(e){return e?(e=Ha,e):Ha}function Pd(e,t,l,n,r,o){r=Id(r),n.context===null?n.context=r:n.pendingContext=r,n=kn(t),n.payload={element:l},o=o===void 0?null:o,o!==null&&(n.callback=o),l=Bn(e,n,t),l!==null&&(Wt(l,e,t),ki(l,e,t))}function ep(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Gc(e,t){ep(e,t),(e=e.alternate)&&ep(e,t)}function tp(e){if(e.tag===13||e.tag===31){var t=ca(e,67108864);t!==null&&Wt(t,e,67108864),Gc(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=ul();t=Ye(t);var l=ca(e,t);l!==null&&Wt(l,e,t),Gc(e,t)}}var Ts=!0;function Sy(e,t,l,n){var r=k.T;k.T=null;var o=P.p;try{P.p=2,Yc(e,t,l,n)}finally{P.p=o,k.T=r}}function _y(e,t,l,n){var r=k.T;k.T=null;var o=P.p;try{P.p=8,Yc(e,t,l,n)}finally{P.p=o,k.T=r}}function Yc(e,t,l,n){if(Ts){var r=Xc(n);if(r===null)Nc(e,t,n,js,l),ap(e,n);else if(Ay(r,e,t,l,n))n.stopPropagation();else if(ap(e,n),t&4&&-1<Ey.indexOf(e)){for(;r!==null;){var o=Fl(r);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var h=kt(o.pendingLanes);if(h!==0){var m=o;for(m.pendingLanes|=2,m.entangledLanes|=2;h;){var x=1<<31-pt(h);m.entanglements[1]|=x,h&=~x}Hl(o),(Ge&6)===0&&(rs=ct()+500,Wi(0))}}break;case 31:case 13:m=ca(o,2),m!==null&&Wt(m,o,2),os(),Gc(o,2)}if(o=Xc(n),o===null&&Nc(e,t,n,js,l),o===r)break;r=o}r!==null&&n.stopPropagation()}else Nc(e,t,n,null,l)}}function Xc(e){return e=_e(e),Qc(e)}var js=null;function Qc(e){if(js=null,e=Ht(e),e!==null){var t=f(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=d(t),e!==null)return e;e=null}else if(l===31){if(e=g(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return js=e,null}function np(e){switch(e){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(_n()){case ol:return 2;case wl:return 8;case jt:case Dl:return 32;case ta:return 268435456;default:return 32}default:return 32}}var Zc=!1,Kn=null,Jn=null,$n=null,au=new Map,iu=new Map,Fn=[],Ey="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 ap(e,t){switch(e){case"focusin":case"focusout":Kn=null;break;case"dragenter":case"dragleave":Jn=null;break;case"mouseover":case"mouseout":$n=null;break;case"pointerover":case"pointerout":au.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":iu.delete(t.pointerId)}}function uu(e,t,l,n,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:o,targetContainers:[r]},t!==null&&(t=Fl(t),t!==null&&tp(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Ay(e,t,l,n,r){switch(t){case"focusin":return Kn=uu(Kn,e,t,l,n,r),!0;case"dragenter":return Jn=uu(Jn,e,t,l,n,r),!0;case"mouseover":return $n=uu($n,e,t,l,n,r),!0;case"pointerover":var o=r.pointerId;return au.set(o,uu(au.get(o)||null,e,t,l,n,r)),!0;case"gotpointercapture":return o=r.pointerId,iu.set(o,uu(iu.get(o)||null,e,t,l,n,r)),!0}return!1}function ip(e){var t=Ht(e.target);if(t!==null){var l=f(t);if(l!==null){if(t=l.tag,t===13){if(t=d(l),t!==null){e.blockedOn=t,Ma(e.priority,function(){lp(l)});return}}else if(t===31){if(t=g(l),t!==null){e.blockedOn=t,Ma(e.priority,function(){lp(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Os(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Xc(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);ue=n,l.target.dispatchEvent(n),ue=null}else return t=Fl(l),t!==null&&tp(t),e.blockedOn=l,!1;t.shift()}return!0}function up(e,t,l){Os(e)&&l.delete(t)}function Ty(){Zc=!1,Kn!==null&&Os(Kn)&&(Kn=null),Jn!==null&&Os(Jn)&&(Jn=null),$n!==null&&Os($n)&&($n=null),au.forEach(up),iu.forEach(up)}function Ns(e,t){e.blockedOn===t&&(e.blockedOn=null,Zc||(Zc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ty)))}var Ms=null;function sp(e){Ms!==e&&(Ms=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Ms===e&&(Ms=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],r=e[t+2];if(typeof n!="function"){if(Qc(n||l)===null)continue;break}var o=Fl(l);o!==null&&(e.splice(t,3),t-=3,Xr(o,{pending:!0,data:r,method:l.method,action:n},n,r))}}))}function ci(e){function t(x){return Ns(x,e)}Kn!==null&&Ns(Kn,e),Jn!==null&&Ns(Jn,e),$n!==null&&Ns($n,e),au.forEach(t),iu.forEach(t);for(var l=0;l<Fn.length;l++){var n=Fn[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Fn.length&&(l=Fn[0],l.blockedOn===null);)ip(l),l.blockedOn===null&&Fn.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var r=l[n],o=l[n+1],h=r[Bt]||null;if(typeof o=="function")h||sp(l);else if(h){var m=null;if(o&&o.hasAttribute("formAction")){if(r=o,h=o[Bt]||null)m=h.formAction;else if(Qc(r)!==null)continue}else m=h.action;typeof m=="function"?l[n+1]=m:(l.splice(n,3),n-=3),sp(l)}}}function rp(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(h){return r=h})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Vc(e){this._internalRoot=e}Rs.prototype.render=Vc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var l=t.current,n=ul();Pd(l,n,e,t,null,null)},Rs.prototype.unmount=Vc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Pd(e.current,2,null,e,null,null),os(),t[An]=null}};function Rs(e){this._internalRoot=e}Rs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Na();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Fn.length&&t!==0&&t<Fn[l].priority;l++);Fn.splice(l,0,e),l===0&&ip(e)}};var cp=a.version;if(cp!=="19.2.4")throw Error(s(527,cp,"19.2.4"));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=y(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var jy={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Cs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cs.isDisabled&&Cs.supportsFiber)try{Kl=Cs.inject(jy),Nt=Cs}catch{}}return ru.createRoot=function(e,t){if(!c(e))throw Error(s(299));var l=!1,n="",r=mh,o=yh,h=bh;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Wd(e,1,!1,null,null,l,n,null,r,o,h,rp),e[An]=t.current,Oc(e),new Vc(t)},ru.hydrateRoot=function(e,t,l){if(!c(e))throw Error(s(299));var n=!1,r="",o=mh,h=yh,m=bh,x=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(r=l.identifierPrefix),l.onUncaughtError!==void 0&&(o=l.onUncaughtError),l.onCaughtError!==void 0&&(h=l.onCaughtError),l.onRecoverableError!==void 0&&(m=l.onRecoverableError),l.formState!==void 0&&(x=l.formState)),t=Wd(e,1,!0,t,l??null,n,r,x,o,h,m,rp),t.context=Id(null),l=t.current,n=ul(),n=Ye(n),r=kn(n),r.callback=null,Bn(l,r,n),l=n,t.current.lanes=l,Xe(t,l),Hl(t),e[An]=t.current,Oc(e),new Rs(t)},ru.version="19.2.4",ru}var vp;function Uy(){if(vp)return Jc.exports;vp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(a){console.error(a)}}return i(),Jc.exports=By(),Jc.exports}var qy=Uy(),z=bo();const Hy="/api";async function st(i,a,u){const s={method:i,headers:{}};u!==void 0&&(s.headers["Content-Type"]="application/json",s.body=JSON.stringify(u));const c=await fetch(`${Hy}${a}`,s);if(!c.ok){const d=await c.text().catch(()=>"");throw new Error(`${c.status} ${c.statusText}: ${d}`)}return(c.headers.get("content-type")||"").includes("application/json")?c.json():c.text()}function Ly(){return st("GET","/project")}function Gy(i){return st("PUT","/project/switch",{path:i})}function zs(){return st("GET","/projects")}function Yy(i,a){return st("POST","/projects",{path:i,spec:a})}function Xy(i){return st("DELETE","/projects",{path:i})}function xp(){return st("GET","/project/spec/endpoints")}function Qy(i,a){return st("GET",`/project/spec/endpoint?method=${encodeURIComponent(i)}&path=${encodeURIComponent(a)}`)}function Zy(i,a,u){let s=`?method=${encodeURIComponent(i)}&path=${encodeURIComponent(a)}`;return s+=`&contentType=${encodeURIComponent(u)}`,st("GET",`/project/spec/endpoint/sample${s}`)}function Sp(){return st("GET","/project/environments")}function Pc(){return st("GET","/project/environments/resolved")}function Vy(i){return st("PUT","/project/environments/base",i)}function Ky(i,a){return st("PUT",`/project/environments/${encodeURIComponent(i)}`,a)}function Jy(i){return st("PUT","/project/environments/active",{name:i})}function $y(i){return st("DELETE",`/project/environments/${encodeURIComponent(i)}`)}function Fy(i,a){return st("GET",`/project/params?method=${encodeURIComponent(i)}&path=${encodeURIComponent(a)}`)}function _p(i,a,u){return st("PUT",`/project/params?method=${encodeURIComponent(i)}&path=${encodeURIComponent(a)}`,u)}function Wy(i){return st("POST","/project/request/send",i)}function Iy(i){return st("POST","/project/request/cancel",{request_id:i})}function Py(i,a,u,s){return st("POST","/project/request/validate",{method:i,path:a,body:u,content_type:s})}function Ep(i,a,u){let s=`?method=${encodeURIComponent(i)}&path=${encodeURIComponent(a)}`;return st("GET",`/project/request/history${s}`)}function e0(i,a,u){return st("GET",`/project/request/history/entry?method=${encodeURIComponent(i)}&path=${encodeURIComponent(a)}&index=${encodeURIComponent(u)}`)}function t0(i,a){return st("DELETE",`/project/request/history?method=${encodeURIComponent(i)}&path=${encodeURIComponent(a)}`)}function l0(i){return st("GET",`/browse?path=${encodeURIComponent(i||"~")}`)}function n0(){return st("GET","/preferences")}function a0(i){return st("PATCH","/preferences",i)}function i0({onSpecReloaded:i,onSpecError:a,onGitChanged:u,onProjectSwitched:s}={}){const c=new EventSource("/api/events");return c.addEventListener("spec:reloaded",f=>{const d=f.data?JSON.parse(f.data):{};i&&i(d)}),c.addEventListener("spec:error",f=>{const d=f.data?JSON.parse(f.data):{};a&&a(d)}),c.addEventListener("git:changed",f=>{const d=f.data?JSON.parse(f.data):{};u&&u(d)}),c.addEventListener("project:switched",f=>{const d=f.data?JSON.parse(f.data):{};s&&s(d)}),c.onerror=()=>{},{disconnect(){c.close()}}}function u0({project:i,git:a,environments:u,activeEnv:s,onSwitchProject:c,onSetActiveEnv:f,onOpenEnvEditor:d,onOpenProjectDialog:g,toast:p,projects:y,servers:v,serverIndex:A,onServerIndexChange:w,sending:D,onSend:V,onCancel:Q,hasEndpoint:Z}){const J=[];u&&(J.push("Base"),u.environments&&Object.keys(u.environments).forEach(le=>J.push(le)));const ce=i?.name||i?.path||"No project";return b.jsxs("div",{className:"topbar",children:[b.jsxs("div",{className:"topbar__section",children:[b.jsx("span",{className:"topbar__label",children:"Project"}),b.jsxs("select",{className:"topbar__select",value:i?.path||"",onChange:le=>{le.target.value&&c&&c(le.target.value)},children:[(!y||y.length===0)&&b.jsx("option",{value:"",children:ce}),y&&y.map(le=>b.jsx("option",{value:le.path,children:le.name||le.path},le.path))]}),b.jsx("button",{className:"topbar__btn",onClick:g,title:"Open project",children:"Open"})]}),u&&b.jsxs("div",{className:"topbar__section",children:[b.jsx("span",{className:"topbar__label",children:"Env"}),b.jsx("select",{className:"topbar__select",value:s||"Base",onChange:le=>{f&&f(le.target.value==="Base"?null:le.target.value)},children:J.map(le=>b.jsx("option",{value:le,children:le},le))}),b.jsx("button",{className:"topbar__btn",onClick:d,title:"Edit environments (Ctrl+E)",children:"Edit"})]}),v&&v.length>0&&b.jsxs("div",{className:"topbar__section",children:[b.jsx("span",{className:"topbar__label",children:"Server"}),b.jsx("select",{className:"topbar__select",value:A,onChange:le=>w(Number(le.target.value)),children:v.map((le,ve)=>b.jsxs("option",{value:ve,children:[le.url,le.description?` - ${le.description}`:""]},ve))})]}),Z&&b.jsxs("div",{className:"topbar__section",children:[b.jsx("button",{className:"topbar__send-btn",onClick:V,disabled:D,children:D?"Sending...":"Send"}),D&&b.jsx("span",{className:"topbar__spinner"}),D&&Q&&b.jsx("button",{className:"topbar__cancel-btn",onClick:Q,children:"Cancel"})]}),a&&b.jsxs("div",{className:"topbar__git",children:[b.jsx("span",{className:"topbar__git-branch",children:a.branch||"detached"}),a.commit&&b.jsx("span",{className:"topbar__git-commit",children:a.commit}),a.dirty&&b.jsx("span",{className:"topbar__git-dirty",children:"*"})]}),b.jsx("div",{className:"topbar__section--right",children:p&&b.jsx("span",{className:"topbar__toast",children:p},p)})]})}function vo({endpoint:i,selected:a,onSelect:u}){const s=`endpoint-item__method endpoint-item__method--${(i.method||"").toLowerCase()}`,c=`endpoint-item${a?" endpoint-item--selected":""}`;return b.jsxs("div",{className:c,onClick:()=>u(i),children:[b.jsx("span",{className:s,children:(i.method||"").toUpperCase()}),b.jsx("span",{className:"endpoint-item__path",children:i.path}),i.summary&&b.jsx("span",{className:"endpoint-item__summary",children:i.summary})]})}function s0({endpoints:i,selectedEndpoint:a,onSelect:u}){const s=z.useMemo(()=>{const f={};for(const d of i){const g=d.tags&&d.tags.length>0?d.tags:["default"];for(const p of g)f[p]||(f[p]=[]),f[p].push(d)}return f},[i]),c=Object.keys(s).sort();return b.jsx(b.Fragment,{children:c.map(f=>b.jsxs("div",{children:[b.jsx("div",{className:"endpoint-list__tag-header",children:f}),s[f].map(d=>b.jsx(vo,{endpoint:d,selected:a&&a.method===d.method&&a.path===d.path,onSelect:u},`${d.method}-${d.path}`))]},f))})}function r0(i){const a={__children:{},__endpoints:[]};for(const u of i){const s=u.path.replace(/^\//,"").split("/").filter(Boolean);let c=a;for(const f of s)c.__children[f]||(c.__children[f]={__children:{},__endpoints:[]}),c=c.__children[f];c.__endpoints.push(u)}return a}function $p({name:i,node:a,depth:u,selectedEndpoint:s,onSelect:c,collapseState:f,onToggle:d}){const g=`${u}-${i}`,p=f[g]??!1,y=Object.keys(a.__children).sort();return!(y.length>0||a.__endpoints.length>0)&&!i?null:b.jsxs("div",{children:[i&&b.jsxs("div",{className:"endpoint-list__tree-folder",style:{paddingLeft:`${12+u*16}px`},onClick:()=>d(g),children:[b.jsx("span",{children:p?"▶":"▼"}),b.jsxs("span",{children:["/",i]})]}),!p&&b.jsxs("div",{children:[a.__endpoints.map(A=>b.jsx(vo,{endpoint:A,selected:s&&s.method===A.method&&s.path===A.path,onSelect:c},`${A.method}-${A.path}`)),y.map(A=>b.jsx($p,{name:A,node:a.__children[A],depth:u+1,selectedEndpoint:s,onSelect:c,collapseState:f,onToggle:d},A))]})]})}function c0({endpoints:i,selectedEndpoint:a,onSelect:u,collapseState:s,onToggle:c}){const f=z.useMemo(()=>r0(i),[i]),d=Object.keys(f.__children).sort();return b.jsxs(b.Fragment,{children:[f.__endpoints.map(g=>b.jsx(vo,{endpoint:g,selected:a&&a.method===g.method&&a.path===g.path,onSelect:u},`${g.method}-${g.path}`)),d.map(g=>b.jsx($p,{name:g,node:f.__children[g],depth:0,selectedEndpoint:a,onSelect:u,collapseState:s,onToggle:c},g))]})}function o0({endpoints:i,selectedEndpoint:a,onSelect:u,viewMode:s,onToggleViewMode:c,treeCollapseState:f,onToggleTreeNode:d,searchTerm:g,onSearchChange:p}){const y=z.useMemo(()=>{if(!g)return i||[];const v=g.toLowerCase();return(i||[]).filter(A=>A.path.toLowerCase().includes(v)||(A.method||"").toLowerCase().includes(v)||(A.summary||"").toLowerCase().includes(v))},[i,g]);return b.jsxs("div",{className:"endpoint-list",children:[b.jsx("div",{className:"endpoint-list__search",children:b.jsx("input",{className:"endpoint-list__search-input",type:"text",placeholder:"Search endpoints...",value:g,onChange:v=>p(v.target.value)})}),b.jsxs("div",{className:"endpoint-list__toolbar",children:[b.jsx("button",{className:`endpoint-list__view-btn${s==="tag"?" endpoint-list__view-btn--active":""}`,onClick:s!=="tag"?c:void 0,children:"Tags"}),b.jsx("button",{className:`endpoint-list__view-btn${s==="tree"?" endpoint-list__view-btn--active":""}`,onClick:s!=="tree"?c:void 0,children:"Tree"})]}),b.jsxs("div",{className:"endpoint-list__items",children:[s==="tag"?b.jsx(s0,{endpoints:y,selectedEndpoint:a,onSelect:u}):b.jsx(c0,{endpoints:y,selectedEndpoint:a,onSelect:u,collapseState:f||{},onToggle:d}),y.length===0&&b.jsx("div",{style:{padding:"16px",color:"var(--fg-muted)",textAlign:"center"},children:"No endpoints found"})]})]})}const no=/(\{\{\s*\w+\s*\}\})/g;function f0(i){if(!i)return" ";const a=i.split(no);return a.length===1?i||" ":a.map((u,s)=>no.test(u)?b.jsx("mark",{className:"hl-var",children:u},s):u)}function h0({className:i,value:a,...u}){const s=a&&no.test(a),c=z.useRef(null),f=z.useRef(null),[d,g]=z.useState(0);return z.useEffect(()=>{f.current&&(f.current.scrollLeft=d)},[d]),s?b.jsxs("div",{className:"hl-wrap",children:[b.jsx("div",{className:"hl-backdrop",ref:f,"aria-hidden":"true",children:f0(a)}),b.jsx("input",{ref:c,className:`${i} hl-input`,value:a,onScroll:p=>g(p.target.scrollLeft),...u})]}):b.jsx("input",{className:i,value:a,...u})}function d0(i,a){return!i||!a||typeof i!="string"||!/\{\{\s*(\w+)\s*\}\}/g.test(i)?null:i.replace(/\{\{\s*(\w+)\s*\}\}/g,(s,c)=>a[c]!==void 0?a[c]:s)}function eo({parameters:i,values:a,onChange:u,resolvedEnv:s}){return!i||i.length===0?null:b.jsx("div",{className:"param-form",children:i.map(c=>{const f=c.name,d=a[f]??"",g=d0(d,s);return b.jsxs("div",{className:"param-form__field",children:[b.jsxs("label",{className:"param-form__label",children:[f,c.required&&b.jsx("span",{className:"param-form__required",children:"*"})]}),c.description&&b.jsx("span",{className:"param-form__desc",children:c.description}),b.jsx(h0,{className:"param-form__input",type:"text",value:d,placeholder:c.schema?.default!=null?String(c.schema.default):"",onChange:p=>u(f,p.target.value),title:g||void 0}),g&&g!==d&&b.jsx("span",{className:"param-form__resolved",children:g})]},f)})})}function ao({schema:i,depth:a=0}){if(!i)return null;const u=a*16;if(i.type==="object"&&i.properties){const s=new Set(i.required||[]);return b.jsx("div",{style:{paddingLeft:u},children:Object.entries(i.properties).map(([c,f])=>b.jsxs("div",{className:"schema-view__prop",children:[b.jsx("span",{className:"schema-view__name",children:c}),b.jsx("span",{className:"schema-view__type",children:f.type||(f.items?"array":"object")}),s.has(c)&&b.jsx("span",{className:"schema-view__required",children:"required"}),f.description&&b.jsx("span",{className:"schema-view__desc",children:f.description}),f.enum&&b.jsxs("span",{className:"schema-view__enum",children:["enum: ",f.enum.join(", ")]}),f.type==="object"&&f.properties&&b.jsx(ao,{schema:f,depth:a+1}),f.type==="array"&&f.items?.type==="object"&&f.items.properties&&b.jsx(ao,{schema:f.items,depth:a+1})]},c))})}return null}function p0({endpoint:i,body:a,contentType:u,onBodyChange:s,onContentTypeChange:c,resolvedEnv:f}){const[d,g]=z.useState(null),[p,y]=z.useState(!1),[v,A]=z.useState(!1),w=z.useRef(null),V=(i?.request_body||i?.requestBody)?.content||{},Q=Object.keys(V),Z=u||Q[0]||"application/json",J=Z.includes("json"),ce=Z==="application/x-www-form-urlencoded",le=Z.includes("multipart"),ve=ce||le,ee=z.useMemo(()=>{if(!ve||!a)return[{key:"",value:"",type:"text"}];try{const I=JSON.parse(a);if(Array.isArray(I))return I.length>0?I:[{key:"",value:"",type:"text"}]}catch{}return[{key:"",value:"",type:"text"}]},[a,ve]);z.useEffect(()=>{if(!a||!i){g(null);return}return w.current&&clearTimeout(w.current),w.current=setTimeout(async()=>{try{const I=await Py(i.method,i.path,a,Z);g(I)}catch{g(null)}},600),()=>{w.current&&clearTimeout(w.current)}},[a,i,Z]);const re=z.useCallback(async()=>{if(i){y(!0);try{const I=await Zy(i.method,i.path,Z),be=I?.sample??I;if(be==null)return;const lt=typeof be=="string"?be:JSON.stringify(be,null,2);s(lt)}catch{}finally{y(!1)}}},[i,Z,s]),L=z.useCallback(I=>{s(JSON.stringify(I))},[s]),X=z.useCallback((I,be,lt)=>{const Me=ee.map((et,k)=>k===I?{...et,[be]:lt}:et);L(Me)},[ee,L]),ie=z.useCallback(()=>{L([...ee,{key:"",value:"",type:"text"}])},[ee,L]),$e=z.useCallback(I=>{const be=ee.filter((lt,Me)=>Me!==I);L(be.length>0?be:[{key:"",value:"",type:"text"}])},[ee,L]);return b.jsxs("div",{children:[b.jsxs("div",{className:"body-editor__toolbar",children:[Q.length>1&&b.jsx("select",{className:"body-editor__content-type",value:Z,onChange:I=>c(I.target.value),children:Q.map(I=>b.jsx("option",{value:I,children:I},I))}),Q.length===1&&b.jsx("span",{style:{fontSize:"12px",color:"var(--fg-muted)",fontFamily:"var(--font-mono)"},children:Z}),b.jsx("button",{className:"body-editor__sample-btn",onClick:re,disabled:p,children:p?"Generating...":"Generate Sample"})]}),!ve&&b.jsx("textarea",{className:"body-editor__textarea",value:a||"",onChange:I=>s(I.target.value),placeholder:J?`{
10
+
11
+ }`:"Request body...",spellCheck:!1}),ve&&b.jsxs("div",{children:[b.jsxs("table",{className:"body-editor__kv-table",children:[b.jsx("thead",{children:b.jsxs("tr",{children:[b.jsx("th",{children:"Key"}),b.jsx("th",{children:"Value"}),le&&b.jsx("th",{children:"Type"}),b.jsx("th",{})]})}),b.jsx("tbody",{children:ee.map((I,be)=>b.jsxs("tr",{children:[b.jsx("td",{children:b.jsx("input",{className:"body-editor__kv-input",type:"text",value:I.key||"",onChange:lt=>X(be,"key",lt.target.value),placeholder:"key"})}),b.jsx("td",{children:b.jsx("input",{className:"body-editor__kv-input",type:"text",value:I.value||"",onChange:lt=>X(be,"value",lt.target.value),placeholder:"value"})}),le&&b.jsx("td",{children:b.jsxs("select",{className:"body-editor__kv-input",value:I.type||"text",onChange:lt=>X(be,"type",lt.target.value),children:[b.jsx("option",{value:"text",children:"text"}),b.jsx("option",{value:"file",children:"file"})]})}),b.jsx("td",{children:b.jsx("button",{className:"body-editor__kv-remove",onClick:()=>$e(be),title:"Remove row",children:"x"})})]},be))})]}),b.jsx("button",{className:"body-editor__kv-add",onClick:ie,children:"+ Add Row"})]}),d&&b.jsxs("div",{className:`body-editor__validation body-editor__validation--${d.valid?"valid":"invalid"}`,children:[d.valid?"✓ Valid":`✗ ${(d.errors||[]).length} error(s)`,!d.valid&&d.errors&&d.errors.length>0&&b.jsx("div",{className:"validation-details__errors",children:d.errors.map((I,be)=>b.jsxs("div",{className:"validation-details__error",children:[I.path&&b.jsx("div",{className:"validation-details__error-path",children:I.path}),b.jsx("div",{className:"validation-details__error-msg",children:I.message||"Validation error"}),(I.expected||I.actual)&&b.jsxs("div",{className:"validation-details__error-detail",children:[I.expected&&b.jsxs(b.Fragment,{children:["Expected: ",String(I.expected)," "]}),I.actual&&b.jsxs(b.Fragment,{children:["Actual: ",String(I.actual)]})]})]},be))})]}),!d&&a&&b.jsx("div",{className:"body-editor__validation body-editor__validation--none",children:"— No schema validation"}),V[Z]?.schema&&b.jsxs("div",{className:"body-editor__schema",children:[b.jsxs("button",{className:"body-editor__schema-toggle",onClick:()=>A(I=>!I),children:[b.jsx("span",{children:"Schema"}),b.jsx("span",{className:`endpoint-doc__toggle-icon${v?" endpoint-doc__toggle-icon--expanded":""}`,children:"▶"})]}),v&&b.jsx("div",{className:"body-editor__schema-body",children:b.jsx(ao,{schema:V[Z].schema})})]})]})}function xo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ta=xo();function Fp(i){Ta=i}var _a={exec:()=>null};function ke(i,a=""){let u=typeof i=="string"?i:i.source,s={replace:(c,f)=>{let d=typeof f=="string"?f:f.source;return d=d.replace(Gt.caret,"$1"),u=u.replace(c,d),s},getRegex:()=>new RegExp(u,a)};return s}var g0=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Gt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}#`),htmlBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}>`)},m0=/^(?:[ \t]*(?:\n|$))+/,y0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,b0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,mu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,v0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,So=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Wp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ip=ke(Wp).replace(/bull/g,So).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),x0=ke(Wp).replace(/bull/g,So).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_o=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,S0=/^[^\n]+/,Eo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,_0=ke(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Eo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),E0=ke(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,So).getRegex(),Xs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ao=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,A0=ke("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ao).replace("tag",Xs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pp=ke(_o).replace("hr",mu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xs).getRegex(),T0=ke(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Pp).getRegex(),To={blockquote:T0,code:y0,def:_0,fences:b0,heading:v0,hr:mu,html:A0,lheading:Ip,list:E0,newline:m0,paragraph:Pp,table:_a,text:S0},Ap=ke("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",mu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xs).getRegex(),j0={...To,lheading:x0,table:Ap,paragraph:ke(_o).replace("hr",mu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ap).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xs).getRegex()},O0={...To,html:ke(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ao).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_a,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ke(_o).replace("hr",mu).replace("heading",` *#{1,6} *[^
12
+ ]`).replace("lheading",Ip).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},N0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,M0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,eg=/^( {2,}|\\)\n(?!\s*$)/,R0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Qs=/[\p{P}\p{S}]/u,jo=/[\s\p{P}\p{S}]/u,tg=/[^\s\p{P}\p{S}]/u,C0=ke(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,jo).getRegex(),lg=/(?!~)[\p{P}\p{S}]/u,z0=/(?!~)[\s\p{P}\p{S}]/u,w0=/(?:[^\s\p{P}\p{S}]|~)/u,ng=/(?![*_])[\p{P}\p{S}]/u,D0=/(?![*_])[\s\p{P}\p{S}]/u,k0=/(?:[^\s\p{P}\p{S}]|[*_])/u,B0=ke(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",g0?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ag=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,U0=ke(ag,"u").replace(/punct/g,Qs).getRegex(),q0=ke(ag,"u").replace(/punct/g,lg).getRegex(),ig="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",H0=ke(ig,"gu").replace(/notPunctSpace/g,tg).replace(/punctSpace/g,jo).replace(/punct/g,Qs).getRegex(),L0=ke(ig,"gu").replace(/notPunctSpace/g,w0).replace(/punctSpace/g,z0).replace(/punct/g,lg).getRegex(),G0=ke("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,tg).replace(/punctSpace/g,jo).replace(/punct/g,Qs).getRegex(),Y0=ke(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ng).getRegex(),X0="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Q0=ke(X0,"gu").replace(/notPunctSpace/g,k0).replace(/punctSpace/g,D0).replace(/punct/g,ng).getRegex(),Z0=ke(/\\(punct)/,"gu").replace(/punct/g,Qs).getRegex(),V0=ke(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),K0=ke(Ao).replace("(?:-->|$)","-->").getRegex(),J0=ke("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",K0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Us=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,$0=ke(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Us).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ug=ke(/^!?\[(label)\]\[(ref)\]/).replace("label",Us).replace("ref",Eo).getRegex(),sg=ke(/^!?\[(ref)\](?:\[\])?/).replace("ref",Eo).getRegex(),F0=ke("reflink|nolink(?!\\()","g").replace("reflink",ug).replace("nolink",sg).getRegex(),Tp=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Oo={_backpedal:_a,anyPunctuation:Z0,autolink:V0,blockSkip:B0,br:eg,code:M0,del:_a,delLDelim:_a,delRDelim:_a,emStrongLDelim:U0,emStrongRDelimAst:H0,emStrongRDelimUnd:G0,escape:N0,link:$0,nolink:sg,punctuation:C0,reflink:ug,reflinkSearch:F0,tag:J0,text:R0,url:_a},W0={...Oo,link:ke(/^!?\[(label)\]\((.*?)\)/).replace("label",Us).getRegex(),reflink:ke(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Us).getRegex()},io={...Oo,emStrongRDelimAst:L0,emStrongLDelim:q0,delLDelim:Y0,delRDelim:Q0,url:ke(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Tp).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ke(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Tp).getRegex()},I0={...io,br:ke(eg).replace("{2,}","*").getRegex(),text:ke(io.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ws={normal:To,gfm:j0,pedantic:O0},cu={normal:Oo,gfm:io,breaks:I0,pedantic:W0},P0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},jp=i=>P0[i];function Ll(i,a){if(a){if(Gt.escapeTest.test(i))return i.replace(Gt.escapeReplace,jp)}else if(Gt.escapeTestNoEncode.test(i))return i.replace(Gt.escapeReplaceNoEncode,jp);return i}function Op(i){try{i=encodeURI(i).replace(Gt.percentDecode,"%")}catch{return null}return i}function Np(i,a){let u=i.replace(Gt.findPipe,(f,d,g)=>{let p=!1,y=d;for(;--y>=0&&g[y]==="\\";)p=!p;return p?"|":" |"}),s=u.split(Gt.splitPipe),c=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),a)if(s.length>a)s.splice(a);else for(;s.length<a;)s.push("");for(;c<s.length;c++)s[c]=s[c].trim().replace(Gt.slashPipe,"|");return s}function ou(i,a,u){let s=i.length;if(s===0)return"";let c=0;for(;c<s&&i.charAt(s-c-1)===a;)c++;return i.slice(0,s-c)}function eb(i,a){if(i.indexOf(a[1])===-1)return-1;let u=0;for(let s=0;s<i.length;s++)if(i[s]==="\\")s++;else if(i[s]===a[0])u++;else if(i[s]===a[1]&&(u--,u<0))return s;return u>0?-2:-1}function tb(i,a=0){let u=a,s="";for(let c of i)if(c===" "){let f=4-u%4;s+=" ".repeat(f),u+=f}else s+=c,u++;return s}function Mp(i,a,u,s,c){let f=a.href,d=a.title||null,g=i[1].replace(c.other.outputLinkReplace,"$1");s.state.inLink=!0;let p={type:i[0].charAt(0)==="!"?"image":"link",raw:u,href:f,title:d,text:g,tokens:s.inlineTokens(g)};return s.state.inLink=!1,p}function lb(i,a,u){let s=i.match(u.other.indentCodeCompensation);if(s===null)return a;let c=s[1];return a.split(`
13
+ `).map(f=>{let d=f.match(u.other.beginningSpace);if(d===null)return f;let[g]=d;return g.length>=c.length?f.slice(c.length):f}).join(`
14
+ `)}var qs=class{options;rules;lexer;constructor(i){this.options=i||Ta}space(i){let a=this.rules.block.newline.exec(i);if(a&&a[0].length>0)return{type:"space",raw:a[0]}}code(i){let a=this.rules.block.code.exec(i);if(a){let u=a[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:a[0],codeBlockStyle:"indented",text:this.options.pedantic?u:ou(u,`
15
+ `)}}}fences(i){let a=this.rules.block.fences.exec(i);if(a){let u=a[0],s=lb(u,a[3]||"",this.rules);return{type:"code",raw:u,lang:a[2]?a[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):a[2],text:s}}}heading(i){let a=this.rules.block.heading.exec(i);if(a){let u=a[2].trim();if(this.rules.other.endingHash.test(u)){let s=ou(u,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(u=s.trim())}return{type:"heading",raw:a[0],depth:a[1].length,text:u,tokens:this.lexer.inline(u)}}}hr(i){let a=this.rules.block.hr.exec(i);if(a)return{type:"hr",raw:ou(a[0],`
16
+ `)}}blockquote(i){let a=this.rules.block.blockquote.exec(i);if(a){let u=ou(a[0],`
17
+ `).split(`
18
+ `),s="",c="",f=[];for(;u.length>0;){let d=!1,g=[],p;for(p=0;p<u.length;p++)if(this.rules.other.blockquoteStart.test(u[p]))g.push(u[p]),d=!0;else if(!d)g.push(u[p]);else break;u=u.slice(p);let y=g.join(`
19
+ `),v=y.replace(this.rules.other.blockquoteSetextReplace,`
20
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
21
+ ${y}`:y,c=c?`${c}
22
+ ${v}`:v;let A=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(v,f,!0),this.lexer.state.top=A,u.length===0)break;let w=f.at(-1);if(w?.type==="code")break;if(w?.type==="blockquote"){let D=w,V=D.raw+`
23
+ `+u.join(`
24
+ `),Q=this.blockquote(V);f[f.length-1]=Q,s=s.substring(0,s.length-D.raw.length)+Q.raw,c=c.substring(0,c.length-D.text.length)+Q.text;break}else if(w?.type==="list"){let D=w,V=D.raw+`
25
+ `+u.join(`
26
+ `),Q=this.list(V);f[f.length-1]=Q,s=s.substring(0,s.length-w.raw.length)+Q.raw,c=c.substring(0,c.length-D.raw.length)+Q.raw,u=V.substring(f.at(-1).raw.length).split(`
27
+ `);continue}}return{type:"blockquote",raw:s,tokens:f,text:c}}}list(i){let a=this.rules.block.list.exec(i);if(a){let u=a[1].trim(),s=u.length>1,c={type:"list",raw:"",ordered:s,start:s?+u.slice(0,-1):"",loose:!1,items:[]};u=s?`\\d{1,9}\\${u.slice(-1)}`:`\\${u}`,this.options.pedantic&&(u=s?u:"[*+-]");let f=this.rules.other.listItemRegex(u),d=!1;for(;i;){let p=!1,y="",v="";if(!(a=f.exec(i))||this.rules.block.hr.test(i))break;y=a[0],i=i.substring(y.length);let A=tb(a[2].split(`
28
+ `,1)[0],a[1].length),w=i.split(`
29
+ `,1)[0],D=!A.trim(),V=0;if(this.options.pedantic?(V=2,v=A.trimStart()):D?V=a[1].length+1:(V=A.search(this.rules.other.nonSpaceChar),V=V>4?1:V,v=A.slice(V),V+=a[1].length),D&&this.rules.other.blankLine.test(w)&&(y+=w+`
30
+ `,i=i.substring(w.length+1),p=!0),!p){let Q=this.rules.other.nextBulletRegex(V),Z=this.rules.other.hrRegex(V),J=this.rules.other.fencesBeginRegex(V),ce=this.rules.other.headingBeginRegex(V),le=this.rules.other.htmlBeginRegex(V),ve=this.rules.other.blockquoteBeginRegex(V);for(;i;){let ee=i.split(`
31
+ `,1)[0],re;if(w=ee,this.options.pedantic?(w=w.replace(this.rules.other.listReplaceNesting," "),re=w):re=w.replace(this.rules.other.tabCharGlobal," "),J.test(w)||ce.test(w)||le.test(w)||ve.test(w)||Q.test(w)||Z.test(w))break;if(re.search(this.rules.other.nonSpaceChar)>=V||!w.trim())v+=`
32
+ `+re.slice(V);else{if(D||A.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||J.test(A)||ce.test(A)||Z.test(A))break;v+=`
33
+ `+w}D=!w.trim(),y+=ee+`
34
+ `,i=i.substring(ee.length+1),A=re.slice(V)}}c.loose||(d?c.loose=!0:this.rules.other.doubleBlankLine.test(y)&&(d=!0)),c.items.push({type:"list_item",raw:y,task:!!this.options.gfm&&this.rules.other.listIsTask.test(v),loose:!1,text:v,tokens:[]}),c.raw+=y}let g=c.items.at(-1);if(g)g.raw=g.raw.trimEnd(),g.text=g.text.trimEnd();else return;c.raw=c.raw.trimEnd();for(let p of c.items){if(this.lexer.state.top=!1,p.tokens=this.lexer.blockTokens(p.text,[]),p.task){if(p.text=p.text.replace(this.rules.other.listReplaceTask,""),p.tokens[0]?.type==="text"||p.tokens[0]?.type==="paragraph"){p.tokens[0].raw=p.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),p.tokens[0].text=p.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let v=this.lexer.inlineQueue.length-1;v>=0;v--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[v].src)){this.lexer.inlineQueue[v].src=this.lexer.inlineQueue[v].src.replace(this.rules.other.listReplaceTask,"");break}}let y=this.rules.other.listTaskCheckbox.exec(p.raw);if(y){let v={type:"checkbox",raw:y[0]+" ",checked:y[0]!=="[ ]"};p.checked=v.checked,c.loose?p.tokens[0]&&["paragraph","text"].includes(p.tokens[0].type)&&"tokens"in p.tokens[0]&&p.tokens[0].tokens?(p.tokens[0].raw=v.raw+p.tokens[0].raw,p.tokens[0].text=v.raw+p.tokens[0].text,p.tokens[0].tokens.unshift(v)):p.tokens.unshift({type:"paragraph",raw:v.raw,text:v.raw,tokens:[v]}):p.tokens.unshift(v)}}if(!c.loose){let y=p.tokens.filter(A=>A.type==="space"),v=y.length>0&&y.some(A=>this.rules.other.anyLine.test(A.raw));c.loose=v}}if(c.loose)for(let p of c.items){p.loose=!0;for(let y of p.tokens)y.type==="text"&&(y.type="paragraph")}return c}}html(i){let a=this.rules.block.html.exec(i);if(a)return{type:"html",block:!0,raw:a[0],pre:a[1]==="pre"||a[1]==="script"||a[1]==="style",text:a[0]}}def(i){let a=this.rules.block.def.exec(i);if(a){let u=a[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=a[2]?a[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",c=a[3]?a[3].substring(1,a[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):a[3];return{type:"def",tag:u,raw:a[0],href:s,title:c}}}table(i){let a=this.rules.block.table.exec(i);if(!a||!this.rules.other.tableDelimiter.test(a[2]))return;let u=Np(a[1]),s=a[2].replace(this.rules.other.tableAlignChars,"").split("|"),c=a[3]?.trim()?a[3].replace(this.rules.other.tableRowBlankLine,"").split(`
35
+ `):[],f={type:"table",raw:a[0],header:[],align:[],rows:[]};if(u.length===s.length){for(let d of s)this.rules.other.tableAlignRight.test(d)?f.align.push("right"):this.rules.other.tableAlignCenter.test(d)?f.align.push("center"):this.rules.other.tableAlignLeft.test(d)?f.align.push("left"):f.align.push(null);for(let d=0;d<u.length;d++)f.header.push({text:u[d],tokens:this.lexer.inline(u[d]),header:!0,align:f.align[d]});for(let d of c)f.rows.push(Np(d,f.header.length).map((g,p)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:f.align[p]})));return f}}lheading(i){let a=this.rules.block.lheading.exec(i);if(a)return{type:"heading",raw:a[0],depth:a[2].charAt(0)==="="?1:2,text:a[1],tokens:this.lexer.inline(a[1])}}paragraph(i){let a=this.rules.block.paragraph.exec(i);if(a){let u=a[1].charAt(a[1].length-1)===`
36
+ `?a[1].slice(0,-1):a[1];return{type:"paragraph",raw:a[0],text:u,tokens:this.lexer.inline(u)}}}text(i){let a=this.rules.block.text.exec(i);if(a)return{type:"text",raw:a[0],text:a[0],tokens:this.lexer.inline(a[0])}}escape(i){let a=this.rules.inline.escape.exec(i);if(a)return{type:"escape",raw:a[0],text:a[1]}}tag(i){let a=this.rules.inline.tag.exec(i);if(a)return!this.lexer.state.inLink&&this.rules.other.startATag.test(a[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(a[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(a[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(a[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:a[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:a[0]}}link(i){let a=this.rules.inline.link.exec(i);if(a){let u=a[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(u)){if(!this.rules.other.endAngleBracket.test(u))return;let f=ou(u.slice(0,-1),"\\");if((u.length-f.length)%2===0)return}else{let f=eb(a[2],"()");if(f===-2)return;if(f>-1){let d=(a[0].indexOf("!")===0?5:4)+a[1].length+f;a[2]=a[2].substring(0,f),a[0]=a[0].substring(0,d).trim(),a[3]=""}}let s=a[2],c="";if(this.options.pedantic){let f=this.rules.other.pedanticHrefTitle.exec(s);f&&(s=f[1],c=f[3])}else c=a[3]?a[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(u)?s=s.slice(1):s=s.slice(1,-1)),Mp(a,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:c&&c.replace(this.rules.inline.anyPunctuation,"$1")},a[0],this.lexer,this.rules)}}reflink(i,a){let u;if((u=this.rules.inline.reflink.exec(i))||(u=this.rules.inline.nolink.exec(i))){let s=(u[2]||u[1]).replace(this.rules.other.multipleSpaceGlobal," "),c=a[s.toLowerCase()];if(!c){let f=u[0].charAt(0);return{type:"text",raw:f,text:f}}return Mp(u,c,u[0],this.lexer,this.rules)}}emStrong(i,a,u=""){let s=this.rules.inline.emStrongLDelim.exec(i);if(!(!s||s[3]&&u.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!u||this.rules.inline.punctuation.exec(u))){let c=[...s[0]].length-1,f,d,g=c,p=0,y=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(y.lastIndex=0,a=a.slice(-1*i.length+c);(s=y.exec(a))!=null;){if(f=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!f)continue;if(d=[...f].length,s[3]||s[4]){g+=d;continue}else if((s[5]||s[6])&&c%3&&!((c+d)%3)){p+=d;continue}if(g-=d,g>0)continue;d=Math.min(d,d+g+p);let v=[...s[0]][0].length,A=i.slice(0,c+s.index+v+d);if(Math.min(c,d)%2){let D=A.slice(1,-1);return{type:"em",raw:A,text:D,tokens:this.lexer.inlineTokens(D)}}let w=A.slice(2,-2);return{type:"strong",raw:A,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(i){let a=this.rules.inline.code.exec(i);if(a){let u=a[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(u),c=this.rules.other.startingSpaceChar.test(u)&&this.rules.other.endingSpaceChar.test(u);return s&&c&&(u=u.substring(1,u.length-1)),{type:"codespan",raw:a[0],text:u}}}br(i){let a=this.rules.inline.br.exec(i);if(a)return{type:"br",raw:a[0]}}del(i,a,u=""){let s=this.rules.inline.delLDelim.exec(i);if(s&&(!s[1]||!u||this.rules.inline.punctuation.exec(u))){let c=[...s[0]].length-1,f,d,g=c,p=this.rules.inline.delRDelim;for(p.lastIndex=0,a=a.slice(-1*i.length+c);(s=p.exec(a))!=null;){if(f=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!f||(d=[...f].length,d!==c))continue;if(s[3]||s[4]){g+=d;continue}if(g-=d,g>0)continue;d=Math.min(d,d+g);let y=[...s[0]][0].length,v=i.slice(0,c+s.index+y+d),A=v.slice(c,-c);return{type:"del",raw:v,text:A,tokens:this.lexer.inlineTokens(A)}}}}autolink(i){let a=this.rules.inline.autolink.exec(i);if(a){let u,s;return a[2]==="@"?(u=a[1],s="mailto:"+u):(u=a[1],s=u),{type:"link",raw:a[0],text:u,href:s,tokens:[{type:"text",raw:u,text:u}]}}}url(i){let a;if(a=this.rules.inline.url.exec(i)){let u,s;if(a[2]==="@")u=a[0],s="mailto:"+u;else{let c;do c=a[0],a[0]=this.rules.inline._backpedal.exec(a[0])?.[0]??"";while(c!==a[0]);u=a[0],a[1]==="www."?s="http://"+a[0]:s=a[0]}return{type:"link",raw:a[0],text:u,href:s,tokens:[{type:"text",raw:u,text:u}]}}}inlineText(i){let a=this.rules.inline.text.exec(i);if(a){let u=this.lexer.state.inRawBlock;return{type:"text",raw:a[0],text:a[0],escaped:u}}}},Ol=class uo{tokens;options;state;inlineQueue;tokenizer;constructor(a){this.tokens=[],this.tokens.links=Object.create(null),this.options=a||Ta,this.options.tokenizer=this.options.tokenizer||new qs,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let u={other:Gt,block:ws.normal,inline:cu.normal};this.options.pedantic?(u.block=ws.pedantic,u.inline=cu.pedantic):this.options.gfm&&(u.block=ws.gfm,this.options.breaks?u.inline=cu.breaks:u.inline=cu.gfm),this.tokenizer.rules=u}static get rules(){return{block:ws,inline:cu}}static lex(a,u){return new uo(u).lex(a)}static lexInline(a,u){return new uo(u).inlineTokens(a)}lex(a){a=a.replace(Gt.carriageReturn,`
37
+ `),this.blockTokens(a,this.tokens);for(let u=0;u<this.inlineQueue.length;u++){let s=this.inlineQueue[u];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(a,u=[],s=!1){for(this.options.pedantic&&(a=a.replace(Gt.tabCharGlobal," ").replace(Gt.spaceLine,""));a;){let c;if(this.options.extensions?.block?.some(d=>(c=d.call({lexer:this},a,u))?(a=a.substring(c.raw.length),u.push(c),!0):!1))continue;if(c=this.tokenizer.space(a)){a=a.substring(c.raw.length);let d=u.at(-1);c.raw.length===1&&d!==void 0?d.raw+=`
38
+ `:u.push(c);continue}if(c=this.tokenizer.code(a)){a=a.substring(c.raw.length);let d=u.at(-1);d?.type==="paragraph"||d?.type==="text"?(d.raw+=(d.raw.endsWith(`
39
+ `)?"":`
40
+ `)+c.raw,d.text+=`
41
+ `+c.text,this.inlineQueue.at(-1).src=d.text):u.push(c);continue}if(c=this.tokenizer.fences(a)){a=a.substring(c.raw.length),u.push(c);continue}if(c=this.tokenizer.heading(a)){a=a.substring(c.raw.length),u.push(c);continue}if(c=this.tokenizer.hr(a)){a=a.substring(c.raw.length),u.push(c);continue}if(c=this.tokenizer.blockquote(a)){a=a.substring(c.raw.length),u.push(c);continue}if(c=this.tokenizer.list(a)){a=a.substring(c.raw.length),u.push(c);continue}if(c=this.tokenizer.html(a)){a=a.substring(c.raw.length),u.push(c);continue}if(c=this.tokenizer.def(a)){a=a.substring(c.raw.length);let d=u.at(-1);d?.type==="paragraph"||d?.type==="text"?(d.raw+=(d.raw.endsWith(`
42
+ `)?"":`
43
+ `)+c.raw,d.text+=`
44
+ `+c.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},u.push(c));continue}if(c=this.tokenizer.table(a)){a=a.substring(c.raw.length),u.push(c);continue}if(c=this.tokenizer.lheading(a)){a=a.substring(c.raw.length),u.push(c);continue}let f=a;if(this.options.extensions?.startBlock){let d=1/0,g=a.slice(1),p;this.options.extensions.startBlock.forEach(y=>{p=y.call({lexer:this},g),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(f=a.substring(0,d+1))}if(this.state.top&&(c=this.tokenizer.paragraph(f))){let d=u.at(-1);s&&d?.type==="paragraph"?(d.raw+=(d.raw.endsWith(`
45
+ `)?"":`
46
+ `)+c.raw,d.text+=`
47
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):u.push(c),s=f.length!==a.length,a=a.substring(c.raw.length);continue}if(c=this.tokenizer.text(a)){a=a.substring(c.raw.length);let d=u.at(-1);d?.type==="text"?(d.raw+=(d.raw.endsWith(`
48
+ `)?"":`
49
+ `)+c.raw,d.text+=`
50
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):u.push(c);continue}if(a){let d="Infinite loop on byte: "+a.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,u}inline(a,u=[]){return this.inlineQueue.push({src:a,tokens:u}),u}inlineTokens(a,u=[]){let s=a,c=null;if(this.tokens.links){let p=Object.keys(this.tokens.links);if(p.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)p.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,c.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let f;for(;(c=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)f=c[2]?c[2].length:0,s=s.slice(0,c.index+f)+"["+"a".repeat(c[0].length-f-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let d=!1,g="";for(;a;){d||(g=""),d=!1;let p;if(this.options.extensions?.inline?.some(v=>(p=v.call({lexer:this},a,u))?(a=a.substring(p.raw.length),u.push(p),!0):!1))continue;if(p=this.tokenizer.escape(a)){a=a.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.tag(a)){a=a.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.link(a)){a=a.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.reflink(a,this.tokens.links)){a=a.substring(p.raw.length);let v=u.at(-1);p.type==="text"&&v?.type==="text"?(v.raw+=p.raw,v.text+=p.text):u.push(p);continue}if(p=this.tokenizer.emStrong(a,s,g)){a=a.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.codespan(a)){a=a.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.br(a)){a=a.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.del(a,s,g)){a=a.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.autolink(a)){a=a.substring(p.raw.length),u.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(a))){a=a.substring(p.raw.length),u.push(p);continue}let y=a;if(this.options.extensions?.startInline){let v=1/0,A=a.slice(1),w;this.options.extensions.startInline.forEach(D=>{w=D.call({lexer:this},A),typeof w=="number"&&w>=0&&(v=Math.min(v,w))}),v<1/0&&v>=0&&(y=a.substring(0,v+1))}if(p=this.tokenizer.inlineText(y)){a=a.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(g=p.raw.slice(-1)),d=!0;let v=u.at(-1);v?.type==="text"?(v.raw+=p.raw,v.text+=p.text):u.push(p);continue}if(a){let v="Infinite loop on byte: "+a.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return u}},Hs=class{options;parser;constructor(i){this.options=i||Ta}space(i){return""}code({text:i,lang:a,escaped:u}){let s=(a||"").match(Gt.notSpaceStart)?.[0],c=i.replace(Gt.endingNewline,"")+`
51
+ `;return s?'<pre><code class="language-'+Ll(s)+'">'+(u?c:Ll(c,!0))+`</code></pre>
52
+ `:"<pre><code>"+(u?c:Ll(c,!0))+`</code></pre>
53
+ `}blockquote({tokens:i}){return`<blockquote>
54
+ ${this.parser.parse(i)}</blockquote>
55
+ `}html({text:i}){return i}def(i){return""}heading({tokens:i,depth:a}){return`<h${a}>${this.parser.parseInline(i)}</h${a}>
56
+ `}hr(i){return`<hr>
57
+ `}list(i){let a=i.ordered,u=i.start,s="";for(let d=0;d<i.items.length;d++){let g=i.items[d];s+=this.listitem(g)}let c=a?"ol":"ul",f=a&&u!==1?' start="'+u+'"':"";return"<"+c+f+`>
58
+ `+s+"</"+c+`>
59
+ `}listitem(i){return`<li>${this.parser.parse(i.tokens)}</li>
60
+ `}checkbox({checked:i}){return"<input "+(i?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:i}){return`<p>${this.parser.parseInline(i)}</p>
61
+ `}table(i){let a="",u="";for(let c=0;c<i.header.length;c++)u+=this.tablecell(i.header[c]);a+=this.tablerow({text:u});let s="";for(let c=0;c<i.rows.length;c++){let f=i.rows[c];u="";for(let d=0;d<f.length;d++)u+=this.tablecell(f[d]);s+=this.tablerow({text:u})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
62
+ <thead>
63
+ `+a+`</thead>
64
+ `+s+`</table>
65
+ `}tablerow({text:i}){return`<tr>
66
+ ${i}</tr>
67
+ `}tablecell(i){let a=this.parser.parseInline(i.tokens),u=i.header?"th":"td";return(i.align?`<${u} align="${i.align}">`:`<${u}>`)+a+`</${u}>
68
+ `}strong({tokens:i}){return`<strong>${this.parser.parseInline(i)}</strong>`}em({tokens:i}){return`<em>${this.parser.parseInline(i)}</em>`}codespan({text:i}){return`<code>${Ll(i,!0)}</code>`}br(i){return"<br>"}del({tokens:i}){return`<del>${this.parser.parseInline(i)}</del>`}link({href:i,title:a,tokens:u}){let s=this.parser.parseInline(u),c=Op(i);if(c===null)return s;i=c;let f='<a href="'+i+'"';return a&&(f+=' title="'+Ll(a)+'"'),f+=">"+s+"</a>",f}image({href:i,title:a,text:u,tokens:s}){s&&(u=this.parser.parseInline(s,this.parser.textRenderer));let c=Op(i);if(c===null)return Ll(u);i=c;let f=`<img src="${i}" alt="${Ll(u)}"`;return a&&(f+=` title="${Ll(a)}"`),f+=">",f}text(i){return"tokens"in i&&i.tokens?this.parser.parseInline(i.tokens):"escaped"in i&&i.escaped?i.text:Ll(i.text)}},No=class{strong({text:i}){return i}em({text:i}){return i}codespan({text:i}){return i}del({text:i}){return i}html({text:i}){return i}text({text:i}){return i}link({text:i}){return""+i}image({text:i}){return""+i}br(){return""}checkbox({raw:i}){return i}},Nl=class so{options;renderer;textRenderer;constructor(a){this.options=a||Ta,this.options.renderer=this.options.renderer||new Hs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new No}static parse(a,u){return new so(u).parse(a)}static parseInline(a,u){return new so(u).parseInline(a)}parse(a){let u="";for(let s=0;s<a.length;s++){let c=a[s];if(this.options.extensions?.renderers?.[c.type]){let d=c,g=this.options.extensions.renderers[d.type].call({parser:this},d);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(d.type)){u+=g||"";continue}}let f=c;switch(f.type){case"space":{u+=this.renderer.space(f);break}case"hr":{u+=this.renderer.hr(f);break}case"heading":{u+=this.renderer.heading(f);break}case"code":{u+=this.renderer.code(f);break}case"table":{u+=this.renderer.table(f);break}case"blockquote":{u+=this.renderer.blockquote(f);break}case"list":{u+=this.renderer.list(f);break}case"checkbox":{u+=this.renderer.checkbox(f);break}case"html":{u+=this.renderer.html(f);break}case"def":{u+=this.renderer.def(f);break}case"paragraph":{u+=this.renderer.paragraph(f);break}case"text":{u+=this.renderer.text(f);break}default:{let d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return u}parseInline(a,u=this.renderer){let s="";for(let c=0;c<a.length;c++){let f=a[c];if(this.options.extensions?.renderers?.[f.type]){let g=this.options.extensions.renderers[f.type].call({parser:this},f);if(g!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(f.type)){s+=g||"";continue}}let d=f;switch(d.type){case"escape":{s+=u.text(d);break}case"html":{s+=u.html(d);break}case"link":{s+=u.link(d);break}case"image":{s+=u.image(d);break}case"checkbox":{s+=u.checkbox(d);break}case"strong":{s+=u.strong(d);break}case"em":{s+=u.em(d);break}case"codespan":{s+=u.codespan(d);break}case"br":{s+=u.br(d);break}case"del":{s+=u.del(d);break}case"text":{s+=u.text(d);break}default:{let g='Token with "'+d.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return s}},du=class{options;block;constructor(i){this.options=i||Ta}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}emStrongMask(i){return i}provideLexer(){return this.block?Ol.lex:Ol.lexInline}provideParser(){return this.block?Nl.parse:Nl.parseInline}},nb=class{defaults=xo();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Nl;Renderer=Hs;TextRenderer=No;Lexer=Ol;Tokenizer=qs;Hooks=du;constructor(...i){this.use(...i)}walkTokens(i,a){let u=[];for(let s of i)switch(u=u.concat(a.call(this,s)),s.type){case"table":{let c=s;for(let f of c.header)u=u.concat(this.walkTokens(f.tokens,a));for(let f of c.rows)for(let d of f)u=u.concat(this.walkTokens(d.tokens,a));break}case"list":{let c=s;u=u.concat(this.walkTokens(c.items,a));break}default:{let c=s;this.defaults.extensions?.childTokens?.[c.type]?this.defaults.extensions.childTokens[c.type].forEach(f=>{let d=c[f].flat(1/0);u=u.concat(this.walkTokens(d,a))}):c.tokens&&(u=u.concat(this.walkTokens(c.tokens,a)))}}return u}use(...i){let a=this.defaults.extensions||{renderers:{},childTokens:{}};return i.forEach(u=>{let s={...u};if(s.async=this.defaults.async||s.async||!1,u.extensions&&(u.extensions.forEach(c=>{if(!c.name)throw new Error("extension name required");if("renderer"in c){let f=a.renderers[c.name];f?a.renderers[c.name]=function(...d){let g=c.renderer.apply(this,d);return g===!1&&(g=f.apply(this,d)),g}:a.renderers[c.name]=c.renderer}if("tokenizer"in c){if(!c.level||c.level!=="block"&&c.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let f=a[c.level];f?f.unshift(c.tokenizer):a[c.level]=[c.tokenizer],c.start&&(c.level==="block"?a.startBlock?a.startBlock.push(c.start):a.startBlock=[c.start]:c.level==="inline"&&(a.startInline?a.startInline.push(c.start):a.startInline=[c.start]))}"childTokens"in c&&c.childTokens&&(a.childTokens[c.name]=c.childTokens)}),s.extensions=a),u.renderer){let c=this.defaults.renderer||new Hs(this.defaults);for(let f in u.renderer){if(!(f in c))throw new Error(`renderer '${f}' does not exist`);if(["options","parser"].includes(f))continue;let d=f,g=u.renderer[d],p=c[d];c[d]=(...y)=>{let v=g.apply(c,y);return v===!1&&(v=p.apply(c,y)),v||""}}s.renderer=c}if(u.tokenizer){let c=this.defaults.tokenizer||new qs(this.defaults);for(let f in u.tokenizer){if(!(f in c))throw new Error(`tokenizer '${f}' does not exist`);if(["options","rules","lexer"].includes(f))continue;let d=f,g=u.tokenizer[d],p=c[d];c[d]=(...y)=>{let v=g.apply(c,y);return v===!1&&(v=p.apply(c,y)),v}}s.tokenizer=c}if(u.hooks){let c=this.defaults.hooks||new du;for(let f in u.hooks){if(!(f in c))throw new Error(`hook '${f}' does not exist`);if(["options","block"].includes(f))continue;let d=f,g=u.hooks[d],p=c[d];du.passThroughHooks.has(f)?c[d]=y=>{if(this.defaults.async&&du.passThroughHooksRespectAsync.has(f))return(async()=>{let A=await g.call(c,y);return p.call(c,A)})();let v=g.call(c,y);return p.call(c,v)}:c[d]=(...y)=>{if(this.defaults.async)return(async()=>{let A=await g.apply(c,y);return A===!1&&(A=await p.apply(c,y)),A})();let v=g.apply(c,y);return v===!1&&(v=p.apply(c,y)),v}}s.hooks=c}if(u.walkTokens){let c=this.defaults.walkTokens,f=u.walkTokens;s.walkTokens=function(d){let g=[];return g.push(f.call(this,d)),c&&(g=g.concat(c.call(this,d))),g}}this.defaults={...this.defaults,...s}}),this}setOptions(i){return this.defaults={...this.defaults,...i},this}lexer(i,a){return Ol.lex(i,a??this.defaults)}parser(i,a){return Nl.parse(i,a??this.defaults)}parseMarkdown(i){return(a,u)=>{let s={...u},c={...this.defaults,...s},f=this.onError(!!c.silent,!!c.async);if(this.defaults.async===!0&&s.async===!1)return f(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof a>"u"||a===null)return f(new Error("marked(): input parameter is undefined or null"));if(typeof a!="string")return f(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(a)+", string expected"));if(c.hooks&&(c.hooks.options=c,c.hooks.block=i),c.async)return(async()=>{let d=c.hooks?await c.hooks.preprocess(a):a,g=await(c.hooks?await c.hooks.provideLexer():i?Ol.lex:Ol.lexInline)(d,c),p=c.hooks?await c.hooks.processAllTokens(g):g;c.walkTokens&&await Promise.all(this.walkTokens(p,c.walkTokens));let y=await(c.hooks?await c.hooks.provideParser():i?Nl.parse:Nl.parseInline)(p,c);return c.hooks?await c.hooks.postprocess(y):y})().catch(f);try{c.hooks&&(a=c.hooks.preprocess(a));let d=(c.hooks?c.hooks.provideLexer():i?Ol.lex:Ol.lexInline)(a,c);c.hooks&&(d=c.hooks.processAllTokens(d)),c.walkTokens&&this.walkTokens(d,c.walkTokens);let g=(c.hooks?c.hooks.provideParser():i?Nl.parse:Nl.parseInline)(d,c);return c.hooks&&(g=c.hooks.postprocess(g)),g}catch(d){return f(d)}}}onError(i,a){return u=>{if(u.message+=`
69
+ Please report this to https://github.com/markedjs/marked.`,i){let s="<p>An error occurred:</p><pre>"+Ll(u.message+"",!0)+"</pre>";return a?Promise.resolve(s):s}if(a)return Promise.reject(u);throw u}}},Aa=new nb;function Je(i,a){return Aa.parse(i,a)}Je.options=Je.setOptions=function(i){return Aa.setOptions(i),Je.defaults=Aa.defaults,Fp(Je.defaults),Je};Je.getDefaults=xo;Je.defaults=Ta;Je.use=function(...i){return Aa.use(...i),Je.defaults=Aa.defaults,Fp(Je.defaults),Je};Je.walkTokens=function(i,a){return Aa.walkTokens(i,a)};Je.parseInline=Aa.parseInline;Je.Parser=Nl;Je.parser=Nl.parse;Je.Renderer=Hs;Je.TextRenderer=No;Je.Lexer=Ol;Je.lexer=Ol.lex;Je.Tokenizer=qs;Je.Hooks=du;Je.parse=Je;Je.options;Je.setOptions;Je.use;Je.walkTokens;Je.parseInline;Nl.parse;Ol.lex;function ab({endpoint:i,collapsed:a,onToggle:u}){if(!i)return null;const s=i.summary||i.operationId||"",c=i.description||"",f=i.deprecated||!1,d=z.useMemo(()=>{if(!c)return"";try{return Je(c)}catch{return c}},[c]);return!s&&!c&&!f?null:b.jsxs("div",{className:"endpoint-doc",children:[b.jsxs("button",{className:"endpoint-doc__toggle",onClick:u,children:[b.jsx("span",{children:s||"Documentation"}),b.jsx("span",{className:`endpoint-doc__toggle-icon${a?"":" endpoint-doc__toggle-icon--expanded"}`,children:"▶"})]}),!a&&b.jsxs("div",{className:"endpoint-doc__body",children:[f&&b.jsx("div",{className:"endpoint-doc__deprecated",children:"Deprecated - This endpoint is marked as deprecated"}),d&&b.jsx("div",{dangerouslySetInnerHTML:{__html:d}})]})]})}function ib({spec:i,endpoint:a,params:u,onParamsChange:s,serverIndex:c,onServerIndexChange:f,serverVariables:d,onServerVariablesChange:g,preferences:p,resolvedEnv:y}){const[v,A]=z.useState(!1),D=(a?.servers||[])[c]||{},V=z.useMemo(()=>{const re=(D.url||"").match(/\{([^}]+)\}/g);return re?re.map(L=>L.slice(1,-1)):[]},[D.url]);if(!a)return b.jsx("div",{style:{color:"var(--fg-muted)",padding:"32px",textAlign:"center"},children:"Select an endpoint to begin"});const Q=a.parameters||[],Z=Q.filter(ee=>ee.in==="path"),J=Q.filter(ee=>ee.in==="query"),ce=Q.filter(ee=>ee.in==="header"),le=(ee,re,L)=>{s({...u,[ee]:{...u[ee]||{},[re]:L}})},ve=a.request_body||a.requestBody;return b.jsxs("div",{children:[V.length>0&&b.jsxs("div",{className:"request-panel__section",children:[b.jsx("div",{className:"request-panel__section-title",children:"Server Variables"}),b.jsx("div",{className:"request-panel__server-vars",children:V.map(ee=>{const re=D.variables?.[ee];return b.jsxs("div",{className:"param-form__field",children:[b.jsx("label",{className:"param-form__label",children:ee}),re?.description&&b.jsx("span",{className:"param-form__desc",children:re.description}),b.jsx("input",{className:"param-form__input",type:"text",value:d[ee]??re?.default??"",placeholder:re?.default||"",onChange:L=>g({...d,[ee]:L.target.value})})]},ee)})})]}),Z.length>0&&b.jsxs("div",{className:"request-panel__section",children:[b.jsx("div",{className:"request-panel__section-title",children:"Path Parameters"}),b.jsx(eo,{parameters:Z,values:u.path||{},onChange:(ee,re)=>le("path",ee,re),resolvedEnv:y})]}),J.length>0&&b.jsxs("div",{className:"request-panel__section",children:[b.jsx("div",{className:"request-panel__section-title",children:"Query Parameters"}),b.jsx(eo,{parameters:J,values:u.query||{},onChange:(ee,re)=>le("query",ee,re),resolvedEnv:y})]}),ce.length>0&&b.jsxs("div",{className:"request-panel__section",children:[b.jsx("div",{className:"request-panel__section-title",children:"Headers"}),b.jsx(eo,{parameters:ce,values:u.header||{},onChange:(ee,re)=>le("header",ee,re),resolvedEnv:y})]}),ve&&b.jsxs("div",{className:"request-panel__section",children:[b.jsx("div",{className:"request-panel__section-title",children:"Request Body"}),b.jsx(p0,{endpoint:a,body:u.body||"",contentType:u.contentType||"",onBodyChange:ee=>s({...u,body:ee}),onContentTypeChange:ee=>s({...u,contentType:ee}),resolvedEnv:y})]}),b.jsx(ab,{endpoint:a,collapsed:v,onToggle:()=>A(ee=>!ee)})]})}var to,Rp;function ub(){if(Rp)return to;Rp=1;function i(S){return S instanceof Map?S.clear=S.delete=S.set=function(){throw new Error("map is read-only")}:S instanceof Set&&(S.add=S.clear=S.delete=function(){throw new Error("set is read-only")}),Object.freeze(S),Object.getOwnPropertyNames(S).forEach(q=>{const $=S[q],de=typeof $;(de==="object"||de==="function")&&!Object.isFrozen($)&&i($)}),S}class a{constructor(q){q.data===void 0&&(q.data={}),this.data=q.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function u(S){return S.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function s(S,...q){const $=Object.create(null);for(const de in S)$[de]=S[de];return q.forEach(function(de){for(const Le in de)$[Le]=de[Le]}),$}const c="</span>",f=S=>!!S.scope,d=(S,{prefix:q})=>{if(S.startsWith("language:"))return S.replace("language:","language-");if(S.includes(".")){const $=S.split(".");return[`${q}${$.shift()}`,...$.map((de,Le)=>`${de}${"_".repeat(Le+1)}`)].join(" ")}return`${q}${S}`};class g{constructor(q,$){this.buffer="",this.classPrefix=$.classPrefix,q.walk(this)}addText(q){this.buffer+=u(q)}openNode(q){if(!f(q))return;const $=d(q.scope,{prefix:this.classPrefix});this.span($)}closeNode(q){f(q)&&(this.buffer+=c)}value(){return this.buffer}span(q){this.buffer+=`<span class="${q}">`}}const p=(S={})=>{const q={children:[]};return Object.assign(q,S),q};class y{constructor(){this.rootNode=p(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(q){this.top.children.push(q)}openNode(q){const $=p({scope:q});this.add($),this.stack.push($)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(q){return this.constructor._walk(q,this.rootNode)}static _walk(q,$){return typeof $=="string"?q.addText($):$.children&&(q.openNode($),$.children.forEach(de=>this._walk(q,de)),q.closeNode($)),q}static _collapse(q){typeof q!="string"&&q.children&&(q.children.every($=>typeof $=="string")?q.children=[q.children.join("")]:q.children.forEach($=>{y._collapse($)}))}}class v extends y{constructor(q){super(),this.options=q}addText(q){q!==""&&this.add(q)}startScope(q){this.openNode(q)}endScope(){this.closeNode()}__addSublanguage(q,$){const de=q.root;$&&(de.scope=`language:${$}`),this.add(de)}toHTML(){return new g(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function A(S){return S?typeof S=="string"?S:S.source:null}function w(S){return Q("(?=",S,")")}function D(S){return Q("(?:",S,")*")}function V(S){return Q("(?:",S,")?")}function Q(...S){return S.map($=>A($)).join("")}function Z(S){const q=S[S.length-1];return typeof q=="object"&&q.constructor===Object?(S.splice(S.length-1,1),q):{}}function J(...S){return"("+(Z(S).capture?"":"?:")+S.map(de=>A(de)).join("|")+")"}function ce(S){return new RegExp(S.toString()+"|").exec("").length-1}function le(S,q){const $=S&&S.exec(q);return $&&$.index===0}const ve=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ee(S,{joinWith:q}){let $=0;return S.map(de=>{$+=1;const Le=$;let Xe=A(de),N="";for(;Xe.length>0;){const R=ve.exec(Xe);if(!R){N+=Xe;break}N+=Xe.substring(0,R.index),Xe=Xe.substring(R.index+R[0].length),R[0][0]==="\\"&&R[1]?N+="\\"+String(Number(R[1])+Le):(N+=R[0],R[0]==="("&&$++)}return N}).map(de=>`(${de})`).join(q)}const re=/\b\B/,L="[a-zA-Z]\\w*",X="[a-zA-Z_]\\w*",ie="\\b\\d+(\\.\\d+)?",$e="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",I="\\b(0b[01]+)",be="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",lt=(S={})=>{const q=/^#![ ]*\//;return S.binary&&(S.begin=Q(q,/.*\b/,S.binary,/\b.*/)),s({scope:"meta",begin:q,end:/$/,relevance:0,"on:begin":($,de)=>{$.index!==0&&de.ignoreMatch()}},S)},Me={begin:"\\\\[\\s\\S]",relevance:0},et={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Me]},k={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Me]},P={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},fe=function(S,q,$={}){const de=s({scope:"comment",begin:S,end:q,contains:[]},$);de.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Le=J("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return de.contains.push({begin:Q(/[ ]+/,"(",Le,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),de},Be=fe("//","$"),He=fe("/\\*","\\*/"),E=fe("#","$"),G={scope:"number",begin:ie,relevance:0},te={scope:"number",begin:$e,relevance:0},ne={scope:"number",begin:I,relevance:0},me={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Me,{begin:/\[/,end:/\]/,relevance:0,contains:[Me]}]},Se={scope:"title",begin:L,relevance:0},we={scope:"title",begin:X,relevance:0},Tt={begin:"\\.\\s*"+X,relevance:0};var Yt=Object.freeze({__proto__:null,APOS_STRING_MODE:et,BACKSLASH_ESCAPE:Me,BINARY_NUMBER_MODE:ne,BINARY_NUMBER_RE:I,COMMENT:fe,C_BLOCK_COMMENT_MODE:He,C_LINE_COMMENT_MODE:Be,C_NUMBER_MODE:te,C_NUMBER_RE:$e,END_SAME_AS_BEGIN:function(S){return Object.assign(S,{"on:begin":(q,$)=>{$.data._beginMatch=q[1]},"on:end":(q,$)=>{$.data._beginMatch!==q[1]&&$.ignoreMatch()}})},HASH_COMMENT_MODE:E,IDENT_RE:L,MATCH_NOTHING_RE:re,METHOD_GUARD:Tt,NUMBER_MODE:G,NUMBER_RE:ie,PHRASAL_WORDS_MODE:P,QUOTE_STRING_MODE:k,REGEXP_MODE:me,RE_STARTERS_RE:be,SHEBANG:lt,TITLE_MODE:Se,UNDERSCORE_IDENT_RE:X,UNDERSCORE_TITLE_MODE:we});function vn(S,q){S.input[S.index-1]==="."&&q.ignoreMatch()}function Rl(S,q){S.className!==void 0&&(S.scope=S.className,delete S.className)}function ja(S,q){q&&S.beginKeywords&&(S.begin="\\b("+S.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",S.__beforeBegin=vn,S.keywords=S.keywords||S.beginKeywords,delete S.beginKeywords,S.relevance===void 0&&(S.relevance=0))}function rl(S,q){Array.isArray(S.illegal)&&(S.illegal=J(...S.illegal))}function xn(S,q){if(S.match){if(S.begin||S.end)throw new Error("begin & end are not supported with match");S.begin=S.match,delete S.match}}function Ql(S,q){S.relevance===void 0&&(S.relevance=1)}const ea=(S,q)=>{if(!S.beforeMatch)return;if(S.starts)throw new Error("beforeMatch cannot be used with starts");const $=Object.assign({},S);Object.keys(S).forEach(de=>{delete S[de]}),S.keywords=$.keywords,S.begin=Q($.beforeMatch,w($.begin)),S.starts={relevance:0,contains:[Object.assign($,{endsParent:!0})]},S.relevance=0,delete $.beforeMatch},El=["of","and","for","in","not","or","if","then","parent","list","value"],Sn="keyword";function Cl(S,q,$=Sn){const de=Object.create(null);return typeof S=="string"?Le($,S.split(" ")):Array.isArray(S)?Le($,S):Object.keys(S).forEach(function(Xe){Object.assign(de,Cl(S[Xe],q,Xe))}),de;function Le(Xe,N){q&&(N=N.map(R=>R.toLowerCase())),N.forEach(function(R){const W=R.split("|");de[W[0]]=[Xe,zl(W[0],W[1])]})}}function zl(S,q){return q?Number(q):cl(S)?0:1}function cl(S){return El.includes(S.toLowerCase())}const Zl={},ct=S=>{console.error(S)},_n=(S,...q)=>{console.log(`WARN: ${S}`,...q)},ol=(S,q)=>{Zl[`${S}/${q}`]||(console.log(`Deprecated as of ${S}. ${q}`),Zl[`${S}/${q}`]=!0)},wl=new Error;function jt(S,q,{key:$}){let de=0;const Le=S[$],Xe={},N={};for(let R=1;R<=q.length;R++)N[R+de]=Le[R],Xe[R+de]=!0,de+=ce(q[R-1]);S[$]=N,S[$]._emit=Xe,S[$]._multi=!0}function Dl(S){if(Array.isArray(S.begin)){if(S.skip||S.excludeBegin||S.returnBegin)throw ct("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),wl;if(typeof S.beginScope!="object"||S.beginScope===null)throw ct("beginScope must be object"),wl;jt(S,S.begin,{key:"beginScope"}),S.begin=ee(S.begin,{joinWith:""})}}function ta(S){if(Array.isArray(S.end)){if(S.skip||S.excludeEnd||S.returnEnd)throw ct("skip, excludeEnd, returnEnd not compatible with endScope: {}"),wl;if(typeof S.endScope!="object"||S.endScope===null)throw ct("endScope must be object"),wl;jt(S,S.end,{key:"endScope"}),S.end=ee(S.end,{joinWith:""})}}function hi(S){S.scope&&typeof S.scope=="object"&&S.scope!==null&&(S.beginScope=S.scope,delete S.scope)}function Vl(S){hi(S),typeof S.beginScope=="string"&&(S.beginScope={_wrap:S.beginScope}),typeof S.endScope=="string"&&(S.endScope={_wrap:S.endScope}),Dl(S),ta(S)}function Kl(S){function q(N,R){return new RegExp(A(N),"m"+(S.case_insensitive?"i":"")+(S.unicodeRegex?"u":"")+(R?"g":""))}class ${constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(R,W){W.position=this.position++,this.matchIndexes[this.matchAt]=W,this.regexes.push([W,R]),this.matchAt+=ce(R)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const R=this.regexes.map(W=>W[1]);this.matcherRe=q(ee(R,{joinWith:"|"}),!0),this.lastIndex=0}exec(R){this.matcherRe.lastIndex=this.lastIndex;const W=this.matcherRe.exec(R);if(!W)return null;const Ee=W.findIndex((Xt,Na)=>Na>0&&Xt!==void 0),Ye=this.matchIndexes[Ee];return W.splice(0,Ee),Object.assign(W,Ye)}}class de{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(R){if(this.multiRegexes[R])return this.multiRegexes[R];const W=new $;return this.rules.slice(R).forEach(([Ee,Ye])=>W.addRule(Ee,Ye)),W.compile(),this.multiRegexes[R]=W,W}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(R,W){this.rules.push([R,W]),W.type==="begin"&&this.count++}exec(R){const W=this.getMatcher(this.regexIndex);W.lastIndex=this.lastIndex;let Ee=W.exec(R);if(this.resumingScanAtSamePosition()&&!(Ee&&Ee.index===this.lastIndex)){const Ye=this.getMatcher(0);Ye.lastIndex=this.lastIndex+1,Ee=Ye.exec(R)}return Ee&&(this.regexIndex+=Ee.position+1,this.regexIndex===this.count&&this.considerAll()),Ee}}function Le(N){const R=new de;return N.contains.forEach(W=>R.addRule(W.begin,{rule:W,type:"begin"})),N.terminatorEnd&&R.addRule(N.terminatorEnd,{type:"end"}),N.illegal&&R.addRule(N.illegal,{type:"illegal"}),R}function Xe(N,R){const W=N;if(N.isCompiled)return W;[Rl,xn,Vl,ea].forEach(Ye=>Ye(N,R)),S.compilerExtensions.forEach(Ye=>Ye(N,R)),N.__beforeBegin=null,[ja,rl,Ql].forEach(Ye=>Ye(N,R)),N.isCompiled=!0;let Ee=null;return typeof N.keywords=="object"&&N.keywords.$pattern&&(N.keywords=Object.assign({},N.keywords),Ee=N.keywords.$pattern,delete N.keywords.$pattern),Ee=Ee||/\w+/,N.keywords&&(N.keywords=Cl(N.keywords,S.case_insensitive)),W.keywordPatternRe=q(Ee,!0),R&&(N.begin||(N.begin=/\B|\b/),W.beginRe=q(W.begin),!N.end&&!N.endsWithParent&&(N.end=/\B|\b/),N.end&&(W.endRe=q(W.end)),W.terminatorEnd=A(W.end)||"",N.endsWithParent&&R.terminatorEnd&&(W.terminatorEnd+=(N.end?"|":"")+R.terminatorEnd)),N.illegal&&(W.illegalRe=q(N.illegal)),N.contains||(N.contains=[]),N.contains=[].concat(...N.contains.map(function(Ye){return fl(Ye==="self"?N:Ye)})),N.contains.forEach(function(Ye){Xe(Ye,W)}),N.starts&&Xe(N.starts,R),W.matcher=Le(W),W}if(S.compilerExtensions||(S.compilerExtensions=[]),S.contains&&S.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return S.classNameAliases=s(S.classNameAliases||{}),Xe(S)}function Nt(S){return S?S.endsWithParent||Nt(S.starts):!1}function fl(S){return S.variants&&!S.cachedVariants&&(S.cachedVariants=S.variants.map(function(q){return s(S,{variants:null},q)})),S.cachedVariants?S.cachedVariants:Nt(S)?s(S,{starts:S.starts?s(S.starts):null}):Object.isFrozen(S)?s(S):S}var pt="11.11.1";class di extends Error{constructor(q,$){super(q),this.name="HTMLInjectionError",this.html=$}}const la=u,Oa=s,Jl=Symbol("nomatch"),En=7,$l=function(S){const q=Object.create(null),$=Object.create(null),de=[];let Le=!0;const Xe="Could not find the language '{}', did you forget to load/include a language module?",N={disableAutodetect:!0,name:"Plain text",contains:[]};let R={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:v};function W(K){return R.noHighlightRe.test(K)}function Ee(K){let oe=K.className+" ";oe+=K.parentNode?K.parentNode.className:"";const je=R.languageDetectRe.exec(oe);if(je){const Qe=Ht(je[1]);return Qe||(_n(Xe.replace("{}",je[1])),_n("Falling back to no-highlight mode for this block.",K)),Qe?je[1]:"no-highlight"}return oe.split(/\s+/).find(Qe=>W(Qe)||Ht(Qe))}function Ye(K,oe,je){let Qe="",mt="";typeof oe=="object"?(Qe=K,je=oe.ignoreIllegals,mt=oe.language):(ol("10.7.0","highlight(lang, code, ...args) has been deprecated."),ol("10.7.0",`Please use highlight(code, options) instead.
70
+ https://github.com/highlightjs/highlight.js/issues/2277`),mt=K,Qe=oe),je===void 0&&(je=!0);const Ut={code:Qe,language:mt};aa("before:highlight",Ut);const It=Ut.result?Ut.result:Xt(Ut.language,Ut.code,je);return It.code=Ut.code,aa("after:highlight",It),It}function Xt(K,oe,je,Qe){const mt=Object.create(null);function Ut(F,ue){return F.keywords[ue]}function It(){if(!ge.keywords){xt.addText(Ze);return}let F=0;ge.keywordPatternRe.lastIndex=0;let ue=ge.keywordPatternRe.exec(Ze),_e="";for(;ue;){_e+=Ze.substring(F,ue.index);const Re=Rt.case_insensitive?ue[0].toLowerCase():ue[0],ft=Ut(ge,Re);if(ft){const[hl,vi]=ft;if(xt.addText(_e),_e="",mt[Re]=(mt[Re]||0)+1,mt[Re]<=En&&(On+=vi),hl.startsWith("_"))_e+=ue[0];else{const Eu=Rt.classNameAliases[hl]||hl;Pt(ue[0],Eu)}}else _e+=ue[0];F=ge.keywordPatternRe.lastIndex,ue=ge.keywordPatternRe.exec(Ze)}_e+=Ze.substring(F),xt.addText(_e)}function Qt(){if(Ze==="")return;let F=null;if(typeof ge.subLanguage=="string"){if(!q[ge.subLanguage]){xt.addText(Ze);return}F=Xt(ge.subLanguage,Ze,!0,_u[ge.subLanguage]),_u[ge.subLanguage]=F._top}else F=Ma(Ze,ge.subLanguage.length?ge.subLanguage:null);ge.relevance>0&&(On+=F.relevance),xt.__addSublanguage(F._emitter,F.language)}function nt(){ge.subLanguage!=null?Qt():It(),Ze=""}function Pt(F,ue){F!==""&&(xt.startScope(ue),xt.addText(F),xt.endScope())}function xu(F,ue){let _e=1;const Re=ue.length-1;for(;_e<=Re;){if(!F._emit[_e]){_e++;continue}const ft=Rt.classNameAliases[F[_e]]||F[_e],hl=ue[_e];ft?Pt(hl,ft):(Ze=hl,It(),Ze=""),_e++}}function Ca(F,ue){return F.scope&&typeof F.scope=="string"&&xt.openNode(Rt.classNameAliases[F.scope]||F.scope),F.beginScope&&(F.beginScope._wrap?(Pt(Ze,Rt.classNameAliases[F.beginScope._wrap]||F.beginScope._wrap),Ze=""):F.beginScope._multi&&(xu(F.beginScope,ue),Ze="")),ge=Object.create(F,{parent:{value:ge}}),ge}function mi(F,ue,_e){let Re=le(F.endRe,_e);if(Re){if(F["on:end"]){const ft=new a(F);F["on:end"](ue,ft),ft.isMatchIgnored&&(Re=!1)}if(Re){for(;F.endsParent&&F.parent;)F=F.parent;return F}}if(F.endsWithParent)return mi(F.parent,ue,_e)}function za(F){return ge.matcher.regexIndex===0?(Ze+=F[0],1):(Nn=!0,0)}function Vs(F){const ue=F[0],_e=F.rule,Re=new a(_e),ft=[_e.__beforeBegin,_e["on:begin"]];for(const hl of ft)if(hl&&(hl(F,Re),Re.isMatchIgnored))return za(ue);return _e.skip?Ze+=ue:(_e.excludeBegin&&(Ze+=ue),nt(),!_e.returnBegin&&!_e.excludeBegin&&(Ze=ue)),Ca(_e,F),_e.returnBegin?0:ue.length}function Zt(F){const ue=F[0],_e=oe.substring(F.index),Re=mi(ge,F,_e);if(!Re)return Jl;const ft=ge;ge.endScope&&ge.endScope._wrap?(nt(),Pt(ue,ge.endScope._wrap)):ge.endScope&&ge.endScope._multi?(nt(),xu(ge.endScope,F)):ft.skip?Ze+=ue:(ft.returnEnd||ft.excludeEnd||(Ze+=ue),nt(),ft.excludeEnd&&(Ze=ue));do ge.scope&&xt.closeNode(),!ge.skip&&!ge.subLanguage&&(On+=ge.relevance),ge=ge.parent;while(ge!==Re.parent);return Re.starts&&Ca(Re.starts,F),ft.returnEnd?0:ue.length}function yi(){const F=[];for(let ue=ge;ue!==Rt;ue=ue.parent)ue.scope&&F.unshift(ue.scope);F.forEach(ue=>xt.openNode(ue))}let ia={};function wa(F,ue){const _e=ue&&ue[0];if(Ze+=F,_e==null)return nt(),0;if(ia.type==="begin"&&ue.type==="end"&&ia.index===ue.index&&_e===""){if(Ze+=oe.slice(ue.index,ue.index+1),!Le){const Re=new Error(`0 width match regex (${K})`);throw Re.languageName=K,Re.badRule=ia.rule,Re}return 1}if(ia=ue,ue.type==="begin")return Vs(ue);if(ue.type==="illegal"&&!je){const Re=new Error('Illegal lexeme "'+_e+'" for mode "'+(ge.scope||"<unnamed>")+'"');throw Re.mode=ge,Re}else if(ue.type==="end"){const Re=Zt(ue);if(Re!==Jl)return Re}if(ue.type==="illegal"&&_e==="")return Ze+=`
71
+ `,1;if(bi>1e5&&bi>ue.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ze+=_e,_e.length}const Rt=Ht(K);if(!Rt)throw ct(Xe.replace("{}",K)),new Error('Unknown language: "'+K+'"');const Su=Kl(Rt);let Da="",ge=Qe||Su;const _u={},xt=new R.__emitter(R);yi();let Ze="",On=0,Il=0,bi=0,Nn=!1;try{if(Rt.__emitTokens)Rt.__emitTokens(oe,xt);else{for(ge.matcher.considerAll();;){bi++,Nn?Nn=!1:ge.matcher.considerAll(),ge.matcher.lastIndex=Il;const F=ge.matcher.exec(oe);if(!F)break;const ue=oe.substring(Il,F.index),_e=wa(ue,F);Il=F.index+_e}wa(oe.substring(Il))}return xt.finalize(),Da=xt.toHTML(),{language:K,value:Da,relevance:On,illegal:!1,_emitter:xt,_top:ge}}catch(F){if(F.message&&F.message.includes("Illegal"))return{language:K,value:la(oe),illegal:!0,relevance:0,_illegalBy:{message:F.message,index:Il,context:oe.slice(Il-100,Il+100),mode:F.mode,resultSoFar:Da},_emitter:xt};if(Le)return{language:K,value:la(oe),illegal:!1,relevance:0,errorRaised:F,_emitter:xt,_top:ge};throw F}}function Na(K){const oe={value:la(K),illegal:!1,relevance:0,_top:N,_emitter:new R.__emitter(R)};return oe._emitter.addText(K),oe}function Ma(K,oe){oe=oe||R.languages||Object.keys(q);const je=Na(K),Qe=oe.filter(Ht).filter(Tn).map(nt=>Xt(nt,K,!1));Qe.unshift(je);const mt=Qe.sort((nt,Pt)=>{if(nt.relevance!==Pt.relevance)return Pt.relevance-nt.relevance;if(nt.language&&Pt.language){if(Ht(nt.language).supersetOf===Pt.language)return 1;if(Ht(Pt.language).supersetOf===nt.language)return-1}return 0}),[Ut,It]=mt,Qt=Ut;return Qt.secondBest=It,Qt}function kl(K,oe,je){const Qe=oe&&$[oe]||je;K.classList.add("hljs"),K.classList.add(`language-${Qe}`)}function gt(K){let oe=null;const je=Ee(K);if(W(je))return;if(aa("before:highlightElement",{el:K,language:je}),K.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",K);return}if(K.children.length>0&&(R.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(K)),R.throwUnescapedHTML))throw new di("One of your code blocks includes unescaped HTML.",K.innerHTML);oe=K;const Qe=oe.textContent,mt=je?Ye(Qe,{language:je,ignoreIllegals:!0}):Ma(Qe);K.innerHTML=mt.value,K.dataset.highlighted="yes",kl(K,je,mt.language),K.result={language:mt.language,re:mt.relevance,relevance:mt.relevance},mt.secondBest&&(K.secondBest={language:mt.secondBest.language,relevance:mt.secondBest.relevance}),aa("after:highlightElement",{el:K,result:mt,text:Qe})}function Bt(K){R=Oa(R,K)}const An=()=>{Ra(),ol("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function pi(){Ra(),ol("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let yu=!1;function Ra(){function K(){Ra()}if(document.readyState==="loading"){yu||window.addEventListener("DOMContentLoaded",K,!1),yu=!0;return}document.querySelectorAll(R.cssSelector).forEach(gt)}function bu(K,oe){let je=null;try{je=oe(S)}catch(Qe){if(ct("Language definition for '{}' could not be registered.".replace("{}",K)),Le)ct(Qe);else throw Qe;je=N}je.name||(je.name=K),q[K]=je,je.rawDefinition=oe.bind(null,S),je.aliases&&Fl(je.aliases,{languageName:K})}function na(K){delete q[K];for(const oe of Object.keys($))$[oe]===K&&delete $[oe]}function gi(){return Object.keys(q)}function Ht(K){return K=(K||"").toLowerCase(),q[K]||q[$[K]]}function Fl(K,{languageName:oe}){typeof K=="string"&&(K=[K]),K.forEach(je=>{$[je.toLowerCase()]=oe})}function Tn(K){const oe=Ht(K);return oe&&!oe.disableAutodetect}function jn(K){K["before:highlightBlock"]&&!K["before:highlightElement"]&&(K["before:highlightElement"]=oe=>{K["before:highlightBlock"](Object.assign({block:oe.el},oe))}),K["after:highlightBlock"]&&!K["after:highlightElement"]&&(K["after:highlightElement"]=oe=>{K["after:highlightBlock"](Object.assign({block:oe.el},oe))})}function vt(K){jn(K),de.push(K)}function vu(K){const oe=de.indexOf(K);oe!==-1&&de.splice(oe,1)}function aa(K,oe){const je=K;de.forEach(function(Qe){Qe[je]&&Qe[je](oe)})}function Wl(K){return ol("10.7.0","highlightBlock will be removed entirely in v12.0"),ol("10.7.0","Please use highlightElement now."),gt(K)}Object.assign(S,{highlight:Ye,highlightAuto:Ma,highlightAll:Ra,highlightElement:gt,highlightBlock:Wl,configure:Bt,initHighlighting:An,initHighlightingOnLoad:pi,registerLanguage:bu,unregisterLanguage:na,listLanguages:gi,getLanguage:Ht,registerAliases:Fl,autoDetection:Tn,inherit:Oa,addPlugin:vt,removePlugin:vu}),S.debugMode=function(){Le=!1},S.safeMode=function(){Le=!0},S.versionString=pt,S.regex={concat:Q,lookahead:w,either:J,optional:V,anyNumberOfTimes:D};for(const K in Yt)typeof Yt[K]=="object"&&i(Yt[K]);return Object.assign(S,Yt),S},kt=$l({});return kt.newInstance=()=>$l({}),to=kt,kt.HighlightJS=kt,kt.default=kt,to}var sb=ub();const Zs=Ny(sb);function rb(i){const a={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},u={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],c={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:s},contains:[a,u,i.QUOTE_STRING_MODE,c,i.C_NUMBER_MODE,i.C_LINE_COMMENT_MODE,i.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function cb(i){const a=i.regex,u=a.concat(/[\p{L}_]/u,a.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,c={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},f={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},d=i.inherit(f,{begin:/\(/,end:/\)/}),g=i.inherit(i.APOS_STRING_MODE,{className:"string"}),p=i.inherit(i.QUOTE_STRING_MODE,{className:"string"}),y={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:s,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[c]},{begin:/'/,end:/'/,contains:[c]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[f,p,g,d,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[f,d,p,g]}]}]},i.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},c,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[p]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[y],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[y],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:a.concat(/</,a.lookahead(a.concat(u,a.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:u,relevance:0,starts:y}]},{className:"tag",begin:a.concat(/<\//,a.lookahead(a.concat(u,/>/))),contains:[{className:"name",begin:u,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function ob(i){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function rg(i){let a=at(Mo(i).tokens);const u=s=>a.node.apply(s,{userFuncArgs:{},variables:{}});return u.filter=a,u.ast=a.node,u.trace=s=>{let c=[];return a.node.trace(s,{userFuncArgs:{},variables:{}},c),{node:null,output:s,next:c}},u}function fb(i){return at(Mo(i).tokens).node}function fu(i){return i>="a"&&i<="z"||i>="A"&&i<="Z"||i==="_"}function hu(i){return i>="0"&&i<="9"}function Gl(i,a="",u=" ",s=`
72
+ `){let c=u?" ":"";if(typeof i>"u")return i;if(i===null)return"null";if(i instanceof Array){let f="[",d=!0;for(let g of Object.values(i))f+=(d?"":",")+s+a+u+Gl(g,a+u,u,s),d=!1;return f+=s+a+"]",f}else if(typeof i=="object"){let f="{",d=!0;for(let g of Object.keys(i))f+=(d?"":",")+s+a+u+'"'+g+'":'+c+Gl(i[g],a+u,u,s),d=!1;return f+=s+a+"}",f}else{if(typeof i=="string")return'"'+cg(i)+'"';if(typeof i=="number")return""+i;if(typeof i=="boolean")return i?"true":"false"}}function cg(i){return i=i.replace(/\\/g,"\\\\"),i=i.replace(/"/g,'\\"'),i=i.replace(/\n/g,"\\n"),i=i.replace(/[\x00-\x1f]/g,a=>"\\u00"+a.charCodeAt(0).toString(16).padStart(2,"0")),i}function*ro(i,a){let u=i[Symbol.iterator](),s=a[Symbol.iterator](),c=u.next(),f=s.next();for(;!c.done&&!f.done;)yield[c.value,f.value],c=u.next(),f=s.next()}function _l(i,a){let u=U(i),s=U(a);if(u!=s)return _l.typeOrder.indexOf(u)-_l.typeOrder.indexOf(s);if(u=="boolean"){if(i&&!a)return 1;if(!i&&a)return-1}else{if(u=="number")return i-a;if(u=="string"){if(i<a)return-1;if(a<i)return 1}else if(u=="array"){for(let c=0;c<i.length;c++){let f=i[c],d=a[c];if(typeof f>"u"&&typeof d<"u")return-1;if(typeof f<"u"&&typeof d>"u")return 1;if(typeof f>"u")return 0;let g=_l(f,d);if(g!=0)return g}return 0}else if(u=="object"){let c=Object.keys(i).sort(),f=Object.keys(a).sort(),d=_l(c,f);if(d)return d;for(let g of c)if(d=_l(i[g],a[g]),d)return d}}return 0}_l.typeOrder=["null","boolean","number","string","array","object"];function Cp(i,a,u=!1){let s=fb(a),c=(f,d)=>s.apply(f,d);return u&&(c=(f,d)=>s.paths(f,d)),function*(f,d,g){let p=d.userFuncArgs;d.userFuncArgs=Object.create(p);for(let y=0;y<i.length;y++){let v=i[y],A=g[y];d.userFuncArgs[v+"/0"]=A}yield*c(f,d),d.userFuncArgs=p}}function Ml(i,a,u){let s=i+"/"+a.length;yn[s]=Cp(a,u),yn[s].params=Array.prototype.map.call(a,c=>({label:c,mode:"defer"})),yn[s+"-paths"]=Cp(a,u,!0)}function Mo(i,a=0,u){let s=[];function c(d){throw d}let f;e:for(f=a;f<i.length;f++){let d=f,g=i[f];if(g!=" ")if(g=='"'||g=="'"){let p=g,y="",v=!1,A,w=0;for(f++;f<i.length;f++)if(A)A--,w*=16,w+=Number.parseInt(i[f],16),A==0&&(y+=String.fromCharCode(w),w=0);else if(v){let D=i[f];if(D=='"'||D=="'")y+=D;else if(D=="n")y+=`
73
+ `;else if(D=="t")y+=" ";else if(D=="r")y+="\r";else if(D=="b")y+="\b";else if(D=="f")y+="\f";else if(D=="/")y+="/";else if(D=="\\")y+="\\";else if(D=="u")A=4;else if(D=="("){let V=Mo(i,f+1,0);s.push({type:"quote-interp",value:y,location:d}),y="",s=s.concat(V.tokens),f=V.i}else throw"invalid escape "+D;v=!1}else if(i[f]=="\\")v=!0;else if(i[f]==p){s.push({type:"quote",value:y,location:d});continue e}else v=!1,y+=i[f];c("unterminated string literal")}else if(hu(g)){let p="";for(;hu(i[f])||i[f]==".";)p+=i[f++];s.push({type:"number",value:Number.parseFloat(p),location:d}),f--}else if(g=="."){let p=i[f+1];if(fu(p)){f++;let y="";for(;fu(i[f])||hu(i[f]);)y+=i[f++];s.push({type:"identifier-index",value:y,location:d}),f--}else p=="["?(f++,s.push({type:"dot-square",location:d})):p=="."?(f++,s.push({type:"dot-dot",location:d})):s.push({type:"dot",location:d})}else if(g=="$"){i[f+1],f++;let p="";for(;fu(i[f])||hu(i[f]);)p+=i[f],f++;s.push({type:"variable",name:p,location:d}),f--}else if(g=="[")s.push({type:"left-square",location:d});else if(g=="]")s.push({type:"right-square",location:d});else if(g=="(")s.push({type:"left-paren",location:d}),u++;else if(g==")"){if(s.push({type:"right-paren",location:d}),u--,u<0)return{tokens:s,i:f}}else if(g=="{")s.push({type:"left-brace",location:d});else if(g=="}")s.push({type:"right-brace",location:d});else if(g==",")s.push({type:"comma",location:d});else if(g==";")s.push({type:"semicolon",location:d});else if(g=="@")s.push({type:"at",location:d});else if(g=="?")s.push({type:"question",location:d});else if(g=="|")i[f+1]=="="?(s.push({type:"pipe-equals",location:d}),f++):s.push({type:"pipe",location:d});else if(g=="+"||g=="*"||g=="-"||g=="/"||g=="%"||g=="<"||g==">")g=="/"&&i[f+1]=="/"&&(g="//",f++),i[f+1]=="="?(g=="<"||g==">"?s.push({type:"op",op:g+"=",location:d}):s.push({type:"op-equals",op:g,location:d}),f++):s.push({type:"op",op:g});else if(g=="="){if(i[f+1]!="=")throw"plain assignment = is not supported";f++,s.push({type:"op",op:"==",location:d})}else if(g=="!"){if(i[f+1]!="=")throw"unexpected ! at "+d;f++,s.push({type:"op",op:"!=",location:d})}else if(fu(g)){let p="";for(;fu(i[f])||hu(i[f])||i[f]=="_";)p+=i[f++];p=="as"||p=="reduce"||p=="foreach"||p=="import"||p=="include"||p=="def"||p=="if"||p=="then"||p=="else"||p=="end"||p=="elif"?s.push({type:p,location:d}):s.push({type:"identifier",value:p,location:d}),f--}else g==":"&&s.push({type:"colon",location:d})}return s.push({type:"<end-of-program>",location:f}),{tokens:s,i:f}}function Sl(i){return i?i.location:"<end>"}function at(i,a=0,u=[]){let s=a,c=i[s],f=[],d=[];for(;c&&u.indexOf(c.type)==-1;){if(c.type=="identifier-index")f.push(new co(c.value));else if(c.type=="number")f.push(new pu(c.value));else if(c.type=="quote")f.push(new fi(c.value));else if(c.type=="dot")f.push(new Dp);else if(c.type=="dot-dot")f.push(new _b);else if(c.type=="identifier")if(c.value=="true"||c.value=="false")f.push(new kp(c.value=="true"));else if(c.value=="null")f.push(new kp(null));else{let g=c.value,p=[];if(i[s+1]&&i[s+1].type=="left-paren")for(s++;i[s].type!="right-paren";){let y=at(i,s+1,["semicolon","right-paren"]);p.push(y.node),s=y.i}f.push(new wb(g+"/"+p.length,p))}else if(c.type=="dot-square"){let g=hb(i,s);f.push(g.node),s=g.i}else if(c.type=="left-square"){let g=at(i,s+1,["right-square","colon"]);if(f.length){let p=mn(f);if(f=[],i[g.i].type=="colon"){g.node.length===0&&(g.node=new pu(0));let y=at(i,g.i+1,["right-square"]);y.node.length===0&&(y.node=new pu(-1)),f.push(new gb(p,g.node,y.node)),g=y}else g.node.length===0?f.push(new bb(p)):f.push(new pb(p,g.node))}else f.push(new vb(g.node));s=g.i}else if(c.type=="left-paren"){let g=at(i,s+1,["right-paren"]);f.push(g.node),s=g.i}else if(c.type=="left-brace"){let g=db(i,s+1);f.push(g.node),s=g.i}else if(c.type=="at"){let g=i[++s];if(!g||g.type!="identifier")throw"expected identifier after @ at "+Sl(g);let p=g.value;if(!gu[p])throw"not a valid format: "+p;let y;i[s+1]&&i[s+1].type=="quote-interp"&&({q:y,i:s}=zp(i,s+1),s=s),f.push(new Db(p,y))}else if(c.type=="comma")d.push(mn(f)),f=[];else if(c.type=="pipe"||c.type=="as"){d.length&&(d.push(mn(f)),f=[new Bp(d)],d=[]);let g=mn(f);if(c.type=="as"){let v=i[s+1];g=new gg(g,v.name),s+=2}let p=at(i,s+1,u),y=p.node;s=p.i,i[s]&&u.indexOf(i[s].type)!=-1&&s--,f=[new xb(g,y)]}else if(c.type=="question"){let g=f.pop();if(!g)throw"unexpected ? without preceding filter at "+Sl(c);f.push(new kb(g))}else if(c.type=="op"){if(f.length==0&&c.op=="-"&&i[s+1].type=="number"){i[s+1].value=-i[s+1].value,c=i[++s];continue}let g=mn(f);c.op;let p=[g,c],y=at(i,s+1,["op","comma","pipe","right-paren","right-brace","right-square","<end-of-program>"].concat(u));for(s=y.i,p.push(y.node);s<i.length&&i[s].type=="op";){p.push(i[s]);let v=at(i,s+1,["op","comma","pipe","right-paren","right-brace","right-square","<end-of-program>"].concat(u));s=v.i,p.push(v.node)}f=[wp(p)],i[s]&&s--}else if(c.type=="pipe-equals"){let g=mn(f),p=at(i,s+1,["comma","pipe","right-paren","right-brace","right-square","<end-of-program>"].concat(u));s=p.i-1;let y=p.node;f=[new Up(g,y)]}else if(c.type=="op-equals"){let g=mn(f),p=at(i,s+1,["comma","pipe","right-paren","right-brace","right-square","<end-of-program>"].concat(u));s=p.i;let y=p.node;y=wp([new Dp,{type:"op",op:c.op},y]),f=[new Up(g,y)]}else if(c.type=="reduce"){let g=at(i,s+1,["as"]);s=g.i;let p=g.node;s++;let y=i[s].name;if(s++,i[s].type!="left-paren")throw"expected left-paren in reduce at "+Sl(i[s]);g=at(i,s+1,["semicolon"]),s=g.i;let v=g.node;g=at(i,s+1,["right-paren"]),s=g.i;let A=g.node;f.push(new Bb(p,y,v,A))}else if(c.type=="quote-interp"){let g;({q:g,i:s}=zp(i,s)),f.push(g)}else if(c.type=="variable")f.push(new mg(c.name));else if(c.type=="if"){let g=[],p=[],y=null;for(;i[s]&&(i[s].type=="if"||i[s].type=="elif");){let v=at(i,s+1,["then"]);if(!i[v.i]||i[v.i].type!="then")throw"expected then at "+Sl(i[v.i])+", from "+i[s].type+" at "+i[s].location;let A=at(i,v.i+1,["else","elif","end"]);if(A.i==v.i+1)throw"expected expression after then at "+Sl(i[v.i+1])+", not "+i[v.i+1].type;s=A.i,g.push(v.node),p.push(A.node)}if(i[s]&&i[s].type=="else"){let v=at(i,s+1,["end"]);s=v.i,y=v.node}if(!i[s]||i[s].type!="end")throw"expected end at "+Sl(i[s])+" from if at "+c.location;f.push(new Ub(g,p,y))}else{if(c.type=="<end-of-program>"&&u.length==0)break;throw"could not handle token "+c.type+" at "+Sl(c)+(u.length>0?", expected "+u.join("/"):"")}c=i[++s]}return d.length?(d.push(mn(f)),{node:new Bp(d),i:s}):{node:mn(f),i:s}}function mn(i){return i.length==1?i[0]:new Ro(i)}function zp(i,a){let u=i[a],s=[],c=[];s.push(u.value);let f=at(i,a+1,["right-paren"]);for(a=f.i+1,c.push(f.node);i[a].type=="quote-interp";)s.push(i[a].value),f=at(i,a+1,["right-paren"]),a=f.i+1,c.push(f.node);return s.push(i[a].value),{q:new yb(s,c),i:a}}function hb(i,a=0){let u=a;if(i[u],u++,i[u].type=="right-square")return{node:new dg,i:u};let s=at(i,u,["right-square","colon"]);if(i[s.i].type=="colon"){let c=s;return c.length===0&&(c.node=new pu(0)),s=at(i,s.i+1,["right-square"]),s.length===0&&(s.node=new pu(-1)),{node:new mb(c.node,s.node),i:s.i}}return{node:new hg(s.node),i:s.i}}function db(i,a=0){let u=a,s=[];for(;i[u].type!="right-brace";){if(i[u].type=="identifier"){let c=i[u++];if(i[u].type=="colon"){let f=at(i,u+1,["comma","right-brace"]);u=f.i,s.push({key:new fi(c.value),value:f.node}),u--}else i[u].type=="comma"?s.push({key:new fi(c.value),value:new co(c.value)}):i[u].type=="right-brace"&&(s.push({key:new fi(c.value),value:new co(c.value)}),u--)}else if(i[u].type=="quote"){let c=i[u++];if(i[u].type=="colon"){let f=at(i,u+1,["comma","right-brace"]);u=f.i,s.push({key:new fi(c.value),value:f.node}),u--}else throw"unexpected "+i[u].type+", expected colon at "+Sl(i[u])}else if(i[u].type=="left-paren"){let c=at(i,u+1,["right-paren"]);if(u=c.i+1,i[u].type=="colon"){let f=at(i,u+1,["comma","right-brace"]);u=f.i,s.push({key:c.node,value:f.node}),u--}else throw"unexpected "+i[u].type+", expected colon at "+Sl(i[u])}else if(i[u].type=="variable"){let c=i[u++];if(i[u].type=="colon"){let f=at(i,u+1,["comma","right-brace"]);u=f.i,s.push({key:new mg(c.name),value:f.node}),u--}else throw"unexpected "+i[u].type+", expected colon at "+Sl(i[u])}else throw"unexpected "+i[u].type+" at "+Sl(i[u])+" in object at "+Sl(i[a-1]);u++,i[u].type=="comma"&&u++}return{node:new Sb(s),i:u}}function wp(i){const a={"+":5,"-":5,"*":10,"/":10,"%":10,"//":2,"==":3,"!=":3,">":3,"<":3,">=":3,"<=":3};let u=[],s=[];for(let d of i)if(d.type=="op"){for(;s.length&&a[s[0].op]>=a[d.op];)u.push(s.shift());s.unshift(d)}else u.push(d);for(let d of s)u.push(d);let c={"+":Bs,"*":Eb,"-":Ab,"/":Tb,"%":jb,"//":zb,"==":pg,"!=":Cb,"<":Ob,">":Nb,"<=":Mb,">=":Rb},f=[];for(let d of u)if(d.type=="op"){let g=f.pop(),p=f.pop();f.push(new c[d.op](p,g))}else f.push(d);return f[0]}function og(i,a,u,s){let c=s[0];for(let f of c.apply(i,a)){let d=[];u.push({node:c,output:f,next:d,variables:JSON.parse(JSON.stringify(a.variables))}),s.length>1&&og(f,a,d,s.slice(1))}}function fg(i,a,u,s){let c=[],f=this;for(;f.source;)f.filter&&c.unshift(f.filter),f=f.source;c.unshift(f),og(i,a,u,c)}function U(i){if(i===null)return"null";if(typeof i=="number")return"number";if(typeof i=="string")return"string";if(typeof i=="boolean")return"boolean";if(i instanceof Array)return"array";if(typeof i=="object")return"object"}class rt{trace(a,u,s){for(let c of this.apply(a,u))s.push({node:this,output:c,next:[]})}toString(){return"<"+this.constructor.name+">"}*apply(a,u){throw"apply not implemented for "+this.constructor.name}}class Ro extends rt{constructor(a){super(),this.length=a.length;let u=a.pop();u&&(this.filter=u,this.source=a.length==1?a[0]:new Ro(a))}*apply(a,u){if(this.filter)for(let s of this.source.apply(a,u))yield*this.filter.apply(s,u)}*paths(a,u){if(!this.filter)return[];for(let s of this.source.paths(a,u))for(let c of this.filter.paths(a,u))yield s.concat(c)}trace=fg;toString(){return(this.source?this.source.toString():"")+(this.filter?this.filter.toString():"")}}class pb extends rt{constructor(a,u){super(),this.lhs=a,this.index=u}*apply(a,u){for(let s of this.lhs.apply(a,u)){let c=U(s);for(let f of this.index.apply(a,u)){if(c=="array"&&U(f)!="number")throw"Cannot index array with "+U(f)+" "+JSON.stringify(f);if(c=="object"&&U(f)!="string")throw"Cannot index object with "+U(f)+" "+JSON.stringify(f);typeof f=="number"&&f<0&&U(s)=="array"?yield s[s.length+f]:yield typeof s[f]>"u"?null:s[f]}}}*paths(a,u){for(let s of this.lhs.paths(a,u))for(let c of this.index.apply(a,u))yield s.concat([c])}toString(){return this.lhs.toString()+"["+this.index.toString()+"]"}}class gb extends rt{constructor(a,u,s){super(),this.lhs=a,this.from=u,this.to=s}*apply(a,u){for(let s of this.lhs.apply(a,u))for(let c of this.from.apply(a,u)){c<0&&(c+=s.length);for(let f of this.to.apply(a,u))f<0&&(f+=s.length),yield s.slice(c,f)}}*paths(a,u){for(let s of this.lhs.paths(a,u))for(let c of this.from.apply(a,u))for(let f of this.to.apply(a,u))yield s.concat([{start:c,end:f}])}toString(){return this.lhs.toString()+"["+this.from.toString()+":"+this.to.toString()+"]"}}class hg extends rt{constructor(a){super(),this.index=a}*apply(a,u){let s=U(a);for(let c of this.index.apply(a,u)){if(s=="array"&&U(c)!="number")throw"Cannot index array with "+U(c)+" "+JSON.stringify(c);if(s=="object"&&U(c)!="string")throw"Cannot index object with "+U(c)+" "+JSON.stringify(c);typeof c=="number"&&c<0&&U(a)=="array"?yield a[a.length+c]:yield typeof a[c]>"u"?null:a[c]}}*paths(a,u){for(let s of this.index.apply(a,u))yield[s]}}class co extends hg{constructor(a){super(new fi(a))}toString(){return"."+this.index.value}}class mb extends rt{constructor(a,u){super(),this.from=a,this.to=u}*apply(a,u){for(let s of this.from.apply(a,u)){s<0&&(s+=a.length);for(let c of this.to.apply(a,u))c<0&&(c+=a.length),yield a.slice(s,c)}}*paths(a,u){for(let s of this.from.apply(a,u))for(let c of this.to.apply(a,u))yield[{start:s,end:c}]}toString(){return".["+this.from.toString()+":"+this.to.toString()+"]"}}class Dp extends rt{constructor(){super()}*apply(a,u){yield a}*paths(a,u){yield[]}toString(){return"."}}class Co extends rt{constructor(a){super(),this.value=a}*apply(){yield this.value}*paths(a,u){yield this.value}toString(){return JSON.stringify(this.value)}}class fi extends Co{constructor(a){super(a)}}class yb extends rt{constructor(a,u){super(),this.strings=a,this.interpolations=u}*apply(a,u){yield*this.applyEscape(a,gu.text,u)}*applyEscape(a,u,s,c=0){let f=this.strings[c];if(!this.interpolations[c])return yield f;for(let g of this.interpolations[c].apply(a,s))for(let p of this.applyEscape(a,u,s,c+1))yield f+u(g)+p}toString(){let a="";for(let u=0;u<this.strings.length;u++)a+=this.strings[u].replace("\\","\\\\").replace('"','\\"'),this.interpolations[u]&&(a+="\\("+this.interpolations[u].toString()+")");return'"'+a+'"'}}class pu extends Co{constructor(a){super(a)}toString(){return this.value.toString()}}class kp extends Co{constructor(a){super(a)}toString(){return this.value?"true":"false"}}class bb extends rt{constructor(a){super(),this.source=a,this.filter=new dg}*apply(a,u){for(let s of this.source.apply(a,u))yield*Object.values(s)}*paths(a,u){for(let[s,c]of this.zip(this.source.paths(a,u),this.source.apply(a,u)))if(U(c)=="array")for(let f=0;f<c.length;f++)yield s.concat([f]);else for(let f of Object.keys(c))yield s.concat([f])}*zip(a,u){let s=a[Symbol.iterator](),c=u[Symbol.iterator](),f=s.next(),d=c.next();for(;!f.done&&!d.done;)yield[f.value,d.value],f=s.next(),d=c.next()}toString(){return this.source.toString()+"[]"}trace=fg}class dg extends rt{constructor(){super()}*apply(a,u){U(a)=="array"?yield*a:yield*Object.values(a)}*paths(a,u){if(U(a)=="array")for(let s=0;s<a.length;s++)yield[s];else for(let s of Object.keys(a))yield[s]}toString(){return".[]"}}class Bp extends rt{constructor(a){super(),this.branches=a}*apply(a,u){for(let s of this.branches)yield*s.apply(a,u)}*paths(a,u){for(let s of this.branches)yield*s.paths(a,u)}toString(){return this.branches.join(", ")}}class vb extends rt{constructor(a){super(),this.body=a}*apply(a,u){yield Array.from(this.body.apply(a,u))}toString(){return"["+this.body+"]"}}class xb extends rt{constructor(a,u){super(),this.lhs=a,this.rhs=u,this.isPipe=!0}toString(){return`${this.lhs} | ${this.rhs}`}*apply(a,u){for(let s of this.lhs.apply(a,u))for(let c of this.rhs.apply(s,u))yield c}*paths(a,u){for(let[s,c]of this.zip(this.lhs.paths(a,u),this.lhs.apply(a,u)))for(let f of this.rhs.paths(c,u))yield s.concat(f)}*zip(a,u){let s=a[Symbol.iterator](),c=u[Symbol.iterator](),f=s.next(),d=c.next();for(;!f.done&&!d.done;)yield[f.value,d.value],f=s.next(),d=c.next()}trace(a,u,s){for(let c of this.lhs.apply(a,u)){let f=[],d={};this.lhs instanceof gg&&(d.variableValue=u.variables[this.lhs.name]),s.push({node:this.lhs,output:c,next:f,variables:JSON.parse(JSON.stringify(u.variables)),...d}),this.rhs.trace(c,u,f)}}}class Sb extends rt{constructor(a){super(),this.fields=a}*apply(a,u){let s={},c=[];for(let{key:f,value:d}of this.fields)for(let g of f.apply(a,u)){c.push(g),s[g]=[];for(let p of d.apply(a,u))s[g].push(p)}yield*this.helper(c,s,0,{})}*helper(a,u,s,c){if(s>=a.length){yield Object.assign({},c);return}let f=a[s];for(let d of u[f])c[f]=d,yield*this.helper(a,u,s+1,c)}toString(){return"{"+this.fields.map(({key:a,value:u})=>a.toString()+": "+u.toString()).join(", ")+"}"}}class _b extends rt{constructor(){super()}*apply(a,u){yield*this.recurse(a)}*recurse(a){yield a;let u=U(a);if(u=="array"||u=="object")for(let s of Object.values(a))yield*this.recurse(s)}*paths(a,u){yield*this.recursePaths(a,[])}*recursePaths(a,u){yield u;let s=U(a);if(s=="array")for(let c=0;c<a.length;c++)yield*this.recursePaths(a[c],u.concat([c]));else if(s=="object")for(let[c,f]of Object.entries(a))yield*this.recursePaths(f,u.concat([c]))}toString(){return".."}}class Xl extends rt{constructor(a,u){super(),this.l=a,this.r=u}*apply(a,u){for(let s of this.r.apply(a,u))for(let c of this.l.apply(a,u))yield this.combine(c,s,U(c),U(s))}trace(a,u,s){for(let c of this.l.apply(a,u)){let f=[];s.push({node:this.l,output:c,next:f,subsidiary:"left"});for(let d of this.r.apply(a,u)){let g=[];f.push({node:this.r,output:d,next:g,subsidiary:"right"});let p=this.combine(c,d,U(c),U(d)),y=[];g.push({node:this,output:p,next:y})}}}}class Bs extends Xl{constructor(a,u){super(a,u)}combine(a,u,s,c){if(s=="number"&&c=="number")return a+u;if(a===null)return u;if(u===null)return a;if(s=="string"&&c=="string")return a+u;if(s=="array"&&c=="array")return a.concat(u);if(s=="object"&&c=="object")return Object.assign(Object.assign({},a),u);throw"type mismatch in +:"+s+" and "+c+" cannot be added"}toString(){return this.l+" + "+this.r}}class Eb extends Xl{constructor(a,u){super(a,u)}combine(a,u,s,c){if(s=="number"&&c=="number")return a*u;if(s=="number"&&c=="string")return this.repeat(u,a);if(s=="string"&&c=="number")return this.repeat(a,u);if(s=="object"&&c=="object")return this.merge(Object.assign({},a),u);throw"type mismatch in *:"+s+" and "+c+" cannot be multiplied"}repeat(a,u){if(u==0)return null;let s=[];for(let c=0;c<u;c++)s.push(a);return s.join("")}merge(a,u){for(let s of Object.keys(u))a.hasOwnProperty(s)?U(a[s])!="object"||U(u[s])!="object"?a[s]=u[s]:this.merge(a[s],u[s]):a[s]=u[s];return a}toString(){return this.l+" * "+this.r}}class Ab extends Xl{constructor(a,u){super(a,u)}combine(a,u,s,c){if(s=="number"&&c=="number")return a-u;if(a==null||u==null)throw"type mismatch in -";if(s=="array"&&c=="array")return a.filter(f=>u.indexOf(f)==-1);throw"type mismatch in -:"+s+" and "+c+" cannot be subtracted"}toString(){return this.l+" - "+this.r}}class Tb extends Xl{constructor(a,u){super(a,u)}combine(a,u,s,c){if(s=="number"&&c=="number")return a/u;if(s=="string"&&c=="string")return a.split(u);throw"type mismatch in -:"+s+" and "+c+" cannot be divided"}toString(){return this.l+" / "+this.r}}class jb extends Xl{constructor(a,u){super(a,u)}combine(a,u,s,c){if(s=="number"&&c=="number")return a%u;throw"type mismatch in -:"+s+" and "+c+" cannot be divided (remainder)"}toString(){return this.l+" % "+this.r}}class Ob extends Xl{constructor(a,u){super(a,u)}combine(a,u,s,c){return _l(a,u)<0}toString(){return this.l+" < "+this.r}}class Nb extends Xl{constructor(a,u){super(a,u)}combine(a,u,s,c){return _l(a,u)>0}toString(){return this.l+" > "+this.r}}class Mb extends Xl{constructor(a,u){super(a,u)}combine(a,u,s,c){return _l(a,u)<=0}toString(){return this.l+" <= "+this.r}}class Rb extends Xl{constructor(a,u){super(a,u)}combine(a,u,s,c){return _l(a,u)>=0}toString(){return this.l+" >= "+this.r}}class pg extends Xl{constructor(a,u){super(a,u)}combine(a,u,s,c){if(s!=c)return!1;if(s=="number"||s=="string"||s=="boolean"||s=="null")return a==u;if(s=="array"){if(a.length!=u.length)return!1;for(let g=0;g<a.length;g++)if(!this.combine(a[g],u[g],U(a[g]),U(u[g])))return!1;return!0}let f=Object.keys(a),d=Object.keys(u);if(f.length!=d.length)return!1;for(let g of f)if(!u.hasOwnProperty(g)||!this.combine(a[g],u[g],U(a[g]),U(u[g])))return!1;return!0}toString(){return this.l+" == "+this.r}}class Cb extends pg{constructor(a,u){super(a,u)}combine(a,u,s,c){return!super.combine(a,u,s,c)}toString(){return this.l+" != "+this.r}}class zb extends rt{constructor(a,u){super(),this.lhs=a,this.rhs=u}*apply(a,u){let s=!1;for(let c of this.lhs.apply(a,u))c!==null&&(s=!0),yield c;s||(yield*this.rhs.apply(a,u))}toString(){return this.l+" // "+this.r}}class Up extends rt{constructor(a,u){super(),this.l=a,this.r=u}*apply(a,u){a=JSON.parse(JSON.stringify(a));for(let s of this.l.paths(a,u)){let c=this.r.apply(this.get(a,s),u).next();c.done?a=this.update(a,s,null,!0):a=this.update(a,s,c.value)}yield a}get(a,u){let s=a;for(let c of u)s=s[c];return s}update(a,u,s,c=!1){let f=a,d=u.pop();for(let g of u)f=f[g];return typeof d>"u"?s:(f[d]=s,c&&delete f[d],a)}toString(){return this.l+" |= "+this.r}}class wb extends rt{constructor(a,u){super(),this.name=a,this.args=u}apply(a,u){let s,c=u.userFuncArgs[this.name];if(c?s=function(f,d,g){return c.apply(f,d)}:s||(s=yn[this.name]),!s)throw"no such function "+this.name;return s(a,u,this.args)}paths(a,u){let s=u.userFuncArgs[this.name];if(s)return s.paths(a,u);let c=yn[this.name+"-paths"];if(!c)throw"no paths for "+this.name;return c(a,u,this.args)}trace(a,u,s){if(this.args.length==1&&!u.userFuncArgs[this.name]&&this.ordinary){let c=yn[this.name];if(c.params&&c.params.length>0&&c.params[0].mode=="defer")return super.trace(a,u,s);for(let f of this.args[0].apply(a,u)){let d=[],g="arg1";c.params&&c.params.length>0&&c.params[0].label&&(g=c.params[0].label),s.push({node:this.args[0],output:f,next:d,subsidiary:g});for(let p of c(a,u,[new qb(f)])){let y=[];d.push({node:this,output:p,next:y})}}}else return super.trace(a,u,s)}get ordinary(){let a=yn[this.name];return a?!(a.params&&a.params.length>0&&a.params[0].mode=="defer"):!0}toString(){return this.args.length==0?this.name.replace(/\/.*$/,""):this.name.replace(/\/.*$/,"")+"("+this.args.join("; ")+")"}}class Db extends rt{constructor(a,u){super(),this.name=a,this.string=u}*apply(a,u){if(typeof this.string>"u")return yield gu[this.name](a);yield*this.string.applyEscape(a,gu[this.name],u)}toString(){return this.string?"@"+this.name+" "+this.string:"@"+this.name}}class kb extends rt{constructor(a){super(),this.inner=a}*apply(a,u){try{for(let s of this.inner.apply(a,u))s!==null&&(yield s)}catch{}}*paths(a,u){try{for(let[s,c]of ro(this.inner.apply(a,u),this.inner.paths(a,u)))s!==null&&(yield c)}catch{}}toString(){return this.inner+"?"}}class gg extends rt{constructor(a,u){super(),this.value=a,this.name=u}*apply(a,u){for(let s of this.value.apply(a,u))u.variables[this.name]=s,yield a;delete u.variables[this.name]}toString(){return this.value+" as $"+this.name}}class mg extends rt{constructor(a){super(),this.name=a}*apply(a,u){yield u.variables[this.name]}toString(){return"$"+this.name}}class Bb extends rt{constructor(a,u,s,c){super(),this.generator=a,this.name=u,this.init=s,this.expr=c}*apply(a,u){for(let s of this.init.apply(a,u)){for(let c of this.generator.apply(a,u)){u.variables[this.name]=c;for(let f of this.expr.apply(s,u))s=f}delete u.variables[this.name],yield s}}toString(){return"reduce "+this.generator+" as $"+this.name+"("+this.init+"; "+this.expr+")"}}class Ub extends rt{constructor(a,u,s){super(),this.conditions=a,this.thens=u,this.elseBranch=s}*apply(a,u){for(let[s,c]of ro(this.conditions,this.thens))for(let f of s.apply(a,u))if(f){for(let d of c.apply(a,u))yield d;return}if(this.elseBranch){yield*this.elseBranch.apply(a,u);return}yield a}toString(){let a="";for(let[u,s]of ro(this.conditions,this.thens))a+="if "+u+" then "+s+" el";return this.elseBranch?a+"se "+this.elseBranch+" end":a.slice(0,-2)+"end"}}class qb{constructor(a){this.value=a}*apply(a,u){yield this.value}toString(){return this.value.toString()}}const gu={text(i){return typeof i=="string"?i:Gl(i,"","","")},json(i){return Gl(i,"","","")},html(i){return typeof i!="string"&&(i=Gl(i,"","","")),i.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;")},uri(i){return typeof i!="string"&&(i=Gl(i,"","","")),encodeURIComponent(i)},urid(i){return typeof i!="string"&&(i=Gl(i,"","","")),decodeURIComponent(i)},csv(i){if(U(i)!="array")throw"cannot csv-format "+U(i)+", only array";return i.map(a=>{if(typeof a=="string")return'"'+a.replace(/"/g,'""')+'"';if(typeof a=="number")return""+a;if(a===null)return"";throw"type "+U(a)+" not valid in a csv row"}).join(",")},tsv(i){if(U(i)!="array")throw"cannot tsv-format "+U(i)+", only array";return i.map(a=>{if(typeof a=="string")return cg(a);if(typeof a=="number")return""+a;if(a===null)return"";throw"type "+U(a)+" not valid in a tsv row"}).join(" ")},base64(i){return typeof i!="string"&&(i=Gl(i,"","","")),btoa(i)},base64d(i){if(typeof i!="string")throw"can only base64-decode strings";return atob(i)},sh(i){let a=U(i);if(a=="string")return"'"+a.replace(/'/g,"'\\''")+"'";if(a=="number")return""+i;if(a=="boolean")return""+i;if(i===null)return"null";if(a==="array")return i.map(u=>{let s=U(u);if(s=="string")return"'"+u.replace(/'/g,"'\\''")+"'";if(s=="number")return""+u;if(s=="boolean")return""+u;if(u===null)return"null";throw s+" cannot be escaped for shell"}).join(" ");throw a+" cannot be escaped for shell"}},yn={"tostring/0":function*(i){yield gu.text(i)},"empty/0":function*(i){},"fromjson/0":function*(i){yield JSON.parse(i)},"path/1":Object.assign(function*(i,a,u){yield*u[0].paths(i,a)},{params:[{mode:"defer"}]}),"select/1":Object.assign(function*(i,a,u){let s=u[0];for(let c of s.apply(i,a))c!==!1&&c!==null&&(yield i)},{params:[{label:"predicate",mode:"eval"}]}),"select/1-paths":function*(i,a,u){let s=u[0];for(let c of s.apply(i,a))c!==!1&&c!==null&&(yield[])},"length/0":function*(i){let a=U(i);if(a=="string"||a=="array")return yield i.length;if(a=="null")return yield 0;if(a=="object")return yield Object.keys(i).length;throw"cannot compute length of "+a},"keys/0":function*(i){yield*Object.keys(i).sort()},"has/1":Object.assign(function*(i,a,u){let s=u[0];for(let c of s.apply(i,a))yield i.hasOwnProperty(c)},{params:[{label:"key"}]}),"has/1-paths":function*(i,a,u){let s=u[0];for(let c of s.apply(i,a))i.hasOwnProperty(c)&&(yield[])},"in/1":Object.assign(function*(i,a,u){let s=u[0];for(let c of s.apply(i,a))yield c.hasOwnProperty(i)},{params:[{label:"object"}]}),"in/1-paths":function*(i,a,u){let s=u[0];for(let c of s.apply(i,a))c.hasOwnProperty(i)&&(yield[])},"contains/1":Object.assign(function*(i,a,u){let s=u[0],c=U(i);for(let f of s.apply(i,a)){let d=U(f);if(c!=d)throw c+" and "+d+" cannot have their containment checked";yield Ls(i,f)}},{params:[{label:"element"}]}),"inside/1":Object.assign(function*(i,a,u){let s=u[0],c=U(i);for(let f of s.apply(i,a)){let d=U(f);if(c!=d)throw c+" and "+d+" cannot have their containment checked";yield Ls(f,i)}},{params:[{label:"container"}]}),"to_entries/0":function*(i,a){let u=U(i);if(u=="array"){let s=[];for(let c=0;c<i.length;c++)s.push({key:c,value:i[c]});yield s}else if(u=="object")yield Object.entries(i).map(s=>({key:s[0],value:s[1]}));else throw"cannot make entries from "+u},"from_entries/0":function*(i,a){let u=U(i);if(u=="array"){let s={};for(let{key:c,value:f}of i)s[c]=f;yield s}else throw"cannot use entries from "+u},"type/0":function*(i){yield U(i)},"range/1":Object.assign(function*(i,a,u){for(let s of u[0].apply(i,a))for(let c=0;c<s;c++)yield c},{params:[{mode:"defer"}]}),"range/2":function*(i,a,u){for(let s of u[0].apply(i,a))for(let c of u[1].apply(i,a))for(let f=s;f<c;f++)yield f},"range/3":function*(i,a,u){for(let s of u[0].apply(i,a))for(let c of u[1].apply(i,a))for(let f of u[2].apply(i,a))for(let d=s;d<c;d+=f)yield d},"any/0":function*(i,a){if(U(i)!="array")throw"any/0 requires array as input, not "+U(i);for(let u of i)if(u)return yield!0;yield!1},"any/1":Object.assign(function*(i,a,u){if(U(i)!="array")throw"any/1 requires array as input, not "+U(i);for(let s of i)for(let c of u[0].apply(s,a))if(c)return yield!0;yield!1},{params:[{mode:"defer"}]}),"any/2":function*(i,a,u){let s=u[0],c=u[1];for(let f of s.apply(i,a))for(let d of c.apply(f,a))if(d)return yield!0;yield!1},"all/0":function*(i,a){if(U(i)!="array")throw"all/0 requires array as input, not "+U(i);for(let u of i)if(!u)return yield!1;yield!0},"all/1":Object.assign(function*(i,a,u){if(U(i)!="array")throw"all/1 requires array as input, not "+U(i);for(let s of i)for(let c of u[0].apply(s,a))if(!c)return yield!1;yield!0},{params:[{mode:"defer"}]}),"all/2":function*(i,a,u){let s=u[0],c=u[1];for(let f of s.apply(i,a))for(let d of c.apply(f,a))if(!d)return yield!1;yield!0},"add/0":function*(i,a){if(U(i)!="array")throw"can only add up arrays";if(i.length==0)return yield null;if(i.length==1)return yield i[0];let u=Bs.prototype.combine(i[0],i[1],U(i[0]),U(i[1]));for(let s=2;s<i.length;s++)u=Bs.prototype.combine(u,i[s],U(u),U(i[s]));yield u},"add/1":Object.assign(function*(i,a,u){let s=null;for(let c of u[0].apply(i,a))s=Bs.prototype.combine(s,c,U(s),U(c));yield s},{params:[{label:"source"}]}),"tonumber/0":function*(i){yield Number.parseFloat(i)},"toboolean/0":function*(i){if(i==="false"||i===!1)yield!1;else if(i==="true"||i===!0)yield!0;else throw`cannot convert ${U(i)} (${Gl(i)}) to boolean`},"tojson/0":function*(i){yield JSON.stringify(i)},"fromjson/0":function*(i){yield JSON.parse(i)},"reverse/0":function*(i){if(U(i)!="array")throw"can only reverse arrays, not "+U(i);yield i.toReversed()},"sort/0":function*(i,a){if(U(i)!="array")throw"can only sort arrays, not "+U(i);yield Array.from(i).sort(_l)},"sort_by/1":Object.assign(function*(i,a,u){if(U(i)!="array")throw"can only sort arrays, not "+U(i);let s=u[0],c=i.map(f=>({key:s.apply(f,a).next().value,value:f}));c.sort((f,d)=>_l(f.key,d.key)),yield c.map(f=>f.value)},{params:[{mode:"defer"}]}),"explode/0":function*(i,a){if(U(i)!="string")throw"can only explode string, not "+U(i);let u=[];for(let s=0;s<i.length;s++){let c=i.charCodeAt(s);u.push(c),c>65535&&s++}yield u},"implode/0":function*(i,a){if(U(i)!="array")throw"can only implode array, not "+U(i);yield i.map(u=>String.fromCodePoint(u)).join("")},"split/1":Object.assign(function*(i,a,u){if(U(i)!="string")throw"can only split string, not "+U(i);for(let s of u[0].apply(i,a))yield i.split(s)},{params:[{label:"separator"}]}),"split/2":Object.assign(function*(i,a,u){if(U(i)!="string")throw"can only split string, not "+U(i);let s=u[1]?u[1].apply(i,a).next().value:"";s=oi(s);for(let c of u[0].apply(i,a)){let f=new RegExp(c,s);yield i.split(f)}},{params:[{label:"regex"},{label:"flags"}]}),"splits/1":Object.assign(function*(i,a,u){if(U(i)!="string")throw"can only split string, not "+U(i);for(let s of u[0].apply(i,a)){let c=new RegExp(s,"u");yield*i.split(c)}},{params:[{label:"regex"},{label:"flags"}]}),"splits/2":Object.assign(function*(i,a,u){if(U(i)!="string")throw"can only split string, not "+U(i);let s=u[1]?u[1].apply(i,a).next().value:"";s=oi(s);for(let c of u[0].apply(i,a)){let f=new RegExp(c,s);yield*i.split(f)}},{params:[{label:"regex"},{label:"flags"}]}),"join/1":Object.assign(function*(i,a,u){if(U(i)!="array")throw"can only join array, not "+U(i);let s=i.map(c=>{if(typeof c=="number")return""+c;if(typeof c=="string")return c;if(typeof c=="boolean")return""+c;if(c===null)return"";throw"cannot join "+U(c)});for(let c of u[0].apply(i,a))yield s.join(c)},{params:[{label:"delimiter"}]}),"getpath/1":Object.assign(function*(i,a,u){if(U(i)!="object"&&U(i)!="array")throw"can only get path from objects and arrays, not "+U(i);for(let s of u[0].apply(i,a)){let c=i;for(let f of s)if(c.hasOwnProperty(f))c=c[f];else{c=null;break}yield c}},{params:[{label:"paths"}]}),"setpath/2":Object.assign(function*(i,a,u){if(U(i)!="object"&&U(i)!="array"&&U(i)!="null")throw"can only set path on objects and arrays, not "+U(i);for(let s of u[0].apply(i,a)){let c=JSON.parse(JSON.stringify(i)),f=c;for(let d of s.slice(0,-1))c===null?U(d)=="number"?(c=[],f=c):(c={},f=c):f.hasOwnProperty(d)||(U(d)=="number"?f[d]=[]:f[d]={}),f=f[d];for(let d of u[1].apply(i,a)){let g=s[s.length-1];c===null?U(g)=="number"?(c=[],f=c):(c={},f=c):f.hasOwnProperty(g)||(U(g)=="number"?f=[]:f={}),f[g]=d}yield c}},{params:[{label:"paths"},{label:"value"}]}),"delpaths/1":Object.assign(function*(i,a,u){if(U(i)!="object"&&U(i)!="array")throw"can only delete paths from objects and arrays, not "+U(i);for(let s of u[0].apply(i,a)){let c=JSON.parse(JSON.stringify(i));for(let f of s){let d=c;for(let g of f.slice(0,-1))d.hasOwnProperty(g)||(d[g]={}),d=d[g];delete d[f[f.length-1]]}yield c}},{params:[{label:"paths"}]}),"ltrim/0":Object.assign(function*(i,a){if(U(i)!="string")throw"can only trim strings, not "+U(i);yield i.trimLeft()},{params:[]}),"rtrim/0":Object.assign(function*(i,a){if(U(i)!="string")throw"can only trim strings, not "+U(i);yield i.trimRight()},{params:[]}),"trim/0":Object.assign(function*(i,a){if(U(i)!="string")throw"can only trim strings, not "+U(i);yield i.trim()},{params:[]}),"trimstr/1":Object.assign(function*(i,a,u){if(U(i)!="string")throw"can only trim strings, not "+U(i);for(let s of u[0].apply(i,a)){let c=i;c.startsWith(s)&&(c=c.slice(s.length)),c.endsWith(s)&&(c=c.slice(0,-s.length)),yield c}},{params:[{label:"str"}]}),"ltrimstr/1":Object.assign(function*(i,a,u){if(U(i)!="string")throw"can only trim strings, not "+U(i);for(let s of u[0].apply(i,a)){let c=i;c.startsWith(s)&&(c=c.slice(s.length)),yield c}},{params:[{label:"str"}]}),"rtrimstr/1":Object.assign(function*(i,a,u){if(U(i)!="string")throw"can only trim strings, not "+U(i);for(let s of u[0].apply(i,a)){let c=i;c.endsWith(s)&&(c=c.slice(0,-s.length)),yield c}},{params:[{label:"str"}]}),"first/0":function*(i,a){if(U(i)!="array")throw"can only get first element of arrays, not "+U(i);if(i.length==0)return yield null;yield i[0]},"last/0":Object.assign(function*(i,a){if(U(i)!="array")throw"can only get last element of arrays, not "+U(i);if(i.length==0)return yield null;yield i[i.length-1]},{params:[]}),"nth/1":Object.assign(function*(i,a,u){if(U(i)!="array")throw"can only get nth element of arrays, not "+U(i);if(i.length==0)return yield null;for(let s of u[0].apply(i,a)){if(U(s)!="number")throw"nth index must be a number, not "+U(s);if(s<0)throw"negative indices not supported for nth";yield i[s]}},{params:[{label:"index"}]}),"first/1":Object.assign(function*(i,a,u){for(let s of u[0].apply(i,a))return yield s},{params:[{label:"generator"}]}),"last/1":Object.assign(function*(i,a,u){let s=null;for(let c of u[0].apply(i,a))s=c;yield s},{params:[{label:"generator"}]}),"limit/2":Object.assign(function*(i,a,u){for(let s of u[0].apply(i,a)){let c=0;for(let f of u[1].apply(i,a)){if(c>=s)break;yield f,c++}}},{params:[{label:"n"},{label:"expr"}]}),"skip/2":Object.assign(function*(i,a,u){for(let s of u[0].apply(i,a)){let c=0;for(let f of u[1].apply(i,a))c>=s&&(yield f),c++}},{params:[{label:"n"},{label:"expr"}]}),"walk/1":Object.assign(function*(i,a,u){yield*oo(i,a,u[0])},{params:[{label:"generator"}]}),"ascii_upcase/0":function*(i,a){if(U(i)!="string")throw"can only convert strings to uppercase, not "+U(i);yield i.replace(/./g,u=>u.charCodeAt(0)>=97&&u.charCodeAt(0)<=122?u.toUpperCase():u)},"ascii_downcase/0":function*(i,a){if(U(i)!="string")throw"can only convert strings to lowercase, not "+U(i);yield i.replace(/./g,u=>u.charCodeAt(0)>=65&&u.charCodeAt(0)<=90?u.toLowerCase():u)},"sub/2":Object.assign(function*(i,a,u){yield*Ds(i,a,u[0],u[1])},{params:[{label:"regex"},{label:"tostring"}]}),"sub/3":Object.assign(function*(i,a,u){let s=u[2].apply(i,a).next().value||"";yield*Ds(i,a,u[0],u[1],s)},{params:[{label:"regex"},{label:"tostring"},{label:"flags"}]}),"gsub/2":Object.assign(function*(i,a,u){return yield*Ds(i,a,u[0],u[1],"g")},{params:[{label:"regex"},{label:"tostring"}]}),"gsub/3":Object.assign(function*(i,a,u){let s=u[2].apply(i,a).next().value||"g";yield*Ds(i,a,u[0],u[1],s)},{params:[{label:"regex"},{label:"tostring"},{label:"flags"}]}),"test/1":Object.assign(function*(i,a,u){for(let s of u[0].apply(i,a))yield new RegExp(s,"u").test(i)},{params:[{label:"regex"}]}),"test/2":Object.assign(function*(i,a,u){let s=u[0].apply(i,a).next().value||"";for(let c of u[0].apply(i,a))yield new RegExp(c,oi(s)).test(i)},{params:[{label:"regex"},{label:"flags"}]}),"capture/1":Object.assign(function*(i,a,u){for(let s of u[0].apply(i,a)){let f=new RegExp(s,"u").exec(i);f&&(yield f.groups)}},{params:[{label:"regex"}]}),"capture/2":Object.assign(function*(i,a,u){let s=u[1].apply(i,a).next().value||"";s=oi(s);for(let c of u[0].apply(i,a)){let d=new RegExp(c,s).exec(i);d&&(yield d.groups)}},{params:[{label:"regex"},{label:"flags"}]}),"match/1":Object.assign(function*(i,a,u){let s="u";u[1]&&(s=oi(u[1].apply(i,a).next().value||"")),s+="d";let c=s.indexOf("g")>=0,f=0;for(let d of u[0].apply(i,a)){let g=new RegExp(d,s),p=g.exec(i);for(;p;){let y={offset:p.index,length:p[0].length,string:p[0],captures:[]};for(let v=1;v<p.length;v++){if(!p.indices[v])continue;let A=null;if(p.indices.groups){for(let[w,D]of Object.entries(p.indices.groups))if(p.indices[v][0]==D[0]&&p.indices[v][1]==D[1]){A=w;break}}y.captures.push({offset:p.indices[v][0],length:p[v].length,string:p[v],name:A})}if(yield y,p=g.exec(i),f++>1e3||!c)break}}},{params:[{label:"regex"}]})};yn["match/2"]=yn["match/1"];function*Ds(i,a,u,s,c=""){c=oi(c);for(let f of u.apply(i,a)){let d=new RegExp(f,c),g,p=0,y=[];for(;(g=d.exec(i))&&(y.push(i.slice(p,g.index)),y.push(g.groups),p=g.index+g[0].length,!(c.indexOf("g")<0)););if(y.length==0)return yield i;let v=i.slice(p),A=[];for(let D=0;D<y.length;D+=2){let V=y[D],Q=y[D+1],Z=[];A.push(Z);for(let J of s.apply(Q,a))Z.push(V+J)}let w=0;for(;;){let D="",V=!1;for(let Q=0;Q<A.length;Q++)typeof A[Q][w]<"u"&&(V=!0),D+=A[Q][w]??"";if(!V||(D+=v,yield D,w++,w>1e3))break}}}function oi(i){let a=["u"];if(i===null)return"u";for(let u of i)if(u=="g"||u=="i"||u=="m"||u=="s")a.push(u);else if(u=="p")a.push("s","m");else throw u=="x"||u=="l"||u=="n"?`jqjs does not have support for regex flag '${u}'`:`Invalid flag '${u}' in regex substitution`;return a.join("")}function*oo(i,a,u){if(U(i)=="array"){let s=[];for(let c of i)s.push(...oo(c,a,u));return yield*u.apply(s,a)}else if(U(i)=="object"){let s={};for(let c of Object.keys(i))for(let f of oo(i[c],a,u)){s[c]=f;break}return yield*u.apply(s,a)}yield*u.apply(i,a)}function Ls(i,a){let u=U(i),s=U(a);if(u!=s)return!1;if(u=="string")return i.indexOf(a)!=-1;if(u=="array"){for(let c of a){let f=!1;for(let d of i)if(Ls(d,c)){f=!0;break}if(!f)return!1}return!0}else if(u=="object"){for(let c of Object.keys(a))if(!i.hasOwnProperty(c)||!Ls(i[c],a[c]))return!1;return!0}else return i===a}Ml("map","f","[.[] | f]");Ml("map_values","f",".[] |= f");Ml("del","p","p |= empty");Ml("with_entries","w","to_entries | map(w) | from_entries");Ml("arrays","",'select(type == "array")');Ml("objects","",'select(type == "object")');Ml("booleans","",'select(type == "boolean")');Ml("strings","",'select(type == "string")');Ml("numbers","",'select(type == "number")');Ml("nulls","",'select(type == "null")');Ml("pick",["pathexps"],". as $in | reduce path(pathexps) as $a (null; setpath($a; $in|getpath($a)) )");function Hb(i,a){let u=rg(i);return typeof a<"u"?u(a):u}const Lb=Object.assign(Hb,{compile:rg,prettyPrint:Gl});Zs.registerLanguage("json",rb);Zs.registerLanguage("xml",cb);Zs.registerLanguage("plaintext",ob);const qp=5*1024*1024;function Gb(i){return i?i.includes("json")?"json":i.includes("xml")||i.includes("html")?"xml":"plaintext":"plaintext"}function Yb({body:i,contentType:a,wrapEnabled:u,onToggleWrap:s}){const c=z.useRef(null),[f,d]=z.useState(!1),[g,p]=z.useState(""),y=z.useRef(null),v=z.useMemo(()=>Gb(a),[a]),A=v==="json",w=z.useMemo(()=>{if(!A||!i)return null;try{return JSON.parse(i)}catch{return null}},[i,A]),{displayBody:D,truncated:V,filterError:Q}=z.useMemo(()=>{let J=i||"",ce=!1,le=null;if(J.length>qp&&(J=J.slice(0,qp),ce=!0),A)try{const ve=JSON.parse(J);J=JSON.stringify(ve,null,2)}catch{}if(g.trim()&&w!==null)try{const ee=[...Lb.compile(g.trim())(w)];ee.length===1?J=typeof ee[0]=="string"?ee[0]:JSON.stringify(ee[0],null,2):J=ee.map(re=>typeof re=="string"?JSON.stringify(re):JSON.stringify(re,null,2)).join(`
74
+ `)}catch(ve){le=ve.message}return{displayBody:J,truncated:ce,filterError:le}},[i,A,g,w]);z.useEffect(()=>{if(c.current&&D)try{const J=g.trim()&&!Q?"json":v,ce=Zs.highlight(D,{language:J});c.current.innerHTML=ce.value}catch{c.current.textContent=D}},[D,v,g,Q]);const Z=z.useCallback(async()=>{const J=D||i||"";try{await navigator.clipboard.writeText(J),d(!0),setTimeout(()=>d(!1),1500)}catch{const ce=document.createElement("textarea");ce.value=J,document.body.appendChild(ce),ce.select(),document.execCommand("copy"),document.body.removeChild(ce),d(!0),setTimeout(()=>d(!1),1500)}},[D,i]);return i?b.jsxs("div",{children:[b.jsxs("div",{className:"body-view__toolbar",children:[A&&b.jsxs("div",{className:"body-view__filter-group",children:[b.jsx("input",{ref:y,className:`body-view__filter${Q?" body-view__filter--error":g.trim()?" body-view__filter--active":""}`,type:"text",placeholder:"jq filter, e.g. .data[0].name",value:g,onChange:J=>p(J.target.value),spellCheck:!1}),g&&b.jsx("button",{className:"body-view__filter-clear",onClick:()=>{p(""),y.current?.focus()},title:"Clear filter",children:"x"})]}),b.jsx("button",{className:`body-view__btn${u?" body-view__btn--active":""}`,onClick:s,children:"Wrap"}),b.jsx("button",{className:"body-view__btn",onClick:Z,children:f?"Copied!":"Copy"})]}),Q&&b.jsx("div",{className:"body-view__filter-error",children:Q}),b.jsx("pre",{className:`body-view__pre ${u?"body-view__pre--wrap":"body-view__pre--nowrap"}`,children:b.jsx("code",{ref:c,children:D})}),V&&b.jsx("div",{style:{color:"var(--method-put)",fontSize:"12px",marginTop:"8px"},children:"Response truncated at 5MB. Full response available in verbose view."})]}):b.jsx("div",{style:{color:"var(--fg-muted)"},children:"No response body"})}function Hp({headers:i}){if(!i)return null;const a=Array.isArray(i)?i:Object.entries(i).map(([u,s])=>({name:u,value:s}));return a.length===0?null:b.jsxs("table",{className:"headers-view__table",children:[b.jsx("thead",{children:b.jsxs("tr",{children:[b.jsx("th",{children:"Header"}),b.jsx("th",{children:"Value"})]})}),b.jsx("tbody",{children:a.map((u,s)=>{const c=u.name||u[0]||"",f=u.value||u[1]||"";return b.jsxs("tr",{children:[b.jsx("td",{children:c}),b.jsx("td",{children:String(f)})]},`${c}-${s}`)})})]})}function Xb({responseHeaders:i,requestHeaders:a}){const[u,s]=z.useState(!1);return b.jsxs("div",{children:[b.jsx(Hp,{headers:i}),a&&b.jsxs("div",{children:[b.jsxs("div",{className:"headers-view__section-title",onClick:()=>s(c=>!c),children:[u?"▼":"▶"," Request Headers"]}),u&&b.jsx(Hp,{headers:a})]}),!i&&!a&&b.jsx("div",{style:{color:"var(--fg-muted)"},children:"No headers available"})]})}function Qb(i){return i.startsWith("* ")?"verbose-view__line--comment":i.startsWith("> ")?"verbose-view__line--request":i.startsWith("< ")?"verbose-view__line--response":"verbose-view__line--other"}function Zb({verbose:i}){const a=z.useMemo(()=>i?i.split(`
75
+ `):[],[i]);return i?b.jsx("div",{className:"verbose-view",children:a.map((u,s)=>b.jsx("div",{className:Qb(u),children:u||" "},s))}):b.jsx("div",{style:{color:"var(--fg-muted)"},children:"No verbose output available"})}function Vb({curlCommand:i}){const[a,u]=z.useState(!1),s=z.useCallback(async()=>{if(i)try{await navigator.clipboard.writeText(i),u(!0),setTimeout(()=>u(!1),1500)}catch{const c=document.createElement("textarea");c.value=i,document.body.appendChild(c),c.select(),document.execCommand("copy"),document.body.removeChild(c),u(!0),setTimeout(()=>u(!1),1500)}},[i]);return i?b.jsxs("div",{className:"curl-view",children:[b.jsx("button",{className:"copy-btn curl-view__copy-btn",onClick:s,children:a?"Copied!":"Copy"}),b.jsx("pre",{className:"curl-view__pre",children:b.jsx("code",{children:i})})]}):b.jsx("div",{style:{color:"var(--fg-muted)"},children:"No curl command available"})}function Kb({validation:i,expanded:a,onToggle:u}){if(!i)return b.jsx("span",{className:"validation-details",children:b.jsx("span",{className:"validation-details__indicator--none",children:"—"})});const{valid:s,errors:c}=i;return b.jsxs("div",{children:[b.jsx("span",{className:"validation-details",onClick:u,children:s?b.jsxs("span",{className:"validation-details__indicator--valid",children:["✓"," Valid"]}):b.jsxs("span",{className:"validation-details__indicator--invalid",children:["✗"," ",(c||[]).length," error(s)"]})}),a&&!s&&c&&c.length>0&&b.jsx("div",{className:"validation-details__errors",children:c.map((f,d)=>b.jsxs("div",{className:"validation-details__error",children:[f.path&&b.jsx("div",{className:"validation-details__error-path",children:f.path}),b.jsx("div",{className:"validation-details__error-msg",children:f.message||"Validation error"}),(f.expected||f.actual)&&b.jsxs("div",{className:"validation-details__error-detail",children:[f.expected&&b.jsxs(b.Fragment,{children:["Expected: ",String(f.expected)," "]}),f.actual&&b.jsxs(b.Fragment,{children:["Actual: ",String(f.actual)]})]})]},d))})]})}function Lp(i){if(!i)return"";const a=Number(i);return a>=200&&a<300?"response-panel__status--2xx":a>=300&&a<400?"response-panel__status--3xx":a>=400&&a<500?"response-panel__status--4xx":a>=500?"response-panel__status--5xx":""}function Jb(i){return i==null?"":i<1024?`${i} B`:i<1048576?`${(i/1024).toFixed(1)} KB`:`${(i/1048576).toFixed(2)} MB`}function $b(i){if(!i)return"";const a=Date.now()-new Date(i).getTime(),u=Math.floor(a/1e3);if(u<60)return`${u}s ago`;const s=Math.floor(u/60);if(s<60)return`${s}m ago`;const c=Math.floor(s/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function Fb({response:i,sending:a,history:u=[],onSelectHistoryEntry:s,onClearHistory:c}){const[f,d]=z.useState("body"),[g,p]=z.useState(!0),[y,v]=z.useState(null),[A,w]=z.useState(!1),D=z.useRef(null);if(z.useEffect(()=>{if(!A)return;function Q(Z){D.current&&!D.current.contains(Z.target)&&w(!1)}return document.addEventListener("mousedown",Q),()=>document.removeEventListener("mousedown",Q)},[A]),a)return b.jsxs("div",{className:"response-panel__loading",children:[b.jsx("span",{className:"request-panel__spinner"}),b.jsx("span",{children:"Sending request..."})]});if(!i)return b.jsx("div",{className:"response-panel__empty",children:"Send a request to see the response"});if(i.error&&!i.status)return b.jsxs("div",{className:"response-panel__empty",style:{color:"var(--method-delete)"},children:["Error: ",i.error]});const V=["Body","Headers","Verbose","Curl"];return b.jsxs("div",{children:[b.jsxs("div",{className:"response-panel__header",children:[b.jsxs("span",{className:`response-panel__status ${Lp(i.status)}`,children:[i.status," ",i.status_text||i.statusText||""]}),i.timing?.total_ms!=null&&b.jsxs("span",{className:"response-panel__meta",children:[i.timing.total_ms," ms"]}),i.size_bytes!=null&&b.jsx("span",{className:"response-panel__meta",children:Jb(i.size_bytes)}),i.validation!==void 0&&b.jsx(Kb,{validation:i.validation,expanded:y??!i.validation?.valid,onToggle:()=>v(Q=>Q===null?i.validation?.valid:!Q)}),u.length>0&&b.jsxs("div",{className:"response-panel__history",ref:D,children:[b.jsxs("button",{className:"response-panel__history-btn",onClick:()=>w(Q=>!Q),children:["History (",u.length,")"]}),A&&b.jsxs("div",{className:"response-panel__history-dropdown",children:[u.map(Q=>b.jsxs("button",{className:"response-panel__history-item",onClick:()=>{s?.(Q.index),w(!1)},children:[b.jsx("span",{className:`response-panel__status ${Lp(Q.status)}`,children:Q.status}),b.jsx("span",{className:"response-panel__history-time",children:Q.timing?.total_ms!=null?`${Q.timing.total_ms}ms`:""}),b.jsx("span",{className:"response-panel__history-ago",children:$b(Q.timestamp)})]},Q.index)),b.jsx("button",{className:"response-panel__history-clear",onClick:()=>{c?.(),w(!1)},children:"Clear history"})]})]})]}),b.jsx("div",{className:"response-panel__tabs",children:V.map(Q=>b.jsx("button",{className:`response-panel__tab${f===Q.toLowerCase()?" response-panel__tab--active":""}`,onClick:()=>d(Q.toLowerCase()),children:Q},Q))}),f==="body"&&b.jsx(Yb,{body:i.body,contentType:i.contentType||i.content_type||i.headers?.["content-type"],wrapEnabled:g,onToggleWrap:()=>p(Q=>!Q)}),f==="headers"&&b.jsx(Xb,{responseHeaders:i.headers,requestHeaders:i.requestHeaders||i.request_headers}),f==="verbose"&&b.jsx(Zb,{verbose:i.verbose}),f==="curl"&&b.jsx(Vb,{curlCommand:i.curl||i.curlCommand||i.curl_command})]})}function Wb({pairs:i,onChange:a}){const u=(f,d,g)=>{const p=i.map((y,v)=>v===f?{...y,[d]:g}:y);a(p)},s=()=>{a([...i,{key:"",value:""}])},c=f=>{const d=i.filter((g,p)=>p!==f);a(d.length>0?d:[{key:"",value:""}])};return b.jsxs("div",{children:[b.jsxs("table",{className:"body-editor__kv-table",children:[b.jsx("thead",{children:b.jsxs("tr",{children:[b.jsx("th",{children:"Variable"}),b.jsx("th",{children:"Value"}),b.jsx("th",{})]})}),b.jsx("tbody",{children:i.map((f,d)=>b.jsxs("tr",{children:[b.jsx("td",{children:b.jsx("input",{className:"body-editor__kv-input",type:"text",value:f.key||"",onChange:g=>u(d,"key",g.target.value),placeholder:"variable name"})}),b.jsx("td",{children:b.jsx("input",{className:"body-editor__kv-input",type:"text",value:f.value||"",onChange:g=>u(d,"value",g.target.value),placeholder:"value"})}),b.jsx("td",{children:b.jsx("button",{className:"body-editor__kv-remove",onClick:()=>c(d),title:"Remove",children:"x"})})]},d))})]}),b.jsx("button",{className:"body-editor__kv-add",onClick:s,children:"+ Add Variable"})]})}function Gp(i){return!i||Object.keys(i).length===0?[{key:"",value:""}]:Object.entries(i).map(([a,u])=>({key:a,value:String(u)}))}function Yp(i){const a={};for(const{key:u,value:s}of i)u&&(a[u]=s);return a}function Ib({environments:i,onSave:a,onClose:u}){const[s,c]=z.useState("base"),[f,d]=z.useState(""),[g,p]=z.useState({}),[y,v]=z.useState(!1);z.useEffect(()=>{if(!i)return;const Z={};Z.base=Gp(i.base),i.environments&&Object.entries(i.environments).forEach(([J,ce])=>{Z[J]=Gp(ce)}),p(Z)},[i]);const A=["base",...Object.keys(g).filter(Z=>Z!=="base").sort()],w=z.useCallback(()=>{const Z=f.trim();!Z||Z==="base"||g[Z]||(p(J=>({...J,[Z]:[{key:"",value:""}]})),d(""),c(Z))},[f,g]),D=z.useCallback(async Z=>{if(Z==="base")return;const J=i?.environments&&Z in i.environments;try{J&&await $y(Z),p(ce=>{const le={...ce};return delete le[Z],le}),c("base"),J&&a&&a()}catch{}},[a,i]),V=z.useCallback(async()=>{v(!0);try{g.base&&await Vy(Yp(g.base));for(const[Z,J]of Object.entries(g))Z!=="base"&&await Ky(Z,Yp(J));a&&a()}catch{}finally{v(!1)}},[g,a]),Q=z.useCallback(Z=>{Z.key==="Escape"&&u()},[u]);return z.useEffect(()=>(document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)),[Q]),b.jsxs("div",{className:"env-editor",children:[b.jsx("div",{className:"env-editor__backdrop",onClick:u}),b.jsxs("div",{className:"env-editor__dialog",children:[b.jsxs("div",{className:"env-editor__header",children:[b.jsx("span",{className:"env-editor__title",children:"Environments"}),b.jsx("button",{className:"env-editor__close",onClick:u,children:"x"})]}),b.jsx("div",{className:"env-editor__tabs",children:A.map(Z=>b.jsx("button",{className:`env-editor__tab${s===Z?" env-editor__tab--active":""}`,onClick:()=>c(Z),children:Z==="base"?"Base":Z},Z))}),b.jsxs("div",{className:"env-editor__body",children:[b.jsxs("div",{className:"env-editor__new-env",children:[b.jsx("input",{className:"env-editor__new-env-input",type:"text",placeholder:"New environment name...",value:f,onChange:Z=>d(Z.target.value),onKeyDown:Z=>{Z.key==="Enter"&&w()}}),b.jsx("button",{className:"topbar__btn",onClick:w,children:"Add"})]}),g[s]&&b.jsx(Wb,{pairs:g[s],onChange:Z=>p(J=>({...J,[s]:Z}))})]}),b.jsxs("div",{className:"env-editor__footer",children:[s!=="base"&&b.jsxs("button",{className:"env-editor__delete-btn",onClick:()=>D(s),children:['Delete "',s,'"']}),b.jsx("button",{className:"env-editor__save-btn",onClick:V,disabled:y,children:y?"Saving...":"Save"})]})]})]})}function bn(i){return Array.isArray?Array.isArray(i):vg(i)==="[object Array]"}function Pb(i){if(typeof i=="string")return i;let a=i+"";return a=="0"&&1/i==-1/0?"-0":a}function ev(i){return i==null?"":Pb(i)}function Yl(i){return typeof i=="string"}function yg(i){return typeof i=="number"}function tv(i){return i===!0||i===!1||lv(i)&&vg(i)=="[object Boolean]"}function bg(i){return typeof i=="object"}function lv(i){return bg(i)&&i!==null}function sl(i){return i!=null}function lo(i){return!i.trim().length}function vg(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const nv="Incorrect 'index' type",av=i=>`Invalid value for key ${i}`,iv=i=>`Pattern length exceeds max of ${i}.`,uv=i=>`Missing ${i} property in key`,sv=i=>`Property 'weight' in key '${i}' must be a positive integer`,Xp=Object.prototype.hasOwnProperty;class rv{constructor(a){this._keys=[],this._keyMap={};let u=0;a.forEach(s=>{let c=xg(s);this._keys.push(c),this._keyMap[c.id]=c,u+=c.weight}),this._keys.forEach(s=>{s.weight/=u})}get(a){return this._keyMap[a]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function xg(i){let a=null,u=null,s=null,c=1,f=null;if(Yl(i)||bn(i))s=i,a=Qp(i),u=fo(i);else{if(!Xp.call(i,"name"))throw new Error(uv("name"));const d=i.name;if(s=d,Xp.call(i,"weight")&&(c=i.weight,c<=0))throw new Error(sv(d));a=Qp(d),u=fo(d),f=i.getFn}return{path:a,id:u,weight:c,src:s,getFn:f}}function Qp(i){return bn(i)?i:i.split(".")}function fo(i){return bn(i)?i.join("."):i}function cv(i,a){let u=[],s=!1;const c=(f,d,g)=>{if(sl(f))if(!d[g])u.push(f);else{let p=d[g];const y=f[p];if(!sl(y))return;if(g===d.length-1&&(Yl(y)||yg(y)||tv(y)))u.push(ev(y));else if(bn(y)){s=!0;for(let v=0,A=y.length;v<A;v+=1)c(y[v],d,g+1)}else d.length&&c(y,d,g+1)}};return c(i,Yl(a)?a.split("."):a,0),s?u:u[0]}const ov={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},fv={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(i,a)=>i.score===a.score?i.idx<a.idx?-1:1:i.score<a.score?-1:1},hv={location:0,threshold:.6,distance:100},dv={useExtendedSearch:!1,getFn:cv,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var ye={...fv,...ov,...hv,...dv};const pv=/[^ ]+/g;function gv(i=1,a=3){const u=new Map,s=Math.pow(10,a);return{get(c){const f=c.match(pv).length;if(u.has(f))return u.get(f);const d=1/Math.pow(f,.5*i),g=parseFloat(Math.round(d*s)/s);return u.set(f,g),g},clear(){u.clear()}}}class zo{constructor({getFn:a=ye.getFn,fieldNormWeight:u=ye.fieldNormWeight}={}){this.norm=gv(u,3),this.getFn=a,this.isCreated=!1,this.setIndexRecords()}setSources(a=[]){this.docs=a}setIndexRecords(a=[]){this.records=a}setKeys(a=[]){this.keys=a,this._keysMap={},a.forEach((u,s)=>{this._keysMap[u.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Yl(this.docs[0])?this.docs.forEach((a,u)=>{this._addString(a,u)}):this.docs.forEach((a,u)=>{this._addObject(a,u)}),this.norm.clear())}add(a){const u=this.size();Yl(a)?this._addString(a,u):this._addObject(a,u)}removeAt(a){this.records.splice(a,1);for(let u=a,s=this.size();u<s;u+=1)this.records[u].i-=1}getValueForItemAtKeyId(a,u){return a[this._keysMap[u]]}size(){return this.records.length}_addString(a,u){if(!sl(a)||lo(a))return;let s={v:a,i:u,n:this.norm.get(a)};this.records.push(s)}_addObject(a,u){let s={i:u,$:{}};this.keys.forEach((c,f)=>{let d=c.getFn?c.getFn(a):this.getFn(a,c.path);if(sl(d)){if(bn(d)){let g=[];const p=[{nestedArrIndex:-1,value:d}];for(;p.length;){const{nestedArrIndex:y,value:v}=p.pop();if(sl(v))if(Yl(v)&&!lo(v)){let A={v,i:y,n:this.norm.get(v)};g.push(A)}else bn(v)&&v.forEach((A,w)=>{p.push({nestedArrIndex:w,value:A})})}s.$[f]=g}else if(Yl(d)&&!lo(d)){let g={v:d,n:this.norm.get(d)};s.$[f]=g}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function Sg(i,a,{getFn:u=ye.getFn,fieldNormWeight:s=ye.fieldNormWeight}={}){const c=new zo({getFn:u,fieldNormWeight:s});return c.setKeys(i.map(xg)),c.setSources(a),c.create(),c}function mv(i,{getFn:a=ye.getFn,fieldNormWeight:u=ye.fieldNormWeight}={}){const{keys:s,records:c}=i,f=new zo({getFn:a,fieldNormWeight:u});return f.setKeys(s),f.setIndexRecords(c),f}function ks(i,{errors:a=0,currentLocation:u=0,expectedLocation:s=0,distance:c=ye.distance,ignoreLocation:f=ye.ignoreLocation}={}){const d=a/i.length;if(f)return d;const g=Math.abs(s-u);return c?d+g/c:g?1:d}function yv(i=[],a=ye.minMatchCharLength){let u=[],s=-1,c=-1,f=0;for(let d=i.length;f<d;f+=1){let g=i[f];g&&s===-1?s=f:!g&&s!==-1&&(c=f-1,c-s+1>=a&&u.push([s,c]),s=-1)}return i[f-1]&&f-s>=a&&u.push([s,f-1]),u}const Ea=32;function bv(i,a,u,{location:s=ye.location,distance:c=ye.distance,threshold:f=ye.threshold,findAllMatches:d=ye.findAllMatches,minMatchCharLength:g=ye.minMatchCharLength,includeMatches:p=ye.includeMatches,ignoreLocation:y=ye.ignoreLocation}={}){if(a.length>Ea)throw new Error(iv(Ea));const v=a.length,A=i.length,w=Math.max(0,Math.min(s,A));let D=f,V=w;const Q=g>1||p,Z=Q?Array(A):[];let J;for(;(J=i.indexOf(a,V))>-1;){let L=ks(a,{currentLocation:J,expectedLocation:w,distance:c,ignoreLocation:y});if(D=Math.min(L,D),V=J+v,Q){let X=0;for(;X<v;)Z[J+X]=1,X+=1}}V=-1;let ce=[],le=1,ve=v+A;const ee=1<<v-1;for(let L=0;L<v;L+=1){let X=0,ie=ve;for(;X<ie;)ks(a,{errors:L,currentLocation:w+ie,expectedLocation:w,distance:c,ignoreLocation:y})<=D?X=ie:ve=ie,ie=Math.floor((ve-X)/2+X);ve=ie;let $e=Math.max(1,w-ie+1),I=d?A:Math.min(w+ie,A)+v,be=Array(I+2);be[I+1]=(1<<L)-1;for(let Me=I;Me>=$e;Me-=1){let et=Me-1,k=u[i.charAt(et)];if(Q&&(Z[et]=+!!k),be[Me]=(be[Me+1]<<1|1)&k,L&&(be[Me]|=(ce[Me+1]|ce[Me])<<1|1|ce[Me+1]),be[Me]&ee&&(le=ks(a,{errors:L,currentLocation:et,expectedLocation:w,distance:c,ignoreLocation:y}),le<=D)){if(D=le,V=et,V<=w)break;$e=Math.max(1,2*w-V)}}if(ks(a,{errors:L+1,currentLocation:w,expectedLocation:w,distance:c,ignoreLocation:y})>D)break;ce=be}const re={isMatch:V>=0,score:Math.max(.001,le)};if(Q){const L=yv(Z,g);L.length?p&&(re.indices=L):re.isMatch=!1}return re}function vv(i){let a={};for(let u=0,s=i.length;u<s;u+=1){const c=i.charAt(u);a[c]=(a[c]||0)|1<<s-u-1}return a}const Gs=String.prototype.normalize?(i=>i.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(i=>i);class _g{constructor(a,{location:u=ye.location,threshold:s=ye.threshold,distance:c=ye.distance,includeMatches:f=ye.includeMatches,findAllMatches:d=ye.findAllMatches,minMatchCharLength:g=ye.minMatchCharLength,isCaseSensitive:p=ye.isCaseSensitive,ignoreDiacritics:y=ye.ignoreDiacritics,ignoreLocation:v=ye.ignoreLocation}={}){if(this.options={location:u,threshold:s,distance:c,includeMatches:f,findAllMatches:d,minMatchCharLength:g,isCaseSensitive:p,ignoreDiacritics:y,ignoreLocation:v},a=p?a:a.toLowerCase(),a=y?Gs(a):a,this.pattern=a,this.chunks=[],!this.pattern.length)return;const A=(D,V)=>{this.chunks.push({pattern:D,alphabet:vv(D),startIndex:V})},w=this.pattern.length;if(w>Ea){let D=0;const V=w%Ea,Q=w-V;for(;D<Q;)A(this.pattern.substr(D,Ea),D),D+=Ea;if(V){const Z=w-Ea;A(this.pattern.substr(Z),Z)}}else A(this.pattern,0)}searchIn(a){const{isCaseSensitive:u,ignoreDiacritics:s,includeMatches:c}=this.options;if(a=u?a:a.toLowerCase(),a=s?Gs(a):a,this.pattern===a){let Q={isMatch:!0,score:0};return c&&(Q.indices=[[0,a.length-1]]),Q}const{location:f,distance:d,threshold:g,findAllMatches:p,minMatchCharLength:y,ignoreLocation:v}=this.options;let A=[],w=0,D=!1;this.chunks.forEach(({pattern:Q,alphabet:Z,startIndex:J})=>{const{isMatch:ce,score:le,indices:ve}=bv(a,Q,Z,{location:f+J,distance:d,threshold:g,findAllMatches:p,minMatchCharLength:y,includeMatches:c,ignoreLocation:v});ce&&(D=!0),w+=le,ce&&ve&&(A=[...A,...ve])});let V={isMatch:D,score:D?w/this.chunks.length:1};return D&&c&&(V.indices=A),V}}class Pn{constructor(a){this.pattern=a}static isMultiMatch(a){return Zp(a,this.multiRegex)}static isSingleMatch(a){return Zp(a,this.singleRegex)}search(){}}function Zp(i,a){const u=i.match(a);return u?u[1]:null}class xv extends Pn{constructor(a){super(a)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(a){const u=a===this.pattern;return{isMatch:u,score:u?0:1,indices:[0,this.pattern.length-1]}}}class Sv extends Pn{constructor(a){super(a)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(a){const s=a.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,a.length-1]}}}class _v extends Pn{constructor(a){super(a)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(a){const u=a.startsWith(this.pattern);return{isMatch:u,score:u?0:1,indices:[0,this.pattern.length-1]}}}class Ev extends Pn{constructor(a){super(a)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(a){const u=!a.startsWith(this.pattern);return{isMatch:u,score:u?0:1,indices:[0,a.length-1]}}}class Av extends Pn{constructor(a){super(a)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(a){const u=a.endsWith(this.pattern);return{isMatch:u,score:u?0:1,indices:[a.length-this.pattern.length,a.length-1]}}}class Tv extends Pn{constructor(a){super(a)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(a){const u=!a.endsWith(this.pattern);return{isMatch:u,score:u?0:1,indices:[0,a.length-1]}}}class Eg extends Pn{constructor(a,{location:u=ye.location,threshold:s=ye.threshold,distance:c=ye.distance,includeMatches:f=ye.includeMatches,findAllMatches:d=ye.findAllMatches,minMatchCharLength:g=ye.minMatchCharLength,isCaseSensitive:p=ye.isCaseSensitive,ignoreDiacritics:y=ye.ignoreDiacritics,ignoreLocation:v=ye.ignoreLocation}={}){super(a),this._bitapSearch=new _g(a,{location:u,threshold:s,distance:c,includeMatches:f,findAllMatches:d,minMatchCharLength:g,isCaseSensitive:p,ignoreDiacritics:y,ignoreLocation:v})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(a){return this._bitapSearch.searchIn(a)}}class Ag extends Pn{constructor(a){super(a)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(a){let u=0,s;const c=[],f=this.pattern.length;for(;(s=a.indexOf(this.pattern,u))>-1;)u=s+f,c.push([s,u-1]);const d=!!c.length;return{isMatch:d,score:d?0:1,indices:c}}}const ho=[xv,Ag,_v,Ev,Tv,Av,Sv,Eg],Vp=ho.length,jv=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Ov="|";function Nv(i,a={}){return i.split(Ov).map(u=>{let s=u.trim().split(jv).filter(f=>f&&!!f.trim()),c=[];for(let f=0,d=s.length;f<d;f+=1){const g=s[f];let p=!1,y=-1;for(;!p&&++y<Vp;){const v=ho[y];let A=v.isMultiMatch(g);A&&(c.push(new v(A,a)),p=!0)}if(!p)for(y=-1;++y<Vp;){const v=ho[y];let A=v.isSingleMatch(g);if(A){c.push(new v(A,a));break}}}return c})}const Mv=new Set([Eg.type,Ag.type]);class Rv{constructor(a,{isCaseSensitive:u=ye.isCaseSensitive,ignoreDiacritics:s=ye.ignoreDiacritics,includeMatches:c=ye.includeMatches,minMatchCharLength:f=ye.minMatchCharLength,ignoreLocation:d=ye.ignoreLocation,findAllMatches:g=ye.findAllMatches,location:p=ye.location,threshold:y=ye.threshold,distance:v=ye.distance}={}){this.query=null,this.options={isCaseSensitive:u,ignoreDiacritics:s,includeMatches:c,minMatchCharLength:f,findAllMatches:g,ignoreLocation:d,location:p,threshold:y,distance:v},a=u?a:a.toLowerCase(),a=s?Gs(a):a,this.pattern=a,this.query=Nv(this.pattern,this.options)}static condition(a,u){return u.useExtendedSearch}searchIn(a){const u=this.query;if(!u)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:c,ignoreDiacritics:f}=this.options;a=c?a:a.toLowerCase(),a=f?Gs(a):a;let d=0,g=[],p=0;for(let y=0,v=u.length;y<v;y+=1){const A=u[y];g.length=0,d=0;for(let w=0,D=A.length;w<D;w+=1){const V=A[w],{isMatch:Q,indices:Z,score:J}=V.search(a);if(Q){if(d+=1,p+=J,s){const ce=V.constructor.type;Mv.has(ce)?g=[...g,...Z]:g.push(Z)}}else{p=0,d=0,g.length=0;break}}if(d){let w={isMatch:!0,score:p/d};return s&&(w.indices=g),w}}return{isMatch:!1,score:1}}}const po=[];function Cv(...i){po.push(...i)}function go(i,a){for(let u=0,s=po.length;u<s;u+=1){let c=po[u];if(c.condition(i,a))return new c(i,a)}return new _g(i,a)}const Ys={AND:"$and",OR:"$or"},mo={PATH:"$path",PATTERN:"$val"},yo=i=>!!(i[Ys.AND]||i[Ys.OR]),zv=i=>!!i[mo.PATH],wv=i=>!bn(i)&&bg(i)&&!yo(i),Kp=i=>({[Ys.AND]:Object.keys(i).map(a=>({[a]:i[a]}))});function Tg(i,a,{auto:u=!0}={}){const s=c=>{let f=Object.keys(c);const d=zv(c);if(!d&&f.length>1&&!yo(c))return s(Kp(c));if(wv(c)){const p=d?c[mo.PATH]:f[0],y=d?c[mo.PATTERN]:c[p];if(!Yl(y))throw new Error(av(p));const v={keyId:fo(p),pattern:y};return u&&(v.searcher=go(y,a)),v}let g={children:[],operator:f[0]};return f.forEach(p=>{const y=c[p];bn(y)&&y.forEach(v=>{g.children.push(s(v))})}),g};return yo(i)||(i=Kp(i)),s(i)}function Dv(i,{ignoreFieldNorm:a=ye.ignoreFieldNorm}){i.forEach(u=>{let s=1;u.matches.forEach(({key:c,norm:f,score:d})=>{const g=c?c.weight:null;s*=Math.pow(d===0&&g?Number.EPSILON:d,(g||1)*(a?1:f))}),u.score=s})}function kv(i,a){const u=i.matches;a.matches=[],sl(u)&&u.forEach(s=>{if(!sl(s.indices)||!s.indices.length)return;const{indices:c,value:f}=s;let d={indices:c,value:f};s.key&&(d.key=s.key.src),s.idx>-1&&(d.refIndex=s.idx),a.matches.push(d)})}function Bv(i,a){a.score=i.score}function Uv(i,a,{includeMatches:u=ye.includeMatches,includeScore:s=ye.includeScore}={}){const c=[];return u&&c.push(kv),s&&c.push(Bv),i.map(f=>{const{idx:d}=f,g={item:a[d],refIndex:d};return c.length&&c.forEach(p=>{p(f,g)}),g})}class In{constructor(a,u={},s){this.options={...ye,...u},this.options.useExtendedSearch,this._keyStore=new rv(this.options.keys),this.setCollection(a,s)}setCollection(a,u){if(this._docs=a,u&&!(u instanceof zo))throw new Error(nv);this._myIndex=u||Sg(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(a){sl(a)&&(this._docs.push(a),this._myIndex.add(a))}remove(a=()=>!1){const u=[];for(let s=0,c=this._docs.length;s<c;s+=1){const f=this._docs[s];a(f,s)&&(this.removeAt(s),s-=1,c-=1,u.push(f))}return u}removeAt(a){this._docs.splice(a,1),this._myIndex.removeAt(a)}getIndex(){return this._myIndex}search(a,{limit:u=-1}={}){const{includeMatches:s,includeScore:c,shouldSort:f,sortFn:d,ignoreFieldNorm:g}=this.options;let p=Yl(a)?Yl(this._docs[0])?this._searchStringList(a):this._searchObjectList(a):this._searchLogical(a);return Dv(p,{ignoreFieldNorm:g}),f&&p.sort(d),yg(u)&&u>-1&&(p=p.slice(0,u)),Uv(p,this._docs,{includeMatches:s,includeScore:c})}_searchStringList(a){const u=go(a,this.options),{records:s}=this._myIndex,c=[];return s.forEach(({v:f,i:d,n:g})=>{if(!sl(f))return;const{isMatch:p,score:y,indices:v}=u.searchIn(f);p&&c.push({item:f,idx:d,matches:[{score:y,value:f,norm:g,indices:v}]})}),c}_searchLogical(a){const u=Tg(a,this.options),s=(g,p,y)=>{if(!g.children){const{keyId:A,searcher:w}=g,D=this._findMatches({key:this._keyStore.get(A),value:this._myIndex.getValueForItemAtKeyId(p,A),searcher:w});return D&&D.length?[{idx:y,item:p,matches:D}]:[]}const v=[];for(let A=0,w=g.children.length;A<w;A+=1){const D=g.children[A],V=s(D,p,y);if(V.length)v.push(...V);else if(g.operator===Ys.AND)return[]}return v},c=this._myIndex.records,f={},d=[];return c.forEach(({$:g,i:p})=>{if(sl(g)){let y=s(u,g,p);y.length&&(f[p]||(f[p]={idx:p,item:g,matches:[]},d.push(f[p])),y.forEach(({matches:v})=>{f[p].matches.push(...v)}))}}),d}_searchObjectList(a){const u=go(a,this.options),{keys:s,records:c}=this._myIndex,f=[];return c.forEach(({$:d,i:g})=>{if(!sl(d))return;let p=[];s.forEach((y,v)=>{p.push(...this._findMatches({key:y,value:d[v],searcher:u}))}),p.length&&f.push({idx:g,item:d,matches:p})}),f}_findMatches({key:a,value:u,searcher:s}){if(!sl(u))return[];let c=[];if(bn(u))u.forEach(({v:f,i:d,n:g})=>{if(!sl(f))return;const{isMatch:p,score:y,indices:v}=s.searchIn(f);p&&c.push({score:y,key:a,value:f,idx:d,norm:g,indices:v})});else{const{v:f,n:d}=u,{isMatch:g,score:p,indices:y}=s.searchIn(f);g&&c.push({score:p,key:a,value:f,norm:d,indices:y})}return c}}In.version="7.1.0";In.createIndex=Sg;In.parseIndex=mv;In.config=ye;In.parseQuery=Tg;Cv(Rv);function qv({visible:i,onClose:a,projects:u,endpoints:s,actions:c,onSelectProject:f,onSelectEndpoint:d,onAction:g}){const[p,y]=z.useState(""),[v,A]=z.useState(0),w=z.useRef(null),D=z.useMemo(()=>new In(u||[],{keys:["name","path"],threshold:.4}),[u]),V=z.useMemo(()=>new In(s||[],{keys:["method","path","summary","tags"],threshold:.4}),[s]),Q=z.useMemo(()=>new In(c||[],{keys:["label"],threshold:.4}),[c]),Z=z.useMemo(()=>{const L=[];if(!p)c&&c.length>0&&c.forEach(X=>L.push({type:"action",item:X})),u&&u.length>0&&u.forEach(X=>L.push({type:"project",item:X})),s&&s.length>0&&s.slice(0,20).forEach(X=>L.push({type:"endpoint",item:X}));else{const X=Q.search(p,{limit:5}),ie=D.search(p,{limit:5}),$e=V.search(p,{limit:15});X.forEach(I=>L.push({type:"action",item:I.item})),ie.forEach(I=>L.push({type:"project",item:I.item})),$e.forEach(I=>L.push({type:"endpoint",item:I.item}))}return L},[p,u,s,c,D,V,Q]);z.useEffect(()=>{A(0)},[p]),z.useEffect(()=>{i&&w.current&&w.current.focus()},[i]),z.useEffect(()=>{i&&y("")},[i]);const J=z.useCallback(L=>{L.type==="action"&&g?g(L.item):L.type==="project"&&f?f(L.item):L.type==="endpoint"&&d&&d(L.item)},[g,f,d]),ce=z.useCallback(L=>{L.key==="Escape"?(L.preventDefault(),a()):L.key==="ArrowDown"?(L.preventDefault(),A(X=>Math.min(X+1,Z.length-1))):L.key==="ArrowUp"?(L.preventDefault(),A(X=>Math.max(X-1,0))):L.key==="Enter"&&(L.preventDefault(),Z[v]&&J(Z[v]))},[a,Z,v,J]);if(!i)return null;const le=Z.filter(L=>L.type==="action"),ve=Z.filter(L=>L.type==="project"),ee=Z.filter(L=>L.type==="endpoint");let re=0;return b.jsxs("div",{className:"command-palette",children:[b.jsx("div",{className:"command-palette__backdrop",onClick:a}),b.jsxs("div",{className:"command-palette__dialog",children:[b.jsx("input",{ref:w,className:"command-palette__input",type:"text",placeholder:"Search actions, projects, and endpoints...",value:p,onChange:L=>y(L.target.value),onKeyDown:ce}),b.jsxs("div",{className:"command-palette__results",children:[le.length>0&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"command-palette__section-title",children:"Actions"}),le.map(L=>{const X=re++;return b.jsxs("div",{className:`command-palette__item${X===v?" command-palette__item--active":""}`,onClick:()=>J(L),onMouseEnter:()=>A(X),children:[b.jsx("span",{className:"command-palette__item-label",children:L.item.label}),L.item.shortcut&&b.jsx("span",{className:"command-palette__item-shortcut",children:L.item.shortcut})]},`act-${L.item.id}`)})]}),ve.length>0&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"command-palette__section-title",children:"Projects"}),ve.map(L=>{const X=re++;return b.jsxs("div",{className:`command-palette__item${X===v?" command-palette__item--active":""}`,onClick:()=>J(L),onMouseEnter:()=>A(X),children:[b.jsx("span",{className:"command-palette__item-label",children:L.item.name||L.item.path}),L.item.name&&b.jsx("span",{className:"command-palette__item-detail",children:L.item.path})]},`proj-${L.item.path}`)})]}),ee.length>0&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"command-palette__section-title",children:"Endpoints"}),ee.map(L=>{const X=L.item,ie=re++;return b.jsxs("div",{className:`command-palette__item${ie===v?" command-palette__item--active":""}`,onClick:()=>J(L),onMouseEnter:()=>A(ie),children:[b.jsx("span",{className:`endpoint-item__method endpoint-item__method--${(X.method||"").toLowerCase()}`,children:(X.method||"").toUpperCase()}),b.jsx("span",{className:"command-palette__item-label",children:X.path}),X.summary&&b.jsx("span",{className:"command-palette__item-detail",children:X.summary})]},`ep-${X.method}-${X.path}`)})]}),Z.length===0&&p&&b.jsx("div",{style:{padding:"16px",color:"var(--fg-muted)",textAlign:"center"},children:"No results found"})]})]})]})}function Hv({visible:i,onClose:a,projects:u,currentProject:s,onSwitch:c,onAdd:f,onRemove:d}){const[g,p]=z.useState(""),[y,v]=z.useState(0),[A,w]=z.useState(null),[D,V]=z.useState(null),[Q,Z]=z.useState(null),[J,ce]=z.useState("bookmarks"),le=z.useRef(null);z.useEffect(()=>{if(i){const X=s?.path||"",ie=!!X;p(ie?X+"/":""),v(0),w(ie?X:null),V(null),Z(null),ce(ie?"browse":"bookmarks"),setTimeout(()=>le.current?.focus(),0)}},[i]),z.useEffect(()=>{A!==null&&(Z(null),l0(A).then(X=>{V(X),v(0)}).catch(X=>{Z(X.message||"Cannot browse"),V(null)}))},[A]),z.useEffect(()=>{if(g.startsWith("/")||g.startsWith("~")){ce("browse");const X=g.lastIndexOf("/"),ie=X<=0?g.startsWith("~")?"~":"/":g.slice(0,X)||"/";ie!==A&&w(ie)}else J==="browse"&&!g&&(ce("bookmarks"),w(null),V(null))},[g]);const ee=z.useCallback(()=>{if(J==="browse"&&D){const $e=g.slice((A||"").length).replace(/^\//,"").toLowerCase();let I=[];$e||(D.parent&&I.push({type:"parent",path:D.parent,label:"..",detail:D.parent}),D.has_spec&&I.push({type:"open",path:D.path,label:". (open this directory)",detail:`spec: ${D.spec_file}`,hasSpec:!0}));for(const be of D.dirs)$e&&!be.toLowerCase().includes($e)||I.push({type:"dir",path:`${D.path}/${be}`,label:be,detail:null});return I}const X=g.toLowerCase();let ie=[];if(u&&u.length>0){const $e=X?u.filter(I=>I.name.toLowerCase().includes(X)||I.path.toLowerCase().includes(X)):u;for(const I of $e)ie.push({type:"project",path:I.path,label:I.name,detail:I.path,isCurrent:I.path===s?.path})}return ie.length===0&&!X&&ie.push({type:"hint",label:"Type a path (e.g. /home/user/my-api) to browse",detail:""}),ie},[J,D,A,g,u,s])(),re=z.useCallback(async X=>{if(!(!X||X.type==="hint")){if(X.type==="parent"){const ie=X.path;p(ie+"/"),w(ie),v(0);return}if(X.type==="dir"){p(X.path+"/"),w(X.path),v(0);return}try{await c(X.path),a()}catch(ie){Z(ie.message||"Failed to open project")}}},[c,a]),L=z.useCallback(X=>{if(X.key==="Escape")X.preventDefault(),a();else if(X.key==="ArrowDown")X.preventDefault(),v(ie=>Math.min(ie+1,ee.length-1));else if(X.key==="ArrowUp")X.preventDefault(),v(ie=>Math.max(ie-1,0));else if(X.key==="Enter")if(X.preventDefault(),J==="browse"&&g&&!g.endsWith("/")){const ie=g.replace(/\/$/,"");c(ie).then(()=>a()).catch($e=>{Z($e.message||"Failed to open")})}else ee[y]&&re(ee[y]);else if(X.key==="Tab"){X.preventDefault();const ie=ee[y];ie&&(ie.type==="dir"||ie.type==="parent")&&re(ie)}},[a,ee,y,re,J,g,c]);return i?b.jsxs("div",{className:"command-palette",children:[b.jsx("div",{className:"command-palette__backdrop",onClick:a}),b.jsxs("div",{className:"command-palette__dialog",children:[b.jsx("input",{ref:le,className:"command-palette__input",type:"text",placeholder:"Search bookmarks or type /path/to/project...",value:g,onChange:X=>p(X.target.value),onKeyDown:L}),Q&&b.jsx("div",{style:{padding:"8px 16px",fontSize:"12px",color:"var(--method-delete)"},children:Q}),J==="browse"&&D&&b.jsxs("div",{className:"command-palette__section-title",style:{display:"flex",justifyContent:"space-between"},children:[b.jsx("span",{children:D.path}),D.has_spec&&b.jsx("span",{style:{color:"var(--method-get)"},children:"spec found"})]}),b.jsxs("div",{className:"command-palette__results",children:[J==="bookmarks"&&ee.some(X=>X.type==="project")&&b.jsx("div",{className:"command-palette__section-title",children:"Bookmarked Projects"}),ee.map((X,ie)=>{if(X.type==="hint")return b.jsx("div",{style:{padding:"16px",color:"var(--fg-muted)",textAlign:"center",fontSize:"13px"},children:X.label},"hint");const $e=X.type==="parent"?"← ":X.type==="dir"?"📁 ":X.type==="open"?"→ ":X.isCurrent?"● ":"";return b.jsxs("div",{className:`command-palette__item${ie===y?" command-palette__item--active":""}`,onClick:()=>re(X),onMouseEnter:()=>v(ie),children:[b.jsxs("span",{className:"command-palette__item-label",children:[$e,X.label]}),X.detail&&b.jsx("span",{className:"command-palette__item-detail",children:X.detail})]},`${X.type}-${X.path}`)}),ee.length===0&&J==="browse"&&b.jsx("div",{style:{padding:"16px",color:"var(--fg-muted)",textAlign:"center"},children:D?"No subdirectories":"Loading..."})]}),b.jsxs("div",{style:{padding:"6px 16px",borderTop:"1px solid var(--border)",fontSize:"11px",color:"var(--fg-muted)",display:"flex",gap:"16px"},children:[b.jsx("span",{children:"Enter: open/navigate"}),b.jsx("span",{children:"Tab: enter directory"}),b.jsx("span",{children:"Esc: close"})]})]})]}):null}function Jp({onResize:i,onResizeStart:a,direction:u="horizontal"}){const s=z.useRef(!1),c=z.useCallback(f=>{f.preventDefault(),s.current=!0;const d=f.clientX,g=f.clientY;a&&a();const p=v=>{if(!s.current)return;const A=u==="horizontal"?v.clientX-d:v.clientY-g;i(A)},y=()=>{s.current=!1,document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",y),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor=u==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",p),document.addEventListener("mouseup",y)},[i,a,u]);return b.jsx("div",{className:`resize-handle resize-handle--${u}`,onMouseDown:c})}function Lv(){const[i,a]=z.useState(null),[u,s]=z.useState([]),[c,f]=z.useState([]),[d,g]=z.useState(null),[p,y]=z.useState(null),[v,A]=z.useState({}),[w,D]=z.useState(null),[V,Q]=z.useState(!1),[Z,J]=z.useState(null),[ce,le]=z.useState({global:{},project:{}}),[ve,ee]=z.useState(null),[re,L]=z.useState(null),[X,ie]=z.useState(null),[$e,I]=z.useState({}),[be,lt]=z.useState(!1),[Me,et]=z.useState(!1),[k,P]=z.useState(!1),[fe,Be]=z.useState("tag"),[He,E]=z.useState({}),[G,te]=z.useState(""),[ne,me]=z.useState(0),[Se,we]=z.useState({}),[Tt,Fe]=z.useState([]),[Yt,vn]=z.useState(()=>{try{return Number(localStorage.getItem("apigrip:sidebarWidth"))||280}catch{return 280}}),[Rl,ja]=z.useState(()=>{try{return Number(localStorage.getItem("apigrip:requestPanelRatio"))||.5}catch{return .5}}),rl=z.useRef(280),xn=z.useRef(.5),Ql=z.useRef(null),ea=z.useRef(null),El=z.useRef(null),Sn=z.useRef(v),Cl=z.useRef(d),zl=z.useRef(null);Sn.current=v,Cl.current=d;const cl=z.useCallback((N,R,W)=>`apigrip:${N}:${R}:${W}`,[]),Zl=z.useCallback((N,R,W)=>{try{localStorage.setItem(cl("params",N,R),JSON.stringify(W))}catch{}},[cl]),ct=z.useCallback((N,R)=>{try{const W=localStorage.getItem(cl("params",N,R));return W?JSON.parse(W):null}catch{return null}},[cl]),_n=z.useCallback((N,R,W)=>{try{localStorage.setItem(cl("response",N,R),JSON.stringify(W))}catch{}},[cl]),ol=z.useCallback((N,R)=>{try{const W=localStorage.getItem(cl("response",N,R));return W?JSON.parse(W):null}catch{return null}},[cl]),wl=z.useCallback(()=>{if(El.current&&Cl.current){clearTimeout(El.current),El.current=null;const N=Cl.current;_p(N.method,N.path,Sn.current).catch(()=>{})}},[]),jt=z.useCallback(N=>{ee(N),ea.current&&clearTimeout(ea.current),ea.current=setTimeout(()=>ee(null),3e3)},[]),Dl=z.useCallback(async()=>{const[N,R]=await Promise.allSettled([n0(),zs()]);le(N.status==="fulfilled"?N.value||{global:{},project:{}}:{global:{},project:{}}),s(R.status==="fulfilled"?R.value||[]:[]);const W=N.status==="fulfilled"&&(N.value?.global?.theme||N.value?.project?.theme)||"dark";document.documentElement.setAttribute("data-theme",W);try{localStorage.setItem("apigrip:theme",W)}catch{}try{const Ee=await Ly();a(Ee),J(Ee.git||null)}catch{a(null),J(null)}try{const Ee=await xp();f(Array.isArray(Ee)?Ee:[])}catch{f([])}try{const Ee=await Sp();L(Ee),ie(Ee.active||null);const Ye=await Pc();I(Ye||{})}catch{}},[]);z.useEffect(()=>{Dl()},[Dl]),z.useEffect(()=>{const N=i0({onSpecReloaded:()=>{xp().then(R=>f(Array.isArray(R)?R:[])).catch(()=>{}),jt("Spec reloaded")},onSpecError:R=>{jt(`Spec error: ${R.message||"unknown"}`)},onGitChanged:R=>{J(R)},onProjectSwitched:()=>{Dl()}});return()=>N.disconnect()},[Dl,jt]);const ta=z.useCallback(async N=>{wl(),g(N),me(0),we({});const R=ct(N.method,N.path);R&&A(R);const W=ol(N.method,N.path);D(W||null);try{const Ee=await Qy(N.method,N.path);y(Ee);const Xt=await Fy(N.method,N.path)||{};A(Xt),Zl(N.method,N.path,Xt)}catch(Ee){console.error("Failed to load endpoint:",Ee)}try{const Ee=await Ep(N.method,N.path);Fe(Ee||[])}catch{Fe([])}},[wl,ct,ol,Zl]),hi=z.useCallback(N=>{A(N),d&&(Zl(d.method,d.path,N),El.current&&clearTimeout(El.current),El.current=setTimeout(()=>{_p(d.method,d.path,N).catch(()=>{})},500))},[d,Zl]),Vl=z.useCallback(async()=>{if(!p||V)return;const N=`req-${Date.now()}`;zl.current=N,Q(!0),D(null);try{const W=(p.servers||[])[ne]||{},Ee={method:p.method,path:p.path,params:v,server_index:ne,server_variables:Se,request_id:N},Ye=await Wy(Ee);D(Ye),_n(p.method,p.path,Ye);try{const Xt=await Ep(p.method,p.path);Fe(Xt||[])}catch{}}catch(R){const W={error:R.message};D(W),_n(p.method,p.path,W)}finally{zl.current=null,Q(!1)}},[p,v,V,ne,Se,_n]),Kl=z.useCallback(async()=>{const N=zl.current;if(N){try{await Iy(N)}catch{}zl.current=null,Q(!1),D({error:"Request cancelled"})}},[]),Nt=z.useCallback(async N=>{if(p)try{const R=await e0(p.method,p.path,N);R&&D(R)}catch(R){console.error("Failed to load history entry:",R)}},[p]),fl=z.useCallback(async()=>{if(p)try{await t0(p.method,p.path),Fe([])}catch(N){console.error("Failed to clear history:",N)}},[p]),pt=z.useCallback(async N=>{try{await Gy(N),await Dl(),g(null),y(null),D(null),Fe([]),jt("Project switched")}catch(R){jt(`Failed to switch: ${R.message}`)}},[Dl,jt]),di=z.useCallback(async N=>{await Yy(N);const R=await zs();s(R||[])},[]),la=z.useCallback(async N=>{await Xy(N);const R=await zs();s(R||[])},[]),Oa=z.useCallback(async N=>{try{await Jy(N),ie(N);const R=await Pc();I(R||{})}catch(R){jt(`Failed to set env: ${R.message}`)}},[jt]),Jl=z.useCallback(async()=>{try{const N=await Sp();L(N);const R=await Pc();I(R||{}),jt("Environments saved")}catch(N){jt(`Env error: ${N.message}`)}},[jt]),En=z.useCallback(()=>{rl.current=Yt},[Yt]),$l=z.useCallback(N=>{const R=Math.max(160,Math.min(600,rl.current+N));vn(R);try{localStorage.setItem("apigrip:sidebarWidth",String(R))}catch{}},[]),kt=z.useCallback(()=>{xn.current=Rl},[Rl]),S=z.useCallback(N=>{if(!Ql.current)return;const R=Ql.current.offsetWidth;if(R<=0)return;const W=Math.max(.2,Math.min(.8,xn.current+N/R));ja(W);try{localStorage.setItem("apigrip:requestPanelRatio",String(W))}catch{}},[]),$=navigator.platform?.startsWith("Mac")||navigator.userAgent?.includes("Mac")?"⌘":"Ctrl",de=z.useCallback(async()=>{const R=(ce?.global?.theme||ce?.project?.theme||"dark")==="dark"?"light":"dark";try{await a0({global:{theme:R}}),document.documentElement.setAttribute("data-theme",R);try{localStorage.setItem("apigrip:theme",R)}catch{}le(W=>({...W,global:{...W.global,theme:R}}))}catch{}},[ce]),Le=z.useCallback(async()=>{if(window.apigrip?.pickDirectory){const N=await window.apigrip.pickDirectory();N&&pt(N)}else P(!0)},[pt]),Xe=z.useMemo(()=>[{id:"env-editor",label:"Edit Environments",shortcut:`${$}+E`,handler:()=>lt(!0)},{id:"open-project",label:"Open Project",shortcut:`${$}+O`,handler:Le},{id:"toggle-theme",label:"Toggle Theme",shortcut:`${$}+Shift+L`,handler:de},{id:"toggle-view",label:"Toggle View Mode (Tag/Tree)",shortcut:null,handler:()=>Be(N=>N==="tag"?"tree":"tag")},{id:"send-request",label:"Send Request",shortcut:`${$}+Enter`,handler:Vl}],[de,Vl,Le,$]);return z.useEffect(()=>{Me&&zs().then(N=>s(N||[])).catch(()=>{})},[Me]),z.useEffect(()=>{function N(R){const W=R.ctrlKey||R.metaKey;W&&R.key==="p"&&(R.preventDefault(),et(Ee=>!Ee)),W&&R.key==="Enter"&&(R.preventDefault(),Vl()),W&&R.key==="o"&&(R.preventDefault(),Le()),W&&R.key==="e"&&(R.preventDefault(),lt(Ee=>!Ee)),W&&R.shiftKey&&(R.key==="L"||R.key==="l")&&(R.preventDefault(),de())}return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[Vl,de,Le]),b.jsxs("div",{className:"app",children:[b.jsx(u0,{project:i,git:Z,environments:re,activeEnv:X,onSwitchProject:pt,onSetActiveEnv:Oa,onOpenEnvEditor:()=>lt(!0),onOpenProjectDialog:Le,toast:ve,projects:u,servers:p?.servers||[],serverIndex:ne,onServerIndexChange:me,sending:V,onSend:Vl,onCancel:Kl,hasEndpoint:!!p}),b.jsxs("div",{className:"app__body",children:[b.jsx("div",{className:"app__sidebar",style:{width:Yt},children:b.jsx(o0,{endpoints:c,selectedEndpoint:d,onSelect:ta,viewMode:fe,onToggleViewMode:()=>Be(N=>N==="tag"?"tree":"tag"),treeCollapseState:He,onToggleTreeNode:N=>E(R=>({...R,[N]:!R[N]})),searchTerm:G,onSearchChange:te})}),b.jsx(Jp,{direction:"horizontal",onResize:$l,onResizeStart:En}),b.jsxs("div",{className:"app__main",ref:Ql,children:[b.jsx("div",{className:"app__request-panel",style:{flex:`${Rl} 0 0%`},children:b.jsx(ib,{spec:i,endpoint:p,params:v,onParamsChange:hi,serverIndex:ne,onServerIndexChange:me,serverVariables:Se,onServerVariablesChange:we,preferences:ce,resolvedEnv:$e})}),b.jsx(Jp,{direction:"horizontal",onResize:S,onResizeStart:kt}),b.jsx("div",{className:"app__response-panel",style:{flex:`${1-Rl} 0 0%`},children:b.jsx(Fb,{response:w,sending:V,history:Tt,onSelectHistoryEntry:Nt,onClearHistory:fl})})]})]}),be&&b.jsx(Ib,{environments:re,onSave:Jl,onClose:()=>lt(!1)}),Me&&b.jsx(qv,{visible:Me,onClose:()=>et(!1),projects:u,endpoints:c,actions:Xe,onSelectProject:N=>{pt(N.path),et(!1)},onSelectEndpoint:N=>{ta(N),et(!1)},onAction:N=>{N.handler(),et(!1)}}),b.jsx(Hv,{visible:k,onClose:()=>P(!1),projects:u,currentProject:i,onSwitch:pt,onAdd:di,onRemove:la})]})}qy.createRoot(document.getElementById("root")).render(b.jsx(Lv,{}));