apigrip 0.8.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/commands/send.js +15 -2
- package/cli/index.js +4 -2
- package/client/dist/assets/index-B0_C2Edh.css +1 -0
- package/client/dist/assets/index-D4I40ptE.js +111 -0
- package/client/dist/index.html +8 -3
- package/core/code-generators.js +368 -0
- package/core/preferences-store.js +1 -1
- package/mcp/server.js +69 -1
- package/package.json +3 -4
- package/server/routes/requests.js +16 -0
- package/client/dist/assets/index-Bjob23lK.js +0 -75
- package/client/dist/assets/index-C-wLtypK.css +0 -1
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const f of r)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(r){const f={};return r.integrity&&(f.integrity=r.integrity),r.referrerPolicy&&(f.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?f.credentials="include":r.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function s(r){if(r.ep)return;r.ep=!0;const f=u(r);fetch(r.href,f)}})();function oy(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Xr={exports:{}},is={};var Pd;function fy(){if(Pd)return is;Pd=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function u(s,r,f){var d=null;if(f!==void 0&&(d=""+f),r.key!==void 0&&(d=""+r.key),"key"in r){f={};for(var g in r)g!=="key"&&(f[g]=r[g])}else f=r;return r=f.ref,{$$typeof:a,type:s,key:d,ref:r!==void 0?r:null,props:f}}return is.Fragment=i,is.jsx=u,is.jsxs=u,is}var ep;function hy(){return ep||(ep=1,Xr.exports=fy()),Xr.exports}var b=hy(),Zr={exports:{}},ss={},Qr={exports:{}},$r={};var tp;function dy(){return tp||(tp=1,(function(a){function i(k,K){var ae=k.length;k.push(K);e:for(;0<ae;){var Ae=ae-1>>>1,je=k[Ae];if(0<r(je,K))k[Ae]=K,k[ae]=je,ae=Ae;else break e}}function u(k){return k.length===0?null:k[0]}function s(k){if(k.length===0)return null;var K=k[0],ae=k.pop();if(ae!==K){k[0]=ae;e:for(var Ae=0,je=k.length,E=je>>>1;Ae<E;){var L=2*(Ae+1)-1,F=k[L],ne=L+1,be=k[ne];if(0>r(F,ae))ne<je&&0>r(be,F)?(k[Ae]=be,k[ne]=ae,Ae=ne):(k[Ae]=F,k[L]=ae,Ae=L);else if(ne<je&&0>r(be,ae))k[Ae]=be,k[ne]=ae,Ae=ne;else break e}}return K}function r(k,K){var ae=k.sortIndex-K.sortIndex;return ae!==0?ae:k.id-K.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;a.unstable_now=function(){return f.now()}}else{var d=Date,g=d.now();a.unstable_now=function(){return d.now()-g}}var p=[],y=[],v=1,S=null,O=3,j=!1,Z=!1,$=!1,Q=!1,Y=typeof setTimeout=="function"?setTimeout:null,se=typeof clearTimeout=="function"?clearTimeout:null,te=typeof setImmediate<"u"?setImmediate:null;function J(k){for(var K=u(y);K!==null;){if(K.callback===null)s(y);else if(K.startTime<=k)s(y),K.sortIndex=K.expirationTime,i(p,K);else break;K=u(y)}}function I(k){if($=!1,J(k),!Z)if(u(p)!==null)Z=!0,ge||(ge=!0,Se());else{var K=u(y);K!==null&&Qe(I,K.startTime-k)}}var ge=!1,oe=-1,D=5,le=-1;function ke(){return Q?!0:!(a.unstable_now()-le<D)}function P(){if(Q=!1,ge){var k=a.unstable_now();le=k;var K=!0;try{e:{Z=!1,$&&($=!1,se(oe),oe=-1),j=!0;var ae=O;try{t:{for(J(k),S=u(p);S!==null&&!(S.expirationTime>k&&ke());){var Ae=S.callback;if(typeof Ae=="function"){S.callback=null,O=S.priorityLevel;var je=Ae(S.expirationTime<=k);if(k=a.unstable_now(),typeof je=="function"){S.callback=je,J(k),K=!0;break t}S===u(p)&&s(p),J(k)}else s(p);S=u(p)}if(S!==null)K=!0;else{var E=u(y);E!==null&&Qe(I,E.startTime-k),K=!1}}break e}finally{S=null,O=ae,j=!1}K=void 0}}finally{K?Se():ge=!1}}}var Se;if(typeof te=="function")Se=function(){te(P)};else if(typeof MessageChannel<"u"){var Ye=new MessageChannel,Ze=Ye.port2;Ye.port1.onmessage=P,Se=function(){Ze.postMessage(null)}}else Se=function(){Y(P,0)};function Qe(k,K){oe=Y(function(){k(a.unstable_now())},K)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(k){k.callback=null},a.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<k?Math.floor(1e3/k):5},a.unstable_getCurrentPriorityLevel=function(){return O},a.unstable_next=function(k){switch(O){case 1:case 2:case 3:var K=3;break;default:K=O}var ae=O;O=K;try{return k()}finally{O=ae}},a.unstable_requestPaint=function(){Q=!0},a.unstable_runWithPriority=function(k,K){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var ae=O;O=k;try{return K()}finally{O=ae}},a.unstable_scheduleCallback=function(k,K,ae){var Ae=a.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Ae+ae:Ae):ae=Ae,k){case 1:var je=-1;break;case 2:je=250;break;case 5:je=1073741823;break;case 4:je=1e4;break;default:je=5e3}return je=ae+je,k={id:v++,callback:K,priorityLevel:k,startTime:ae,expirationTime:je,sortIndex:-1},ae>Ae?(k.sortIndex=ae,i(y,k),u(p)===null&&k===u(y)&&($?(se(oe),oe=-1):$=!0,Qe(I,ae-Ae))):(k.sortIndex=je,i(p,k),Z||j||(Z=!0,ge||(ge=!0,Se()))),k},a.unstable_shouldYield=ke,a.unstable_wrapCallback=function(k){var K=O;return function(){var ae=O;O=K;try{return k.apply(this,arguments)}finally{O=ae}}}})($r)),$r}var lp;function py(){return lp||(lp=1,Qr.exports=dy()),Qr.exports}var Vr={exports:{}},_e={};var np;function gy(){if(np)return _e;np=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),r=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"),S=Symbol.for("react.activity"),O=Symbol.iterator;function j(E){return E===null||typeof E!="object"?null:(E=O&&E[O]||E["@@iterator"],typeof E=="function"?E:null)}var Z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$=Object.assign,Q={};function Y(E,L,F){this.props=E,this.context=L,this.refs=Q,this.updater=F||Z}Y.prototype.isReactComponent={},Y.prototype.setState=function(E,L){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,L,"setState")},Y.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function se(){}se.prototype=Y.prototype;function te(E,L,F){this.props=E,this.context=L,this.refs=Q,this.updater=F||Z}var J=te.prototype=new se;J.constructor=te,$(J,Y.prototype),J.isPureReactComponent=!0;var I=Array.isArray;function ge(){}var oe={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function le(E,L,F){var ne=F.ref;return{$$typeof:a,type:E,key:L,ref:ne!==void 0?ne:null,props:F}}function ke(E,L){return le(E.type,L,E.props)}function P(E){return typeof E=="object"&&E!==null&&E.$$typeof===a}function Se(E){var L={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(F){return L[F]})}var Ye=/\/+/g;function Ze(E,L){return typeof E=="object"&&E!==null&&E.key!=null?Se(""+E.key):L.toString(36)}function Qe(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(ge,ge):(E.status="pending",E.then(function(L){E.status==="pending"&&(E.status="fulfilled",E.value=L)},function(L){E.status==="pending"&&(E.status="rejected",E.reason=L)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function k(E,L,F,ne,be){var xe=typeof E;(xe==="undefined"||xe==="boolean")&&(E=null);var De=!1;if(E===null)De=!0;else switch(xe){case"bigint":case"string":case"number":De=!0;break;case"object":switch(E.$$typeof){case a:case i:De=!0;break;case v:return De=E._init,k(De(E._payload),L,F,ne,be)}}if(De)return be=be(E),De=ne===""?"."+Ze(E,0):ne,I(be)?(F="",De!=null&&(F=De.replace(Ye,"$&/")+"/"),k(be,L,F,"",function(Xt){return Xt})):be!=null&&(P(be)&&(be=ke(be,F+(be.key==null||E&&E.key===be.key?"":(""+be.key).replace(Ye,"$&/")+"/")+De)),L.push(be)),1;De=0;var Et=ne===""?".":ne+":";if(I(E))for(var Fe=0;Fe<E.length;Fe++)ne=E[Fe],xe=Et+Ze(ne,Fe),De+=k(ne,L,F,xe,be);else if(Fe=j(E),typeof Fe=="function")for(E=Fe.call(E),Fe=0;!(ne=E.next()).done;)ne=ne.value,xe=Et+Ze(ne,Fe++),De+=k(ne,L,F,xe,be);else if(xe==="object"){if(typeof E.then=="function")return k(Qe(E),L,F,ne,be);throw L=String(E),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return De}function K(E,L,F){if(E==null)return E;var ne=[],be=0;return k(E,ne,"","",function(xe){return L.call(F,xe,be++)}),ne}function ae(E){if(E._status===-1){var L=E._result;L=L(),L.then(function(F){(E._status===0||E._status===-1)&&(E._status=1,E._result=F)},function(F){(E._status===0||E._status===-1)&&(E._status=2,E._result=F)}),E._status===-1&&(E._status=0,E._result=L)}if(E._status===1)return E._result.default;throw E._result}var Ae=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=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(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},je={map:K,forEach:function(E,L,F){K(E,function(){L.apply(this,arguments)},F)},count:function(E){var L=0;return K(E,function(){L++}),L},toArray:function(E){return K(E,function(L){return L})||[]},only:function(E){if(!P(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return _e.Activity=S,_e.Children=je,_e.Component=Y,_e.Fragment=u,_e.Profiler=r,_e.PureComponent=te,_e.StrictMode=s,_e.Suspense=p,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=oe,_e.__COMPILER_RUNTIME={__proto__:null,c:function(E){return oe.H.useMemoCache(E)}},_e.cache=function(E){return function(){return E.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(E,L,F){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var ne=$({},E.props),be=E.key;if(L!=null)for(xe in L.key!==void 0&&(be=""+L.key),L)!D.call(L,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&L.ref===void 0||(ne[xe]=L[xe]);var xe=arguments.length-2;if(xe===1)ne.children=F;else if(1<xe){for(var De=Array(xe),Et=0;Et<xe;Et++)De[Et]=arguments[Et+2];ne.children=De}return le(E.type,be,ne)},_e.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},_e.createElement=function(E,L,F){var ne,be={},xe=null;if(L!=null)for(ne in L.key!==void 0&&(xe=""+L.key),L)D.call(L,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(be[ne]=L[ne]);var De=arguments.length-2;if(De===1)be.children=F;else if(1<De){for(var Et=Array(De),Fe=0;Fe<De;Fe++)Et[Fe]=arguments[Fe+2];be.children=Et}if(E&&E.defaultProps)for(ne in De=E.defaultProps,De)be[ne]===void 0&&(be[ne]=De[ne]);return le(E,xe,be)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(E){return{$$typeof:g,render:E}},_e.isValidElement=P,_e.lazy=function(E){return{$$typeof:v,_payload:{_status:-1,_result:E},_init:ae}},_e.memo=function(E,L){return{$$typeof:y,type:E,compare:L===void 0?null:L}},_e.startTransition=function(E){var L=oe.T,F={};oe.T=F;try{var ne=E(),be=oe.S;be!==null&&be(F,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(ge,Ae)}catch(xe){Ae(xe)}finally{L!==null&&F.types!==null&&(L.types=F.types),oe.T=L}},_e.unstable_useCacheRefresh=function(){return oe.H.useCacheRefresh()},_e.use=function(E){return oe.H.use(E)},_e.useActionState=function(E,L,F){return oe.H.useActionState(E,L,F)},_e.useCallback=function(E,L){return oe.H.useCallback(E,L)},_e.useContext=function(E){return oe.H.useContext(E)},_e.useDebugValue=function(){},_e.useDeferredValue=function(E,L){return oe.H.useDeferredValue(E,L)},_e.useEffect=function(E,L){return oe.H.useEffect(E,L)},_e.useEffectEvent=function(E){return oe.H.useEffectEvent(E)},_e.useId=function(){return oe.H.useId()},_e.useImperativeHandle=function(E,L,F){return oe.H.useImperativeHandle(E,L,F)},_e.useInsertionEffect=function(E,L){return oe.H.useInsertionEffect(E,L)},_e.useLayoutEffect=function(E,L){return oe.H.useLayoutEffect(E,L)},_e.useMemo=function(E,L){return oe.H.useMemo(E,L)},_e.useOptimistic=function(E,L){return oe.H.useOptimistic(E,L)},_e.useReducer=function(E,L,F){return oe.H.useReducer(E,L,F)},_e.useRef=function(E){return oe.H.useRef(E)},_e.useState=function(E){return oe.H.useState(E)},_e.useSyncExternalStore=function(E,L,F){return oe.H.useSyncExternalStore(E,L,F)},_e.useTransition=function(){return oe.H.useTransition()},_e.version="19.2.4",_e}var ap;function uo(){return ap||(ap=1,Vr.exports=gy()),Vr.exports}var Kr={exports:{}},Bt={};var ip;function my(){if(ip)return Bt;ip=1;var a=uo();function i(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(i(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},r=Symbol.for("react.portal");function f(p,y,v){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:S==null?null:""+S,children:p,containerInfo:y,implementation:v}}var d=a.__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 Bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Bt.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(i(299));return f(p,y,null,v)},Bt.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()}},Bt.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))},Bt.prefetchDNS=function(p){typeof p=="string"&&s.d.D(p)},Bt.preinit=function(p,y){if(typeof p=="string"&&y&&typeof y.as=="string"){var v=y.as,S=g(v,y.crossOrigin),O=typeof y.integrity=="string"?y.integrity:void 0,j=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;v==="style"?s.d.S(p,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:S,integrity:O,fetchPriority:j}):v==="script"&&s.d.X(p,{crossOrigin:S,integrity:O,fetchPriority:j,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},Bt.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)},Bt.preload=function(p,y){if(typeof p=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var v=y.as,S=g(v,y.crossOrigin);s.d.L(p,v,{crossOrigin:S,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})}},Bt.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)},Bt.requestFormReset=function(p){s.d.r(p)},Bt.unstable_batchedUpdates=function(p,y){return p(y)},Bt.useFormState=function(p,y,v){return d.H.useFormState(p,y,v)},Bt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Bt.version="19.2.4",Bt}var sp;function yy(){if(sp)return Kr.exports;sp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),Kr.exports=my(),Kr.exports}var up;function by(){if(up)return ss;up=1;var a=py(),i=uo(),u=yy();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 r(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 c=l.return;if(c===null)break;var o=c.alternate;if(o===null){if(n=c.return,n!==null){l=n;continue}break}if(c.child===o.child){for(o=c.child;o;){if(o===l)return p(c),e;if(o===n)return p(c),t;o=o.sibling}throw Error(s(188))}if(l.return!==n.return)l=c,n=o;else{for(var h=!1,m=c.child;m;){if(m===l){h=!0,l=c,n=o;break}if(m===n){h=!0,n=c,l=o;break}m=m.sibling}if(!h){for(m=o.child;m;){if(m===l){h=!0,l=o,n=c;break}if(m===n){h=!0,n=o,l=c;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 S=Object.assign,O=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),Z=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),se=Symbol.for("react.consumer"),te=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),ge=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),ke=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function Se(e){return e===null||typeof e!="object"?null:(e=P&&e[P]||e["@@iterator"],typeof e=="function"?e:null)}var Ye=Symbol.for("react.client.reference");function Ze(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ye?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $:return"Fragment";case Y:return"Profiler";case Q:return"StrictMode";case I:return"Suspense";case ge:return"SuspenseList";case le:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Z:return"Portal";case te:return e.displayName||"Context";case se:return(e._context.displayName||"Context")+".Consumer";case J:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case oe:return t=e.displayName||null,t!==null?t:Ze(e.type)||"Memo";case D:t=e._payload,e=e._init;try{return Ze(e(t))}catch{}}return null}var Qe=Array.isArray,k=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Ae=[],je=-1;function E(e){return{current:e}}function L(e){0>je||(e.current=Ae[je],Ae[je]=null,je--)}function F(e,t){je++,Ae[je]=e.current,e.current=t}var ne=E(null),be=E(null),xe=E(null),De=E(null);function Et(e,t){switch(F(xe,t),F(be,e),F(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=xd(t),e=Ed(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(ne),F(ne,e)}function Fe(){L(ne),L(be),L(xe)}function Xt(e){e.memoizedState!==null&&F(De,e);var t=ne.current,l=Ed(t,e.type);t!==l&&(F(be,e),F(ne,l))}function Sn(e){be.current===e&&(L(ne),L(be)),De.current===e&&(L(De),ts._currentValue=ae)}var Cl,Ta;function ol(e){if(Cl===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Cl=t&&t[1]||"",Ta=-1<l.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Cl+e+Ta}var _n=!1;function $l(e,t){if(!e||_n)return"";_n=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(C){var z=C}Reflect.construct(e,[],X)}else{try{X.call()}catch(C){z=C}e.call(X.prototype)}}else{try{throw Error()}catch(C){z=C}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(C){if(C&&z&&typeof C.stack=="string")return[C.stack,z.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=n.DetermineComponentFrameRoot(),h=o[0],m=o[1];if(h&&m){var _=h.split(`
|
|
4
|
+
`),R=m.split(`
|
|
5
|
+
`);for(c=n=0;n<_.length&&!_[n].includes("DetermineComponentFrameRoot");)n++;for(;c<R.length&&!R[c].includes("DetermineComponentFrameRoot");)c++;if(n===_.length||c===R.length)for(n=_.length-1,c=R.length-1;1<=n&&0<=c&&_[n]!==R[c];)c--;for(;1<=n&&0<=c;n--,c--)if(_[n]!==R[c]){if(n!==1||c!==1)do if(n--,c--,0>c||_[n]!==R[c]){var U=`
|
|
6
|
+
`+_[n].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=n&&0<=c);break}}}finally{_n=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?ol(l):""}function In(e,t){switch(e.tag){case 26:case 27:case 5:return ol(e.type);case 16:return ol("Lazy");case 13:return e.child!==t&&t!==null?ol("Suspense Fallback"):ol("Suspense");case 19:return ol("SuspenseList");case 0:case 15:return $l(e.type,!1);case 11:return $l(e.type.render,!1);case 1:return $l(e.type,!0);case 31:return ol("Activity");default:return""}}function Tl(e){try{var t="",l=null;do t+=In(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
|
|
7
|
+
Error generating stack: `+n.message+`
|
|
8
|
+
`+n.stack}}var xn=Object.prototype.hasOwnProperty,kl=a.unstable_scheduleCallback,Dl=a.unstable_cancelCallback,Na=a.unstable_shouldYield,It=a.unstable_requestPaint,lt=a.unstable_now,Pn=a.unstable_getCurrentPriorityLevel,Pt=a.unstable_ImmediatePriority,Ul=a.unstable_UserBlockingPriority,Bl=a.unstable_NormalPriority,qt=a.unstable_LowPriority,Nl=a.unstable_IdlePriority,Aa=a.log,fi=a.unstable_setDisableYieldValue,el=null,Nt=null;function fl(e){if(typeof Aa=="function"&&fi(e),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(el,e)}catch{}}var Ot=Math.clz32?Math.clz32:Oa,Vl=Math.log,ea=Math.LN2;function Oa(e){return e>>>=0,e===0?32:31-(Vl(e)/ea|0)|0}var Kl=256,En=262144,Jl=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 x(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var c=0,o=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var m=n&134217727;return m!==0?(n=m&~o,n!==0?c=kt(n):(h&=m,h!==0?c=kt(h):l||(l=m&~e,l!==0&&(c=kt(l))))):(m=n&~o,m!==0?c=kt(m):h!==0?c=kt(h):l||(l=n&~e,l!==0&&(c=kt(l)))),c===0?0:t!==0&&t!==c&&(t&o)===0&&(o=c&-c,l=t&-t,o>=l||o===32&&(l&4194048)!==0)?t:c}function H(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ee(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 pe(){var e=Jl;return Jl<<=1,(Jl&62914560)===0&&(Jl=4194304),e}function Xe(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ue(e,t,l,n,c,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,_=e.expirationTimes,R=e.hiddenUpdates;for(l=h&~l;0<l;){var U=31-Ot(l),X=1<<U;m[U]=0,_[U]=-1;var z=R[U];if(z!==null)for(R[U]=null,U=0;U<z.length;U++){var C=z[U];C!==null&&(C.lane&=-536870913)}l&=~X}n!==0&&A(e,n,0),o!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=o&~(h&~t))}function A(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Ot(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function q(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-Ot(l),c=1<<n;c&t|e[n]&t&&(e[n]|=t),l&=~c}}function de(e,t){var l=t&-t;return l=(l&42)!==0?1:ve(l),(l&(e.suspendedLanes|t))!==0?0:l}function ve(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 Ht(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Al(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:$d(e.type))}function ja(e,t){var l=K.p;try{return K.p=e,t()}finally{K.p=l}}var ql=Math.random().toString(36).slice(2),dt="__reactFiber$"+ql,Dt="__reactProps$"+ql,Tn="__reactContainer$"+ql,hi="__reactEvents$"+ql,gs="__reactListeners$"+ql,wa="__reactHandles$"+ql,ms="__reactResources$"+ql,ta="__reactMarker$"+ql;function di(e){delete e[dt],delete e[Dt],delete e[hi],delete e[gs],delete e[wa]}function Lt(e){var t=e[dt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Tn]||l[dt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Rd(e);e!==null;){if(l=e[dt])return l;e=Rd(e)}return t}e=l,l=e.parentNode}return null}function Wl(e){if(e=e[dt]||e[Tn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function An(e){var t=e[ms];return t||(t=e[ms]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function yt(e){e[ta]=!0}var ys=new Set,la={};function Fl(e,t){V(e,t),V(e+"Capture",t)}function V(e,t){for(la[e]=t,e=0;e<t.length;e++)ys.add(t[e])}var fe=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]*$"),Oe={},$e={};function pt(e){return xn.call($e,e)?!0:xn.call(Oe,e)?!1:fe.test(e)?$e[e]=!0:(Oe[e]=!0,!1)}function Ut(e,t,l){if(pt(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 tl(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 Zt(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 ll(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bs(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 c=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.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 Ra(e){if(!e._valueTracker){var t=ll(e)?"checked":"value";e._valueTracker=bs(e,t,""+e[t])}}function pi(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=ll(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 Yu=/[\n"\\]/g;function Qt(e){return e.replace(Yu,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function gi(e,t,l,n,c,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?Ma(e,h,nt(t)):l!=null?Ma(e,h,nt(l)):n!=null&&e.removeAttribute("value"),c==null&&o!=null&&(e.defaultChecked=!!o),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+nt(m):e.removeAttribute("name")}function na(e,t,l,n,c,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)){Ra(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??c,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),Ra(e)}function Ma(e,t,l){t==="number"&&za(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function jt(e,t,l,n){if(e=e.options,t){t={};for(var c=0;c<l.length;c++)t["$"+l[c]]=!0;for(l=0;l<e.length;l++)c=t.hasOwnProperty("$"+e[l].value),e[l].selected!==c&&(e[l].selected=c),c&&n&&(e[l].defaultSelected=!0)}else{for(l=""+nt(l),t=null,c=0;c<e.length;c++){if(e[c].value===l){e[c].selected=!0,n&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function vs(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 Ca(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(s(92));if(Qe(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),Ra(e)}function ye(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Ss=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 bt(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||Ss.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Ve(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 c in t)n=t[c],t.hasOwnProperty(c)&&l[c]!==n&&bt(e,c,n)}else for(var o in t)t.hasOwnProperty(o)&&bt(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"]]),mi=/^[\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 jn(e){return mi.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function W(){}var ce=null;function Ee(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ze=null,ot=null;function hl(e){var t=Wl(e);if(t&&(e=t.stateNode)){var l=e[Dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(gi(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="'+Qt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var n=l[t];if(n!==e&&n.form===e.form){var c=n[Dt]||null;if(!c)throw Error(s(90));gi(n,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&pi(n)}break e;case"textarea":vs(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&jt(e,!!l.multiple,t,!1)}}}var yi=!1;function _s(e,t,l){if(yi)return e(t,l);yi=!0;try{var n=e(t);return n}finally{if(yi=!1,(ze!==null||ot!==null)&&(cu(),ze&&(t=ze,e=ot,ot=ze=null,hl(t),e)))for(t=0;t<e.length;t++)hl(e[t])}}function bi(e,t){var l=e.stateNode;if(l===null)return null;var n=l[Dt]||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"),Xu=!1;if(Pl)try{var vi={};Object.defineProperty(vi,"passive",{get:function(){Xu=!0}}),window.addEventListener("test",vi,vi),window.removeEventListener("test",vi,vi)}catch{Xu=!1}var wn=null,Zu=null,xs=null;function xo(){if(xs)return xs;var e,t=Zu,l=t.length,n,c="value"in wn?wn.value:wn.textContent,o=c.length;for(e=0;e<l&&t[e]===c[e];e++);var h=l-e;for(n=1;n<=h&&t[l-n]===c[o-n];n++);return xs=c.slice(e,1<n?1-n:void 0)}function Es(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ts(){return!0}function Eo(){return!1}function $t(e){function t(l,n,c,o,h){this._reactName=l,this._targetInst=c,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)?Ts:Eo,this.isPropagationStopped=Eo,this}return S(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=Ts)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ts)},persist:function(){},isPersistent:Ts}),t}var aa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ns=$t(aa),Si=S({},aa,{view:0,detail:0}),cg=$t(Si),Qu,$u,_i,As=S({},Si,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ku,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!==_i&&(_i&&e.type==="mousemove"?(Qu=e.screenX-_i.screenX,$u=e.screenY-_i.screenY):$u=Qu=0,_i=e),Qu)},movementY:function(e){return"movementY"in e?e.movementY:$u}}),To=$t(As),rg=S({},As,{dataTransfer:0}),og=$t(rg),fg=S({},Si,{relatedTarget:0}),Vu=$t(fg),hg=S({},aa,{animationName:0,elapsedTime:0,pseudoElement:0}),dg=$t(hg),pg=S({},aa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gg=$t(pg),mg=S({},aa,{data:0}),No=$t(mg),yg={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"},vg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vg[e])?!!t[e]:!1}function Ku(){return Sg}var _g=S({},Si,{key:function(e){if(e.key){var t=yg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ku,charCode:function(e){return e.type==="keypress"?Es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xg=$t(_g),Eg=S({},As,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ao=$t(Eg),Tg=S({},Si,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ku}),Ng=$t(Tg),Ag=S({},aa,{propertyName:0,elapsedTime:0,pseudoElement:0}),Og=$t(Ag),jg=S({},As,{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}),wg=$t(jg),Rg=S({},aa,{newState:0,oldState:0}),zg=$t(Rg),Mg=[9,13,27,32],Ju=Pl&&"CompositionEvent"in window,xi=null;Pl&&"documentMode"in document&&(xi=document.documentMode);var Cg=Pl&&"TextEvent"in window&&!xi,Oo=Pl&&(!Ju||xi&&8<xi&&11>=xi),jo=" ",wo=!1;function Ro(e,t){switch(e){case"keyup":return Mg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ka=!1;function kg(e,t){switch(e){case"compositionend":return zo(t);case"keypress":return t.which!==32?null:(wo=!0,jo);case"textInput":return e=t.data,e===jo&&wo?null:e;default:return null}}function Dg(e,t){if(ka)return e==="compositionend"||!Ju&&Ro(e,t)?(e=xo(),xs=Zu=wn=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 Oo&&t.locale!=="ko"?null:t.data;default:return null}}var Ug={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 Mo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ug[e.type]:t==="textarea"}function Co(e,t,l,n){ze?ot?ot.push(n):ot=[n]:ze=n,t=gu(t,"onChange"),0<t.length&&(l=new Ns("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var Ei=null,Ti=null;function Bg(e){md(e,0)}function Os(e){var t=Nn(e);if(pi(t))return e}function ko(e,t){if(e==="change")return t}var Do=!1;if(Pl){var Wu;if(Pl){var Fu="oninput"in document;if(!Fu){var Uo=document.createElement("div");Uo.setAttribute("oninput","return;"),Fu=typeof Uo.oninput=="function"}Wu=Fu}else Wu=!1;Do=Wu&&(!document.documentMode||9<document.documentMode)}function Bo(){Ei&&(Ei.detachEvent("onpropertychange",qo),Ti=Ei=null)}function qo(e){if(e.propertyName==="value"&&Os(Ti)){var t=[];Co(t,Ti,e,Ee(e)),_s(Bg,t)}}function qg(e,t,l){e==="focusin"?(Bo(),Ei=t,Ti=l,Ei.attachEvent("onpropertychange",qo)):e==="focusout"&&Bo()}function Hg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Os(Ti)}function Lg(e,t){if(e==="click")return Os(t)}function Gg(e,t){if(e==="input"||e==="change")return Os(t)}function Yg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nl=typeof Object.is=="function"?Object.is:Yg;function Ni(e,t){if(nl(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 c=l[n];if(!xn.call(t,c)||!nl(e[c],t[c]))return!1}return!0}function Ho(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lo(e,t){var l=Ho(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=Ho(l)}}function Go(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Go(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yo(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 Iu(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 Xg=Pl&&"documentMode"in document&&11>=document.documentMode,Da=null,Pu=null,Ai=null,ec=!1;function Xo(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ec||Da==null||Da!==za(n)||(n=Da,"selectionStart"in n&&Iu(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}),Ai&&Ni(Ai,n)||(Ai=n,n=gu(Pu,"onSelect"),0<n.length&&(t=new Ns("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=Da)))}function ia(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Ua={animationend:ia("Animation","AnimationEnd"),animationiteration:ia("Animation","AnimationIteration"),animationstart:ia("Animation","AnimationStart"),transitionrun:ia("Transition","TransitionRun"),transitionstart:ia("Transition","TransitionStart"),transitioncancel:ia("Transition","TransitionCancel"),transitionend:ia("Transition","TransitionEnd")},tc={},Zo={};Pl&&(Zo=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 sa(e){if(tc[e])return tc[e];if(!Ua[e])return e;var t=Ua[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Zo)return tc[e]=t[l];return e}var Qo=sa("animationend"),$o=sa("animationiteration"),Vo=sa("animationstart"),Zg=sa("transitionrun"),Qg=sa("transitionstart"),$g=sa("transitioncancel"),Ko=sa("transitionend"),Jo=new Map,lc="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(" ");lc.push("scrollEnd");function Ol(e,t){Jo.set(e,t),Fl(t,[e])}var js=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=[],Ba=0,nc=0;function ws(){for(var e=Ba,t=nc=Ba=0;t<e;){var l=dl[t];dl[t++]=null;var n=dl[t];dl[t++]=null;var c=dl[t];dl[t++]=null;var o=dl[t];if(dl[t++]=null,n!==null&&c!==null){var h=n.pending;h===null?c.next=c:(c.next=h.next,h.next=c),n.pending=c}o!==0&&Wo(l,c,o)}}function Rs(e,t,l,n){dl[Ba++]=e,dl[Ba++]=t,dl[Ba++]=l,dl[Ba++]=n,nc|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function ac(e,t,l,n){return Rs(e,t,l,n),zs(e)}function ua(e,t){return Rs(e,null,null,t),zs(e)}function Wo(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var c=!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||(c=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,c&&t!==null&&(c=31-Ot(l),e=o.hiddenUpdates,n=e[c],n===null?e[c]=[t]:n.push(t),t.lane=l|536870912),o):null}function zs(e){if(50<Ki)throw Ki=0,dr=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var qa={};function Vg(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 al(e,t,l,n){return new Vg(e,t,l,n)}function ic(e){return e=e.prototype,!(!e||!e.isReactComponent)}function en(e,t){var l=e.alternate;return l===null?(l=al(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 Fo(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 Ms(e,t,l,n,c,o){var h=0;if(n=e,typeof e=="function")ic(e)&&(h=1);else if(typeof e=="string")h=Im(e,l,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case le:return e=al(31,l,t,c),e.elementType=le,e.lanes=o,e;case $:return ca(l.children,c,o,t);case Q:h=8,c|=24;break;case Y:return e=al(12,l,t,c|2),e.elementType=Y,e.lanes=o,e;case I:return e=al(13,l,t,c),e.elementType=I,e.lanes=o,e;case ge:return e=al(19,l,t,c),e.elementType=ge,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case te:h=10;break e;case se:h=9;break e;case J:h=11;break e;case oe:h=14;break e;case D:h=16,n=null;break e}h=29,l=Error(s(130,e===null?"null":typeof e,"")),n=null}return t=al(h,l,t,c),t.elementType=e,t.type=n,t.lanes=o,t}function ca(e,t,l,n){return e=al(7,e,n,t),e.lanes=l,e}function sc(e,t,l){return e=al(6,e,null,t),e.lanes=l,e}function Io(e){var t=al(18,null,null,0);return t.stateNode=e,t}function uc(e,t,l){return t=al(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Po=new WeakMap;function pl(e,t){if(typeof e=="object"&&e!==null){var l=Po.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Tl(t)},Po.set(e,t),t)}return{value:e,source:t,stack:Tl(t)}}var Ha=[],La=0,Cs=null,Oi=0,gl=[],ml=0,Rn=null,Hl=1,Ll="";function tn(e,t){Ha[La++]=Oi,Ha[La++]=Cs,Cs=e,Oi=t}function ef(e,t,l){gl[ml++]=Hl,gl[ml++]=Ll,gl[ml++]=Rn,Rn=e;var n=Hl;e=Ll;var c=32-Ot(n)-1;n&=~(1<<c),l+=1;var o=32-Ot(t)+c;if(30<o){var h=c-c%5;o=(n&(1<<h)-1).toString(32),n>>=h,c-=h,Hl=1<<32-Ot(t)+c|l<<c|n,Ll=o+e}else Hl=1<<o|l<<c|n,Ll=e}function cc(e){e.return!==null&&(tn(e,1),ef(e,1,0))}function rc(e){for(;e===Cs;)Cs=Ha[--La],Ha[La]=null,Oi=Ha[--La],Ha[La]=null;for(;e===Rn;)Rn=gl[--ml],gl[ml]=null,Ll=gl[--ml],gl[ml]=null,Hl=gl[--ml],gl[ml]=null}function tf(e,t){gl[ml++]=Hl,gl[ml++]=Ll,gl[ml++]=Rn,Hl=t.id,Ll=t.overflow,Rn=e}var wt=null,it=null,Ue=!1,zn=null,yl=!1,oc=Error(s(519));function Mn(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ji(pl(t,e)),oc}function lf(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[dt]=e,t[Dt]=n,l){case"dialog":Re("cancel",t),Re("close",t);break;case"iframe":case"object":case"embed":Re("load",t);break;case"video":case"audio":for(l=0;l<Wi.length;l++)Re(Wi[l],t);break;case"source":Re("error",t);break;case"img":case"image":case"link":Re("error",t),Re("load",t);break;case"details":Re("toggle",t);break;case"input":Re("invalid",t),na(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Re("invalid",t);break;case"textarea":Re("invalid",t),Ca(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||Sd(t.textContent,l)?(n.popover!=null&&(Re("beforetoggle",t),Re("toggle",t)),n.onScroll!=null&&Re("scroll",t),n.onScrollEnd!=null&&Re("scrollend",t),n.onClick!=null&&(t.onclick=W),t=!0):t=!1,t||Mn(e,!0)}function nf(e){for(wt=e.return;wt;)switch(wt.tag){case 5:case 31:case 13:yl=!1;return;case 27:case 3:yl=!0;return;default:wt=wt.return}}function Ga(e){if(e!==wt)return!1;if(!Ue)return nf(e),Ue=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||jr(e.type,e.memoizedProps)),l=!l),l&&it&&Mn(e),nf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));it=wd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));it=wd(e)}else t===27?(t=it,$n(e.type)?(e=Cr,Cr=null,it=e):it=t):it=wt?vl(e.stateNode.nextSibling):null;return!0}function ra(){it=wt=null,Ue=!1}function fc(){var e=zn;return e!==null&&(Wt===null?Wt=e:Wt.push.apply(Wt,e),zn=null),e}function ji(e){zn===null?zn=[e]:zn.push(e)}var hc=E(null),oa=null,ln=null;function Cn(e,t,l){F(hc,t._currentValue),t._currentValue=l}function nn(e){e._currentValue=hc.current,L(hc)}function dc(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 pc(e,t,l,n){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var o=c.dependencies;if(o!==null){var h=c.child;o=o.firstContext;e:for(;o!==null;){var m=o;o=c;for(var _=0;_<t.length;_++)if(m.context===t[_]){o.lanes|=l,m=o.alternate,m!==null&&(m.lanes|=l),dc(o.return,l,e),n||(h=null);break e}o=m.next}}else if(c.tag===18){if(h=c.return,h===null)throw Error(s(341));h.lanes|=l,o=h.alternate,o!==null&&(o.lanes|=l),dc(h,l,e),h=null}else h=c.child;if(h!==null)h.return=c;else for(h=c;h!==null;){if(h===e){h=null;break}if(c=h.sibling,c!==null){c.return=h.return,h=c;break}h=h.return}c=h}}function Ya(e,t,l,n){e=null;for(var c=t,o=!1;c!==null;){if(!o){if((c.flags&524288)!==0)o=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var h=c.alternate;if(h===null)throw Error(s(387));if(h=h.memoizedProps,h!==null){var m=c.type;nl(c.pendingProps.value,h.value)||(e!==null?e.push(m):e=[m])}}else if(c===De.current){if(h=c.alternate,h===null)throw Error(s(387));h.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(ts):e=[ts])}c=c.return}e!==null&&pc(t,e,l,n),t.flags|=262144}function ks(e){for(e=e.firstContext;e!==null;){if(!nl(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function fa(e){oa=e,ln=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return af(oa,e)}function Ds(e,t){return oa===null&&fa(e),af(e,t)}function af(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 Kg=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()})}},Jg=a.unstable_scheduleCallback,Wg=a.unstable_NormalPriority,vt={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gc(){return{controller:new Kg,data:new Map,refCount:0}}function wi(e){e.refCount--,e.refCount===0&&Jg(Wg,function(){e.controller.abort()})}var Ri=null,mc=0,Xa=0,Za=null;function Fg(e,t){if(Ri===null){var l=Ri=[];mc=0,Xa=vr(),Za={status:"pending",value:void 0,then:function(n){l.push(n)}}}return mc++,t.then(sf,sf),t}function sf(){if(--mc===0&&Ri!==null){Za!==null&&(Za.status="fulfilled");var e=Ri;Ri=null,Xa=0,Za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ig(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(c){l.push(c)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var c=0;c<l.length;c++)(0,l[c])(t)},function(c){for(n.status="rejected",n.reason=c,c=0;c<l.length;c++)(0,l[c])(void 0)}),n}var uf=k.S;k.S=function(e,t){Zh=lt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Fg(e,t),uf!==null&&uf(e,t)};var ha=E(null);function yc(){var e=ha.current;return e!==null?e:tt.pooledCache}function Us(e,t){t===null?F(ha,ha.current):F(ha,t.pool)}function cf(){var e=yc();return e===null?null:{parent:vt._currentValue,pool:e}}var Qa=Error(s(460)),bc=Error(s(474)),Bs=Error(s(542)),qs={then:function(){}};function rf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function of(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(W,W),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hf(e),e;default:if(typeof t.status=="string")t.then(W,W);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 c=t;c.status="fulfilled",c.value=n}},function(n){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hf(e),e}throw pa=t,Qa}}function da(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(pa=l,Qa):l}}var pa=null;function ff(){if(pa===null)throw Error(s(459));var e=pa;return pa=null,e}function hf(e){if(e===Qa||e===Bs)throw Error(s(483))}var $a=null,zi=0;function Hs(e){var t=zi;return zi+=1,$a===null&&($a=[]),of($a,e,t)}function Mi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ls(e,t){throw t.$$typeof===O?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function df(e){function t(N,T){if(e){var w=N.deletions;w===null?(N.deletions=[T],N.flags|=16):w.push(T)}}function l(N,T){if(!e)return null;for(;T!==null;)t(N,T),T=T.sibling;return null}function n(N){for(var T=new Map;N!==null;)N.key!==null?T.set(N.key,N):T.set(N.index,N),N=N.sibling;return T}function c(N,T){return N=en(N,T),N.index=0,N.sibling=null,N}function o(N,T,w){return N.index=w,e?(w=N.alternate,w!==null?(w=w.index,w<T?(N.flags|=67108866,T):w):(N.flags|=67108866,T)):(N.flags|=1048576,T)}function h(N){return e&&N.alternate===null&&(N.flags|=67108866),N}function m(N,T,w,G){return T===null||T.tag!==6?(T=sc(w,N.mode,G),T.return=N,T):(T=c(T,w),T.return=N,T)}function _(N,T,w,G){var he=w.type;return he===$?U(N,T,w.props.children,G,w.key):T!==null&&(T.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===D&&da(he)===T.type)?(T=c(T,w.props),Mi(T,w),T.return=N,T):(T=Ms(w.type,w.key,w.props,null,N.mode,G),Mi(T,w),T.return=N,T)}function R(N,T,w,G){return T===null||T.tag!==4||T.stateNode.containerInfo!==w.containerInfo||T.stateNode.implementation!==w.implementation?(T=uc(w,N.mode,G),T.return=N,T):(T=c(T,w.children||[]),T.return=N,T)}function U(N,T,w,G,he){return T===null||T.tag!==7?(T=ca(w,N.mode,G,he),T.return=N,T):(T=c(T,w),T.return=N,T)}function X(N,T,w){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=sc(""+T,N.mode,w),T.return=N,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case j:return w=Ms(T.type,T.key,T.props,null,N.mode,w),Mi(w,T),w.return=N,w;case Z:return T=uc(T,N.mode,w),T.return=N,T;case D:return T=da(T),X(N,T,w)}if(Qe(T)||Se(T))return T=ca(T,N.mode,w,null),T.return=N,T;if(typeof T.then=="function")return X(N,Hs(T),w);if(T.$$typeof===te)return X(N,Ds(N,T),w);Ls(N,T)}return null}function z(N,T,w,G){var he=T!==null?T.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return he!==null?null:m(N,T,""+w,G);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case j:return w.key===he?_(N,T,w,G):null;case Z:return w.key===he?R(N,T,w,G):null;case D:return w=da(w),z(N,T,w,G)}if(Qe(w)||Se(w))return he!==null?null:U(N,T,w,G,null);if(typeof w.then=="function")return z(N,T,Hs(w),G);if(w.$$typeof===te)return z(N,T,Ds(N,w),G);Ls(N,w)}return null}function C(N,T,w,G,he){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return N=N.get(w)||null,m(T,N,""+G,he);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case j:return N=N.get(G.key===null?w:G.key)||null,_(T,N,G,he);case Z:return N=N.get(G.key===null?w:G.key)||null,R(T,N,G,he);case D:return G=da(G),C(N,T,w,G,he)}if(Qe(G)||Se(G))return N=N.get(w)||null,U(T,N,G,he,null);if(typeof G.then=="function")return C(N,T,w,Hs(G),he);if(G.$$typeof===te)return C(N,T,w,Ds(T,G),he);Ls(T,G)}return null}function ie(N,T,w,G){for(var he=null,He=null,re=T,Ne=T=0,Ce=null;re!==null&&Ne<w.length;Ne++){re.index>Ne?(Ce=re,re=null):Ce=re.sibling;var Le=z(N,re,w[Ne],G);if(Le===null){re===null&&(re=Ce);break}e&&re&&Le.alternate===null&&t(N,re),T=o(Le,T,Ne),He===null?he=Le:He.sibling=Le,He=Le,re=Ce}if(Ne===w.length)return l(N,re),Ue&&tn(N,Ne),he;if(re===null){for(;Ne<w.length;Ne++)re=X(N,w[Ne],G),re!==null&&(T=o(re,T,Ne),He===null?he=re:He.sibling=re,He=re);return Ue&&tn(N,Ne),he}for(re=n(re);Ne<w.length;Ne++)Ce=C(re,N,Ne,w[Ne],G),Ce!==null&&(e&&Ce.alternate!==null&&re.delete(Ce.key===null?Ne:Ce.key),T=o(Ce,T,Ne),He===null?he=Ce:He.sibling=Ce,He=Ce);return e&&re.forEach(function(Fn){return t(N,Fn)}),Ue&&tn(N,Ne),he}function me(N,T,w,G){if(w==null)throw Error(s(151));for(var he=null,He=null,re=T,Ne=T=0,Ce=null,Le=w.next();re!==null&&!Le.done;Ne++,Le=w.next()){re.index>Ne?(Ce=re,re=null):Ce=re.sibling;var Fn=z(N,re,Le.value,G);if(Fn===null){re===null&&(re=Ce);break}e&&re&&Fn.alternate===null&&t(N,re),T=o(Fn,T,Ne),He===null?he=Fn:He.sibling=Fn,He=Fn,re=Ce}if(Le.done)return l(N,re),Ue&&tn(N,Ne),he;if(re===null){for(;!Le.done;Ne++,Le=w.next())Le=X(N,Le.value,G),Le!==null&&(T=o(Le,T,Ne),He===null?he=Le:He.sibling=Le,He=Le);return Ue&&tn(N,Ne),he}for(re=n(re);!Le.done;Ne++,Le=w.next())Le=C(re,N,Ne,Le.value,G),Le!==null&&(e&&Le.alternate!==null&&re.delete(Le.key===null?Ne:Le.key),T=o(Le,T,Ne),He===null?he=Le:He.sibling=Le,He=Le);return e&&re.forEach(function(ry){return t(N,ry)}),Ue&&tn(N,Ne),he}function et(N,T,w,G){if(typeof w=="object"&&w!==null&&w.type===$&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case j:e:{for(var he=w.key;T!==null;){if(T.key===he){if(he=w.type,he===$){if(T.tag===7){l(N,T.sibling),G=c(T,w.props.children),G.return=N,N=G;break e}}else if(T.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===D&&da(he)===T.type){l(N,T.sibling),G=c(T,w.props),Mi(G,w),G.return=N,N=G;break e}l(N,T);break}else t(N,T);T=T.sibling}w.type===$?(G=ca(w.props.children,N.mode,G,w.key),G.return=N,N=G):(G=Ms(w.type,w.key,w.props,null,N.mode,G),Mi(G,w),G.return=N,N=G)}return h(N);case Z:e:{for(he=w.key;T!==null;){if(T.key===he)if(T.tag===4&&T.stateNode.containerInfo===w.containerInfo&&T.stateNode.implementation===w.implementation){l(N,T.sibling),G=c(T,w.children||[]),G.return=N,N=G;break e}else{l(N,T);break}else t(N,T);T=T.sibling}G=uc(w,N.mode,G),G.return=N,N=G}return h(N);case D:return w=da(w),et(N,T,w,G)}if(Qe(w))return ie(N,T,w,G);if(Se(w)){if(he=Se(w),typeof he!="function")throw Error(s(150));return w=he.call(w),me(N,T,w,G)}if(typeof w.then=="function")return et(N,T,Hs(w),G);if(w.$$typeof===te)return et(N,T,Ds(N,w),G);Ls(N,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,T!==null&&T.tag===6?(l(N,T.sibling),G=c(T,w),G.return=N,N=G):(l(N,T),G=sc(w,N.mode,G),G.return=N,N=G),h(N)):l(N,T)}return function(N,T,w,G){try{zi=0;var he=et(N,T,w,G);return $a=null,he}catch(re){if(re===Qa||re===Bs)throw re;var He=al(29,re,null,N.mode);return He.lanes=G,He.return=N,He}}}var ga=df(!0),pf=df(!1),kn=!1;function vc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sc(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 Dn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Un(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ge&2)!==0){var c=n.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),n.pending=t,t=zs(e),Wo(e,null,l),t}return Rs(e,n,t,l),zs(e)}function Ci(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,q(e,l)}}function _c(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var c=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?c=o=h:o=o.next=h,l=l.next}while(l!==null);o===null?c=o=t:o=o.next=t}else c=o=t;l={baseState:n.baseState,firstBaseUpdate:c,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 xc=!1;function ki(){if(xc){var e=Za;if(e!==null)throw e}}function Di(e,t,l,n){xc=!1;var c=e.updateQueue;kn=!1;var o=c.firstBaseUpdate,h=c.lastBaseUpdate,m=c.shared.pending;if(m!==null){c.shared.pending=null;var _=m,R=_.next;_.next=null,h===null?o=R:h.next=R,h=_;var U=e.alternate;U!==null&&(U=U.updateQueue,m=U.lastBaseUpdate,m!==h&&(m===null?U.firstBaseUpdate=R:m.next=R,U.lastBaseUpdate=_))}if(o!==null){var X=c.baseState;h=0,U=R=_=null,m=o;do{var z=m.lane&-536870913,C=z!==m.lane;if(C?(Me&z)===z:(n&z)===z){z!==0&&z===Xa&&(xc=!0),U!==null&&(U=U.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var ie=e,me=m;z=t;var et=l;switch(me.tag){case 1:if(ie=me.payload,typeof ie=="function"){X=ie.call(et,X,z);break e}X=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=me.payload,z=typeof ie=="function"?ie.call(et,X,z):ie,z==null)break e;X=S({},X,z);break e;case 2:kn=!0}}z=m.callback,z!==null&&(e.flags|=64,C&&(e.flags|=8192),C=c.callbacks,C===null?c.callbacks=[z]:C.push(z))}else C={lane:z,tag:m.tag,payload:m.payload,callback:m.callback,next:null},U===null?(R=U=C,_=X):U=U.next=C,h|=z;if(m=m.next,m===null){if(m=c.shared.pending,m===null)break;C=m,m=C.next,C.next=null,c.lastBaseUpdate=C,c.shared.pending=null}}while(!0);U===null&&(_=X),c.baseState=_,c.firstBaseUpdate=R,c.lastBaseUpdate=U,o===null&&(c.shared.lanes=0),Gn|=h,e.lanes=h,e.memoizedState=X}}function gf(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function mf(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)gf(l[e],t)}var Va=E(null),Gs=E(0);function yf(e,t){e=dn,F(Gs,e),F(Va,t),dn=e|t.baseLanes}function Ec(){F(Gs,dn),F(Va,Va.current)}function Tc(){dn=Gs.current,L(Va),L(Gs)}var il=E(null),bl=null;function Bn(e){var t=e.alternate;F(gt,gt.current&1),F(il,e),bl===null&&(t===null||Va.current!==null||t.memoizedState!==null)&&(bl=e)}function Nc(e){F(gt,gt.current),F(il,e),bl===null&&(bl=e)}function bf(e){e.tag===22?(F(gt,gt.current),F(il,e),bl===null&&(bl=e)):qn()}function qn(){F(gt,gt.current),F(il,il.current)}function sl(e){L(il),bl===e&&(bl=null),L(gt)}var gt=E(0);function Ys(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||zr(l)||Mr(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,Te=null,Ie=null,St=null,Xs=!1,Ka=!1,ma=!1,Zs=0,Ui=0,Ja=null,Pg=0;function ft(){throw Error(s(321))}function Ac(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!nl(e[l],t[l]))return!1;return!0}function Oc(e,t,l,n,c,o){return an=o,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?th:Yc,ma=!1,o=l(n,c),ma=!1,Ka&&(o=Sf(t,l,n,c)),vf(e),o}function vf(e){k.H=Hi;var t=Ie!==null&&Ie.next!==null;if(an=0,St=Ie=Te=null,Xs=!1,Ui=0,Ja=null,t)throw Error(s(300));e===null||_t||(e=e.dependencies,e!==null&&ks(e)&&(_t=!0))}function Sf(e,t,l,n){Te=e;var c=0;do{if(Ka&&(Ja=null),Ui=0,Ka=!1,25<=c)throw Error(s(301));if(c+=1,St=Ie=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=lh,o=t(l,n)}while(Ka);return o}function em(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?Bi(t):t,e=e.useState()[0],(Ie!==null?Ie.memoizedState:null)!==e&&(Te.flags|=1024),t}function jc(){var e=Zs!==0;return Zs=0,e}function wc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Rc(e){if(Xs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Xs=!1}an=0,St=Ie=Te=null,Ka=!1,Ui=Zs=0,Ja=null}function Gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?Te.memoizedState=St=e:St=St.next=e,St}function mt(){if(Ie===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=St===null?Te.memoizedState:St.next;if(t!==null)St=t,Ie=e;else{if(e===null)throw Te.alternate===null?Error(s(467)):Error(s(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},St===null?Te.memoizedState=St=e:St=St.next=e}return St}function Qs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bi(e){var t=Ui;return Ui+=1,Ja===null&&(Ja=[]),e=of(Ja,e,t),t=Te,(St===null?t.memoizedState:St.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?th:Yc),e}function $s(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Bi(e);if(e.$$typeof===te)return Rt(e)}throw Error(s(438,String(e)))}function zc(e){var t=null,l=Te.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=Te.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Qs(),Te.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]=ke;return t.index++,l}function sn(e,t){return typeof t=="function"?t(e):t}function Vs(e){var t=mt();return Mc(t,Ie,e)}function Mc(e,t,l){var n=e.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=l;var c=e.baseQueue,o=n.pending;if(o!==null){if(c!==null){var h=c.next;c.next=o.next,o.next=h}t.baseQueue=c=o,n.pending=null}if(o=e.baseState,c===null)e.memoizedState=o;else{t=c.next;var m=h=null,_=null,R=t,U=!1;do{var X=R.lane&-536870913;if(X!==R.lane?(Me&X)===X:(an&X)===X){var z=R.revertLane;if(z===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),X===Xa&&(U=!0);else if((an&z)===z){R=R.next,z===Xa&&(U=!0);continue}else X={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},_===null?(m=_=X,h=o):_=_.next=X,Te.lanes|=z,Gn|=z;X=R.action,ma&&l(o,X),o=R.hasEagerState?R.eagerState:l(o,X)}else z={lane:X,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},_===null?(m=_=z,h=o):_=_.next=z,Te.lanes|=X,Gn|=X;R=R.next}while(R!==null&&R!==t);if(_===null?h=o:_.next=m,!nl(o,e.memoizedState)&&(_t=!0,U&&(l=Za,l!==null)))throw l;e.memoizedState=o,e.baseState=h,e.baseQueue=_,n.lastRenderedState=o}return c===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Cc(e){var t=mt(),l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=e;var n=l.dispatch,c=l.pending,o=t.memoizedState;if(c!==null){l.pending=null;var h=c=c.next;do o=e(o,h.action),h=h.next;while(h!==c);nl(o,t.memoizedState)||(_t=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),l.lastRenderedState=o}return[o,n]}function _f(e,t,l){var n=Te,c=mt(),o=Ue;if(o){if(l===void 0)throw Error(s(407));l=l()}else l=t();var h=!nl((Ie||c).memoizedState,l);if(h&&(c.memoizedState=l,_t=!0),c=c.queue,Uc(Tf.bind(null,n,c,e),[e]),c.getSnapshot!==t||h||St!==null&&St.memoizedState.tag&1){if(n.flags|=2048,Wa(9,{destroy:void 0},Ef.bind(null,n,c,l,t),null),tt===null)throw Error(s(349));o||(an&127)!==0||xf(n,t,l)}return l}function xf(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Te.updateQueue,t===null?(t=Qs(),Te.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Ef(e,t,l,n){t.value=l,t.getSnapshot=n,Nf(t)&&Af(e)}function Tf(e,t,l){return l(function(){Nf(t)&&Af(e)})}function Nf(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!nl(e,l)}catch{return!0}}function Af(e){var t=ua(e,2);t!==null&&Ft(t,e,2)}function kc(e){var t=Gt();if(typeof e=="function"){var l=e;if(e=l(),ma){fl(!0);try{l()}finally{fl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:e},t}function Of(e,t,l,n){return e.baseState=l,Mc(e,Ie,typeof n=="function"?n:sn)}function tm(e,t,l,n,c){if(Ws(e))throw Error(s(485));if(e=t.action,e!==null){var o={payload:c,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,jf(t,o)):(o.next=l.next,t.pending=l.next=o)}}function jf(e,t){var l=t.action,n=t.payload,c=e.state;if(t.isTransition){var o=k.T,h={};k.T=h;try{var m=l(c,n),_=k.S;_!==null&&_(h,m),wf(e,t,m)}catch(R){Dc(e,t,R)}finally{o!==null&&h.types!==null&&(o.types=h.types),k.T=o}}else try{o=l(c,n),wf(e,t,o)}catch(R){Dc(e,t,R)}}function wf(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){Rf(e,t,n)},function(n){return Dc(e,t,n)}):Rf(e,t,l)}function Rf(e,t,l){t.status="fulfilled",t.value=l,zf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,jf(e,l)))}function Dc(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,zf(t),t=t.next;while(t!==n)}e.action=null}function zf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Mf(e,t){return t}function Cf(e,t){if(Ue){var l=tt.formState;if(l!==null){e:{var n=Te;if(Ue){if(it){t:{for(var c=it,o=yl;c.nodeType!==8;){if(!o){c=null;break t}if(c=vl(c.nextSibling),c===null){c=null;break t}}o=c.data,c=o==="F!"||o==="F"?c:null}if(c){it=vl(c.nextSibling),n=c.data==="F!";break e}}Mn(n)}n=!1}n&&(t=l[0])}}return l=Gt(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mf,lastRenderedState:t},l.queue=n,l=If.bind(null,Te,n),n.dispatch=l,n=kc(!1),o=Gc.bind(null,Te,!1,n.queue),n=Gt(),c={state:t,dispatch:null,action:e,pending:null},n.queue=c,l=tm.bind(null,Te,c,o,l),c.dispatch=l,n.memoizedState=e,[t,l,!1]}function kf(e){var t=mt();return Df(t,Ie,e)}function Df(e,t,l){if(t=Mc(e,t,Mf)[0],e=Vs(sn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Bi(t)}catch(h){throw h===Qa?Bs:h}else n=t;t=mt();var c=t.queue,o=c.dispatch;return l!==t.memoizedState&&(Te.flags|=2048,Wa(9,{destroy:void 0},lm.bind(null,c,l),null)),[n,o,e]}function lm(e,t){e.action=t}function Uf(e){var t=mt(),l=Ie;if(l!==null)return Df(t,l,e);mt(),t=t.memoizedState,l=mt();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=Te.updateQueue,t===null&&(t=Qs(),Te.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 Bf(){return mt().memoizedState}function Ks(e,t,l,n){var c=Gt();Te.flags|=e,c.memoizedState=Wa(1|t,{destroy:void 0},l,n===void 0?null:n)}function Js(e,t,l,n){var c=mt();n=n===void 0?null:n;var o=c.memoizedState.inst;Ie!==null&&n!==null&&Ac(n,Ie.memoizedState.deps)?c.memoizedState=Wa(t,o,l,n):(Te.flags|=e,c.memoizedState=Wa(1|t,o,l,n))}function qf(e,t){Ks(8390656,8,e,t)}function Uc(e,t){Js(2048,8,e,t)}function nm(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=Qs(),Te.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Hf(e){var t=mt().memoizedState;return nm({ref:t,nextImpl:e}),function(){if((Ge&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Lf(e,t){return Js(4,2,e,t)}function Gf(e,t){return Js(4,4,e,t)}function Yf(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 Xf(e,t,l){l=l!=null?l.concat([e]):null,Js(4,4,Yf.bind(null,t,e),l)}function Bc(){}function Zf(e,t){var l=mt();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&Ac(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function Qf(e,t){var l=mt();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&Ac(t,n[1]))return n[0];if(n=e(),ma){fl(!0);try{e()}finally{fl(!1)}}return l.memoizedState=[n,t],n}function qc(e,t,l){return l===void 0||(an&1073741824)!==0&&(Me&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=$h(),Te.lanes|=e,Gn|=e,l)}function $f(e,t,l,n){return nl(l,t)?l:Va.current!==null?(e=qc(e,l,n),nl(e,t)||(_t=!0),e):(an&42)===0||(an&1073741824)!==0&&(Me&261930)===0?(_t=!0,e.memoizedState=l):(e=$h(),Te.lanes|=e,Gn|=e,t)}function Vf(e,t,l,n,c){var o=K.p;K.p=o!==0&&8>o?o:8;var h=k.T,m={};k.T=m,Gc(e,!1,t,l);try{var _=c(),R=k.S;if(R!==null&&R(m,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var U=Ig(_,n);qi(e,t,U,rl(e))}else qi(e,t,n,rl(e))}catch(X){qi(e,t,{then:function(){},status:"rejected",reason:X},rl())}finally{K.p=o,h!==null&&m.types!==null&&(h.types=m.types),k.T=h}}function am(){}function Hc(e,t,l,n){if(e.tag!==5)throw Error(s(476));var c=Kf(e).queue;Vf(e,c,t,ae,l===null?am:function(){return Jf(e),l(n)})}function Kf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:ae},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Jf(e){var t=Kf(e);t.next===null&&(t=e.alternate.memoizedState),qi(e,t.next.queue,{},rl())}function Lc(){return Rt(ts)}function Wf(){return mt().memoizedState}function Ff(){return mt().memoizedState}function im(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=rl();e=Dn(l);var n=Un(t,e,l);n!==null&&(Ft(n,t,l),Ci(n,t,l)),t={cache:gc()},e.payload=t;return}t=t.return}}function sm(e,t,l){var n=rl();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ws(e)?Pf(t,l):(l=ac(e,t,l,n),l!==null&&(Ft(l,e,n),eh(l,t,n)))}function If(e,t,l){var n=rl();qi(e,t,l,n)}function qi(e,t,l,n){var c={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ws(e))Pf(t,c);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(c.hasEagerState=!0,c.eagerState=m,nl(m,h))return Rs(e,t,c,0),tt===null&&ws(),!1}catch{}if(l=ac(e,t,c,n),l!==null)return Ft(l,e,n),eh(l,t,n),!0}return!1}function Gc(e,t,l,n){if(n={lane:2,revertLane:vr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ws(e)){if(t)throw Error(s(479))}else t=ac(e,l,n,2),t!==null&&Ft(t,e,2)}function Ws(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Pf(e,t){Ka=Xs=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function eh(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,q(e,l)}}var Hi={readContext:Rt,use:$s,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};Hi.useEffectEvent=ft;var th={readContext:Rt,use:$s,useCallback:function(e,t){return Gt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:qf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Ks(4194308,4,Yf.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Ks(4194308,4,e,t)},useInsertionEffect:function(e,t){Ks(4,2,e,t)},useMemo:function(e,t){var l=Gt();t=t===void 0?null:t;var n=e();if(ma){fl(!0);try{e()}finally{fl(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=Gt();if(l!==void 0){var c=l(t);if(ma){fl(!0);try{l(t)}finally{fl(!1)}}}else c=t;return n.memoizedState=n.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},n.queue=e,e=e.dispatch=sm.bind(null,Te,e),[n.memoizedState,e]},useRef:function(e){var t=Gt();return e={current:e},t.memoizedState=e},useState:function(e){e=kc(e);var t=e.queue,l=If.bind(null,Te,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Bc,useDeferredValue:function(e,t){var l=Gt();return qc(l,e,t)},useTransition:function(){var e=kc(!1);return e=Vf.bind(null,Te,e.queue,!0,!1),Gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=Te,c=Gt();if(Ue){if(l===void 0)throw Error(s(407));l=l()}else{if(l=t(),tt===null)throw Error(s(349));(Me&127)!==0||xf(n,t,l)}c.memoizedState=l;var o={value:l,getSnapshot:t};return c.queue=o,qf(Tf.bind(null,n,o,e),[e]),n.flags|=2048,Wa(9,{destroy:void 0},Ef.bind(null,n,o,l,t),null),l},useId:function(){var e=Gt(),t=tt.identifierPrefix;if(Ue){var l=Ll,n=Hl;l=(n&~(1<<32-Ot(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Zs++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Pg++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Lc,useFormState:Cf,useActionState:Cf,useOptimistic:function(e){var t=Gt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Gc.bind(null,Te,!0,l),l.dispatch=t,[e,t]},useMemoCache:zc,useCacheRefresh:function(){return Gt().memoizedState=im.bind(null,Te)},useEffectEvent:function(e){var t=Gt(),l={impl:e};return t.memoizedState=l,function(){if((Ge&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},Yc={readContext:Rt,use:$s,useCallback:Zf,useContext:Rt,useEffect:Uc,useImperativeHandle:Xf,useInsertionEffect:Lf,useLayoutEffect:Gf,useMemo:Qf,useReducer:Vs,useRef:Bf,useState:function(){return Vs(sn)},useDebugValue:Bc,useDeferredValue:function(e,t){var l=mt();return $f(l,Ie.memoizedState,e,t)},useTransition:function(){var e=Vs(sn)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Bi(e),t]},useSyncExternalStore:_f,useId:Wf,useHostTransitionStatus:Lc,useFormState:kf,useActionState:kf,useOptimistic:function(e,t){var l=mt();return Of(l,Ie,e,t)},useMemoCache:zc,useCacheRefresh:Ff};Yc.useEffectEvent=Hf;var lh={readContext:Rt,use:$s,useCallback:Zf,useContext:Rt,useEffect:Uc,useImperativeHandle:Xf,useInsertionEffect:Lf,useLayoutEffect:Gf,useMemo:Qf,useReducer:Cc,useRef:Bf,useState:function(){return Cc(sn)},useDebugValue:Bc,useDeferredValue:function(e,t){var l=mt();return Ie===null?qc(l,e,t):$f(l,Ie.memoizedState,e,t)},useTransition:function(){var e=Cc(sn)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Bi(e),t]},useSyncExternalStore:_f,useId:Wf,useHostTransitionStatus:Lc,useFormState:Uf,useActionState:Uf,useOptimistic:function(e,t){var l=mt();return Ie!==null?Of(l,Ie,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:zc,useCacheRefresh:Ff};lh.useEffectEvent=Hf;function Xc(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:S({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Zc={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=rl(),c=Dn(n);c.payload=t,l!=null&&(c.callback=l),t=Un(e,c,n),t!==null&&(Ft(t,e,n),Ci(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=rl(),c=Dn(n);c.tag=1,c.payload=t,l!=null&&(c.callback=l),t=Un(e,c,n),t!==null&&(Ft(t,e,n),Ci(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=rl(),n=Dn(l);n.tag=2,t!=null&&(n.callback=t),t=Un(e,n,l),t!==null&&(Ft(t,e,l),Ci(t,e,l))}};function nh(e,t,l,n,c,o,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,h):t.prototype&&t.prototype.isPureReactComponent?!Ni(l,n)||!Ni(c,o):!0}function ah(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&&Zc.enqueueReplaceState(t,t.state,null)}function ya(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=S({},l));for(var c in e)l[c]===void 0&&(l[c]=e[c])}return l}function ih(e){js(e)}function sh(e){console.error(e)}function uh(e){js(e)}function Fs(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function ch(e,t,l){try{var n=e.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Qc(e,t,l){return l=Dn(l),l.tag=3,l.payload={element:null},l.callback=function(){Fs(e,t)},l}function rh(e){return e=Dn(e),e.tag=3,e}function oh(e,t,l,n){var c=l.type.getDerivedStateFromError;if(typeof c=="function"){var o=n.value;e.payload=function(){return c(o)},e.callback=function(){ch(t,l,n)}}var h=l.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){ch(t,l,n),typeof c!="function"&&(Yn===null?Yn=new Set([this]):Yn.add(this));var m=n.stack;this.componentDidCatch(n.value,{componentStack:m!==null?m:""})})}function um(e,t,l,n,c){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&Ya(t,l,c,!0),l=il.current,l!==null){switch(l.tag){case 31:case 13:return bl===null?ru():l.alternate===null&&ht===0&&(ht=3),l.flags&=-257,l.flags|=65536,l.lanes=c,n===qs?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),mr(e,n,c)),!1;case 22:return l.flags|=65536,n===qs?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)),mr(e,n,c)),!1}throw Error(s(435,l.tag))}return mr(e,n,c),ru(),!1}if(Ue)return t=il.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,n!==oc&&(e=Error(s(422),{cause:n}),ji(pl(e,l)))):(n!==oc&&(t=Error(s(423),{cause:n}),ji(pl(t,l))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,n=pl(n,l),c=Qc(e.stateNode,n,c),_c(e,c),ht!==4&&(ht=2)),!1;var o=Error(s(520),{cause:n});if(o=pl(o,l),Vi===null?Vi=[o]:Vi.push(o),ht!==4&&(ht=2),t===null)return!0;n=pl(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=c&-c,l.lanes|=e,e=Qc(l.stateNode,n,e),_c(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,c&=-c,l.lanes|=c,c=rh(c),oh(c,e,l,n),_c(l,c),!1}l=l.return}while(l!==null);return!1}var $c=Error(s(461)),_t=!1;function zt(e,t,l,n){t.child=e===null?pf(t,null,l,n):ga(t,e.child,l,n)}function fh(e,t,l,n,c){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 fa(t),n=Oc(e,t,l,h,o,c),m=jc(),e!==null&&!_t?(wc(e,t,c),un(e,t,c)):(Ue&&m&&cc(t),t.flags|=1,zt(e,t,n,c),t.child)}function hh(e,t,l,n,c){if(e===null){var o=l.type;return typeof o=="function"&&!ic(o)&&o.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=o,dh(e,t,o,n,c)):(e=Ms(l.type,null,n,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!er(e,c)){var h=o.memoizedProps;if(l=l.compare,l=l!==null?l:Ni,l(h,n)&&e.ref===t.ref)return un(e,t,c)}return t.flags|=1,e=en(o,n),e.ref=t.ref,e.return=t,t.child=e}function dh(e,t,l,n,c){if(e!==null){var o=e.memoizedProps;if(Ni(o,n)&&e.ref===t.ref)if(_t=!1,t.pendingProps=n=o,er(e,c))(e.flags&131072)!==0&&(_t=!0);else return t.lanes=e.lanes,un(e,t,c)}return Vc(e,t,l,n,c)}function ph(e,t,l,n){var c=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,c=0;n!==null;)c=c|n.lanes|n.childLanes,n=n.sibling;n=c&~o}else n=0,t.child=null;return gh(e,t,o,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Us(t,o!==null?o.cachePool:null),o!==null?yf(t,o):Ec(),bf(t);else return n=t.lanes=536870912,gh(e,t,o!==null?o.baseLanes|l:l,l,n)}else o!==null?(Us(t,o.cachePool),yf(t,o),qn(),t.memoizedState=null):(e!==null&&Us(t,null),Ec(),qn());return zt(e,t,c,l),t.child}function Li(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function gh(e,t,l,n,c){var o=yc();return o=o===null?null:{parent:vt._currentValue,pool:o},t.memoizedState={baseLanes:l,cachePool:o},e!==null&&Us(t,null),Ec(),bf(t),e!==null&&Ya(e,t,n,!0),t.childLanes=c,null}function Is(e,t){return t=eu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mh(e,t,l){return ga(t,e.child,null,l),e=Is(t,t.pendingProps),e.flags|=2,sl(t),t.memoizedState=null,e}function cm(e,t,l){var n=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ue){if(n.mode==="hidden")return e=Is(t,n),t.lanes=536870912,Li(null,e);if(Nc(t),(e=it)?(e=jd(e,yl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Rn!==null?{id:Hl,overflow:Ll}:null,retryLane:536870912,hydrationErrors:null},l=Io(e),l.return=t,t.child=l,wt=t,it=null)):e=null,e===null)throw Mn(t);return t.lanes=536870912,null}return Is(t,n)}var o=e.memoizedState;if(o!==null){var h=o.dehydrated;if(Nc(t),c)if(t.flags&256)t.flags&=-257,t=mh(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(_t||Ya(e,t,l,!1),c=(l&e.childLanes)!==0,_t||c){if(n=tt,n!==null&&(h=de(n,l),h!==0&&h!==o.retryLane))throw o.retryLane=h,ua(e,h),Ft(n,e,h),$c;ru(),t=mh(e,t,l)}else e=o.treeContext,it=vl(h.nextSibling),wt=t,Ue=!0,zn=null,yl=!1,e!==null&&tf(t,e),t=Is(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 Ps(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 Vc(e,t,l,n,c){return fa(t),l=Oc(e,t,l,n,void 0,c),n=jc(),e!==null&&!_t?(wc(e,t,c),un(e,t,c)):(Ue&&n&&cc(t),t.flags|=1,zt(e,t,l,c),t.child)}function yh(e,t,l,n,c,o){return fa(t),t.updateQueue=null,l=Sf(t,n,l,c),vf(e),n=jc(),e!==null&&!_t?(wc(e,t,o),un(e,t,o)):(Ue&&n&&cc(t),t.flags|=1,zt(e,t,l,o),t.child)}function bh(e,t,l,n,c){if(fa(t),t.stateNode===null){var o=qa,h=l.contextType;typeof h=="object"&&h!==null&&(o=Rt(h)),o=new l(n,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Zc,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=n,o.state=t.memoizedState,o.refs={},vc(t),h=l.contextType,o.context=typeof h=="object"&&h!==null?Rt(h):qa,o.state=t.memoizedState,h=l.getDerivedStateFromProps,typeof h=="function"&&(Xc(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&&Zc.enqueueReplaceState(o,o.state,null),Di(t,n,o,c),ki(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){o=t.stateNode;var m=t.memoizedProps,_=ya(l,m);o.props=_;var R=o.context,U=l.contextType;h=qa,typeof U=="object"&&U!==null&&(h=Rt(U));var X=l.getDerivedStateFromProps;U=typeof X=="function"||typeof o.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,U||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(m||R!==h)&&ah(t,o,n,h),kn=!1;var z=t.memoizedState;o.state=z,Di(t,n,o,c),ki(),R=t.memoizedState,m||z!==R||kn?(typeof X=="function"&&(Xc(t,l,X,n),R=t.memoizedState),(_=kn||nh(t,l,_,n,z,R,h))?(U||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=R),o.props=n,o.state=R,o.context=h,n=_):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Sc(e,t),h=t.memoizedProps,U=ya(l,h),o.props=U,X=t.pendingProps,z=o.context,R=l.contextType,_=qa,typeof R=="object"&&R!==null&&(_=Rt(R)),m=l.getDerivedStateFromProps,(R=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(h!==X||z!==_)&&ah(t,o,n,_),kn=!1,z=t.memoizedState,o.state=z,Di(t,n,o,c),ki();var C=t.memoizedState;h!==X||z!==C||kn||e!==null&&e.dependencies!==null&&ks(e.dependencies)?(typeof m=="function"&&(Xc(t,l,m,n),C=t.memoizedState),(U=kn||nh(t,l,U,n,z,C,_)||e!==null&&e.dependencies!==null&&ks(e.dependencies))?(R||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,C,_),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,C,_)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=C),o.props=n,o.state=C,o.context=_,n=U):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),n=!1)}return o=n,Ps(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=ga(t,e.child,null,c),t.child=ga(t,null,l,c)):zt(e,t,l,c),t.memoizedState=o.state,e=t.child):e=un(e,t,c),e}function vh(e,t,l,n){return ra(),t.flags|=256,zt(e,t,l,n),t.child}var Kc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:cf()}}function Wc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=cl),e}function Sh(e,t,l){var n=t.pendingProps,c=!1,o=(t.flags&128)!==0,h;if((h=o)||(h=e!==null&&e.memoizedState===null?!1:(gt.current&2)!==0),h&&(c=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ue){if(c?Bn(t):qn(),(e=it)?(e=jd(e,yl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Rn!==null?{id:Hl,overflow:Ll}:null,retryLane:536870912,hydrationErrors:null},l=Io(e),l.return=t,t.child=l,wt=t,it=null)):e=null,e===null)throw Mn(t);return Mr(e)?t.lanes=32:t.lanes=536870912,null}var m=n.children;return n=n.fallback,c?(qn(),c=t.mode,m=eu({mode:"hidden",children:m},c),n=ca(n,c,l,null),m.return=t,n.return=t,m.sibling=n,t.child=m,n=t.child,n.memoizedState=Jc(l),n.childLanes=Wc(e,h,l),t.memoizedState=Kc,Li(null,n)):(Bn(t),Fc(t,m))}var _=e.memoizedState;if(_!==null&&(m=_.dehydrated,m!==null)){if(o)t.flags&256?(Bn(t),t.flags&=-257,t=Ic(e,t,l)):t.memoizedState!==null?(qn(),t.child=e.child,t.flags|=128,t=null):(qn(),m=n.fallback,c=t.mode,n=eu({mode:"visible",children:n.children},c),m=ca(m,c,l,null),m.flags|=2,n.return=t,m.return=t,n.sibling=m,t.child=n,ga(t,e.child,null,l),n=t.child,n.memoizedState=Jc(l),n.childLanes=Wc(e,h,l),t.memoizedState=Kc,t=Li(null,n));else if(Bn(t),Mr(m)){if(h=m.nextSibling&&m.nextSibling.dataset,h)var R=h.dgst;h=R,n=Error(s(419)),n.stack="",n.digest=h,ji({value:n,source:null,stack:null}),t=Ic(e,t,l)}else if(_t||Ya(e,t,l,!1),h=(l&e.childLanes)!==0,_t||h){if(h=tt,h!==null&&(n=de(h,l),n!==0&&n!==_.retryLane))throw _.retryLane=n,ua(e,n),Ft(h,e,n),$c;zr(m)||ru(),t=Ic(e,t,l)}else zr(m)?(t.flags|=192,t.child=e.child,t=null):(e=_.treeContext,it=vl(m.nextSibling),wt=t,Ue=!0,zn=null,yl=!1,e!==null&&tf(t,e),t=Fc(t,n.children),t.flags|=4096);return t}return c?(qn(),m=n.fallback,c=t.mode,_=e.child,R=_.sibling,n=en(_,{mode:"hidden",children:n.children}),n.subtreeFlags=_.subtreeFlags&65011712,R!==null?m=en(R,m):(m=ca(m,c,l,null),m.flags|=2),m.return=t,n.return=t,n.sibling=m,t.child=n,Li(null,n),n=t.child,m=e.child.memoizedState,m===null?m=Jc(l):(c=m.cachePool,c!==null?(_=vt._currentValue,c=c.parent!==_?{parent:_,pool:_}:c):c=cf(),m={baseLanes:m.baseLanes|l,cachePool:c}),n.memoizedState=m,n.childLanes=Wc(e,h,l),t.memoizedState=Kc,Li(e.child,n)):(Bn(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 Fc(e,t){return t=eu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function eu(e,t){return e=al(22,e,null,t),e.lanes=0,e}function Ic(e,t,l){return ga(t,e.child,null,l),e=Fc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _h(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),dc(e.return,t,l)}function Pc(e,t,l,n,c,o){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:c,treeForkCount:o}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=n,h.tail=l,h.tailMode=c,h.treeForkCount=o)}function xh(e,t,l){var n=t.pendingProps,c=n.revealOrder,o=n.tail;n=n.children;var h=gt.current,m=(h&2)!==0;if(m?(h=h&1|2,t.flags|=128):h&=1,F(gt,h),zt(e,t,n,l),n=Ue?Oi:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_h(e,l,t);else if(e.tag===19)_h(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(c){case"forwards":for(l=t.child,c=null;l!==null;)e=l.alternate,e!==null&&Ys(e)===null&&(c=l),l=l.sibling;l=c,l===null?(c=t.child,t.child=null):(c=l.sibling,l.sibling=null),Pc(t,!1,c,l,o,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Ys(e)===null){t.child=c;break}e=c.sibling,c.sibling=l,l=c,c=e}Pc(t,!0,l,null,o,n);break;case"together":Pc(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function un(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Gn|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ya(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 er(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ks(e)))}function rm(e,t,l){switch(t.tag){case 3:Et(t,t.stateNode.containerInfo),Cn(t,vt,e.memoizedState.cache),ra();break;case 27:case 5:Xt(t);break;case 4:Et(t,t.stateNode.containerInfo);break;case 10:Cn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Nc(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Bn(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Sh(e,t,l):(Bn(t),e=un(e,t,l),e!==null?e.sibling:null);Bn(t);break;case 19:var c=(e.flags&128)!==0;if(n=(l&t.childLanes)!==0,n||(Ya(e,t,l,!1),n=(l&t.childLanes)!==0),c){if(n)return xh(e,t,l);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),F(gt,gt.current),n)break;return null;case 22:return t.lanes=0,ph(e,t,l,t.pendingProps);case 24:Cn(t,vt,e.memoizedState.cache)}return un(e,t,l)}function Eh(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)_t=!0;else{if(!er(e,l)&&(t.flags&128)===0)return _t=!1,rm(e,t,l);_t=(e.flags&131072)!==0}else _t=!1,Ue&&(t.flags&1048576)!==0&&ef(t,Oi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=da(t.elementType),t.type=e,typeof e=="function")ic(e)?(n=ya(e,n),t.tag=1,t=bh(null,t,e,n,l)):(t.tag=0,t=Vc(null,t,e,n,l));else{if(e!=null){var c=e.$$typeof;if(c===J){t.tag=11,t=fh(null,t,e,n,l);break e}else if(c===oe){t.tag=14,t=hh(null,t,e,n,l);break e}}throw t=Ze(e)||e,Error(s(306,t,""))}}return t;case 0:return Vc(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,c=ya(n,t.pendingProps),bh(e,t,n,c,l);case 3:e:{if(Et(t,t.stateNode.containerInfo),e===null)throw Error(s(387));n=t.pendingProps;var o=t.memoizedState;c=o.element,Sc(e,t),Di(t,n,null,l);var h=t.memoizedState;if(n=h.cache,Cn(t,vt,n),n!==o.cache&&pc(t,[vt],l,!0),ki(),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=vh(e,t,n,l);break e}else if(n!==c){c=pl(Error(s(424)),t),ji(c),t=vh(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),wt=t,Ue=!0,zn=null,yl=!0,l=pf(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ra(),n===c){t=un(e,t,l);break e}zt(e,t,n,l)}t=t.child}return t;case 26:return Ps(e,t),e===null?(l=kd(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ue||(l=t.type,e=t.pendingProps,n=mu(xe.current).createElement(l),n[dt]=t,n[Dt]=e,Mt(n,l,e),yt(n),t.stateNode=n):t.memoizedState=kd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Xt(t),e===null&&Ue&&(n=t.stateNode=zd(t.type,t.pendingProps,xe.current),wt=t,yl=!0,c=it,$n(t.type)?(Cr=c,it=vl(n.firstChild)):it=c),zt(e,t,t.pendingProps.children,l),Ps(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ue&&((c=n=it)&&(n=Hm(n,t.type,t.pendingProps,yl),n!==null?(t.stateNode=n,wt=t,it=vl(n.firstChild),yl=!1,c=!0):c=!1),c||Mn(t)),Xt(t),c=t.type,o=t.pendingProps,h=e!==null?e.memoizedProps:null,n=o.children,jr(c,o)?n=null:h!==null&&jr(c,h)&&(t.flags|=32),t.memoizedState!==null&&(c=Oc(e,t,em,null,null,l),ts._currentValue=c),Ps(e,t),zt(e,t,n,l),t.child;case 6:return e===null&&Ue&&((e=l=it)&&(l=Lm(l,t.pendingProps,yl),l!==null?(t.stateNode=l,wt=t,it=null,e=!0):e=!1),e||Mn(t)),null;case 13:return Sh(e,t,l);case 4:return Et(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ga(t,null,n,l):zt(e,t,n,l),t.child;case 11:return fh(e,t,t.type,t.pendingProps,l);case 7:return zt(e,t,t.pendingProps,l),t.child;case 8:return zt(e,t,t.pendingProps.children,l),t.child;case 12:return zt(e,t,t.pendingProps.children,l),t.child;case 10:return n=t.pendingProps,Cn(t,t.type,n.value),zt(e,t,n.children,l),t.child;case 9:return c=t.type._context,n=t.pendingProps.children,fa(t),c=Rt(c),n=n(c),t.flags|=1,zt(e,t,n,l),t.child;case 14:return hh(e,t,t.type,t.pendingProps,l);case 15:return dh(e,t,t.type,t.pendingProps,l);case 19:return xh(e,t,l);case 31:return cm(e,t,l);case 22:return ph(e,t,l,t.pendingProps);case 24:return fa(t),n=Rt(vt),e===null?(c=yc(),c===null&&(c=tt,o=gc(),c.pooledCache=o,o.refCount++,o!==null&&(c.pooledCacheLanes|=l),c=o),t.memoizedState={parent:n,cache:c},vc(t),Cn(t,vt,c)):((e.lanes&l)!==0&&(Sc(e,t),Di(t,null,null,l),ki()),c=e.memoizedState,o=t.memoizedState,c.parent!==n?(c={parent:n,cache:n},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Cn(t,vt,n)):(n=o.cache,Cn(t,vt,n),n!==c.cache&&pc(t,[vt],l,!0))),zt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function cn(e){e.flags|=4}function tr(e,t,l,n,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Wh())e.flags|=8192;else throw pa=qs,bc}else e.flags&=-16777217}function Th(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Hd(t))if(Wh())e.flags|=8192;else throw pa=qs,bc}function tu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?pe():536870912,e.lanes|=t,ei|=t)}function Gi(e,t){if(!Ue)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 st(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var c=e.child;c!==null;)l|=c.lanes|c.childLanes,n|=c.subtreeFlags&65011712,n|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)l|=c.lanes|c.childLanes,n|=c.subtreeFlags,n|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function om(e,t,l){var n=t.pendingProps;switch(rc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return st(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),nn(vt),Fe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ga(t)?cn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,fc())),st(t),null;case 26:var c=t.type,o=t.memoizedState;return e===null?(cn(t),o!==null?(st(t),Th(t,o)):(st(t),tr(t,c,null,n,l))):o?o!==e.memoizedState?(cn(t),st(t),Th(t,o)):(st(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&cn(t),st(t),tr(t,c,e,n,l)),null;case 27:if(Sn(t),l=xe.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&cn(t);else{if(!n){if(t.stateNode===null)throw Error(s(166));return st(t),null}e=ne.current,Ga(t)?lf(t):(e=zd(c,n,l),t.stateNode=e,cn(t))}return st(t),null;case 5:if(Sn(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&cn(t);else{if(!n){if(t.stateNode===null)throw Error(s(166));return st(t),null}if(o=ne.current,Ga(t))lf(t);else{var h=mu(xe.current);switch(o){case 1:o=h.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:o=h.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":o=h.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":o=h.createElementNS("http://www.w3.org/1998/Math/MathML",c);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(c,{is:n.is}):h.createElement(c)}}o[dt]=t,o[Dt]=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(Mt(o,c,n),c){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&cn(t)}}return st(t),tr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&cn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(s(166));if(e=xe.current,Ga(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,c=wt,c!==null)switch(c.tag){case 27:case 5:n=c.memoizedProps}e[dt]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||Sd(e.nodeValue,l)),e||Mn(t,!0)}else e=mu(e).createTextNode(n),e[dt]=t,t.stateNode=e}return st(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=Ga(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[dt]=t}else ra(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),e=!1}else l=fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(sl(t),t):(sl(t),null);if((t.flags&128)!==0)throw Error(s(558))}return st(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Ga(t),n!==null&&n.dehydrated!==null){if(e===null){if(!c)throw Error(s(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(s(317));c[dt]=t}else ra(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),c=!1}else c=fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(sl(t),t):(sl(t),null)}return sl(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,c=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(c=n.alternate.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==c&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),tu(t,t.updateQueue),st(t),null);case 4:return Fe(),e===null&&Er(t.stateNode.containerInfo),st(t),null;case 10:return nn(t.type),st(t),null;case 19:if(L(gt),n=t.memoizedState,n===null)return st(t),null;if(c=(t.flags&128)!==0,o=n.rendering,o===null)if(c)Gi(n,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Ys(e),o!==null){for(t.flags|=128,Gi(n,!1),e=o.updateQueue,t.updateQueue=e,tu(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Fo(l,e),l=l.sibling;return F(gt,gt.current&1|2),Ue&&tn(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&<()>su&&(t.flags|=128,c=!0,Gi(n,!1),t.lanes=4194304)}else{if(!c)if(e=Ys(o),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,tu(t,e),Gi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!Ue)return st(t),null}else 2*lt()-n.renderingStartTime>su&&l!==536870912&&(t.flags|=128,c=!0,Gi(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=lt(),e.sibling=null,l=gt.current,F(gt,c?l&1|2:l&1),Ue&&tn(t,n.treeForkCount),e):(st(t),null);case 22:case 23:return sl(t),Tc(),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&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),l=t.updateQueue,l!==null&&tu(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&&L(ha),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),nn(vt),st(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function fm(e,t){switch(rc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nn(vt),Fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Sn(t),null;case 31:if(t.memoizedState!==null){if(sl(t),t.alternate===null)throw Error(s(340));ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(sl(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(gt),null;case 4:return Fe(),null;case 10:return nn(t.type),null;case 22:case 23:return sl(t),Tc(),e!==null&&L(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return nn(vt),null;case 25:return null;default:return null}}function Nh(e,t){switch(rc(t),t.tag){case 3:nn(vt),Fe();break;case 26:case 27:case 5:Sn(t);break;case 4:Fe();break;case 31:t.memoizedState!==null&&sl(t);break;case 13:sl(t);break;case 19:L(gt);break;case 10:nn(t.type);break;case 22:case 23:sl(t),Tc(),e!==null&&L(ha);break;case 24:nn(vt)}}function Yi(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var c=n.next;l=c;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!==c)}}catch(m){Je(t,t.return,m)}}function Hn(e,t,l){try{var n=t.updateQueue,c=n!==null?n.lastEffect:null;if(c!==null){var o=c.next;n=o;do{if((n.tag&e)===e){var h=n.inst,m=h.destroy;if(m!==void 0){h.destroy=void 0,c=t;var _=l,R=m;try{R()}catch(U){Je(c,_,U)}}}n=n.next}while(n!==o)}}catch(U){Je(t,t.return,U)}}function Ah(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{mf(t,l)}catch(n){Je(e,e.return,n)}}}function Oh(e,t,l){l.props=ya(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){Je(e,t,n)}}function Xi(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(c){Je(e,t,c)}}function Gl(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(c){Je(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(c){Je(e,t,c)}else l.current=null}function jh(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(c){Je(e,e.return,c)}}function lr(e,t,l){try{var n=e.stateNode;Cm(n,e.type,l,t),n[Dt]=t}catch(c){Je(e,e.return,c)}}function wh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$n(e.type)||e.tag===4}function nr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wh(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&&$n(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 ar(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=W));else if(n!==4&&(n===27&&$n(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(ar(e,t,l),e=e.sibling;e!==null;)ar(e,t,l),e=e.sibling}function lu(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&&$n(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(lu(e,t,l),e=e.sibling;e!==null;)lu(e,t,l),e=e.sibling}function Rh(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Mt(t,n,l),t[dt]=e,t[Dt]=l}catch(o){Je(e,e.return,o)}}var rn=!1,xt=!1,ir=!1,zh=typeof WeakSet=="function"?WeakSet:Set,At=null;function hm(e,t){if(e=e.containerInfo,Ar=Eu,e=Yo(e),Iu(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 c=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{l.nodeType,o.nodeType}catch{l=null;break e}var h=0,m=-1,_=-1,R=0,U=0,X=e,z=null;t:for(;;){for(var C;X!==l||c!==0&&X.nodeType!==3||(m=h+c),X!==o||n!==0&&X.nodeType!==3||(_=h+n),X.nodeType===3&&(h+=X.nodeValue.length),(C=X.firstChild)!==null;)z=X,X=C;for(;;){if(X===e)break t;if(z===l&&++R===c&&(m=h),z===o&&++U===n&&(_=h),(C=X.nextSibling)!==null)break;X=z,z=X.parentNode}X=C}l=m===-1||_===-1?null:{start:m,end:_}}else l=null}l=l||{start:0,end:0}}else l=null;for(Or={focusedElem:e,selectionRange:l},Eu=!1,At=t;At!==null;)if(t=At,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,At=e;else for(;At!==null;){switch(t=At,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++)c=e[l],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,l=t,c=o.memoizedProps,o=o.memoizedState,n=l.stateNode;try{var ie=ya(l.type,c);e=n.getSnapshotBeforeUpdate(ie,o),n.__reactInternalSnapshotBeforeUpdate=e}catch(me){Je(l,l.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Rr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Rr(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,At=e;break}At=t.return}}function Mh(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:fn(e,l),n&4&&Yi(5,l);break;case 1:if(fn(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(h){Je(l,l.return,h)}else{var c=ya(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Je(l,l.return,h)}}n&64&&Ah(l),n&512&&Xi(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{mf(e,t)}catch(h){Je(l,l.return,h)}}break;case 27:t===null&&n&4&&Rh(l);case 26:case 5:fn(e,l),t===null&&n&4&&jh(l),n&512&&Xi(l,l.return);break;case 12:fn(e,l);break;case 31:fn(e,l),n&4&&Dh(e,l);break;case 13:fn(e,l),n&4&&Uh(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=_m.bind(null,l),Gm(e,l))));break;case 22:if(n=l.memoizedState!==null||rn,!n){t=t!==null&&t.memoizedState!==null||xt,c=rn;var o=xt;rn=n,(xt=t)&&!o?hn(e,l,(l.subtreeFlags&8772)!==0):fn(e,l),rn=c,xt=o}break;case 30:break;default:fn(e,l)}}function Ch(e){var t=e.alternate;t!==null&&(e.alternate=null,Ch(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&di(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 rt=null,Vt=!1;function on(e,t,l){for(l=l.child;l!==null;)kh(e,t,l),l=l.sibling}function kh(e,t,l){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(el,l)}catch{}switch(l.tag){case 26:xt||Gl(l,t),on(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:xt||Gl(l,t);var n=rt,c=Vt;$n(l.type)&&(rt=l.stateNode,Vt=!1),on(e,t,l),Ii(l.stateNode),rt=n,Vt=c;break;case 5:xt||Gl(l,t);case 6:if(n=rt,c=Vt,rt=null,on(e,t,l),rt=n,Vt=c,rt!==null)if(Vt)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(l.stateNode)}catch(o){Je(l,t,o)}else try{rt.removeChild(l.stateNode)}catch(o){Je(l,t,o)}break;case 18:rt!==null&&(Vt?(e=rt,Ad(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ci(e)):Ad(rt,l.stateNode));break;case 4:n=rt,c=Vt,rt=l.stateNode.containerInfo,Vt=!0,on(e,t,l),rt=n,Vt=c;break;case 0:case 11:case 14:case 15:Hn(2,l,t),xt||Hn(4,l,t),on(e,t,l);break;case 1:xt||(Gl(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&Oh(l,t,n)),on(e,t,l);break;case 21:on(e,t,l);break;case 22:xt=(n=xt)||l.memoizedState!==null,on(e,t,l),xt=n;break;default:on(e,t,l)}}function Dh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ci(e)}catch(l){Je(t,t.return,l)}}}function Uh(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){Je(t,t.return,l)}}function dm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new zh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new zh),t;default:throw Error(s(435,e.tag))}}function nu(e,t){var l=dm(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var c=xm.bind(null,e,n);n.then(c,c)}})}function Kt(e,t){var l=t.deletions;if(l!==null)for(var n=0;n<l.length;n++){var c=l[n],o=e,h=t,m=h;e:for(;m!==null;){switch(m.tag){case 27:if($n(m.type)){rt=m.stateNode,Vt=!1;break e}break;case 5:rt=m.stateNode,Vt=!1;break e;case 3:case 4:rt=m.stateNode.containerInfo,Vt=!0;break e}m=m.return}if(rt===null)throw Error(s(160));kh(o,h,c),rt=null,Vt=!1,o=c.alternate,o!==null&&(o.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bh(t,e),t=t.sibling}var jl=null;function Bh(e,t){var l=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Kt(t,e),Jt(e),n&4&&(Hn(3,e,e.return),Yi(3,e),Hn(5,e,e.return));break;case 1:Kt(t,e),Jt(e),n&512&&(xt||l===null||Gl(l,l.return)),n&64&&rn&&(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 c=jl;if(Kt(t,e),Jt(e),n&512&&(xt||l===null||Gl(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,c=c.ownerDocument||c;t:switch(n){case"title":o=c.getElementsByTagName("title")[0],(!o||o[ta]||o[dt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=c.createElement(n),c.head.insertBefore(o,c.querySelector("head > title"))),Mt(o,n,l),o[dt]=e,yt(o),n=o;break e;case"link":var h=Bd("link","href",c).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=c.createElement(n),Mt(o,n,l),c.head.appendChild(o);break;case"meta":if(h=Bd("meta","content",c).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=c.createElement(n),Mt(o,n,l),c.head.appendChild(o);break;default:throw Error(s(468,n))}o[dt]=e,yt(o),n=o}e.stateNode=n}else qd(c,e.type,e.stateNode);else e.stateNode=Ud(c,n,e.memoizedProps);else o!==n?(o===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):o.count--,n===null?qd(c,e.type,e.stateNode):Ud(c,n,e.memoizedProps)):n===null&&e.stateNode!==null&&lr(e,e.memoizedProps,l.memoizedProps)}break;case 27:Kt(t,e),Jt(e),n&512&&(xt||l===null||Gl(l,l.return)),l!==null&&n&4&&lr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Kt(t,e),Jt(e),n&512&&(xt||l===null||Gl(l,l.return)),e.flags&32){c=e.stateNode;try{ye(c,"")}catch(ie){Je(e,e.return,ie)}}n&4&&e.stateNode!=null&&(c=e.memoizedProps,lr(e,c,l!==null?l.memoizedProps:c)),n&1024&&(ir=!0);break;case 6:if(Kt(t,e),Jt(e),n&4){if(e.stateNode===null)throw Error(s(162));n=e.memoizedProps,l=e.stateNode;try{l.nodeValue=n}catch(ie){Je(e,e.return,ie)}}break;case 3:if(vu=null,c=jl,jl=yu(t.containerInfo),Kt(t,e),jl=c,Jt(e),n&4&&l!==null&&l.memoizedState.isDehydrated)try{ci(t.containerInfo)}catch(ie){Je(e,e.return,ie)}ir&&(ir=!1,qh(e));break;case 4:n=jl,jl=yu(e.stateNode.containerInfo),Kt(t,e),Jt(e),jl=n;break;case 12:Kt(t,e),Jt(e);break;case 31:Kt(t,e),Jt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,nu(e,n)));break;case 13:Kt(t,e),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(iu=lt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,nu(e,n)));break;case 22:c=e.memoizedState!==null;var _=l!==null&&l.memoizedState!==null,R=rn,U=xt;if(rn=R||c,xt=U||_,Kt(t,e),xt=U,rn=R,Jt(e),n&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(l===null||_||rn||xt||ba(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){_=l=t;try{if(o=_.stateNode,c)h=o.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{m=_.stateNode;var X=_.memoizedProps.style,z=X!=null&&X.hasOwnProperty("display")?X.display:null;m.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ie){Je(_,_.return,ie)}}}else if(t.tag===6){if(l===null){_=t;try{_.stateNode.nodeValue=c?"":_.memoizedProps}catch(ie){Je(_,_.return,ie)}}}else if(t.tag===18){if(l===null){_=t;try{var C=_.stateNode;c?Od(C,!0):Od(_.stateNode,!1)}catch(ie){Je(_,_.return,ie)}}}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,nu(e,l))));break;case 19:Kt(t,e),Jt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,nu(e,n)));break;case 30:break;case 21:break;default:Kt(t,e),Jt(e)}}function Jt(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(wh(n)){l=n;break}n=n.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var c=l.stateNode,o=nr(e);lu(e,o,c);break;case 5:var h=l.stateNode;l.flags&32&&(ye(h,""),l.flags&=-33);var m=nr(e);lu(e,m,h);break;case 3:case 4:var _=l.stateNode.containerInfo,R=nr(e);ar(e,R,_);break;default:throw Error(s(161))}}catch(U){Je(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;qh(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;)Mh(e,t.alternate,t),t=t.sibling}function ba(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),ba(t);break;case 1:Gl(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Oh(t,t.return,l),ba(t);break;case 27:Ii(t.stateNode);case 26:case 5:Gl(t,t.return),ba(t);break;case 22:t.memoizedState===null&&ba(t);break;case 30:ba(t);break;default:ba(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,c=e,o=t,h=o.flags;switch(o.tag){case 0:case 11:case 15:hn(c,o,l),Yi(4,o);break;case 1:if(hn(c,o,l),n=o,c=n.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(R){Je(n,n.return,R)}if(n=o,c=n.updateQueue,c!==null){var m=n.stateNode;try{var _=c.shared.hiddenCallbacks;if(_!==null)for(c.shared.hiddenCallbacks=null,c=0;c<_.length;c++)gf(_[c],m)}catch(R){Je(n,n.return,R)}}l&&h&64&&Ah(o),Xi(o,o.return);break;case 27:Rh(o);case 26:case 5:hn(c,o,l),l&&n===null&&h&4&&jh(o),Xi(o,o.return);break;case 12:hn(c,o,l);break;case 31:hn(c,o,l),l&&h&4&&Dh(c,o);break;case 13:hn(c,o,l),l&&h&4&&Uh(c,o);break;case 22:o.memoizedState===null&&hn(c,o,l),Xi(o,o.return);break;case 30:break;default:hn(c,o,l)}t=t.sibling}}function sr(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&&wi(l))}function ur(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wi(e))}function wl(e,t,l,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Hh(e,t,l,n),t=t.sibling}function Hh(e,t,l,n){var c=t.flags;switch(t.tag){case 0:case 11:case 15:wl(e,t,l,n),c&2048&&Yi(9,t);break;case 1:wl(e,t,l,n);break;case 3:wl(e,t,l,n),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wi(e)));break;case 12:if(c&2048){wl(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(_){Je(t,t.return,_)}}else wl(e,t,l,n);break;case 31:wl(e,t,l,n);break;case 13:wl(e,t,l,n);break;case 23:break;case 22:o=t.stateNode,h=t.alternate,t.memoizedState!==null?o._visibility&2?wl(e,t,l,n):Zi(e,t):o._visibility&2?wl(e,t,l,n):(o._visibility|=2,Fa(e,t,l,n,(t.subtreeFlags&10256)!==0||!1)),c&2048&&sr(h,t);break;case 24:wl(e,t,l,n),c&2048&&ur(t.alternate,t);break;default:wl(e,t,l,n)}}function Fa(e,t,l,n,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,h=t,m=l,_=n,R=h.flags;switch(h.tag){case 0:case 11:case 15:Fa(o,h,m,_,c),Yi(8,h);break;case 23:break;case 22:var U=h.stateNode;h.memoizedState!==null?U._visibility&2?Fa(o,h,m,_,c):Zi(o,h):(U._visibility|=2,Fa(o,h,m,_,c)),c&&R&2048&&sr(h.alternate,h);break;case 24:Fa(o,h,m,_,c),c&&R&2048&&ur(h.alternate,h);break;default:Fa(o,h,m,_,c)}t=t.sibling}}function Zi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,c=n.flags;switch(n.tag){case 22:Zi(l,n),c&2048&&sr(n.alternate,n);break;case 24:Zi(l,n),c&2048&&ur(n.alternate,n);break;default:Zi(l,n)}t=t.sibling}}var Qi=8192;function Ia(e,t,l){if(e.subtreeFlags&Qi)for(e=e.child;e!==null;)Lh(e,t,l),e=e.sibling}function Lh(e,t,l){switch(e.tag){case 26:Ia(e,t,l),e.flags&Qi&&e.memoizedState!==null&&Pm(l,jl,e.memoizedState,e.memoizedProps);break;case 5:Ia(e,t,l);break;case 3:case 4:var n=jl;jl=yu(e.stateNode.containerInfo),Ia(e,t,l),jl=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Qi,Qi=16777216,Ia(e,t,l),Qi=n):Ia(e,t,l));break;default:Ia(e,t,l)}}function Gh(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 $i(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];At=n,Xh(n,e)}Gh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yh(e),e=e.sibling}function Yh(e){switch(e.tag){case 0:case 11:case 15:$i(e),e.flags&2048&&Hn(9,e,e.return);break;case 3:$i(e);break;case 12:$i(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,au(e)):$i(e);break;default:$i(e)}}function au(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];At=n,Xh(n,e)}Gh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hn(8,t,t.return),au(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,au(t));break;default:au(t)}e=e.sibling}}function Xh(e,t){for(;At!==null;){var l=At;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:wi(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,At=n;else e:for(l=e;At!==null;){n=At;var c=n.sibling,o=n.return;if(Ch(n),n===l){At=null;break e}if(c!==null){c.return=o,At=c;break e}At=o}}}var pm={getCacheForType:function(e){var t=Rt(vt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Rt(vt).controller.signal}},gm=typeof WeakMap=="function"?WeakMap:Map,Ge=0,tt=null,we=null,Me=0,Ke=0,ul=null,Ln=!1,Pa=!1,cr=!1,dn=0,ht=0,Gn=0,va=0,rr=0,cl=0,ei=0,Vi=null,Wt=null,or=!1,iu=0,Zh=0,su=1/0,uu=null,Yn=null,Tt=0,Xn=null,ti=null,pn=0,fr=0,hr=null,Qh=null,Ki=0,dr=null;function rl(){return(Ge&2)!==0&&Me!==0?Me&-Me:k.T!==null?vr():Al()}function $h(){if(cl===0)if((Me&536870912)===0||Ue){var e=En;En<<=1,(En&3932160)===0&&(En=262144),cl=e}else cl=536870912;return e=il.current,e!==null&&(e.flags|=32),cl}function Ft(e,t,l){(e===tt&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(li(e,0),Zn(e,Me,cl,!1)),qe(e,l),((Ge&2)===0||e!==tt)&&(e===tt&&((Ge&2)===0&&(va|=l),ht===4&&Zn(e,Me,cl,!1)),Yl(e))}function Vh(e,t,l){if((Ge&6)!==0)throw Error(s(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||H(e,t),c=n?bm(e,t):gr(e,t,!0),o=n;do{if(c===0){Pa&&!n&&Zn(e,t,0,!1);break}else{if(l=e.current.alternate,o&&!mm(l)){c=gr(e,t,!1),o=!1;continue}if(c===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;c=Vi;var _=m.current.memoizedState.isDehydrated;if(_&&(li(m,h).flags|=256),h=gr(m,h,!1),h!==2){if(cr&&!_){m.errorRecoveryDisabledLanes|=o,va|=o,c=4;break e}o=Wt,Wt=c,o!==null&&(Wt===null?Wt=o:Wt.push.apply(Wt,o))}c=h}if(o=!1,c!==2)continue}}if(c===1){li(e,0),Zn(e,t,0,!0);break}e:{switch(n=e,o=c,o){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Zn(n,t,cl,!Ln);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(c=iu+300-lt(),10<c)){if(Zn(n,t,cl,!Ln),x(n,0,!0)!==0)break e;pn=t,n.timeoutHandle=Td(Kh.bind(null,n,l,Wt,uu,or,t,cl,va,ei,Ln,o,"Throttled",-0,0),c);break e}Kh(n,l,Wt,uu,or,t,cl,va,ei,Ln,o,null,-0,0)}}break}while(!0);Yl(e)}function Kh(e,t,l,n,c,o,h,m,_,R,U,X,z,C){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:W},Lh(t,o,X);var ie=(o&62914560)===o?iu-lt():(o&4194048)===o?Zh-lt():0;if(ie=ey(X,ie),ie!==null){pn=o,e.cancelPendingCommit=ie(ld.bind(null,e,t,o,l,n,c,h,m,_,U,X,null,z,C)),Zn(e,o,h,!R);return}}ld(e,t,o,l,n,c,h,m,_)}function mm(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 c=l[n],o=c.getSnapshot;c=c.value;try{if(!nl(o(),c))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 Zn(e,t,l,n){t&=~rr,t&=~va,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var c=t;0<c;){var o=31-Ot(c),h=1<<o;n[o]=-1,c&=~h}l!==0&&A(e,l,t)}function cu(){return(Ge&6)===0?(Ji(0),!1):!0}function pr(){if(we!==null){if(Ke===0)var e=we.return;else e=we,ln=oa=null,Rc(e),$a=null,zi=0,e=we;for(;e!==null;)Nh(e.alternate,e),e=e.return;we=null}}function li(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Um(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),pn=0,pr(),tt=e,we=l=en(e.current,null),Me=t,Ke=0,ul=null,Ln=!1,Pa=H(e,t),cr=!1,ei=cl=rr=va=Gn=ht=0,Wt=Vi=null,or=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var c=31-Ot(n),o=1<<c;t|=e[c],n&=~o}return dn=t,ws(),l}function Jh(e,t){Te=null,k.H=Hi,t===Qa||t===Bs?(t=ff(),Ke=3):t===bc?(t=ff(),Ke=4):Ke=t===$c?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ul=t,we===null&&(ht=1,Fs(e,pl(t,e.current)))}function Wh(){var e=il.current;return e===null?!0:(Me&4194048)===Me?bl===null:(Me&62914560)===Me||(Me&536870912)!==0?e===bl:!1}function Fh(){var e=k.H;return k.H=Hi,e===null?Hi:e}function Ih(){var e=k.A;return k.A=pm,e}function ru(){ht=4,Ln||(Me&4194048)!==Me&&il.current!==null||(Pa=!0),(Gn&134217727)===0&&(va&134217727)===0||tt===null||Zn(tt,Me,cl,!1)}function gr(e,t,l){var n=Ge;Ge|=2;var c=Fh(),o=Ih();(tt!==e||Me!==t)&&(uu=null,li(e,t)),t=!1;var h=ht;e:do try{if(Ke!==0&&we!==null){var m=we,_=ul;switch(Ke){case 8:pr(),h=6;break e;case 3:case 2:case 9:case 6:il.current===null&&(t=!0);var R=Ke;if(Ke=0,ul=null,ni(e,m,_,R),l&&Pa){h=0;break e}break;default:R=Ke,Ke=0,ul=null,ni(e,m,_,R)}}ym(),h=ht;break}catch(U){Jh(e,U)}while(!0);return t&&e.shellSuspendCounter++,ln=oa=null,Ge=n,k.H=c,k.A=o,we===null&&(tt=null,Me=0,ws()),h}function ym(){for(;we!==null;)Ph(we)}function bm(e,t){var l=Ge;Ge|=2;var n=Fh(),c=Ih();tt!==e||Me!==t?(uu=null,su=lt()+500,li(e,t)):Pa=H(e,t);e:do try{if(Ke!==0&&we!==null){t=we;var o=ul;t:switch(Ke){case 1:Ke=0,ul=null,ni(e,t,o,1);break;case 2:case 9:if(rf(o)){Ke=0,ul=null,ed(t);break}t=function(){Ke!==2&&Ke!==9||tt!==e||(Ke=7),Yl(e)},o.then(t,t);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:rf(o)?(Ke=0,ul=null,ed(t)):(Ke=0,ul=null,ni(e,t,o,7));break;case 5:var h=null;switch(we.tag){case 26:h=we.memoizedState;case 5:case 27:var m=we;if(h?Hd(h):m.stateNode.complete){Ke=0,ul=null;var _=m.sibling;if(_!==null)we=_;else{var R=m.return;R!==null?(we=R,ou(R)):we=null}break t}}Ke=0,ul=null,ni(e,t,o,5);break;case 6:Ke=0,ul=null,ni(e,t,o,6);break;case 8:pr(),ht=6;break e;default:throw Error(s(462))}}vm();break}catch(U){Jh(e,U)}while(!0);return ln=oa=null,k.H=n,k.A=c,Ge=l,we!==null?0:(tt=null,Me=0,ws(),ht)}function vm(){for(;we!==null&&!Na();)Ph(we)}function Ph(e){var t=Eh(e.alternate,e,dn);e.memoizedProps=e.pendingProps,t===null?ou(e):we=t}function ed(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=yh(l,t,t.pendingProps,t.type,void 0,Me);break;case 11:t=yh(l,t,t.pendingProps,t.type.render,t.ref,Me);break;case 5:Rc(t);default:Nh(l,t),t=we=Fo(t,dn),t=Eh(l,t,dn)}e.memoizedProps=e.pendingProps,t===null?ou(e):we=t}function ni(e,t,l,n){ln=oa=null,Rc(t),$a=null,zi=0;var c=t.return;try{if(um(e,c,t,l,Me)){ht=1,Fs(e,pl(l,e.current)),we=null;return}}catch(o){if(c!==null)throw we=c,o;ht=1,Fs(e,pl(l,e.current)),we=null;return}t.flags&32768?(Ue||n===1?e=!0:Pa||(Me&536870912)!==0?e=!1:(Ln=e=!0,(n===2||n===9||n===3||n===6)&&(n=il.current,n!==null&&n.tag===13&&(n.flags|=16384))),td(t,e)):ou(t)}function ou(e){var t=e;do{if((t.flags&32768)!==0){td(t,Ln);return}e=t.return;var l=om(t.alternate,t,dn);if(l!==null){we=l;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);ht===0&&(ht=5)}function td(e,t){do{var l=fm(e.alternate,e);if(l!==null){l.flags&=32767,we=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){we=e;return}we=e=l}while(e!==null);ht=6,we=null}function ld(e,t,l,n,c,o,h,m,_){e.cancelPendingCommit=null;do fu();while(Tt!==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|=nc,ue(e,l,o,h,m,_),e===tt&&(we=tt=null,Me=0),ti=t,Xn=e,pn=l,fr=o,hr=c,Qh=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Em(Bl,function(){return ud(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=k.T,k.T=null,c=K.p,K.p=2,h=Ge,Ge|=4;try{hm(e,t,l)}finally{Ge=h,K.p=c,k.T=n}}Tt=1,nd(),ad(),id()}}function nd(){if(Tt===1){Tt=0;var e=Xn,t=ti,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var n=K.p;K.p=2;var c=Ge;Ge|=4;try{Bh(t,e);var o=Or,h=Yo(e.containerInfo),m=o.focusedElem,_=o.selectionRange;if(h!==m&&m&&m.ownerDocument&&Go(m.ownerDocument.documentElement,m)){if(_!==null&&Iu(m)){var R=_.start,U=_.end;if(U===void 0&&(U=R),"selectionStart"in m)m.selectionStart=R,m.selectionEnd=Math.min(U,m.value.length);else{var X=m.ownerDocument||document,z=X&&X.defaultView||window;if(z.getSelection){var C=z.getSelection(),ie=m.textContent.length,me=Math.min(_.start,ie),et=_.end===void 0?me:Math.min(_.end,ie);!C.extend&&me>et&&(h=et,et=me,me=h);var N=Lo(m,me),T=Lo(m,et);if(N&&T&&(C.rangeCount!==1||C.anchorNode!==N.node||C.anchorOffset!==N.offset||C.focusNode!==T.node||C.focusOffset!==T.offset)){var w=X.createRange();w.setStart(N.node,N.offset),C.removeAllRanges(),me>et?(C.addRange(w),C.extend(T.node,T.offset)):(w.setEnd(T.node,T.offset),C.addRange(w))}}}}for(X=[],C=m;C=C.parentNode;)C.nodeType===1&&X.push({element:C,left:C.scrollLeft,top:C.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<X.length;m++){var G=X[m];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}Eu=!!Ar,Or=Ar=null}finally{Ge=c,K.p=n,k.T=l}}e.current=t,Tt=2}}function ad(){if(Tt===2){Tt=0;var e=Xn,t=ti,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var n=K.p;K.p=2;var c=Ge;Ge|=4;try{Mh(e,t.alternate,t)}finally{Ge=c,K.p=n,k.T=l}}Tt=3}}function id(){if(Tt===4||Tt===3){Tt=0,It();var e=Xn,t=ti,l=pn,n=Qh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Tt=5:(Tt=0,ti=Xn=null,sd(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Yn=null),Ht(l),t=t.stateNode,Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(el,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=k.T,c=K.p,K.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,K.p=c}}(pn&3)!==0&&fu(),Yl(e),c=e.pendingLanes,(l&261930)!==0&&(c&42)!==0?e===dr?Ki++:(Ki=0,dr=e):Ki=0,Ji(0)}}function sd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,wi(t)))}function fu(){return nd(),ad(),id(),ud()}function ud(){if(Tt!==5)return!1;var e=Xn,t=fr;fr=0;var l=Ht(pn),n=k.T,c=K.p;try{K.p=32>l?32:l,k.T=null,l=hr,hr=null;var o=Xn,h=pn;if(Tt=0,ti=Xn=null,pn=0,(Ge&6)!==0)throw Error(s(331));var m=Ge;if(Ge|=4,Yh(o.current),Hh(o,o.current,h,l),Ge=m,Ji(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(el,o)}catch{}return!0}finally{K.p=c,k.T=n,sd(e,t)}}function cd(e,t,l){t=pl(l,t),t=Qc(e.stateNode,t,2),e=Un(e,t,2),e!==null&&(qe(e,2),Yl(e))}function Je(e,t,l){if(e.tag===3)cd(e,e,l);else for(;t!==null;){if(t.tag===3){cd(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=rh(2),n=Un(t,l,2),n!==null&&(oh(l,n,t,e),qe(n,2),Yl(n));break}}t=t.return}}function mr(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new gm;var c=new Set;n.set(t,c)}else c=n.get(t),c===void 0&&(c=new Set,n.set(t,c));c.has(l)||(cr=!0,c.add(l),e=Sm.bind(null,e,t,l),t.then(e,e))}function Sm(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,tt===e&&(Me&l)===l&&(ht===4||ht===3&&(Me&62914560)===Me&&300>lt()-iu?(Ge&2)===0&&li(e,0):rr|=l,ei===Me&&(ei=0)),Yl(e)}function rd(e,t){t===0&&(t=pe()),e=ua(e,t),e!==null&&(qe(e,t),Yl(e))}function _m(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),rd(e,l)}function xm(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,c=e.memoizedState;c!==null&&(l=c.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),rd(e,l)}function Em(e,t){return kl(e,t)}var hu=null,ai=null,yr=!1,du=!1,br=!1,Qn=0;function Yl(e){e!==ai&&e.next===null&&(ai===null?hu=ai=e:ai=ai.next=e),du=!0,yr||(yr=!0,Nm())}function Ji(e,t){if(!br&&du){br=!0;do for(var l=!1,n=hu;n!==null;){if(e!==0){var c=n.pendingLanes;if(c===0)var o=0;else{var h=n.suspendedLanes,m=n.pingedLanes;o=(1<<31-Ot(42|e)+1)-1,o&=c&~(h&~m),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(l=!0,dd(n,o))}else o=Me,o=x(n,n===tt?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(o&3)===0||H(n,o)||(l=!0,dd(n,o));n=n.next}while(l);br=!1}}function Tm(){od()}function od(){du=yr=!1;var e=0;Qn!==0&&Dm()&&(e=Qn);for(var t=lt(),l=null,n=hu;n!==null;){var c=n.next,o=fd(n,t);o===0?(n.next=null,l===null?hu=c:l.next=c,c===null&&(ai=l)):(l=n,(e!==0||(o&3)!==0)&&(du=!0)),n=c}Tt!==0&&Tt!==5||Ji(e),Qn!==0&&(Qn=0)}function fd(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,c=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var h=31-Ot(o),m=1<<h,_=c[h];_===-1?((m&l)===0||(m&n)!==0)&&(c[h]=ee(m,t)):_<=t&&(e.expiredLanes|=m),o&=~m}if(t=tt,l=Me,l=x(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Dl(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||H(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&Dl(n),Ht(l)){case 2:case 8:l=Ul;break;case 32:l=Bl;break;case 268435456:l=Nl;break;default:l=Bl}return n=hd.bind(null,e),l=kl(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&Dl(n),e.callbackPriority=2,e.callbackNode=null,2}function hd(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(fu()&&e.callbackNode!==l)return null;var n=Me;return n=x(e,e===tt?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Vh(e,n,t),fd(e,lt()),e.callbackNode!=null&&e.callbackNode===l?hd.bind(null,e):null)}function dd(e,t){if(fu())return null;Vh(e,t,!0)}function Nm(){Bm(function(){(Ge&6)!==0?kl(Pt,Tm):od()})}function vr(){if(Qn===0){var e=Xa;e===0&&(e=Kl,Kl<<=1,(Kl&261888)===0&&(Kl=256)),Qn=e}return Qn}function pd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:jn(""+e)}function gd(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 Am(e,t,l,n,c){if(t==="submit"&&l&&l.stateNode===c){var o=pd((c[Dt]||null).action),h=n.submitter;h&&(t=(t=h[Dt]||null)?pd(t.formAction):h.getAttribute("formAction"),t!==null&&(o=t,h=null));var m=new Ns("action","action",null,n,c);e.push({event:m,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Qn!==0){var _=h?gd(c,h):new FormData(c);Hc(l,{pending:!0,data:_,method:c.method,action:o},null,_)}}else typeof o=="function"&&(m.preventDefault(),_=h?gd(c,h):new FormData(c),Hc(l,{pending:!0,data:_,method:c.method,action:o},o,_))},currentTarget:c}]})}}for(var Sr=0;Sr<lc.length;Sr++){var _r=lc[Sr],Om=_r.toLowerCase(),jm=_r[0].toUpperCase()+_r.slice(1);Ol(Om,"on"+jm)}Ol(Qo,"onAnimationEnd"),Ol($o,"onAnimationIteration"),Ol(Vo,"onAnimationStart"),Ol("dblclick","onDoubleClick"),Ol("focusin","onFocus"),Ol("focusout","onBlur"),Ol(Zg,"onTransitionRun"),Ol(Qg,"onTransitionStart"),Ol($g,"onTransitionCancel"),Ol(Ko,"onTransitionEnd"),V("onMouseEnter",["mouseout","mouseover"]),V("onMouseLeave",["mouseout","mouseover"]),V("onPointerEnter",["pointerout","pointerover"]),V("onPointerLeave",["pointerout","pointerover"]),Fl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wi="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(" "),wm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wi));function md(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],c=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],_=m.instance,R=m.currentTarget;if(m=m.listener,_!==o&&c.isPropagationStopped())break e;o=m,c.currentTarget=R;try{o(c)}catch(U){js(U)}c.currentTarget=null,o=_}else for(h=0;h<n.length;h++){if(m=n[h],_=m.instance,R=m.currentTarget,m=m.listener,_!==o&&c.isPropagationStopped())break e;o=m,c.currentTarget=R;try{o(c)}catch(U){js(U)}c.currentTarget=null,o=_}}}}function Re(e,t){var l=t[hi];l===void 0&&(l=t[hi]=new Set);var n=e+"__bubble";l.has(n)||(yd(t,e,2,!1),l.add(n))}function xr(e,t,l){var n=0;t&&(n|=4),yd(l,e,n,t)}var pu="_reactListening"+Math.random().toString(36).slice(2);function Er(e){if(!e[pu]){e[pu]=!0,ys.forEach(function(l){l!=="selectionchange"&&(wm.has(l)||xr(l,!1,e),xr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pu]||(t[pu]=!0,xr("selectionchange",!1,t))}}function yd(e,t,l,n){switch($d(t)){case 2:var c=ny;break;case 8:c=ay;break;default:c=qr}l=c.bind(null,t,l,e),c=void 0,!Xu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),n?c!==void 0?e.addEventListener(t,l,{capture:!0,passive:c}):e.addEventListener(t,l,!0):c!==void 0?e.addEventListener(t,l,{passive:c}):e.addEventListener(t,l,!1)}function Tr(e,t,l,n,c){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===c)break;if(h===4)for(h=n.return;h!==null;){var _=h.tag;if((_===3||_===4)&&h.stateNode.containerInfo===c)return;h=h.return}for(;m!==null;){if(h=Lt(m),h===null)return;if(_=h.tag,_===5||_===6||_===26||_===27){n=o=h;continue e}m=m.parentNode}}n=n.return}_s(function(){var R=o,U=Ee(l),X=[];e:{var z=Jo.get(e);if(z!==void 0){var C=Ns,ie=e;switch(e){case"keypress":if(Es(l)===0)break e;case"keydown":case"keyup":C=xg;break;case"focusin":ie="focus",C=Vu;break;case"focusout":ie="blur",C=Vu;break;case"beforeblur":case"afterblur":C=Vu;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=To;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":C=og;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":C=Ng;break;case Qo:case $o:case Vo:C=dg;break;case Ko:C=Og;break;case"scroll":case"scrollend":C=cg;break;case"wheel":C=wg;break;case"copy":case"cut":case"paste":C=gg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":C=Ao;break;case"toggle":case"beforetoggle":C=zg}var me=(t&4)!==0,et=!me&&(e==="scroll"||e==="scrollend"),N=me?z!==null?z+"Capture":null:z;me=[];for(var T=R,w;T!==null;){var G=T;if(w=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||w===null||N===null||(G=bi(T,N),G!=null&&me.push(Fi(T,G,w))),et)break;T=T.return}0<me.length&&(z=new C(z,ie,null,l,U),X.push({event:z,listeners:me}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",C=e==="mouseout"||e==="pointerout",z&&l!==ce&&(ie=l.relatedTarget||l.fromElement)&&(Lt(ie)||ie[Tn]))break e;if((C||z)&&(z=U.window===U?U:(z=U.ownerDocument)?z.defaultView||z.parentWindow:window,C?(ie=l.relatedTarget||l.toElement,C=R,ie=ie?Lt(ie):null,ie!==null&&(et=f(ie),me=ie.tag,ie!==et||me!==5&&me!==27&&me!==6)&&(ie=null)):(C=null,ie=R),C!==ie)){if(me=To,G="onMouseLeave",N="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(me=Ao,G="onPointerLeave",N="onPointerEnter",T="pointer"),et=C==null?z:Nn(C),w=ie==null?z:Nn(ie),z=new me(G,T+"leave",C,l,U),z.target=et,z.relatedTarget=w,G=null,Lt(U)===R&&(me=new me(N,T+"enter",ie,l,U),me.target=w,me.relatedTarget=et,G=me),et=G,C&&ie)t:{for(me=Rm,N=C,T=ie,w=0,G=N;G;G=me(G))w++;G=0;for(var he=T;he;he=me(he))G++;for(;0<w-G;)N=me(N),w--;for(;0<G-w;)T=me(T),G--;for(;w--;){if(N===T||T!==null&&N===T.alternate){me=N;break t}N=me(N),T=me(T)}me=null}else me=null;C!==null&&bd(X,z,C,me,!1),ie!==null&&et!==null&&bd(X,et,ie,me,!0)}}e:{if(z=R?Nn(R):window,C=z.nodeName&&z.nodeName.toLowerCase(),C==="select"||C==="input"&&z.type==="file")var He=ko;else if(Mo(z))if(Do)He=Gg;else{He=Hg;var re=qg}else C=z.nodeName,!C||C.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?R&&On(R.elementType)&&(He=ko):He=Lg;if(He&&(He=He(e,R))){Co(X,He,l,U);break e}re&&re(e,z,R),e==="focusout"&&R&&z.type==="number"&&R.memoizedProps.value!=null&&Ma(z,"number",z.value)}switch(re=R?Nn(R):window,e){case"focusin":(Mo(re)||re.contentEditable==="true")&&(Da=re,Pu=R,Ai=null);break;case"focusout":Ai=Pu=Da=null;break;case"mousedown":ec=!0;break;case"contextmenu":case"mouseup":case"dragend":ec=!1,Xo(X,l,U);break;case"selectionchange":if(Xg)break;case"keydown":case"keyup":Xo(X,l,U)}var Ne;if(Ju)e:{switch(e){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else ka?Ro(e,l)&&(Ce="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ce="onCompositionStart");Ce&&(Oo&&l.locale!=="ko"&&(ka||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&ka&&(Ne=xo()):(wn=U,Zu="value"in wn?wn.value:wn.textContent,ka=!0)),re=gu(R,Ce),0<re.length&&(Ce=new No(Ce,e,null,l,U),X.push({event:Ce,listeners:re}),Ne?Ce.data=Ne:(Ne=zo(l),Ne!==null&&(Ce.data=Ne)))),(Ne=Cg?kg(e,l):Dg(e,l))&&(Ce=gu(R,"onBeforeInput"),0<Ce.length&&(re=new No("onBeforeInput","beforeinput",null,l,U),X.push({event:re,listeners:Ce}),re.data=Ne)),Am(X,e,R,l,U)}md(X,t)})}function Fi(e,t,l){return{instance:e,listener:t,currentTarget:l}}function gu(e,t){for(var l=t+"Capture",n=[];e!==null;){var c=e,o=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||o===null||(c=bi(e,l),c!=null&&n.unshift(Fi(e,c,o)),c=bi(e,t),c!=null&&n.push(Fi(e,c,o))),e.tag===3)return n;e=e.return}return[]}function Rm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function bd(e,t,l,n,c){for(var o=t._reactName,h=[];l!==null&&l!==n;){var m=l,_=m.alternate,R=m.stateNode;if(m=m.tag,_!==null&&_===n)break;m!==5&&m!==26&&m!==27||R===null||(_=R,c?(R=bi(l,o),R!=null&&h.unshift(Fi(l,R,_))):c||(R=bi(l,o),R!=null&&h.push(Fi(l,R,_)))),l=l.return}h.length!==0&&e.push({event:t,listeners:h})}var zm=/\r\n?/g,Mm=/\u0000|\uFFFD/g;function vd(e){return(typeof e=="string"?e:""+e).replace(zm,`
|
|
9
|
+
`).replace(Mm,"")}function Sd(e,t){return t=vd(t),vd(e)===t}function Pe(e,t,l,n,c,o){switch(l){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||ye(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&ye(e,""+n);break;case"className":tl(e,"class",n);break;case"tabIndex":tl(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":tl(e,l,n);break;case"style":Ve(e,n,o);break;case"data":if(t!=="object"){tl(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=jn(""+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"&&Pe(e,t,"name",c.name,c,null),Pe(e,t,"formEncType",c.formEncType,c,null),Pe(e,t,"formMethod",c.formMethod,c,null),Pe(e,t,"formTarget",c.formTarget,c,null)):(Pe(e,t,"encType",c.encType,c,null),Pe(e,t,"method",c.method,c,null),Pe(e,t,"target",c.target,c,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=jn(""+n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=W);break;case"onScroll":n!=null&&Re("scroll",e);break;case"onScrollEnd":n!=null&&Re("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(c.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=jn(""+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":Re("beforetoggle",e),Re("toggle",e),Ut(e,"popover",n);break;case"xlinkActuate":Zt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Zt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Zt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Zt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Zt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Zt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Zt(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 Nr(e,t,l,n,c,o){switch(l){case"style":Ve(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(c.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"children":typeof n=="string"?ye(e,n):(typeof n=="number"||typeof n=="bigint")&&ye(e,""+n);break;case"onScroll":n!=null&&Re("scroll",e);break;case"onScrollEnd":n!=null&&Re("scrollend",e);break;case"onClick":n!=null&&(e.onclick=W);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!la.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(c=l.endsWith("Capture"),t=l.slice(2,c?l.length-7:void 0),o=e[Dt]||null,o=o!=null?o[l]:null,typeof o=="function"&&e.removeEventListener(t,o,c),typeof n=="function")){typeof o!="function"&&o!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,n,c);break e}l in e?e[l]=n:n===!0?e.setAttribute(l,""):Ut(e,l,n)}}}function Mt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var n=!1,c=!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":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Pe(e,t,o,h,l,null)}}c&&Pe(e,t,"srcSet",l.srcSet,l,null),n&&Pe(e,t,"src",l.src,l,null);return;case"input":Re("invalid",e);var m=o=h=c=null,_=null,R=null;for(n in l)if(l.hasOwnProperty(n)){var U=l[n];if(U!=null)switch(n){case"name":c=U;break;case"type":h=U;break;case"checked":_=U;break;case"defaultChecked":R=U;break;case"value":o=U;break;case"defaultValue":m=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,t));break;default:Pe(e,t,n,U,l,null)}}na(e,o,m,_,R,h,c,!1);return;case"select":Re("invalid",e),n=h=o=null;for(c in l)if(l.hasOwnProperty(c)&&(m=l[c],m!=null))switch(c){case"value":o=m;break;case"defaultValue":h=m;break;case"multiple":n=m;default:Pe(e,t,c,m,l,null)}t=o,l=h,e.multiple=!!n,t!=null?jt(e,!!n,t,!1):l!=null&&jt(e,!!n,l,!0);return;case"textarea":Re("invalid",e),o=c=n=null;for(h in l)if(l.hasOwnProperty(h)&&(m=l[h],m!=null))switch(h){case"value":n=m;break;case"defaultValue":c=m;break;case"children":o=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(s(91));break;default:Pe(e,t,h,m,l,null)}Ca(e,n,c,o);return;case"option":for(_ in l)l.hasOwnProperty(_)&&(n=l[_],n!=null)&&(_==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":Pe(e,t,_,n,l,null));return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(n=0;n<Wi.length;n++)Re(Wi[n],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("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(R in l)if(l.hasOwnProperty(R)&&(n=l[R],n!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Pe(e,t,R,n,l,null)}return;default:if(On(t)){for(U in l)l.hasOwnProperty(U)&&(n=l[U],n!==void 0&&Nr(e,t,U,n,l,void 0));return}}for(m in l)l.hasOwnProperty(m)&&(n=l[m],n!=null&&Pe(e,t,m,n,l,null))}function Cm(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 c=null,o=null,h=null,m=null,_=null,R=null,U=null;for(C in l){var X=l[C];if(l.hasOwnProperty(C)&&X!=null)switch(C){case"checked":break;case"value":break;case"defaultValue":_=X;default:n.hasOwnProperty(C)||Pe(e,t,C,null,n,X)}}for(var z in n){var C=n[z];if(X=l[z],n.hasOwnProperty(z)&&(C!=null||X!=null))switch(z){case"type":o=C;break;case"name":c=C;break;case"checked":R=C;break;case"defaultChecked":U=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!==X&&Pe(e,t,z,C,n,X)}}gi(e,h,m,_,R,U,o,c);return;case"select":C=h=m=z=null;for(o in l)if(_=l[o],l.hasOwnProperty(o)&&_!=null)switch(o){case"value":break;case"multiple":C=_;default:n.hasOwnProperty(o)||Pe(e,t,o,null,n,_)}for(c in n)if(o=n[c],_=l[c],n.hasOwnProperty(c)&&(o!=null||_!=null))switch(c){case"value":z=o;break;case"defaultValue":m=o;break;case"multiple":h=o;default:o!==_&&Pe(e,t,c,o,n,_)}t=m,l=h,n=C,z!=null?jt(e,!!l,z,!1):!!n!=!!l&&(t!=null?jt(e,!!l,t,!0):jt(e,!!l,l?[]:"",!1));return;case"textarea":C=z=null;for(m in l)if(c=l[m],l.hasOwnProperty(m)&&c!=null&&!n.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Pe(e,t,m,null,n,c)}for(h in n)if(c=n[h],o=l[h],n.hasOwnProperty(h)&&(c!=null||o!=null))switch(h){case"value":z=c;break;case"defaultValue":C=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(s(91));break;default:c!==o&&Pe(e,t,h,c,n,o)}vs(e,z,C);return;case"option":for(var ie in l)z=l[ie],l.hasOwnProperty(ie)&&z!=null&&!n.hasOwnProperty(ie)&&(ie==="selected"?e.selected=!1:Pe(e,t,ie,null,n,z));for(_ in n)z=n[_],C=l[_],n.hasOwnProperty(_)&&z!==C&&(z!=null||C!=null)&&(_==="selected"?e.selected=z&&typeof z!="function"&&typeof z!="symbol":Pe(e,t,_,z,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 me in l)z=l[me],l.hasOwnProperty(me)&&z!=null&&!n.hasOwnProperty(me)&&Pe(e,t,me,null,n,z);for(R in n)if(z=n[R],C=l[R],n.hasOwnProperty(R)&&z!==C&&(z!=null||C!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(s(137,t));break;default:Pe(e,t,R,z,n,C)}return;default:if(On(t)){for(var et in l)z=l[et],l.hasOwnProperty(et)&&z!==void 0&&!n.hasOwnProperty(et)&&Nr(e,t,et,void 0,n,z);for(U in n)z=n[U],C=l[U],!n.hasOwnProperty(U)||z===C||z===void 0&&C===void 0||Nr(e,t,U,z,n,C);return}}for(var N in l)z=l[N],l.hasOwnProperty(N)&&z!=null&&!n.hasOwnProperty(N)&&Pe(e,t,N,null,n,z);for(X in n)z=n[X],C=l[X],!n.hasOwnProperty(X)||z===C||z==null&&C==null||Pe(e,t,X,z,n,C)}function _d(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function km(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var c=l[n],o=c.transferSize,h=c.initiatorType,m=c.duration;if(o&&m&&_d(h)){for(h=0,m=c.responseEnd,n+=1;n<l.length;n++){var _=l[n],R=_.startTime;if(R>m)break;var U=_.transferSize,X=_.initiatorType;U&&_d(X)&&(_=_.responseEnd,h+=U*(_<m?1:(m-R)/(_-R)))}if(--n,t+=8*(o+h)/(c.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 Ar=null,Or=null;function mu(e){return e.nodeType===9?e:e.ownerDocument}function xd(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 Ed(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 jr(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 wr=null;function Dm(){var e=window.event;return e&&e.type==="popstate"?e===wr?!1:(wr=e,!0):(wr=null,!1)}var Td=typeof setTimeout=="function"?setTimeout:void 0,Um=typeof clearTimeout=="function"?clearTimeout:void 0,Nd=typeof Promise=="function"?Promise:void 0,Bm=typeof queueMicrotask=="function"?queueMicrotask:typeof Nd<"u"?function(e){return Nd.resolve(null).then(e).catch(qm)}:Td;function qm(e){setTimeout(function(){throw e})}function $n(e){return e==="head"}function Ad(e,t){var l=t,n=0;do{var c=l.nextSibling;if(e.removeChild(l),c&&c.nodeType===8)if(l=c.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(c),ci(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Ii(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Ii(l);for(var o=l.firstChild;o;){var h=o.nextSibling,m=o.nodeName;o[ta]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&o.rel.toLowerCase()==="stylesheet"||l.removeChild(o),o=h}}else l==="body"&&Ii(e.ownerDocument.body);l=c}while(l);ci(t)}function Od(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 Rr(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":Rr(l),di(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Hm(e,t,l,n){for(;e.nodeType===1;){var c=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[ta])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!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=vl(e.nextSibling),e===null)break}return null}function Lm(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 jd(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 zr(e){return e.data==="$?"||e.data==="$~"}function Mr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Gm(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 Cr=null;function wd(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 Rd(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 zd(e,t,l){switch(t=mu(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 Ii(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);di(e)}var Sl=new Map,Md=new Set;function yu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var gn=K.d;K.d={f:Ym,r:Xm,D:Zm,C:Qm,L:$m,m:Vm,X:Jm,S:Km,M:Wm};function Ym(){var e=gn.f(),t=cu();return e||t}function Xm(e){var t=Wl(e);t!==null&&t.tag===5&&t.type==="form"?Jf(t):gn.r(e)}var ii=typeof document>"u"?null:document;function Cd(e,t,l){var n=ii;if(n&&typeof t=="string"&&t){var c=Qt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof l=="string"&&(c+='[crossorigin="'+l+'"]'),Md.has(c)||(Md.add(c),e={rel:e,crossOrigin:l,href:t},n.querySelector(c)===null&&(t=n.createElement("link"),Mt(t,"link",e),yt(t),n.head.appendChild(t)))}}function Zm(e){gn.D(e),Cd("dns-prefetch",e,null)}function Qm(e,t){gn.C(e,t),Cd("preconnect",e,t)}function $m(e,t,l){gn.L(e,t,l);var n=ii;if(n&&e&&t){var c='link[rel="preload"][as="'+Qt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(c+='[imagesrcset="'+Qt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(c+='[imagesizes="'+Qt(l.imageSizes)+'"]')):c+='[href="'+Qt(e)+'"]';var o=c;switch(t){case"style":o=si(e);break;case"script":o=ui(e)}Sl.has(o)||(e=S({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Sl.set(o,e),n.querySelector(c)!==null||t==="style"&&n.querySelector(Pi(o))||t==="script"&&n.querySelector(es(o))||(t=n.createElement("link"),Mt(t,"link",e),yt(t),n.head.appendChild(t)))}}function Vm(e,t){gn.m(e,t);var l=ii;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Qt(n)+'"][href="'+Qt(e)+'"]',o=c;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=ui(e)}if(!Sl.has(o)&&(e=S({rel:"modulepreload",href:e},t),Sl.set(o,e),l.querySelector(c)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(es(o)))return}n=l.createElement("link"),Mt(n,"link",e),yt(n),l.head.appendChild(n)}}}function Km(e,t,l){gn.S(e,t,l);var n=ii;if(n&&e){var c=An(n).hoistableStyles,o=si(e);t=t||"default";var h=c.get(o);if(!h){var m={loading:0,preload:null};if(h=n.querySelector(Pi(o)))m.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Sl.get(o))&&kr(e,l);var _=h=n.createElement("link");yt(_),Mt(_,"link",e),_._p=new Promise(function(R,U){_.onload=R,_.onerror=U}),_.addEventListener("load",function(){m.loading|=1}),_.addEventListener("error",function(){m.loading|=2}),m.loading|=4,bu(h,t,n)}h={type:"stylesheet",instance:h,count:1,state:m},c.set(o,h)}}}function Jm(e,t){gn.X(e,t);var l=ii;if(l&&e){var n=An(l).hoistableScripts,c=ui(e),o=n.get(c);o||(o=l.querySelector(es(c)),o||(e=S({src:e,async:!0},t),(t=Sl.get(c))&&Dr(e,t),o=l.createElement("script"),yt(o),Mt(o,"link",e),l.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(c,o))}}function Wm(e,t){gn.M(e,t);var l=ii;if(l&&e){var n=An(l).hoistableScripts,c=ui(e),o=n.get(c);o||(o=l.querySelector(es(c)),o||(e=S({src:e,async:!0,type:"module"},t),(t=Sl.get(c))&&Dr(e,t),o=l.createElement("script"),yt(o),Mt(o,"link",e),l.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(c,o))}}function kd(e,t,l,n){var c=(c=xe.current)?yu(c):null;if(!c)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=An(c).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=An(c).hoistableStyles,h=o.get(e);if(h||(c=c.ownerDocument||c,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,h),(o=c.querySelector(Pi(e)))&&!o._p&&(h.instance=o,h.state.loading=5),Sl.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},Sl.set(e,l),o||Fm(c,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=ui(l),l=An(c).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="'+Qt(e)+'"'}function Pi(e){return'link[rel="stylesheet"]['+e+"]"}function Dd(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function Fm(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}),Mt(t,"link",l),yt(t),e.head.appendChild(t))}function ui(e){return'[src="'+Qt(e)+'"]'}function es(e){return"script[async]"+e}function Ud(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Qt(l.href)+'"]');if(n)return t.instance=n,yt(n),n;var c=S({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),yt(n),Mt(n,"style",c),bu(n,l.precedence,e),t.instance=n;case"stylesheet":c=si(l.href);var o=e.querySelector(Pi(c));if(o)return t.state.loading|=4,t.instance=o,yt(o),o;n=Dd(l),(c=Sl.get(c))&&kr(n,c),o=(e.ownerDocument||e).createElement("link"),yt(o);var h=o;return h._p=new Promise(function(m,_){h.onload=m,h.onerror=_}),Mt(o,"link",n),t.state.loading|=4,bu(o,l.precedence,e),t.instance=o;case"script":return o=ui(l.src),(c=e.querySelector(es(o)))?(t.instance=c,yt(c),c):(n=l,(c=Sl.get(o))&&(n=S({},l),Dr(n,c)),e=e.ownerDocument||e,c=e.createElement("script"),yt(c),Mt(c,"link",n),e.head.appendChild(c),t.instance=c);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,bu(n,l.precedence,e));return t.instance}function bu(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=n.length?n[n.length-1]:null,o=c,h=0;h<n.length;h++){var m=n[h];if(m.dataset.precedence===t)o=m;else if(o!==c)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function kr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Dr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var vu=null;function Bd(e,t,l){if(vu===null){var n=new Map,c=vu=new Map;c.set(l,n)}else c=vu,n=c.get(l),n||(n=new Map,c.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),c=0;c<l.length;c++){var o=l[c];if(!(o[ta]||o[dt]||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 qd(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Im(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 Hd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Pm(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 c=si(n.href),o=t.querySelector(Pi(c));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Su.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=o,yt(o);return}o=t.ownerDocument||t,n=Dd(n),(c=Sl.get(c))&&kr(n,c),o=o.createElement("link"),yt(o);var h=o;h._p=new Promise(function(m,_){h.onload=m,h.onerror=_}),Mt(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=Su.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Ur=0;function ey(e,t){return e.stylesheets&&e.count===0&&xu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&xu(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Ur===0&&(Ur=62500*km());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&xu(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Ur?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(c)}}:null}function Su(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var _u=null;function xu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,_u=new Map,t.forEach(ty,e),_u=null,Su.call(e))}function ty(e,t){if(!(t.state.loading&4)){var l=_u.get(e);if(l)var n=l.get(null);else{l=new Map,_u.set(e,l);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<c.length;o++){var h=c[o];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(l.set(h.dataset.precedence,h),n=h)}n&&l.set(null,n)}c=t.instance,h=c.getAttribute("data-precedence"),o=l.get(h)||n,o===n&&l.set(null,c),l.set(h,c),this.count++,n=Su.bind(this),c.addEventListener("load",n),c.addEventListener("error",n),o?o.parentNode.insertBefore(c,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var ts={$$typeof:te,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function ly(e,t,l,n,c,o,h,m,_){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=Xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xe(0),this.hiddenUpdates=Xe(null),this.identifierPrefix=n,this.onUncaughtError=c,this.onCaughtError=o,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function Ld(e,t,l,n,c,o,h,m,_,R,U,X){return e=new ly(e,t,l,h,_,R,U,X,m),t=1,o===!0&&(t|=24),o=al(3,null,null,t),e.current=o,o.stateNode=e,t=gc(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:n,isDehydrated:l,cache:t},vc(o),e}function Gd(e){return e?(e=qa,e):qa}function Yd(e,t,l,n,c,o){c=Gd(c),n.context===null?n.context=c:n.pendingContext=c,n=Dn(t),n.payload={element:l},o=o===void 0?null:o,o!==null&&(n.callback=o),l=Un(e,n,t),l!==null&&(Ft(l,e,t),Ci(l,e,t))}function Xd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Br(e,t){Xd(e,t),(e=e.alternate)&&Xd(e,t)}function Zd(e){if(e.tag===13||e.tag===31){var t=ua(e,67108864);t!==null&&Ft(t,e,67108864),Br(e,67108864)}}function Qd(e){if(e.tag===13||e.tag===31){var t=rl();t=ve(t);var l=ua(e,t);l!==null&&Ft(l,e,t),Br(e,t)}}var Eu=!0;function ny(e,t,l,n){var c=k.T;k.T=null;var o=K.p;try{K.p=2,qr(e,t,l,n)}finally{K.p=o,k.T=c}}function ay(e,t,l,n){var c=k.T;k.T=null;var o=K.p;try{K.p=8,qr(e,t,l,n)}finally{K.p=o,k.T=c}}function qr(e,t,l,n){if(Eu){var c=Hr(n);if(c===null)Tr(e,t,n,Tu,l),Vd(e,n);else if(sy(c,e,t,l,n))n.stopPropagation();else if(Vd(e,n),t&4&&-1<iy.indexOf(e)){for(;c!==null;){var o=Wl(c);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 _=1<<31-Ot(h);m.entanglements[1]|=_,h&=~_}Yl(o),(Ge&6)===0&&(su=lt()+500,Ji(0))}}break;case 31:case 13:m=ua(o,2),m!==null&&Ft(m,o,2),cu(),Br(o,2)}if(o=Hr(n),o===null&&Tr(e,t,n,Tu,l),o===c)break;c=o}c!==null&&n.stopPropagation()}else Tr(e,t,n,null,l)}}function Hr(e){return e=Ee(e),Lr(e)}var Tu=null;function Lr(e){if(Tu=null,e=Lt(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 Tu=e,null}function $d(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(Pn()){case Pt:return 2;case Ul:return 8;case Bl:case qt:return 32;case Nl:return 268435456;default:return 32}default:return 32}}var Gr=!1,Vn=null,Kn=null,Jn=null,ls=new Map,ns=new Map,Wn=[],iy="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 Vd(e,t){switch(e){case"focusin":case"focusout":Vn=null;break;case"dragenter":case"dragleave":Kn=null;break;case"mouseover":case"mouseout":Jn=null;break;case"pointerover":case"pointerout":ls.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ns.delete(t.pointerId)}}function as(e,t,l,n,c,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:o,targetContainers:[c]},t!==null&&(t=Wl(t),t!==null&&Zd(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function sy(e,t,l,n,c){switch(t){case"focusin":return Vn=as(Vn,e,t,l,n,c),!0;case"dragenter":return Kn=as(Kn,e,t,l,n,c),!0;case"mouseover":return Jn=as(Jn,e,t,l,n,c),!0;case"pointerover":var o=c.pointerId;return ls.set(o,as(ls.get(o)||null,e,t,l,n,c)),!0;case"gotpointercapture":return o=c.pointerId,ns.set(o,as(ns.get(o)||null,e,t,l,n,c)),!0}return!1}function Kd(e){var t=Lt(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,ja(e.priority,function(){Qd(l)});return}}else if(t===31){if(t=g(l),t!==null){e.blockedOn=t,ja(e.priority,function(){Qd(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 Nu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Hr(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);ce=n,l.target.dispatchEvent(n),ce=null}else return t=Wl(l),t!==null&&Zd(t),e.blockedOn=l,!1;t.shift()}return!0}function Jd(e,t,l){Nu(e)&&l.delete(t)}function uy(){Gr=!1,Vn!==null&&Nu(Vn)&&(Vn=null),Kn!==null&&Nu(Kn)&&(Kn=null),Jn!==null&&Nu(Jn)&&(Jn=null),ls.forEach(Jd),ns.forEach(Jd)}function Au(e,t){e.blockedOn===t&&(e.blockedOn=null,Gr||(Gr=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,uy)))}var Ou=null;function Wd(e){Ou!==e&&(Ou=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Ou===e&&(Ou=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],c=e[t+2];if(typeof n!="function"){if(Lr(n||l)===null)continue;break}var o=Wl(l);o!==null&&(e.splice(t,3),t-=3,Hc(o,{pending:!0,data:c,method:l.method,action:n},n,c))}}))}function ci(e){function t(_){return Au(_,e)}Vn!==null&&Au(Vn,e),Kn!==null&&Au(Kn,e),Jn!==null&&Au(Jn,e),ls.forEach(t),ns.forEach(t);for(var l=0;l<Wn.length;l++){var n=Wn[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Wn.length&&(l=Wn[0],l.blockedOn===null);)Kd(l),l.blockedOn===null&&Wn.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var c=l[n],o=l[n+1],h=c[Dt]||null;if(typeof o=="function")h||Wd(l);else if(h){var m=null;if(o&&o.hasAttribute("formAction")){if(c=o,h=o[Dt]||null)m=h.formAction;else if(Lr(c)!==null)continue}else m=h.action;typeof m=="function"?l[n+1]=m:(l.splice(n,3),n-=3),Wd(l)}}}function Fd(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(h){return c=h})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=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,c=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),c!==null&&(c(),c=null)}}}function Yr(e){this._internalRoot=e}ju.prototype.render=Yr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var l=t.current,n=rl();Yd(l,n,e,t,null,null)},ju.prototype.unmount=Yr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Yd(e.current,2,null,e,null,null),cu(),t[Tn]=null}};function ju(e){this._internalRoot=e}ju.prototype.unstable_scheduleHydration=function(e){if(e){var t=Al();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Wn.length&&t!==0&&t<Wn[l].priority;l++);Wn.splice(l,0,e),l===0&&Kd(e)}};var Id=i.version;if(Id!=="19.2.4")throw Error(s(527,Id,"19.2.4"));K.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 cy={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wu.isDisabled&&wu.supportsFiber)try{el=wu.inject(cy),Nt=wu}catch{}}return ss.createRoot=function(e,t){if(!r(e))throw Error(s(299));var l=!1,n="",c=ih,o=sh,h=uh;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Ld(e,1,!1,null,null,l,n,null,c,o,h,Fd),e[Tn]=t.current,Er(e),new Yr(t)},ss.hydrateRoot=function(e,t,l){if(!r(e))throw Error(s(299));var n=!1,c="",o=ih,h=sh,m=uh,_=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(c=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&&(_=l.formState)),t=Ld(e,1,!0,t,l??null,n,c,_,o,h,m,Fd),t.context=Gd(null),l=t.current,n=rl(),n=ve(n),c=Dn(n),c.callback=null,Un(l,c,n),l=n,t.current.lanes=l,qe(t,l),Yl(t),e[Tn]=t.current,Er(e),new ju(t)},ss.version="19.2.4",ss}var cp;function vy(){if(cp)return Zr.exports;cp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),Zr.exports=by(),Zr.exports}var Sy=vy(),M=uo();const _y="/api";async function ut(a,i,u){const s={method:a,headers:{}};u!==void 0&&(s.headers["Content-Type"]="application/json",s.body=JSON.stringify(u));const r=await fetch(`${_y}${i}`,s);if(!r.ok){const d=await r.text().catch(()=>"");throw new Error(`${r.status} ${r.statusText}: ${d}`)}return(r.headers.get("content-type")||"").includes("application/json")?r.json():r.text()}function xy(){return ut("GET","/project")}function Ey(a){return ut("PUT","/project/switch",{path:a})}function Ru(){return ut("GET","/projects")}function Ty(a,i){return ut("POST","/projects",{path:a,spec:i})}function Ny(a){return ut("DELETE","/projects",{path:a})}function rp(){return ut("GET","/project/spec/endpoints")}function Ay(a,i){return ut("GET",`/project/spec/endpoint?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}`)}function Oy(a,i,u){let s=`?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}`;return s+=`&contentType=${encodeURIComponent(u)}`,ut("GET",`/project/spec/endpoint/sample${s}`)}function op(){return ut("GET","/project/environments")}function Jr(){return ut("GET","/project/environments/resolved")}function jy(a){return ut("PUT","/project/environments/base",a)}function wy(a,i){return ut("PUT",`/project/environments/${encodeURIComponent(a)}`,i)}function Ry(a){return ut("PUT","/project/environments/active",{name:a})}function zy(a){return ut("DELETE",`/project/environments/${encodeURIComponent(a)}`)}function My(a,i){return ut("GET",`/project/params?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}`)}function fp(a,i,u){return ut("PUT",`/project/params?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}`,u)}function Cy(a){return ut("POST","/project/request/send",a)}function ky(a){return ut("POST","/project/request/cancel",{request_id:a})}function Dy(a,i,u,s){return ut("POST","/project/request/validate",{method:a,path:i,body:u,content_type:s})}function hp(a,i,u){let s=`?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}`;return ut("GET",`/project/request/history${s}`)}function Uy(a,i,u){return ut("GET",`/project/request/history/entry?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}&index=${encodeURIComponent(u)}`)}function By(a,i){return ut("DELETE",`/project/request/history?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}`)}function qy(a){return ut("GET",`/browse?path=${encodeURIComponent(a||"~")}`)}function Hy(){return ut("GET","/preferences")}function Ly(a){return ut("PATCH","/preferences",a)}function Gy({onSpecReloaded:a,onSpecError:i,onGitChanged:u,onProjectSwitched:s}={}){const r=new EventSource("/api/events");return r.addEventListener("spec:reloaded",f=>{const d=f.data?JSON.parse(f.data):{};a&&a(d)}),r.addEventListener("spec:error",f=>{const d=f.data?JSON.parse(f.data):{};i&&i(d)}),r.addEventListener("git:changed",f=>{const d=f.data?JSON.parse(f.data):{};u&&u(d)}),r.addEventListener("project:switched",f=>{const d=f.data?JSON.parse(f.data):{};s&&s(d)}),r.onerror=()=>{},{disconnect(){r.close()}}}function Yy({project:a,git:i,environments:u,activeEnv:s,onSwitchProject:r,onSetActiveEnv:f,onOpenEnvEditor:d,onOpenProjectDialog:g,toast:p,projects:y,servers:v,serverIndex:S,onServerIndexChange:O,sending:j,onSend:Z,onCancel:$,hasEndpoint:Q}){const Y=[];u&&(Y.push("Base"),u.environments&&Object.keys(u.environments).forEach(te=>Y.push(te)));const se=a?.name||a?.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:a?.path||"",onChange:te=>{te.target.value&&r&&r(te.target.value)},children:[(!y||y.length===0)&&b.jsx("option",{value:"",children:se}),y&&y.map(te=>b.jsx("option",{value:te.path,children:te.name||te.path},te.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:te=>{f&&f(te.target.value==="Base"?null:te.target.value)},children:Y.map(te=>b.jsx("option",{value:te,children:te},te))}),b.jsx("button",{className:"topbar__btn",onClick:d,title:"Edit environments (Ctrl+E)",children:"Edit"})]}),b.jsxs("div",{className:"topbar__section--right",children:[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:S,onChange:te=>O(Number(te.target.value)),children:v.map((te,J)=>b.jsxs("option",{value:J,children:[te.url,te.description?` - ${te.description}`:""]},J))})]}),Q&&b.jsx("div",{className:"topbar__section",children:j?b.jsxs("button",{className:"topbar__send-btn topbar__send-btn--cancel",onClick:$,children:[b.jsx("span",{className:"topbar__spinner"}),"Cancel"]}):b.jsx("button",{className:"topbar__send-btn",onClick:Z,children:"Send"})}),i&&b.jsxs("div",{className:"topbar__git",children:[b.jsx("span",{className:"topbar__git-branch",children:i.branch||"detached"}),i.commit&&b.jsx("span",{className:"topbar__git-commit",children:i.commit}),i.dirty&&b.jsx("span",{className:"topbar__git-dirty",children:"*"})]}),p&&b.jsx("span",{className:"topbar__toast",children:p},p)]})]})}function co({endpoint:a,selected:i,onSelect:u}){const s=`endpoint-item__method endpoint-item__method--${(a.method||"").toLowerCase()}`,r=`endpoint-item${i?" endpoint-item--selected":""}`;return b.jsxs("div",{className:r,onClick:()=>u(a),children:[b.jsx("span",{className:s,children:(a.method||"").toUpperCase()}),b.jsx("span",{className:"endpoint-item__path",children:a.path}),a.summary&&b.jsx("span",{className:"endpoint-item__summary",children:a.summary})]})}function Xy({endpoints:a,selectedEndpoint:i,onSelect:u}){const s=M.useMemo(()=>{const f={};for(const d of a){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},[a]),r=Object.keys(s).sort();return b.jsx(b.Fragment,{children:r.map(f=>b.jsxs("div",{children:[b.jsx("div",{className:"endpoint-list__tag-header",children:f}),s[f].map(d=>b.jsx(co,{endpoint:d,selected:i&&i.method===d.method&&i.path===d.path,onSelect:u},`${d.method}-${d.path}`))]},f))})}function Zy(a){const i={__children:{},__endpoints:[]};for(const u of a){const s=u.path.replace(/^\//,"").split("/").filter(Boolean);let r=i;for(const f of s)r.__children[f]||(r.__children[f]={__children:{},__endpoints:[]}),r=r.__children[f];r.__endpoints.push(u)}return i}function Up({name:a,node:i,depth:u,selectedEndpoint:s,onSelect:r,collapseState:f,onToggle:d}){const g=`${u}-${a}`,p=f[g]??!1,y=Object.keys(i.__children).sort();return!(y.length>0||i.__endpoints.length>0)&&!a?null:b.jsxs("div",{children:[a&&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:["/",a]})]}),!p&&b.jsxs("div",{children:[i.__endpoints.map(S=>b.jsx(co,{endpoint:S,selected:s&&s.method===S.method&&s.path===S.path,onSelect:r},`${S.method}-${S.path}`)),y.map(S=>b.jsx(Up,{name:S,node:i.__children[S],depth:u+1,selectedEndpoint:s,onSelect:r,collapseState:f,onToggle:d},S))]})]})}function Qy({endpoints:a,selectedEndpoint:i,onSelect:u,collapseState:s,onToggle:r}){const f=M.useMemo(()=>Zy(a),[a]),d=Object.keys(f.__children).sort();return b.jsxs(b.Fragment,{children:[f.__endpoints.map(g=>b.jsx(co,{endpoint:g,selected:i&&i.method===g.method&&i.path===g.path,onSelect:u},`${g.method}-${g.path}`)),d.map(g=>b.jsx(Up,{name:g,node:f.__children[g],depth:0,selectedEndpoint:i,onSelect:u,collapseState:s,onToggle:r},g))]})}function $y({endpoints:a,selectedEndpoint:i,onSelect:u,viewMode:s,onToggleViewMode:r,treeCollapseState:f,onToggleTreeNode:d,searchTerm:g,onSearchChange:p}){const y=M.useMemo(()=>{if(!g)return a||[];const v=g.toLowerCase();return(a||[]).filter(S=>S.path.toLowerCase().includes(v)||(S.method||"").toLowerCase().includes(v)||(S.summary||"").toLowerCase().includes(v))},[a,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"?r:void 0,children:"Tags"}),b.jsx("button",{className:`endpoint-list__view-btn${s==="tree"?" endpoint-list__view-btn--active":""}`,onClick:s!=="tree"?r:void 0,children:"Tree"})]}),b.jsxs("div",{className:"endpoint-list__items",children:[s==="tag"?b.jsx(Xy,{endpoints:y,selectedEndpoint:i,onSelect:u}):b.jsx(Qy,{endpoints:y,selectedEndpoint:i,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 Pr=/(\{\{\s*\w+\s*\}\})/g;function Vy(a){if(!a)return" ";const i=a.split(Pr);return i.length===1?a||" ":i.map((u,s)=>Pr.test(u)?b.jsx("mark",{className:"hl-var",children:u},s):u)}function Ky({className:a,value:i,...u}){const s=i&&Pr.test(i),r=M.useRef(null),f=M.useRef(null),[d,g]=M.useState(0);return M.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:Vy(i)}),b.jsx("input",{ref:r,className:`${a} hl-input`,value:i,onScroll:p=>g(p.target.scrollLeft),...u})]}):b.jsx("input",{className:a,value:i,...u})}function Jy(a,i){return!a||!i||typeof a!="string"||!/\{\{\s*(\w+)\s*\}\}/g.test(a)?null:a.replace(/\{\{\s*(\w+)\s*\}\}/g,(s,r)=>i[r]!==void 0?i[r]:s)}function Wr({parameters:a,values:i,onChange:u,resolvedEnv:s}){return!a||a.length===0?null:b.jsx("div",{className:"param-form",children:a.map(r=>{const f=r.name,d=i[f]??"",g=Jy(d,s);return b.jsxs("div",{className:"param-form__field",children:[b.jsxs("label",{className:"param-form__label",children:[f,r.required&&b.jsx("span",{className:"param-form__required",children:"*"})]}),r.description&&b.jsx("span",{className:"param-form__desc",children:r.description}),b.jsx(Ky,{className:"param-form__input",type:"text",value:d,placeholder:r.schema?.default!=null?String(r.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 eo({schema:a,depth:i=0}){if(!a)return null;const u=i*16;if(a.type==="object"&&a.properties){const s=new Set(a.required||[]);return b.jsx("div",{style:{paddingLeft:u},children:Object.entries(a.properties).map(([r,f])=>b.jsxs("div",{className:"schema-view__prop",children:[b.jsx("span",{className:"schema-view__name",children:r}),b.jsx("span",{className:"schema-view__type",children:f.type||(f.items?"array":"object")}),s.has(r)&&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(eo,{schema:f,depth:i+1}),f.type==="array"&&f.items?.type==="object"&&f.items.properties&&b.jsx(eo,{schema:f.items,depth:i+1})]},r))})}return null}function Wy({endpoint:a,body:i,contentType:u,onBodyChange:s,onContentTypeChange:r,resolvedEnv:f}){const[d,g]=M.useState(null),[p,y]=M.useState(!1),[v,S]=M.useState(!1),O=M.useRef(null),Z=(a?.request_body||a?.requestBody)?.content||{},$=Object.keys(Z),Q=u||$[0]||"application/json",Y=Q.includes("json"),se=Q==="application/x-www-form-urlencoded",te=Q.includes("multipart"),J=se||te,I=M.useMemo(()=>{if(!J||!i)return[{key:"",value:"",type:"text"}];try{const P=JSON.parse(i);if(Array.isArray(P))return P.length>0?P:[{key:"",value:"",type:"text"}]}catch{}return[{key:"",value:"",type:"text"}]},[i,J]);M.useEffect(()=>{if(!i||!a){g(null);return}return O.current&&clearTimeout(O.current),O.current=setTimeout(async()=>{try{const P=await Dy(a.method,a.path,i,Q);g(P)}catch{g(null)}},600),()=>{O.current&&clearTimeout(O.current)}},[i,a,Q]);const ge=M.useCallback(async()=>{if(a){y(!0);try{const P=await Oy(a.method,a.path,Q),Se=P?.sample??P;if(Se==null)return;const Ye=typeof Se=="string"?Se:JSON.stringify(Se,null,2);s(Ye)}catch{}finally{y(!1)}}},[a,Q,s]),oe=M.useCallback(P=>{s(JSON.stringify(P))},[s]),D=M.useCallback((P,Se,Ye)=>{const Ze=I.map((Qe,k)=>k===P?{...Qe,[Se]:Ye}:Qe);oe(Ze)},[I,oe]),le=M.useCallback(()=>{oe([...I,{key:"",value:"",type:"text"}])},[I,oe]),ke=M.useCallback(P=>{const Se=I.filter((Ye,Ze)=>Ze!==P);oe(Se.length>0?Se:[{key:"",value:"",type:"text"}])},[I,oe]);return b.jsxs("div",{children:[b.jsxs("div",{className:"body-editor__toolbar",children:[$.length>1&&b.jsx("select",{className:"body-editor__content-type",value:Q,onChange:P=>r(P.target.value),children:$.map(P=>b.jsx("option",{value:P,children:P},P))}),$.length===1&&b.jsx("span",{style:{fontSize:"12px",color:"var(--fg-muted)",fontFamily:"var(--font-mono)"},children:Q}),b.jsx("button",{className:"body-editor__sample-btn",onClick:ge,disabled:p,children:p?"Generating...":"Generate Sample"})]}),!J&&b.jsx("textarea",{className:"body-editor__textarea",value:i||"",onChange:P=>s(P.target.value),placeholder:Y?`{
|
|
10
|
+
|
|
11
|
+
}`:"Request body...",spellCheck:!1}),J&&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"}),te&&b.jsx("th",{children:"Type"}),b.jsx("th",{})]})}),b.jsx("tbody",{children:I.map((P,Se)=>b.jsxs("tr",{children:[b.jsx("td",{children:b.jsx("input",{className:"body-editor__kv-input",type:"text",value:P.key||"",onChange:Ye=>D(Se,"key",Ye.target.value),placeholder:"key"})}),b.jsx("td",{children:b.jsx("input",{className:"body-editor__kv-input",type:"text",value:P.value||"",onChange:Ye=>D(Se,"value",Ye.target.value),placeholder:"value"})}),te&&b.jsx("td",{children:b.jsxs("select",{className:"body-editor__kv-input",value:P.type||"text",onChange:Ye=>D(Se,"type",Ye.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:()=>ke(Se),title:"Remove row",children:"x"})})]},Se))})]}),b.jsx("button",{className:"body-editor__kv-add",onClick:le,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((P,Se)=>b.jsxs("div",{className:"validation-details__error",children:[P.path&&b.jsx("div",{className:"validation-details__error-path",children:P.path}),b.jsx("div",{className:"validation-details__error-msg",children:P.message||"Validation error"}),(P.expected||P.actual)&&b.jsxs("div",{className:"validation-details__error-detail",children:[P.expected&&b.jsxs(b.Fragment,{children:["Expected: ",String(P.expected)," "]}),P.actual&&b.jsxs(b.Fragment,{children:["Actual: ",String(P.actual)]})]})]},Se))})]}),!d&&i&&b.jsx("div",{className:"body-editor__validation body-editor__validation--none",children:"— No schema validation"}),Z[Q]?.schema&&b.jsxs("div",{className:"body-editor__schema",children:[b.jsxs("button",{className:"body-editor__schema-toggle",onClick:()=>S(P=>!P),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(eo,{schema:Z[Q].schema})})]})]})}function ro(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ea=ro();function Bp(a){Ea=a}var Sa={exec:()=>null};function Be(a,i=""){let u=typeof a=="string"?a:a.source,s={replace:(r,f)=>{let d=typeof f=="string"?f:f.source;return d=d.replace(Yt.caret,"$1"),u=u.replace(r,d),s},getRegex:()=>new RegExp(u,i)};return s}var Fy=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Yt={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:a=>new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}#`),htmlBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}>`)},Iy=/^(?:[ \t]*(?:\n|$))+/,Py=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,eb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ps=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,oo=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,qp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Hp=Be(qp).replace(/bull/g,oo).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(),lb=Be(qp).replace(/bull/g,oo).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(),fo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,nb=/^[^\n]+/,ho=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ab=Be(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ho).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ib=Be(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,oo).getRegex(),Lu="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",po=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,sb=Be("^ {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",po).replace("tag",Lu).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Lp=Be(fo).replace("hr",ps).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",Lu).getRegex(),ub=Be(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Lp).getRegex(),go={blockquote:ub,code:Py,def:ab,fences:eb,heading:tb,hr:ps,html:sb,lheading:Hp,list:ib,newline:Iy,paragraph:Lp,table:Sa,text:nb},dp=Be("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ps).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",Lu).getRegex(),cb={...go,lheading:lb,table:dp,paragraph:Be(fo).replace("hr",ps).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",dp).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",Lu).getRegex()},rb={...go,html:Be(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",po).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:Sa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Be(fo).replace("hr",ps).replace("heading",` *#{1,6} *[^
|
|
12
|
+
]`).replace("lheading",Hp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ob=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,fb=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Gp=/^( {2,}|\\)\n(?!\s*$)/,hb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Gu=/[\p{P}\p{S}]/u,mo=/[\s\p{P}\p{S}]/u,Yp=/[^\s\p{P}\p{S}]/u,db=Be(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,mo).getRegex(),Xp=/(?!~)[\p{P}\p{S}]/u,pb=/(?!~)[\s\p{P}\p{S}]/u,gb=/(?:[^\s\p{P}\p{S}]|~)/u,Zp=/(?![*_])[\p{P}\p{S}]/u,mb=/(?![*_])[\s\p{P}\p{S}]/u,yb=/(?:[^\s\p{P}\p{S}]|[*_])/u,bb=Be(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Fy?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Qp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,vb=Be(Qp,"u").replace(/punct/g,Gu).getRegex(),Sb=Be(Qp,"u").replace(/punct/g,Xp).getRegex(),$p="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_b=Be($p,"gu").replace(/notPunctSpace/g,Yp).replace(/punctSpace/g,mo).replace(/punct/g,Gu).getRegex(),xb=Be($p,"gu").replace(/notPunctSpace/g,gb).replace(/punctSpace/g,pb).replace(/punct/g,Xp).getRegex(),Eb=Be("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yp).replace(/punctSpace/g,mo).replace(/punct/g,Gu).getRegex(),Tb=Be(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Zp).getRegex(),Nb="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Ab=Be(Nb,"gu").replace(/notPunctSpace/g,yb).replace(/punctSpace/g,mb).replace(/punct/g,Zp).getRegex(),Ob=Be(/\\(punct)/,"gu").replace(/punct/g,Gu).getRegex(),jb=Be(/^<(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(),wb=Be(po).replace("(?:-->|$)","-->").getRegex(),Rb=Be("^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",wb).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Uu=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,zb=Be(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Uu).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Vp=Be(/^!?\[(label)\]\[(ref)\]/).replace("label",Uu).replace("ref",ho).getRegex(),Kp=Be(/^!?\[(ref)\](?:\[\])?/).replace("ref",ho).getRegex(),Mb=Be("reflink|nolink(?!\\()","g").replace("reflink",Vp).replace("nolink",Kp).getRegex(),pp=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,yo={_backpedal:Sa,anyPunctuation:Ob,autolink:jb,blockSkip:bb,br:Gp,code:fb,del:Sa,delLDelim:Sa,delRDelim:Sa,emStrongLDelim:vb,emStrongRDelimAst:_b,emStrongRDelimUnd:Eb,escape:ob,link:zb,nolink:Kp,punctuation:db,reflink:Vp,reflinkSearch:Mb,tag:Rb,text:hb,url:Sa},Cb={...yo,link:Be(/^!?\[(label)\]\((.*?)\)/).replace("label",Uu).getRegex(),reflink:Be(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Uu).getRegex()},to={...yo,emStrongRDelimAst:xb,emStrongLDelim:Sb,delLDelim:Tb,delRDelim:Ab,url:Be(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",pp).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:Be(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",pp).getRegex()},kb={...to,br:Be(Gp).replace("{2,}","*").getRegex(),text:Be(to.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zu={normal:go,gfm:cb,pedantic:rb},us={normal:yo,gfm:to,breaks:kb,pedantic:Cb},Db={"&":"&","<":"<",">":">",'"':""","'":"'"},gp=a=>Db[a];function Xl(a,i){if(i){if(Yt.escapeTest.test(a))return a.replace(Yt.escapeReplace,gp)}else if(Yt.escapeTestNoEncode.test(a))return a.replace(Yt.escapeReplaceNoEncode,gp);return a}function mp(a){try{a=encodeURI(a).replace(Yt.percentDecode,"%")}catch{return null}return a}function yp(a,i){let u=a.replace(Yt.findPipe,(f,d,g)=>{let p=!1,y=d;for(;--y>=0&&g[y]==="\\";)p=!p;return p?"|":" |"}),s=u.split(Yt.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),i)if(s.length>i)s.splice(i);else for(;s.length<i;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(Yt.slashPipe,"|");return s}function cs(a,i,u){let s=a.length;if(s===0)return"";let r=0;for(;r<s&&a.charAt(s-r-1)===i;)r++;return a.slice(0,s-r)}function Ub(a,i){if(a.indexOf(i[1])===-1)return-1;let u=0;for(let s=0;s<a.length;s++)if(a[s]==="\\")s++;else if(a[s]===i[0])u++;else if(a[s]===i[1]&&(u--,u<0))return s;return u>0?-2:-1}function Bb(a,i=0){let u=i,s="";for(let r of a)if(r===" "){let f=4-u%4;s+=" ".repeat(f),u+=f}else s+=r,u++;return s}function bp(a,i,u,s,r){let f=i.href,d=i.title||null,g=a[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let p={type:a[0].charAt(0)==="!"?"image":"link",raw:u,href:f,title:d,text:g,tokens:s.inlineTokens(g)};return s.state.inLink=!1,p}function qb(a,i,u){let s=a.match(u.other.indentCodeCompensation);if(s===null)return i;let r=s[1];return i.split(`
|
|
13
|
+
`).map(f=>{let d=f.match(u.other.beginningSpace);if(d===null)return f;let[g]=d;return g.length>=r.length?f.slice(r.length):f}).join(`
|
|
14
|
+
`)}var Bu=class{options;rules;lexer;constructor(a){this.options=a||Ea}space(a){let i=this.rules.block.newline.exec(a);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(a){let i=this.rules.block.code.exec(a);if(i){let u=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?u:cs(u,`
|
|
15
|
+
`)}}}fences(a){let i=this.rules.block.fences.exec(a);if(i){let u=i[0],s=qb(u,i[3]||"",this.rules);return{type:"code",raw:u,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:s}}}heading(a){let i=this.rules.block.heading.exec(a);if(i){let u=i[2].trim();if(this.rules.other.endingHash.test(u)){let s=cs(u,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(u=s.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:u,tokens:this.lexer.inline(u)}}}hr(a){let i=this.rules.block.hr.exec(a);if(i)return{type:"hr",raw:cs(i[0],`
|
|
16
|
+
`)}}blockquote(a){let i=this.rules.block.blockquote.exec(a);if(i){let u=cs(i[0],`
|
|
17
|
+
`).split(`
|
|
18
|
+
`),s="",r="",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,r=r?`${r}
|
|
22
|
+
${v}`:v;let S=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(v,f,!0),this.lexer.state.top=S,u.length===0)break;let O=f.at(-1);if(O?.type==="code")break;if(O?.type==="blockquote"){let j=O,Z=j.raw+`
|
|
23
|
+
`+u.join(`
|
|
24
|
+
`),$=this.blockquote(Z);f[f.length-1]=$,s=s.substring(0,s.length-j.raw.length)+$.raw,r=r.substring(0,r.length-j.text.length)+$.text;break}else if(O?.type==="list"){let j=O,Z=j.raw+`
|
|
25
|
+
`+u.join(`
|
|
26
|
+
`),$=this.list(Z);f[f.length-1]=$,s=s.substring(0,s.length-O.raw.length)+$.raw,r=r.substring(0,r.length-j.raw.length)+$.raw,u=Z.substring(f.at(-1).raw.length).split(`
|
|
27
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:f,text:r}}}list(a){let i=this.rules.block.list.exec(a);if(i){let u=i[1].trim(),s=u.length>1,r={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(;a;){let p=!1,y="",v="";if(!(i=f.exec(a))||this.rules.block.hr.test(a))break;y=i[0],a=a.substring(y.length);let S=Bb(i[2].split(`
|
|
28
|
+
`,1)[0],i[1].length),O=a.split(`
|
|
29
|
+
`,1)[0],j=!S.trim(),Z=0;if(this.options.pedantic?(Z=2,v=S.trimStart()):j?Z=i[1].length+1:(Z=S.search(this.rules.other.nonSpaceChar),Z=Z>4?1:Z,v=S.slice(Z),Z+=i[1].length),j&&this.rules.other.blankLine.test(O)&&(y+=O+`
|
|
30
|
+
`,a=a.substring(O.length+1),p=!0),!p){let $=this.rules.other.nextBulletRegex(Z),Q=this.rules.other.hrRegex(Z),Y=this.rules.other.fencesBeginRegex(Z),se=this.rules.other.headingBeginRegex(Z),te=this.rules.other.htmlBeginRegex(Z),J=this.rules.other.blockquoteBeginRegex(Z);for(;a;){let I=a.split(`
|
|
31
|
+
`,1)[0],ge;if(O=I,this.options.pedantic?(O=O.replace(this.rules.other.listReplaceNesting," "),ge=O):ge=O.replace(this.rules.other.tabCharGlobal," "),Y.test(O)||se.test(O)||te.test(O)||J.test(O)||$.test(O)||Q.test(O))break;if(ge.search(this.rules.other.nonSpaceChar)>=Z||!O.trim())v+=`
|
|
32
|
+
`+ge.slice(Z);else{if(j||S.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Y.test(S)||se.test(S)||Q.test(S))break;v+=`
|
|
33
|
+
`+O}j=!O.trim(),y+=I+`
|
|
34
|
+
`,a=a.substring(I.length+1),S=ge.slice(Z)}}r.loose||(d?r.loose=!0:this.rules.other.doubleBlankLine.test(y)&&(d=!0)),r.items.push({type:"list_item",raw:y,task:!!this.options.gfm&&this.rules.other.listIsTask.test(v),loose:!1,text:v,tokens:[]}),r.raw+=y}let g=r.items.at(-1);if(g)g.raw=g.raw.trimEnd(),g.text=g.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let p of r.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,r.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(!r.loose){let y=p.tokens.filter(S=>S.type==="space"),v=y.length>0&&y.some(S=>this.rules.other.anyLine.test(S.raw));r.loose=v}}if(r.loose)for(let p of r.items){p.loose=!0;for(let y of p.tokens)y.type==="text"&&(y.type="paragraph")}return r}}html(a){let i=this.rules.block.html.exec(a);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(a){let i=this.rules.block.def.exec(a);if(i){let u=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:u,raw:i[0],href:s,title:r}}}table(a){let i=this.rules.block.table.exec(a);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let u=yp(i[1]),s=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
35
|
+
`):[],f={type:"table",raw:i[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 r)f.rows.push(yp(d,f.header.length).map((g,p)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:f.align[p]})));return f}}lheading(a){let i=this.rules.block.lheading.exec(a);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(a){let i=this.rules.block.paragraph.exec(a);if(i){let u=i[1].charAt(i[1].length-1)===`
|
|
36
|
+
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:u,tokens:this.lexer.inline(u)}}}text(a){let i=this.rules.block.text.exec(a);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(a){let i=this.rules.inline.escape.exec(a);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(a){let i=this.rules.inline.tag.exec(a);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(a){let i=this.rules.inline.link.exec(a);if(i){let u=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(u)){if(!this.rules.other.endAngleBracket.test(u))return;let f=cs(u.slice(0,-1),"\\");if((u.length-f.length)%2===0)return}else{let f=Ub(i[2],"()");if(f===-2)return;if(f>-1){let d=(i[0].indexOf("!")===0?5:4)+i[1].length+f;i[2]=i[2].substring(0,f),i[0]=i[0].substring(0,d).trim(),i[3]=""}}let s=i[2],r="";if(this.options.pedantic){let f=this.rules.other.pedanticHrefTitle.exec(s);f&&(s=f[1],r=f[3])}else r=i[3]?i[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)),bp(i,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(a,i){let u;if((u=this.rules.inline.reflink.exec(a))||(u=this.rules.inline.nolink.exec(a))){let s=(u[2]||u[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=i[s.toLowerCase()];if(!r){let f=u[0].charAt(0);return{type:"text",raw:f,text:f}}return bp(u,r,u[0],this.lexer,this.rules)}}emStrong(a,i,u=""){let s=this.rules.inline.emStrongLDelim.exec(a);if(!(!s||s[3]&&u.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!u||this.rules.inline.punctuation.exec(u))){let r=[...s[0]].length-1,f,d,g=r,p=0,y=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(y.lastIndex=0,i=i.slice(-1*a.length+r);(s=y.exec(i))!=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])&&r%3&&!((r+d)%3)){p+=d;continue}if(g-=d,g>0)continue;d=Math.min(d,d+g+p);let v=[...s[0]][0].length,S=a.slice(0,r+s.index+v+d);if(Math.min(r,d)%2){let j=S.slice(1,-1);return{type:"em",raw:S,text:j,tokens:this.lexer.inlineTokens(j)}}let O=S.slice(2,-2);return{type:"strong",raw:S,text:O,tokens:this.lexer.inlineTokens(O)}}}}codespan(a){let i=this.rules.inline.code.exec(a);if(i){let u=i[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(u),r=this.rules.other.startingSpaceChar.test(u)&&this.rules.other.endingSpaceChar.test(u);return s&&r&&(u=u.substring(1,u.length-1)),{type:"codespan",raw:i[0],text:u}}}br(a){let i=this.rules.inline.br.exec(a);if(i)return{type:"br",raw:i[0]}}del(a,i,u=""){let s=this.rules.inline.delLDelim.exec(a);if(s&&(!s[1]||!u||this.rules.inline.punctuation.exec(u))){let r=[...s[0]].length-1,f,d,g=r,p=this.rules.inline.delRDelim;for(p.lastIndex=0,i=i.slice(-1*a.length+r);(s=p.exec(i))!=null;){if(f=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!f||(d=[...f].length,d!==r))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=a.slice(0,r+s.index+y+d),S=v.slice(r,-r);return{type:"del",raw:v,text:S,tokens:this.lexer.inlineTokens(S)}}}}autolink(a){let i=this.rules.inline.autolink.exec(a);if(i){let u,s;return i[2]==="@"?(u=i[1],s="mailto:"+u):(u=i[1],s=u),{type:"link",raw:i[0],text:u,href:s,tokens:[{type:"text",raw:u,text:u}]}}}url(a){let i;if(i=this.rules.inline.url.exec(a)){let u,s;if(i[2]==="@")u=i[0],s="mailto:"+u;else{let r;do r=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(r!==i[0]);u=i[0],i[1]==="www."?s="http://"+i[0]:s=i[0]}return{type:"link",raw:i[0],text:u,href:s,tokens:[{type:"text",raw:u,text:u}]}}}inlineText(a){let i=this.rules.inline.text.exec(a);if(i){let u=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:u}}}},Rl=class lo{tokens;options;state;inlineQueue;tokenizer;constructor(i){this.tokens=[],this.tokens.links=Object.create(null),this.options=i||Ea,this.options.tokenizer=this.options.tokenizer||new Bu,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:Yt,block:zu.normal,inline:us.normal};this.options.pedantic?(u.block=zu.pedantic,u.inline=us.pedantic):this.options.gfm&&(u.block=zu.gfm,this.options.breaks?u.inline=us.breaks:u.inline=us.gfm),this.tokenizer.rules=u}static get rules(){return{block:zu,inline:us}}static lex(i,u){return new lo(u).lex(i)}static lexInline(i,u){return new lo(u).inlineTokens(i)}lex(i){i=i.replace(Yt.carriageReturn,`
|
|
37
|
+
`),this.blockTokens(i,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(i,u=[],s=!1){for(this.options.pedantic&&(i=i.replace(Yt.tabCharGlobal," ").replace(Yt.spaceLine,""));i;){let r;if(this.options.extensions?.block?.some(d=>(r=d.call({lexer:this},i,u))?(i=i.substring(r.raw.length),u.push(r),!0):!1))continue;if(r=this.tokenizer.space(i)){i=i.substring(r.raw.length);let d=u.at(-1);r.raw.length===1&&d!==void 0?d.raw+=`
|
|
38
|
+
`:u.push(r);continue}if(r=this.tokenizer.code(i)){i=i.substring(r.raw.length);let d=u.at(-1);d?.type==="paragraph"||d?.type==="text"?(d.raw+=(d.raw.endsWith(`
|
|
39
|
+
`)?"":`
|
|
40
|
+
`)+r.raw,d.text+=`
|
|
41
|
+
`+r.text,this.inlineQueue.at(-1).src=d.text):u.push(r);continue}if(r=this.tokenizer.fences(i)){i=i.substring(r.raw.length),u.push(r);continue}if(r=this.tokenizer.heading(i)){i=i.substring(r.raw.length),u.push(r);continue}if(r=this.tokenizer.hr(i)){i=i.substring(r.raw.length),u.push(r);continue}if(r=this.tokenizer.blockquote(i)){i=i.substring(r.raw.length),u.push(r);continue}if(r=this.tokenizer.list(i)){i=i.substring(r.raw.length),u.push(r);continue}if(r=this.tokenizer.html(i)){i=i.substring(r.raw.length),u.push(r);continue}if(r=this.tokenizer.def(i)){i=i.substring(r.raw.length);let d=u.at(-1);d?.type==="paragraph"||d?.type==="text"?(d.raw+=(d.raw.endsWith(`
|
|
42
|
+
`)?"":`
|
|
43
|
+
`)+r.raw,d.text+=`
|
|
44
|
+
`+r.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},u.push(r));continue}if(r=this.tokenizer.table(i)){i=i.substring(r.raw.length),u.push(r);continue}if(r=this.tokenizer.lheading(i)){i=i.substring(r.raw.length),u.push(r);continue}let f=i;if(this.options.extensions?.startBlock){let d=1/0,g=i.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=i.substring(0,d+1))}if(this.state.top&&(r=this.tokenizer.paragraph(f))){let d=u.at(-1);s&&d?.type==="paragraph"?(d.raw+=(d.raw.endsWith(`
|
|
45
|
+
`)?"":`
|
|
46
|
+
`)+r.raw,d.text+=`
|
|
47
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):u.push(r),s=f.length!==i.length,i=i.substring(r.raw.length);continue}if(r=this.tokenizer.text(i)){i=i.substring(r.raw.length);let d=u.at(-1);d?.type==="text"?(d.raw+=(d.raw.endsWith(`
|
|
48
|
+
`)?"":`
|
|
49
|
+
`)+r.raw,d.text+=`
|
|
50
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):u.push(r);continue}if(i){let d="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,u}inline(i,u=[]){return this.inlineQueue.push({src:i,tokens:u}),u}inlineTokens(i,u=[]){let s=i,r=null;if(this.tokens.links){let p=Object.keys(this.tokens.links);if(p.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)p.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let f;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)f=r[2]?r[2].length:0,s=s.slice(0,r.index+f)+"["+"a".repeat(r[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(;i;){d||(g=""),d=!1;let p;if(this.options.extensions?.inline?.some(v=>(p=v.call({lexer:this},i,u))?(i=i.substring(p.raw.length),u.push(p),!0):!1))continue;if(p=this.tokenizer.escape(i)){i=i.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.tag(i)){i=i.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.link(i)){i=i.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.reflink(i,this.tokens.links)){i=i.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(i,s,g)){i=i.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.codespan(i)){i=i.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.br(i)){i=i.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.del(i,s,g)){i=i.substring(p.raw.length),u.push(p);continue}if(p=this.tokenizer.autolink(i)){i=i.substring(p.raw.length),u.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(i))){i=i.substring(p.raw.length),u.push(p);continue}let y=i;if(this.options.extensions?.startInline){let v=1/0,S=i.slice(1),O;this.options.extensions.startInline.forEach(j=>{O=j.call({lexer:this},S),typeof O=="number"&&O>=0&&(v=Math.min(v,O))}),v<1/0&&v>=0&&(y=i.substring(0,v+1))}if(p=this.tokenizer.inlineText(y)){i=i.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(i){let v="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return u}},qu=class{options;parser;constructor(a){this.options=a||Ea}space(a){return""}code({text:a,lang:i,escaped:u}){let s=(i||"").match(Yt.notSpaceStart)?.[0],r=a.replace(Yt.endingNewline,"")+`
|
|
51
|
+
`;return s?'<pre><code class="language-'+Xl(s)+'">'+(u?r:Xl(r,!0))+`</code></pre>
|
|
52
|
+
`:"<pre><code>"+(u?r:Xl(r,!0))+`</code></pre>
|
|
53
|
+
`}blockquote({tokens:a}){return`<blockquote>
|
|
54
|
+
${this.parser.parse(a)}</blockquote>
|
|
55
|
+
`}html({text:a}){return a}def(a){return""}heading({tokens:a,depth:i}){return`<h${i}>${this.parser.parseInline(a)}</h${i}>
|
|
56
|
+
`}hr(a){return`<hr>
|
|
57
|
+
`}list(a){let i=a.ordered,u=a.start,s="";for(let d=0;d<a.items.length;d++){let g=a.items[d];s+=this.listitem(g)}let r=i?"ol":"ul",f=i&&u!==1?' start="'+u+'"':"";return"<"+r+f+`>
|
|
58
|
+
`+s+"</"+r+`>
|
|
59
|
+
`}listitem(a){return`<li>${this.parser.parse(a.tokens)}</li>
|
|
60
|
+
`}checkbox({checked:a}){return"<input "+(a?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:a}){return`<p>${this.parser.parseInline(a)}</p>
|
|
61
|
+
`}table(a){let i="",u="";for(let r=0;r<a.header.length;r++)u+=this.tablecell(a.header[r]);i+=this.tablerow({text:u});let s="";for(let r=0;r<a.rows.length;r++){let f=a.rows[r];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
|
+
`+i+`</thead>
|
|
64
|
+
`+s+`</table>
|
|
65
|
+
`}tablerow({text:a}){return`<tr>
|
|
66
|
+
${a}</tr>
|
|
67
|
+
`}tablecell(a){let i=this.parser.parseInline(a.tokens),u=a.header?"th":"td";return(a.align?`<${u} align="${a.align}">`:`<${u}>`)+i+`</${u}>
|
|
68
|
+
`}strong({tokens:a}){return`<strong>${this.parser.parseInline(a)}</strong>`}em({tokens:a}){return`<em>${this.parser.parseInline(a)}</em>`}codespan({text:a}){return`<code>${Xl(a,!0)}</code>`}br(a){return"<br>"}del({tokens:a}){return`<del>${this.parser.parseInline(a)}</del>`}link({href:a,title:i,tokens:u}){let s=this.parser.parseInline(u),r=mp(a);if(r===null)return s;a=r;let f='<a href="'+a+'"';return i&&(f+=' title="'+Xl(i)+'"'),f+=">"+s+"</a>",f}image({href:a,title:i,text:u,tokens:s}){s&&(u=this.parser.parseInline(s,this.parser.textRenderer));let r=mp(a);if(r===null)return Xl(u);a=r;let f=`<img src="${a}" alt="${Xl(u)}"`;return i&&(f+=` title="${Xl(i)}"`),f+=">",f}text(a){return"tokens"in a&&a.tokens?this.parser.parseInline(a.tokens):"escaped"in a&&a.escaped?a.text:Xl(a.text)}},bo=class{strong({text:a}){return a}em({text:a}){return a}codespan({text:a}){return a}del({text:a}){return a}html({text:a}){return a}text({text:a}){return a}link({text:a}){return""+a}image({text:a}){return""+a}br(){return""}checkbox({raw:a}){return a}},zl=class no{options;renderer;textRenderer;constructor(i){this.options=i||Ea,this.options.renderer=this.options.renderer||new qu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new bo}static parse(i,u){return new no(u).parse(i)}static parseInline(i,u){return new no(u).parseInline(i)}parse(i){let u="";for(let s=0;s<i.length;s++){let r=i[s];if(this.options.extensions?.renderers?.[r.type]){let d=r,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=r;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(i,u=this.renderer){let s="";for(let r=0;r<i.length;r++){let f=i[r];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}},fs=class{options;block;constructor(a){this.options=a||Ea}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(a){return a}postprocess(a){return a}processAllTokens(a){return a}emStrongMask(a){return a}provideLexer(){return this.block?Rl.lex:Rl.lexInline}provideParser(){return this.block?zl.parse:zl.parseInline}},Hb=class{defaults=ro();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=zl;Renderer=qu;TextRenderer=bo;Lexer=Rl;Tokenizer=Bu;Hooks=fs;constructor(...a){this.use(...a)}walkTokens(a,i){let u=[];for(let s of a)switch(u=u.concat(i.call(this,s)),s.type){case"table":{let r=s;for(let f of r.header)u=u.concat(this.walkTokens(f.tokens,i));for(let f of r.rows)for(let d of f)u=u.concat(this.walkTokens(d.tokens,i));break}case"list":{let r=s;u=u.concat(this.walkTokens(r.items,i));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(f=>{let d=r[f].flat(1/0);u=u.concat(this.walkTokens(d,i))}):r.tokens&&(u=u.concat(this.walkTokens(r.tokens,i)))}}return u}use(...a){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return a.forEach(u=>{let s={...u};if(s.async=this.defaults.async||s.async||!1,u.extensions&&(u.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let f=i.renderers[r.name];f?i.renderers[r.name]=function(...d){let g=r.renderer.apply(this,d);return g===!1&&(g=f.apply(this,d)),g}:i.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let f=i[r.level];f?f.unshift(r.tokenizer):i[r.level]=[r.tokenizer],r.start&&(r.level==="block"?i.startBlock?i.startBlock.push(r.start):i.startBlock=[r.start]:r.level==="inline"&&(i.startInline?i.startInline.push(r.start):i.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(i.childTokens[r.name]=r.childTokens)}),s.extensions=i),u.renderer){let r=this.defaults.renderer||new qu(this.defaults);for(let f in u.renderer){if(!(f in r))throw new Error(`renderer '${f}' does not exist`);if(["options","parser"].includes(f))continue;let d=f,g=u.renderer[d],p=r[d];r[d]=(...y)=>{let v=g.apply(r,y);return v===!1&&(v=p.apply(r,y)),v||""}}s.renderer=r}if(u.tokenizer){let r=this.defaults.tokenizer||new Bu(this.defaults);for(let f in u.tokenizer){if(!(f in r))throw new Error(`tokenizer '${f}' does not exist`);if(["options","rules","lexer"].includes(f))continue;let d=f,g=u.tokenizer[d],p=r[d];r[d]=(...y)=>{let v=g.apply(r,y);return v===!1&&(v=p.apply(r,y)),v}}s.tokenizer=r}if(u.hooks){let r=this.defaults.hooks||new fs;for(let f in u.hooks){if(!(f in r))throw new Error(`hook '${f}' does not exist`);if(["options","block"].includes(f))continue;let d=f,g=u.hooks[d],p=r[d];fs.passThroughHooks.has(f)?r[d]=y=>{if(this.defaults.async&&fs.passThroughHooksRespectAsync.has(f))return(async()=>{let S=await g.call(r,y);return p.call(r,S)})();let v=g.call(r,y);return p.call(r,v)}:r[d]=(...y)=>{if(this.defaults.async)return(async()=>{let S=await g.apply(r,y);return S===!1&&(S=await p.apply(r,y)),S})();let v=g.apply(r,y);return v===!1&&(v=p.apply(r,y)),v}}s.hooks=r}if(u.walkTokens){let r=this.defaults.walkTokens,f=u.walkTokens;s.walkTokens=function(d){let g=[];return g.push(f.call(this,d)),r&&(g=g.concat(r.call(this,d))),g}}this.defaults={...this.defaults,...s}}),this}setOptions(a){return this.defaults={...this.defaults,...a},this}lexer(a,i){return Rl.lex(a,i??this.defaults)}parser(a,i){return zl.parse(a,i??this.defaults)}parseMarkdown(a){return(i,u)=>{let s={...u},r={...this.defaults,...s},f=this.onError(!!r.silent,!!r.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 i>"u"||i===null)return f(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return f(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=a),r.async)return(async()=>{let d=r.hooks?await r.hooks.preprocess(i):i,g=await(r.hooks?await r.hooks.provideLexer():a?Rl.lex:Rl.lexInline)(d,r),p=r.hooks?await r.hooks.processAllTokens(g):g;r.walkTokens&&await Promise.all(this.walkTokens(p,r.walkTokens));let y=await(r.hooks?await r.hooks.provideParser():a?zl.parse:zl.parseInline)(p,r);return r.hooks?await r.hooks.postprocess(y):y})().catch(f);try{r.hooks&&(i=r.hooks.preprocess(i));let d=(r.hooks?r.hooks.provideLexer():a?Rl.lex:Rl.lexInline)(i,r);r.hooks&&(d=r.hooks.processAllTokens(d)),r.walkTokens&&this.walkTokens(d,r.walkTokens);let g=(r.hooks?r.hooks.provideParser():a?zl.parse:zl.parseInline)(d,r);return r.hooks&&(g=r.hooks.postprocess(g)),g}catch(d){return f(d)}}}onError(a,i){return u=>{if(u.message+=`
|
|
69
|
+
Please report this to https://github.com/markedjs/marked.`,a){let s="<p>An error occurred:</p><pre>"+Xl(u.message+"",!0)+"</pre>";return i?Promise.resolve(s):s}if(i)return Promise.reject(u);throw u}}},_a=new Hb;function We(a,i){return _a.parse(a,i)}We.options=We.setOptions=function(a){return _a.setOptions(a),We.defaults=_a.defaults,Bp(We.defaults),We};We.getDefaults=ro;We.defaults=Ea;We.use=function(...a){return _a.use(...a),We.defaults=_a.defaults,Bp(We.defaults),We};We.walkTokens=function(a,i){return _a.walkTokens(a,i)};We.parseInline=_a.parseInline;We.Parser=zl;We.parser=zl.parse;We.Renderer=qu;We.TextRenderer=bo;We.Lexer=Rl;We.lexer=Rl.lex;We.Tokenizer=Bu;We.Hooks=fs;We.parse=We;We.options;We.setOptions;We.use;We.walkTokens;We.parseInline;zl.parse;Rl.lex;function Lb({endpoint:a,collapsed:i,onToggle:u}){if(!a)return null;const s=a.summary||a.operationId||"",r=a.description||"",f=a.deprecated||!1,d=M.useMemo(()=>{if(!r)return"";try{return We(r)}catch{return r}},[r]);return!s&&!r&&!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${i?"":" endpoint-doc__toggle-icon--expanded"}`,children:"▶"})]}),!i&&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}})]})]})}var Fr,vp;function Gb(){if(vp)return Fr;vp=1;function a(x){return x instanceof Map?x.clear=x.delete=x.set=function(){throw new Error("map is read-only")}:x instanceof Set&&(x.add=x.clear=x.delete=function(){throw new Error("set is read-only")}),Object.freeze(x),Object.getOwnPropertyNames(x).forEach(H=>{const ee=x[H],pe=typeof ee;(pe==="object"||pe==="function")&&!Object.isFrozen(ee)&&a(ee)}),x}class i{constructor(H){H.data===void 0&&(H.data={}),this.data=H.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function u(x){return x.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(x,...H){const ee=Object.create(null);for(const pe in x)ee[pe]=x[pe];return H.forEach(function(pe){for(const Xe in pe)ee[Xe]=pe[Xe]}),ee}const r="</span>",f=x=>!!x.scope,d=(x,{prefix:H})=>{if(x.startsWith("language:"))return x.replace("language:","language-");if(x.includes(".")){const ee=x.split(".");return[`${H}${ee.shift()}`,...ee.map((pe,Xe)=>`${pe}${"_".repeat(Xe+1)}`)].join(" ")}return`${H}${x}`};class g{constructor(H,ee){this.buffer="",this.classPrefix=ee.classPrefix,H.walk(this)}addText(H){this.buffer+=u(H)}openNode(H){if(!f(H))return;const ee=d(H.scope,{prefix:this.classPrefix});this.span(ee)}closeNode(H){f(H)&&(this.buffer+=r)}value(){return this.buffer}span(H){this.buffer+=`<span class="${H}">`}}const p=(x={})=>{const H={children:[]};return Object.assign(H,x),H};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(H){this.top.children.push(H)}openNode(H){const ee=p({scope:H});this.add(ee),this.stack.push(ee)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(H){return this.constructor._walk(H,this.rootNode)}static _walk(H,ee){return typeof ee=="string"?H.addText(ee):ee.children&&(H.openNode(ee),ee.children.forEach(pe=>this._walk(H,pe)),H.closeNode(ee)),H}static _collapse(H){typeof H!="string"&&H.children&&(H.children.every(ee=>typeof ee=="string")?H.children=[H.children.join("")]:H.children.forEach(ee=>{y._collapse(ee)}))}}class v extends y{constructor(H){super(),this.options=H}addText(H){H!==""&&this.add(H)}startScope(H){this.openNode(H)}endScope(){this.closeNode()}__addSublanguage(H,ee){const pe=H.root;ee&&(pe.scope=`language:${ee}`),this.add(pe)}toHTML(){return new g(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function S(x){return x?typeof x=="string"?x:x.source:null}function O(x){return $("(?=",x,")")}function j(x){return $("(?:",x,")*")}function Z(x){return $("(?:",x,")?")}function $(...x){return x.map(ee=>S(ee)).join("")}function Q(x){const H=x[x.length-1];return typeof H=="object"&&H.constructor===Object?(x.splice(x.length-1,1),H):{}}function Y(...x){return"("+(Q(x).capture?"":"?:")+x.map(pe=>S(pe)).join("|")+")"}function se(x){return new RegExp(x.toString()+"|").exec("").length-1}function te(x,H){const ee=x&&x.exec(H);return ee&&ee.index===0}const J=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function I(x,{joinWith:H}){let ee=0;return x.map(pe=>{ee+=1;const Xe=ee;let qe=S(pe),ue="";for(;qe.length>0;){const A=J.exec(qe);if(!A){ue+=qe;break}ue+=qe.substring(0,A.index),qe=qe.substring(A.index+A[0].length),A[0][0]==="\\"&&A[1]?ue+="\\"+String(Number(A[1])+Xe):(ue+=A[0],A[0]==="("&&ee++)}return ue}).map(pe=>`(${pe})`).join(H)}const ge=/\b\B/,oe="[a-zA-Z]\\w*",D="[a-zA-Z_]\\w*",le="\\b\\d+(\\.\\d+)?",ke="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",P="\\b(0b[01]+)",Se="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Ye=(x={})=>{const H=/^#![ ]*\//;return x.binary&&(x.begin=$(H,/.*\b/,x.binary,/\b.*/)),s({scope:"meta",begin:H,end:/$/,relevance:0,"on:begin":(ee,pe)=>{ee.index!==0&&pe.ignoreMatch()}},x)},Ze={begin:"\\\\[\\s\\S]",relevance:0},Qe={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ze]},k={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ze]},K={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/},ae=function(x,H,ee={}){const pe=s({scope:"comment",begin:x,end:H,contains:[]},ee);pe.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 Xe=Y("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 pe.contains.push({begin:$(/[ ]+/,"(",Xe,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),pe},Ae=ae("//","$"),je=ae("/\\*","\\*/"),E=ae("#","$"),L={scope:"number",begin:le,relevance:0},F={scope:"number",begin:ke,relevance:0},ne={scope:"number",begin:P,relevance:0},be={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Ze,{begin:/\[/,end:/\]/,relevance:0,contains:[Ze]}]},xe={scope:"title",begin:oe,relevance:0},De={scope:"title",begin:D,relevance:0},Et={begin:"\\.\\s*"+D,relevance:0};var Xt=Object.freeze({__proto__:null,APOS_STRING_MODE:Qe,BACKSLASH_ESCAPE:Ze,BINARY_NUMBER_MODE:ne,BINARY_NUMBER_RE:P,COMMENT:ae,C_BLOCK_COMMENT_MODE:je,C_LINE_COMMENT_MODE:Ae,C_NUMBER_MODE:F,C_NUMBER_RE:ke,END_SAME_AS_BEGIN:function(x){return Object.assign(x,{"on:begin":(H,ee)=>{ee.data._beginMatch=H[1]},"on:end":(H,ee)=>{ee.data._beginMatch!==H[1]&&ee.ignoreMatch()}})},HASH_COMMENT_MODE:E,IDENT_RE:oe,MATCH_NOTHING_RE:ge,METHOD_GUARD:Et,NUMBER_MODE:L,NUMBER_RE:le,PHRASAL_WORDS_MODE:K,QUOTE_STRING_MODE:k,REGEXP_MODE:be,RE_STARTERS_RE:Se,SHEBANG:Ye,TITLE_MODE:xe,UNDERSCORE_IDENT_RE:D,UNDERSCORE_TITLE_MODE:De});function Sn(x,H){x.input[x.index-1]==="."&&H.ignoreMatch()}function Cl(x,H){x.className!==void 0&&(x.scope=x.className,delete x.className)}function Ta(x,H){H&&x.beginKeywords&&(x.begin="\\b("+x.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",x.__beforeBegin=Sn,x.keywords=x.keywords||x.beginKeywords,delete x.beginKeywords,x.relevance===void 0&&(x.relevance=0))}function ol(x,H){Array.isArray(x.illegal)&&(x.illegal=Y(...x.illegal))}function _n(x,H){if(x.match){if(x.begin||x.end)throw new Error("begin & end are not supported with match");x.begin=x.match,delete x.match}}function $l(x,H){x.relevance===void 0&&(x.relevance=1)}const In=(x,H)=>{if(!x.beforeMatch)return;if(x.starts)throw new Error("beforeMatch cannot be used with starts");const ee=Object.assign({},x);Object.keys(x).forEach(pe=>{delete x[pe]}),x.keywords=ee.keywords,x.begin=$(ee.beforeMatch,O(ee.begin)),x.starts={relevance:0,contains:[Object.assign(ee,{endsParent:!0})]},x.relevance=0,delete ee.beforeMatch},Tl=["of","and","for","in","not","or","if","then","parent","list","value"],xn="keyword";function kl(x,H,ee=xn){const pe=Object.create(null);return typeof x=="string"?Xe(ee,x.split(" ")):Array.isArray(x)?Xe(ee,x):Object.keys(x).forEach(function(qe){Object.assign(pe,kl(x[qe],H,qe))}),pe;function Xe(qe,ue){H&&(ue=ue.map(A=>A.toLowerCase())),ue.forEach(function(A){const q=A.split("|");pe[q[0]]=[qe,Dl(q[0],q[1])]})}}function Dl(x,H){return H?Number(H):Na(x)?0:1}function Na(x){return Tl.includes(x.toLowerCase())}const It={},lt=x=>{console.error(x)},Pn=(x,...H)=>{console.log(`WARN: ${x}`,...H)},Pt=(x,H)=>{It[`${x}/${H}`]||(console.log(`Deprecated as of ${x}. ${H}`),It[`${x}/${H}`]=!0)},Ul=new Error;function Bl(x,H,{key:ee}){let pe=0;const Xe=x[ee],qe={},ue={};for(let A=1;A<=H.length;A++)ue[A+pe]=Xe[A],qe[A+pe]=!0,pe+=se(H[A-1]);x[ee]=ue,x[ee]._emit=qe,x[ee]._multi=!0}function qt(x){if(Array.isArray(x.begin)){if(x.skip||x.excludeBegin||x.returnBegin)throw lt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ul;if(typeof x.beginScope!="object"||x.beginScope===null)throw lt("beginScope must be object"),Ul;Bl(x,x.begin,{key:"beginScope"}),x.begin=I(x.begin,{joinWith:""})}}function Nl(x){if(Array.isArray(x.end)){if(x.skip||x.excludeEnd||x.returnEnd)throw lt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ul;if(typeof x.endScope!="object"||x.endScope===null)throw lt("endScope must be object"),Ul;Bl(x,x.end,{key:"endScope"}),x.end=I(x.end,{joinWith:""})}}function Aa(x){x.scope&&typeof x.scope=="object"&&x.scope!==null&&(x.beginScope=x.scope,delete x.scope)}function fi(x){Aa(x),typeof x.beginScope=="string"&&(x.beginScope={_wrap:x.beginScope}),typeof x.endScope=="string"&&(x.endScope={_wrap:x.endScope}),qt(x),Nl(x)}function el(x){function H(ue,A){return new RegExp(S(ue),"m"+(x.case_insensitive?"i":"")+(x.unicodeRegex?"u":"")+(A?"g":""))}class ee{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(A,q){q.position=this.position++,this.matchIndexes[this.matchAt]=q,this.regexes.push([q,A]),this.matchAt+=se(A)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const A=this.regexes.map(q=>q[1]);this.matcherRe=H(I(A,{joinWith:"|"}),!0),this.lastIndex=0}exec(A){this.matcherRe.lastIndex=this.lastIndex;const q=this.matcherRe.exec(A);if(!q)return null;const de=q.findIndex((Ht,Al)=>Al>0&&Ht!==void 0),ve=this.matchIndexes[de];return q.splice(0,de),Object.assign(q,ve)}}class pe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(A){if(this.multiRegexes[A])return this.multiRegexes[A];const q=new ee;return this.rules.slice(A).forEach(([de,ve])=>q.addRule(de,ve)),q.compile(),this.multiRegexes[A]=q,q}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(A,q){this.rules.push([A,q]),q.type==="begin"&&this.count++}exec(A){const q=this.getMatcher(this.regexIndex);q.lastIndex=this.lastIndex;let de=q.exec(A);if(this.resumingScanAtSamePosition()&&!(de&&de.index===this.lastIndex)){const ve=this.getMatcher(0);ve.lastIndex=this.lastIndex+1,de=ve.exec(A)}return de&&(this.regexIndex+=de.position+1,this.regexIndex===this.count&&this.considerAll()),de}}function Xe(ue){const A=new pe;return ue.contains.forEach(q=>A.addRule(q.begin,{rule:q,type:"begin"})),ue.terminatorEnd&&A.addRule(ue.terminatorEnd,{type:"end"}),ue.illegal&&A.addRule(ue.illegal,{type:"illegal"}),A}function qe(ue,A){const q=ue;if(ue.isCompiled)return q;[Cl,_n,fi,In].forEach(ve=>ve(ue,A)),x.compilerExtensions.forEach(ve=>ve(ue,A)),ue.__beforeBegin=null,[Ta,ol,$l].forEach(ve=>ve(ue,A)),ue.isCompiled=!0;let de=null;return typeof ue.keywords=="object"&&ue.keywords.$pattern&&(ue.keywords=Object.assign({},ue.keywords),de=ue.keywords.$pattern,delete ue.keywords.$pattern),de=de||/\w+/,ue.keywords&&(ue.keywords=kl(ue.keywords,x.case_insensitive)),q.keywordPatternRe=H(de,!0),A&&(ue.begin||(ue.begin=/\B|\b/),q.beginRe=H(q.begin),!ue.end&&!ue.endsWithParent&&(ue.end=/\B|\b/),ue.end&&(q.endRe=H(q.end)),q.terminatorEnd=S(q.end)||"",ue.endsWithParent&&A.terminatorEnd&&(q.terminatorEnd+=(ue.end?"|":"")+A.terminatorEnd)),ue.illegal&&(q.illegalRe=H(ue.illegal)),ue.contains||(ue.contains=[]),ue.contains=[].concat(...ue.contains.map(function(ve){return fl(ve==="self"?ue:ve)})),ue.contains.forEach(function(ve){qe(ve,q)}),ue.starts&&qe(ue.starts,A),q.matcher=Xe(q),q}if(x.compilerExtensions||(x.compilerExtensions=[]),x.contains&&x.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return x.classNameAliases=s(x.classNameAliases||{}),qe(x)}function Nt(x){return x?x.endsWithParent||Nt(x.starts):!1}function fl(x){return x.variants&&!x.cachedVariants&&(x.cachedVariants=x.variants.map(function(H){return s(x,{variants:null},H)})),x.cachedVariants?x.cachedVariants:Nt(x)?s(x,{starts:x.starts?s(x.starts):null}):Object.isFrozen(x)?s(x):x}var Ot="11.11.1";class Vl extends Error{constructor(H,ee){super(H),this.name="HTMLInjectionError",this.html=ee}}const ea=u,Oa=s,Kl=Symbol("nomatch"),En=7,Jl=function(x){const H=Object.create(null),ee=Object.create(null),pe=[];let Xe=!0;const qe="Could not find the language '{}', did you forget to load/include a language module?",ue={disableAutodetect:!0,name:"Plain text",contains:[]};let A={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:v};function q(V){return A.noHighlightRe.test(V)}function de(V){let fe=V.className+" ";fe+=V.parentNode?V.parentNode.className:"";const Oe=A.languageDetectRe.exec(fe);if(Oe){const $e=Lt(Oe[1]);return $e||(Pn(qe.replace("{}",Oe[1])),Pn("Falling back to no-highlight mode for this block.",V)),$e?Oe[1]:"no-highlight"}return fe.split(/\s+/).find($e=>q($e)||Lt($e))}function ve(V,fe,Oe){let $e="",pt="";typeof fe=="object"?($e=V,Oe=fe.ignoreIllegals,pt=fe.language):(Pt("10.7.0","highlight(lang, code, ...args) has been deprecated."),Pt("10.7.0",`Please use highlight(code, options) instead.
|
|
70
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),pt=V,$e=fe),Oe===void 0&&(Oe=!0);const Ut={code:$e,language:pt};la("before:highlight",Ut);const tl=Ut.result?Ut.result:Ht(Ut.language,Ut.code,Oe);return tl.code=Ut.code,la("after:highlight",tl),tl}function Ht(V,fe,Oe,$e){const pt=Object.create(null);function Ut(W,ce){return W.keywords[ce]}function tl(){if(!ye.keywords){bt.addText(Ve);return}let W=0;ye.keywordPatternRe.lastIndex=0;let ce=ye.keywordPatternRe.exec(Ve),Ee="";for(;ce;){Ee+=Ve.substring(W,ce.index);const ze=jt.case_insensitive?ce[0].toLowerCase():ce[0],ot=Ut(ye,ze);if(ot){const[hl,yi]=ot;if(bt.addText(Ee),Ee="",pt[ze]=(pt[ze]||0)+1,pt[ze]<=En&&(On+=yi),hl.startsWith("_"))Ee+=ce[0];else{const _s=jt.classNameAliases[hl]||hl;ll(ce[0],_s)}}else Ee+=ce[0];W=ye.keywordPatternRe.lastIndex,ce=ye.keywordPatternRe.exec(Ve)}Ee+=Ve.substring(W),bt.addText(Ee)}function Zt(){if(Ve==="")return;let W=null;if(typeof ye.subLanguage=="string"){if(!H[ye.subLanguage]){bt.addText(Ve);return}W=Ht(ye.subLanguage,Ve,!0,Ss[ye.subLanguage]),Ss[ye.subLanguage]=W._top}else W=ja(Ve,ye.subLanguage.length?ye.subLanguage:null);ye.relevance>0&&(On+=W.relevance),bt.__addSublanguage(W._emitter,W.language)}function nt(){ye.subLanguage!=null?Zt():tl(),Ve=""}function ll(W,ce){W!==""&&(bt.startScope(ce),bt.addText(W),bt.endScope())}function bs(W,ce){let Ee=1;const ze=ce.length-1;for(;Ee<=ze;){if(!W._emit[Ee]){Ee++;continue}const ot=jt.classNameAliases[W[Ee]]||W[Ee],hl=ce[Ee];ot?ll(hl,ot):(Ve=hl,tl(),Ve=""),Ee++}}function Ra(W,ce){return W.scope&&typeof W.scope=="string"&&bt.openNode(jt.classNameAliases[W.scope]||W.scope),W.beginScope&&(W.beginScope._wrap?(ll(Ve,jt.classNameAliases[W.beginScope._wrap]||W.beginScope._wrap),Ve=""):W.beginScope._multi&&(bs(W.beginScope,ce),Ve="")),ye=Object.create(W,{parent:{value:ye}}),ye}function pi(W,ce,Ee){let ze=te(W.endRe,Ee);if(ze){if(W["on:end"]){const ot=new i(W);W["on:end"](ce,ot),ot.isMatchIgnored&&(ze=!1)}if(ze){for(;W.endsParent&&W.parent;)W=W.parent;return W}}if(W.endsWithParent)return pi(W.parent,ce,Ee)}function za(W){return ye.matcher.regexIndex===0?(Ve+=W[0],1):(jn=!0,0)}function Yu(W){const ce=W[0],Ee=W.rule,ze=new i(Ee),ot=[Ee.__beforeBegin,Ee["on:begin"]];for(const hl of ot)if(hl&&(hl(W,ze),ze.isMatchIgnored))return za(ce);return Ee.skip?Ve+=ce:(Ee.excludeBegin&&(Ve+=ce),nt(),!Ee.returnBegin&&!Ee.excludeBegin&&(Ve=ce)),Ra(Ee,W),Ee.returnBegin?0:ce.length}function Qt(W){const ce=W[0],Ee=fe.substring(W.index),ze=pi(ye,W,Ee);if(!ze)return Kl;const ot=ye;ye.endScope&&ye.endScope._wrap?(nt(),ll(ce,ye.endScope._wrap)):ye.endScope&&ye.endScope._multi?(nt(),bs(ye.endScope,W)):ot.skip?Ve+=ce:(ot.returnEnd||ot.excludeEnd||(Ve+=ce),nt(),ot.excludeEnd&&(Ve=ce));do ye.scope&&bt.closeNode(),!ye.skip&&!ye.subLanguage&&(On+=ye.relevance),ye=ye.parent;while(ye!==ze.parent);return ze.starts&&Ra(ze.starts,W),ot.returnEnd?0:ce.length}function gi(){const W=[];for(let ce=ye;ce!==jt;ce=ce.parent)ce.scope&&W.unshift(ce.scope);W.forEach(ce=>bt.openNode(ce))}let na={};function Ma(W,ce){const Ee=ce&&ce[0];if(Ve+=W,Ee==null)return nt(),0;if(na.type==="begin"&&ce.type==="end"&&na.index===ce.index&&Ee===""){if(Ve+=fe.slice(ce.index,ce.index+1),!Xe){const ze=new Error(`0 width match regex (${V})`);throw ze.languageName=V,ze.badRule=na.rule,ze}return 1}if(na=ce,ce.type==="begin")return Yu(ce);if(ce.type==="illegal"&&!Oe){const ze=new Error('Illegal lexeme "'+Ee+'" for mode "'+(ye.scope||"<unnamed>")+'"');throw ze.mode=ye,ze}else if(ce.type==="end"){const ze=Qt(ce);if(ze!==Kl)return ze}if(ce.type==="illegal"&&Ee==="")return Ve+=`
|
|
71
|
+
`,1;if(mi>1e5&&mi>ce.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ve+=Ee,Ee.length}const jt=Lt(V);if(!jt)throw lt(qe.replace("{}",V)),new Error('Unknown language: "'+V+'"');const vs=el(jt);let Ca="",ye=$e||vs;const Ss={},bt=new A.__emitter(A);gi();let Ve="",On=0,Il=0,mi=0,jn=!1;try{if(jt.__emitTokens)jt.__emitTokens(fe,bt);else{for(ye.matcher.considerAll();;){mi++,jn?jn=!1:ye.matcher.considerAll(),ye.matcher.lastIndex=Il;const W=ye.matcher.exec(fe);if(!W)break;const ce=fe.substring(Il,W.index),Ee=Ma(ce,W);Il=W.index+Ee}Ma(fe.substring(Il))}return bt.finalize(),Ca=bt.toHTML(),{language:V,value:Ca,relevance:On,illegal:!1,_emitter:bt,_top:ye}}catch(W){if(W.message&&W.message.includes("Illegal"))return{language:V,value:ea(fe),illegal:!0,relevance:0,_illegalBy:{message:W.message,index:Il,context:fe.slice(Il-100,Il+100),mode:W.mode,resultSoFar:Ca},_emitter:bt};if(Xe)return{language:V,value:ea(fe),illegal:!1,relevance:0,errorRaised:W,_emitter:bt,_top:ye};throw W}}function Al(V){const fe={value:ea(V),illegal:!1,relevance:0,_top:ue,_emitter:new A.__emitter(A)};return fe._emitter.addText(V),fe}function ja(V,fe){fe=fe||A.languages||Object.keys(H);const Oe=Al(V),$e=fe.filter(Lt).filter(Nn).map(nt=>Ht(nt,V,!1));$e.unshift(Oe);const pt=$e.sort((nt,ll)=>{if(nt.relevance!==ll.relevance)return ll.relevance-nt.relevance;if(nt.language&&ll.language){if(Lt(nt.language).supersetOf===ll.language)return 1;if(Lt(ll.language).supersetOf===nt.language)return-1}return 0}),[Ut,tl]=pt,Zt=Ut;return Zt.secondBest=tl,Zt}function ql(V,fe,Oe){const $e=fe&&ee[fe]||Oe;V.classList.add("hljs"),V.classList.add(`language-${$e}`)}function dt(V){let fe=null;const Oe=de(V);if(q(Oe))return;if(la("before:highlightElement",{el:V,language:Oe}),V.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",V);return}if(V.children.length>0&&(A.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(V)),A.throwUnescapedHTML))throw new Vl("One of your code blocks includes unescaped HTML.",V.innerHTML);fe=V;const $e=fe.textContent,pt=Oe?ve($e,{language:Oe,ignoreIllegals:!0}):ja($e);V.innerHTML=pt.value,V.dataset.highlighted="yes",ql(V,Oe,pt.language),V.result={language:pt.language,re:pt.relevance,relevance:pt.relevance},pt.secondBest&&(V.secondBest={language:pt.secondBest.language,relevance:pt.secondBest.relevance}),la("after:highlightElement",{el:V,result:pt,text:$e})}function Dt(V){A=Oa(A,V)}const Tn=()=>{wa(),Pt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function hi(){wa(),Pt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let gs=!1;function wa(){function V(){wa()}if(document.readyState==="loading"){gs||window.addEventListener("DOMContentLoaded",V,!1),gs=!0;return}document.querySelectorAll(A.cssSelector).forEach(dt)}function ms(V,fe){let Oe=null;try{Oe=fe(x)}catch($e){if(lt("Language definition for '{}' could not be registered.".replace("{}",V)),Xe)lt($e);else throw $e;Oe=ue}Oe.name||(Oe.name=V),H[V]=Oe,Oe.rawDefinition=fe.bind(null,x),Oe.aliases&&Wl(Oe.aliases,{languageName:V})}function ta(V){delete H[V];for(const fe of Object.keys(ee))ee[fe]===V&&delete ee[fe]}function di(){return Object.keys(H)}function Lt(V){return V=(V||"").toLowerCase(),H[V]||H[ee[V]]}function Wl(V,{languageName:fe}){typeof V=="string"&&(V=[V]),V.forEach(Oe=>{ee[Oe.toLowerCase()]=fe})}function Nn(V){const fe=Lt(V);return fe&&!fe.disableAutodetect}function An(V){V["before:highlightBlock"]&&!V["before:highlightElement"]&&(V["before:highlightElement"]=fe=>{V["before:highlightBlock"](Object.assign({block:fe.el},fe))}),V["after:highlightBlock"]&&!V["after:highlightElement"]&&(V["after:highlightElement"]=fe=>{V["after:highlightBlock"](Object.assign({block:fe.el},fe))})}function yt(V){An(V),pe.push(V)}function ys(V){const fe=pe.indexOf(V);fe!==-1&&pe.splice(fe,1)}function la(V,fe){const Oe=V;pe.forEach(function($e){$e[Oe]&&$e[Oe](fe)})}function Fl(V){return Pt("10.7.0","highlightBlock will be removed entirely in v12.0"),Pt("10.7.0","Please use highlightElement now."),dt(V)}Object.assign(x,{highlight:ve,highlightAuto:ja,highlightAll:wa,highlightElement:dt,highlightBlock:Fl,configure:Dt,initHighlighting:Tn,initHighlightingOnLoad:hi,registerLanguage:ms,unregisterLanguage:ta,listLanguages:di,getLanguage:Lt,registerAliases:Wl,autoDetection:Nn,inherit:Oa,addPlugin:yt,removePlugin:ys}),x.debugMode=function(){Xe=!1},x.safeMode=function(){Xe=!0},x.versionString=Ot,x.regex={concat:$,lookahead:O,either:Y,optional:Z,anyNumberOfTimes:j};for(const V in Xt)typeof Xt[V]=="object"&&a(Xt[V]);return Object.assign(x,Xt),x},kt=Jl({});return kt.newInstance=()=>Jl({}),Fr=kt,kt.HighlightJS=kt,kt.default=kt,Fr}var Yb=Gb();const vn=oy(Yb),Sp="[A-Za-z$_][0-9A-Za-z$_]*",Xb=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Zb=["true","false","null","undefined","NaN","Infinity"],Jp=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Wp=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Fp=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Qb=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],$b=[].concat(Fp,Jp,Wp);function Vb(a){const i=a.regex,u=(ae,{after:Ae})=>{const je="</"+ae[0].slice(1);return ae.input.indexOf(je,Ae)!==-1},s=Sp,r={begin:"<>",end:"</>"},f=/<[A-Za-z0-9\\._:-]+\s*\/>/,d={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ae,Ae)=>{const je=ae[0].length+ae.index,E=ae.input[je];if(E==="<"||E===","){Ae.ignoreMatch();return}E===">"&&(u(ae,{after:je})||Ae.ignoreMatch());let L;const F=ae.input.substring(je);if(L=F.match(/^\s*=/)){Ae.ignoreMatch();return}if((L=F.match(/^\s+extends\s+/))&&L.index===0){Ae.ignoreMatch();return}}},g={$pattern:Sp,keyword:Xb,literal:Zb,built_in:$b,"variable.language":Qb},p="[0-9](_?[0-9])*",y=`\\.(${p})`,v="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",S={className:"number",variants:[{begin:`(\\b(${v})((${y})|\\.)?|(${y}))[eE][+-]?(${p})\\b`},{begin:`\\b(${v})\\b((${y})\\b|\\.)?|(${y})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},O={className:"subst",begin:"\\$\\{",end:"\\}",keywords:g,contains:[]},j={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[a.BACKSLASH_ESCAPE,O],subLanguage:"xml"}},Z={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[a.BACKSLASH_ESCAPE,O],subLanguage:"css"}},$={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[a.BACKSLASH_ESCAPE,O],subLanguage:"graphql"}},Q={className:"string",begin:"`",end:"`",contains:[a.BACKSLASH_ESCAPE,O]},se={className:"comment",variants:[a.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),a.C_BLOCK_COMMENT_MODE,a.C_LINE_COMMENT_MODE]},te=[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,j,Z,$,Q,{match:/\$\d+/},S];O.contains=te.concat({begin:/\{/,end:/\}/,keywords:g,contains:["self"].concat(te)});const J=[].concat(se,O.contains),I=J.concat([{begin:/(\s*)\(/,end:/\)/,keywords:g,contains:["self"].concat(J)}]),ge={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:g,contains:I},oe={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,i.concat(s,"(",i.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},D={relevance:0,match:i.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Jp,...Wp]}},le={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ke={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[ge],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Se(ae){return i.concat("(?!",ae.join("|"),")")}const Ye={match:i.concat(/\b/,Se([...Fp,"super","import"].map(ae=>`${ae}\\s*\\(`)),s,i.lookahead(/\s*\(/)),className:"title.function",relevance:0},Ze={begin:i.concat(/\./,i.lookahead(i.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Qe={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},ge]},k="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+a.UNDERSCORE_IDENT_RE+")\\s*=>",K={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,i.lookahead(k)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[ge]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:g,exports:{PARAMS_CONTAINS:I,CLASS_REFERENCE:D},illegal:/#(?![$_A-z])/,contains:[a.SHEBANG({label:"shebang",binary:"node",relevance:5}),le,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,j,Z,$,Q,se,{match:/\$\d+/},S,D,{scope:"attr",match:s+i.lookahead(":"),relevance:0},K,{begin:"("+a.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[se,a.REGEXP_MODE,{className:"function",begin:k,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:a.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:g,contains:I}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:f},{begin:d.begin,"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},ke,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+a.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[ge,a.inherit(a.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},Ze,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[ge]},Ye,P,oe,Qe,{match:/\$[(.]/}]}}function Kb(a){const i=a.regex,u={},s={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[u]}]};Object.assign(u,{className:"variable",variants:[{begin:i.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},s]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[a.BACKSLASH_ESCAPE]},f=a.inherit(a.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),d={begin:/<<-?\s*(?=\w+)/,starts:{contains:[a.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},g={className:"string",begin:/"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,u,r]};r.contains.push(g);const p={match:/\\"/},y={className:"string",begin:/'/,end:/'/},v={match:/\\'/},S={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},a.NUMBER_MODE,u]},O=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],j=a.SHEBANG({binary:`(${O.join("|")})`,relevance:10}),Z={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},$=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],Q=["true","false"],Y={match:/(\/[a-z._-]+)+/},se=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],te=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],J=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],I=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:$,literal:Q,built_in:[...se,...te,"set","shopt",...J,...I]},contains:[j,a.SHEBANG(),Z,S,f,d,Y,g,p,y,v,u]}}function Jb(a){const i=a.regex,u=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],g={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},p={className:"meta",begin:/^(>>>|\.\.\.) /},y={className:"subst",begin:/\{/,end:/\}/,keywords:g,illegal:/#/},v={begin:/\{\{/,relevance:0},S={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[a.BACKSLASH_ESCAPE,p],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[a.BACKSLASH_ESCAPE,p],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[a.BACKSLASH_ESCAPE,p,v,y]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[a.BACKSLASH_ESCAPE,p,v,y]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[a.BACKSLASH_ESCAPE,v,y]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,v,y]},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},O="[0-9](_?[0-9])*",j=`(\\b(${O}))?\\.(${O})|\\b(${O})\\.`,Z=`\\b|${s.join("|")}`,$={className:"number",relevance:0,variants:[{begin:`(\\b(${O})|(${j}))[eE][+-]?(${O})[jJ]?(?=${Z})`},{begin:`(${j})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${Z})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${Z})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${Z})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${Z})`},{begin:`\\b(${O})[jJ](?=${Z})`}]},Q={className:"comment",begin:i.lookahead(/# type:/),end:/$/,keywords:g,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},Y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:g,contains:["self",p,$,S,a.HASH_COMMENT_MODE]}]};return y.contains=[S,$,p],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:g,illegal:/(<\/|\?)|=>/,contains:[p,$,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},S,Q,a.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,u],scope:{1:"keyword",3:"title.function"},contains:[Y]},{variants:[{match:[/\bclass/,/\s+/,u,/\s*/,/\(\s*/,u,/\s*\)/]},{match:[/\bclass/,/\s+/,u]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[$,Y,S]}]}}vn.registerLanguage("javascript",Vb);vn.registerLanguage("bash",Kb);vn.registerLanguage("python",Jb);vn.registerLanguage("httpie",()=>({name:"HTTPie",contains:[{scope:"keyword",begin:/\bhttp\b/},{scope:"keyword",begin:/\becho\b/},{scope:"title",begin:/\b(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS)\b/},{scope:"string",begin:/https?:\/\/[^\s']+/},{scope:"meta",begin:/\s-{1,2}[a-zA-Z][\w-]*/},{scope:"attribute",begin:/[a-zA-Z_][\w-]*(?=:(?!=))/},{scope:"attr",begin:/[a-zA-Z_][\w-]*(?=:=)/},{scope:"attr",begin:/[a-zA-Z_][\w-]*(?==(?!=))/},{scope:"operator",begin:/:=|=/},{scope:"string",begin:/'/,end:/'/,contains:[{begin:/\\'/}]},{scope:"comment",begin:/\\$/},{scope:"operator",begin:/\|/}]}));const _p=[{key:"curl",label:"curl",lang:"bash"},{key:"fetch",label:"fetch",lang:"javascript"},{key:"got",label:"got-verbose",lang:"javascript"},{key:"requests",label:"requests",lang:"python"},{key:"httpie",label:"httpie",lang:"httpie"}];function Wb({curlCommand:a,fetchCode:i,gotCode:u,requestsCode:s,httpieCode:r}){const[f,d]=M.useState("curl"),[g,p]=M.useState(!1),y=M.useRef(null),v=_p.find(j=>j.key===f),S=f==="curl"?a:f==="fetch"?i:f==="got"?u:f==="requests"?s:r;M.useEffect(()=>{if(y.current&&S)try{const j=vn.highlight(S,{language:v.lang});y.current.innerHTML=j.value}catch{y.current.textContent=S}else y.current&&(y.current.textContent="No code available")},[S,v]);const O=M.useCallback(async()=>{if(S)try{await navigator.clipboard.writeText(S),p(!0),setTimeout(()=>p(!1),1500)}catch{const j=document.createElement("textarea");j.value=S,document.body.appendChild(j),j.select(),document.execCommand("copy"),document.body.removeChild(j),p(!0),setTimeout(()=>p(!1),1500)}},[S]);return b.jsxs("div",{className:"code-view",children:[b.jsxs("div",{className:"code-view__format-selector",children:[_p.map(j=>b.jsx("button",{className:`code-view__format-btn${f===j.key?" code-view__format-btn--active":""}`,onClick:()=>d(j.key),children:j.label},j.key)),b.jsx("button",{className:"copy-btn code-view__copy-btn",onClick:O,children:g?"Copied!":"Copy"})]}),b.jsx("pre",{className:"code-view__pre",children:b.jsx("code",{ref:y,children:S||"No code available"})})]})}function Mu(a,i){return typeof a!="string"||!i?a:a.replace(/\{\{\s*([^}\s]+)\s*\}\}/g,(u,s)=>s in i?String(i[s]):u)}function Fb(a,i,u,s,r,f,d){let g="";if(d)g=d;else if(a&&a.length>0){const v=i!=null&&i>=0&&i<a.length?i:0,S=a[v];g=S.url||"",u&&typeof u=="object"?g=g.replace(/\{(\w+)\}/g,(O,j)=>j in u?String(u[j]):S.variables&&S.variables[j]&&S.variables[j].default!=null?String(S.variables[j].default):O):S.variables&&(g=g.replace(/\{(\w+)\}/g,(O,j)=>S.variables[j]&&S.variables[j].default!=null?String(S.variables[j].default):O))}g=g.replace(/\/+$/,"");let p=s||"";if(r&&typeof r=="object")for(const[v,S]of Object.entries(r))p=p.replace(new RegExp(`\\{${v}\\}`,"g"),encodeURIComponent(String(S)));let y=g+p;if(f&&typeof f=="object"){const v=Object.entries(f).filter(([,S])=>S!=null&&S!=="");if(v.length>0){const S=v.map(([O,j])=>`${encodeURIComponent(O)}=${encodeURIComponent(String(j))}`).join("&");y+="?"+S}}return y}JSON.stringify({http_code:"%{http_code}",http_version:"%{http_version}",size_download:"%{size_download}",time_namelookup:"%{time_namelookup}",time_connect:"%{time_connect}",time_appconnect:"%{time_appconnect}",time_starttransfer:"%{time_starttransfer}",time_total:"%{time_total}",num_redirects:"%{num_redirects}"});function Ip(a,i){const u=JSON.stringify(a,null,2),s=" ".repeat(i);return u.split(`
|
|
72
|
+
`).map((r,f)=>f===0?r:s+r).join(`
|
|
73
|
+
`)}function Ct(a){return a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}function mn(a){return a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}function xa(a){if(typeof a!="string")return typeof a=="object"?a:null;try{const i=JSON.parse(a);return typeof i=="object"&&i!==null?i:null}catch{return null}}function Ib({method:a,url:i,headers:u,body:s,contentType:r}){const f=a.toUpperCase(),d=f==="GET",g=s!=null&&s!=="",p=u&&Object.keys(u).length>0,y=[];if(d||y.push(` method: '${f}',`),p){const S=Object.entries(u).map(([O,j])=>` '${Ct(O)}': '${Ct(String(j))}',`).join(`
|
|
74
|
+
`);y.push(` headers: {
|
|
75
|
+
${S}
|
|
76
|
+
},`)}if(g)if(r==="application/json"){const S=xa(s);S?y.push(` body: JSON.stringify(${Ip(S,2)}),`):y.push(` body: '${Ct(String(s))}',`)}else if(r==="application/x-www-form-urlencoded"){const S=xa(s);if(S){const O=Object.entries(S).map(([j,Z])=>` '${Ct(j)}': '${Ct(String(Z))}',`).join(`
|
|
77
|
+
`);y.push(` body: new URLSearchParams({
|
|
78
|
+
${O}
|
|
79
|
+
}),`)}else y.push(` body: '${Ct(String(s))}',`)}else y.push(` body: '${Ct(String(s))}',`);const v=[];return y.length===0?v.push(`const response = await fetch('${Ct(i)}');`):(v.push(`const response = await fetch('${Ct(i)}', {`),v.push(y.join(`
|
|
80
|
+
`)),v.push("});")),v.push("const data = await response.json();"),v.join(`
|
|
81
|
+
`)}function Pb({method:a,url:i,headers:u,body:s,contentType:r}){const f=a.toUpperCase(),d=s!=null&&s!=="",g=u&&Object.keys(u).length>0,p=[];if(p.push(` method: '${f}',`),g){const v=Object.entries(u).map(([S,O])=>` '${Ct(S)}': '${Ct(String(O))}',`).join(`
|
|
82
|
+
`);p.push(` headers: {
|
|
83
|
+
${v}
|
|
84
|
+
},`)}if(d)if(r==="application/json"){const v=xa(s);v?p.push(` json: ${Ip(v,2)},`):p.push(` body: '${Ct(String(s))}',`)}else if(r==="application/x-www-form-urlencoded"){const v=xa(s);if(v){const S=Object.entries(v).map(([O,j])=>` '${Ct(O)}': '${Ct(String(j))}',`).join(`
|
|
85
|
+
`);p.push(` form: {
|
|
86
|
+
${S}
|
|
87
|
+
},`)}else p.push(` body: '${Ct(String(s))}',`)}else p.push(` body: '${Ct(String(s))}',`);(r==="application/json"||!r&&!d)&&p.push(" responseType: 'json',");const y=[];return y.push("const got = require('got-verbose');"),y.push(""),y.push(`const response = await got('${Ct(i)}', {`),y.push(p.join(`
|
|
88
|
+
`)),y.push("});"),y.join(`
|
|
89
|
+
`)}function e0(a,i){const s=JSON.stringify(a,null,4).replace(/: true([,\n\r}])/g,": True$1").replace(/: false([,\n\r}])/g,": False$1").replace(/: null([,\n\r}])/g,": None$1"),r=" ".repeat(i);return s.split(`
|
|
90
|
+
`).map((f,d)=>d===0?f:r+f).join(`
|
|
91
|
+
`)}function t0({method:a,url:i,headers:u,body:s,contentType:r}){a.toUpperCase();const f=a.toLowerCase(),d=s!=null&&s!=="",g=u&&Object.keys(u).length>0,p=[];p.push("import requests"),p.push("");const y=[];if(g){const v=Object.entries(u).map(([S,O])=>` '${mn(S)}': '${mn(String(O))}',`).join(`
|
|
92
|
+
`);y.push(`headers={
|
|
93
|
+
${v}
|
|
94
|
+
}`)}if(d)if(r==="application/json"){const v=xa(s);v?y.push(`json=${e0(v,0)}`):y.push(`data='${mn(String(s))}'`)}else if(r==="application/x-www-form-urlencoded"){const v=xa(s);if(v){const S=Object.entries(v).map(([O,j])=>` '${mn(O)}': '${mn(String(j))}',`).join(`
|
|
95
|
+
`);y.push(`data={
|
|
96
|
+
${S}
|
|
97
|
+
}`)}else y.push(`data='${mn(String(s))}'`)}else y.push(`data='${mn(String(s))}'`);if(y.length===0)p.push(`response = requests.${f}('${mn(i)}')`);else{const v=y.map(S=>S.split(`
|
|
98
|
+
`).map((O,j)=>" "+O).join(`
|
|
99
|
+
`)).join(`,
|
|
100
|
+
`);p.push(`response = requests.${f}(`),p.push(` '${mn(i)}',`),p.push(v+","),p.push(")")}return p.push("data = response.json()"),p.join(`
|
|
101
|
+
`)}function _l(a){return/^[a-zA-Z0-9_\-./,:@%+=]+$/.test(a)?a:"'"+a.replace(/'/g,"'\\''")+"'"}function l0({method:a,url:i,headers:u,body:s,contentType:r}){const f=a.toUpperCase(),d=s!=null&&s!=="",g=u&&Object.keys(u).length>0,p=r==="application/x-www-form-urlencoded",y=["http"];if(p&&d&&y.push("-f"),y.push(f),y.push(_l(i)),g)for(const[v,S]of Object.entries(u))v.toLowerCase()==="content-type"&&r==="application/json"||v.toLowerCase()==="content-type"&&p||y.push(_l(v)+":"+_l(String(S)));if(d){const v=xa(s);if(v&&(r==="application/json"||p))for(const[S,O]of Object.entries(v))p?y.push(_l(S)+"="+_l(String(O))):typeof O=="string"?y.push(_l(S)+"="+_l(O)):y.push(_l(S)+":="+JSON.stringify(O));else if(d)return`echo ${_l(String(s))} | http ${f} ${_l(i)}${g?" "+Object.entries(u).map(([S,O])=>_l(S)+":"+_l(String(O))).join(" "):""}`}return y.length<=4?y.join(" "):y[0]+" "+y.slice(1,3).join(" ")+` \\
|
|
102
|
+
`+y.slice(3).join(` \\
|
|
103
|
+
`)}function n0({spec:a,endpoint:i,params:u,onParamsChange:s,serverIndex:r,onServerIndexChange:f,serverVariables:d,onServerVariablesChange:g,preferences:p,resolvedEnv:y}){const[v,S]=M.useState(!1),[O,j]=M.useState(!0),Z=i?.servers||[],$=Z[r]||{},Q=M.useMemo(()=>{const le=($.url||"").match(/\{([^}]+)\}/g);return le?le.map(ke=>ke.slice(1,-1)):[]},[$.url]),Y=M.useMemo(()=>{if(!i)return null;const D={};for(const[k,K]of Object.entries(u.path||{}))D[k]=Mu(K,y);const le={};for(const[k,K]of Object.entries(u.query||{}))le[k]=Mu(K,y);const ke={};for(const[k,K]of Object.entries(u.header||{}))ke[k]=Mu(K,y);const P=u.body?Mu(u.body,y):null,Se=u.contentType||(P?"application/json":null),Ye=Fb(Z,r,d,i.path,D,le,y?.base_url),Ze=i.method.toUpperCase(),Qe={method:Ze,url:Ye,headers:ke,body:P,contentType:Se};return{curl:`curl -X ${Ze} '${Ye}'${Object.entries(ke).map(([k,K])=>` \\
|
|
104
|
+
-H '${k}: ${K}'`).join("")}${P?` \\
|
|
105
|
+
-d '${typeof P=="string"?P:JSON.stringify(P)}'`:""}`,fetch:Ib(Qe),got:Pb(Qe),requests:t0(Qe),httpie:l0(Qe)}},[i,u,Z,r,d,y]);if(!i)return b.jsx("div",{style:{color:"var(--fg-muted)",padding:"32px",textAlign:"center"},children:"Select an endpoint to begin"});const se=i.parameters||[],te=se.filter(D=>D.in==="path"),J=se.filter(D=>D.in==="query"),I=se.filter(D=>D.in==="header"),ge=(D,le,ke)=>{s({...u,[D]:{...u[D]||{},[le]:ke}})},oe=i.request_body||i.requestBody;return b.jsxs("div",{children:[Q.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:Q.map(D=>{const le=$.variables?.[D];return b.jsxs("div",{className:"param-form__field",children:[b.jsx("label",{className:"param-form__label",children:D}),le?.description&&b.jsx("span",{className:"param-form__desc",children:le.description}),b.jsx("input",{className:"param-form__input",type:"text",value:d[D]??le?.default??"",placeholder:le?.default||"",onChange:ke=>g({...d,[D]:ke.target.value})})]},D)})})]}),te.length>0&&b.jsxs("div",{className:"request-panel__section",children:[b.jsx("div",{className:"request-panel__section-title",children:"Path Parameters"}),b.jsx(Wr,{parameters:te,values:u.path||{},onChange:(D,le)=>ge("path",D,le),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(Wr,{parameters:J,values:u.query||{},onChange:(D,le)=>ge("query",D,le),resolvedEnv:y})]}),I.length>0&&b.jsxs("div",{className:"request-panel__section",children:[b.jsx("div",{className:"request-panel__section-title",children:"Headers"}),b.jsx(Wr,{parameters:I,values:u.header||{},onChange:(D,le)=>ge("header",D,le),resolvedEnv:y})]}),oe&&b.jsxs("div",{className:"request-panel__section",children:[b.jsx("div",{className:"request-panel__section-title",children:"Request Body"}),b.jsx(Wy,{endpoint:i,body:u.body||"",contentType:u.contentType||"",onBodyChange:D=>s({...u,body:D}),onContentTypeChange:D=>s({...u,contentType:D}),resolvedEnv:y})]}),b.jsxs("div",{className:"request-panel__section",children:[b.jsxs("div",{className:"request-panel__section-title request-panel__section-title--collapsible",onClick:()=>j(D=>!D),children:[b.jsx("span",{className:`collapse-arrow${O?"":" collapse-arrow--open"}`,children:"▶"}),"Code"]}),!O&&b.jsx(Wb,{curlCommand:Y.curl,fetchCode:Y.fetch,gotCode:Y.got,requestsCode:Y.requests,httpieCode:Y.httpie})]}),b.jsx(Lb,{endpoint:i,collapsed:v,onToggle:()=>S(D=>!D)})]})}function a0(a){const i={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},u={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],r={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:s},contains:[i,u,a.QUOTE_STRING_MODE,r,a.C_NUMBER_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function i0(a){const i=a.regex,u=i.concat(/[\p{L}_]/u,i.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,r={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=a.inherit(f,{begin:/\(/,end:/\)/}),g=a.inherit(a.APOS_STRING_MODE,{className:"string"}),p=a.inherit(a.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:[r]},{begin:/'/,end:/'/,contains:[r]},{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]}]}]},a.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{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:i.concat(/</,i.lookahead(i.concat(u,i.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:u,relevance:0,starts:y}]},{className:"tag",begin:i.concat(/<\//,i.lookahead(i.concat(u,/>/))),contains:[{className:"name",begin:u,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function s0(a){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Pp(a){let i=at(vo(a).tokens);const u=s=>i.node.apply(s,{userFuncArgs:{},variables:{}});return u.filter=i,u.ast=i.node,u.trace=s=>{let r=[];return i.node.trace(s,{userFuncArgs:{},variables:{}},r),{node:null,output:s,next:r}},u}function u0(a){return at(vo(a).tokens).node}function rs(a){return a>="a"&&a<="z"||a>="A"&&a<="Z"||a==="_"}function os(a){return a>="0"&&a<="9"}function Zl(a,i="",u=" ",s=`
|
|
106
|
+
`){let r=u?" ":"";if(typeof a>"u")return a;if(a===null)return"null";if(a instanceof Array){let f="[",d=!0;for(let g of Object.values(a))f+=(d?"":",")+s+i+u+Zl(g,i+u,u,s),d=!1;return f+=s+i+"]",f}else if(typeof a=="object"){let f="{",d=!0;for(let g of Object.keys(a))f+=(d?"":",")+s+i+u+'"'+g+'":'+r+Zl(a[g],i+u,u,s),d=!1;return f+=s+i+"}",f}else{if(typeof a=="string")return'"'+eg(a)+'"';if(typeof a=="number")return""+a;if(typeof a=="boolean")return a?"true":"false"}}function eg(a){return a=a.replace(/\\/g,"\\\\"),a=a.replace(/"/g,'\\"'),a=a.replace(/\n/g,"\\n"),a=a.replace(/[\x00-\x1f]/g,i=>"\\u00"+i.charCodeAt(0).toString(16).padStart(2,"0")),a}function*ao(a,i){let u=a[Symbol.iterator](),s=i[Symbol.iterator](),r=u.next(),f=s.next();for(;!r.done&&!f.done;)yield[r.value,f.value],r=u.next(),f=s.next()}function El(a,i){let u=B(a),s=B(i);if(u!=s)return El.typeOrder.indexOf(u)-El.typeOrder.indexOf(s);if(u=="boolean"){if(a&&!i)return 1;if(!a&&i)return-1}else{if(u=="number")return a-i;if(u=="string"){if(a<i)return-1;if(i<a)return 1}else if(u=="array"){for(let r=0;r<a.length;r++){let f=a[r],d=i[r];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=El(f,d);if(g!=0)return g}return 0}else if(u=="object"){let r=Object.keys(a).sort(),f=Object.keys(i).sort(),d=El(r,f);if(d)return d;for(let g of r)if(d=El(a[g],i[g]),d)return d}}return 0}El.typeOrder=["null","boolean","number","string","array","object"];function xp(a,i,u=!1){let s=u0(i),r=(f,d)=>s.apply(f,d);return u&&(r=(f,d)=>s.paths(f,d)),function*(f,d,g){let p=d.userFuncArgs;d.userFuncArgs=Object.create(p);for(let y=0;y<a.length;y++){let v=a[y],S=g[y];d.userFuncArgs[v+"/0"]=S}yield*r(f,d),d.userFuncArgs=p}}function Ml(a,i,u){let s=a+"/"+i.length;bn[s]=xp(i,u),bn[s].params=Array.prototype.map.call(i,r=>({label:r,mode:"defer"})),bn[s+"-paths"]=xp(i,u,!0)}function vo(a,i=0,u){let s=[];function r(d){throw d}let f;e:for(f=i;f<a.length;f++){let d=f,g=a[f];if(g!=" ")if(g=='"'||g=="'"){let p=g,y="",v=!1,S,O=0;for(f++;f<a.length;f++)if(S)S--,O*=16,O+=Number.parseInt(a[f],16),S==0&&(y+=String.fromCharCode(O),O=0);else if(v){let j=a[f];if(j=='"'||j=="'")y+=j;else if(j=="n")y+=`
|
|
107
|
+
`;else if(j=="t")y+=" ";else if(j=="r")y+="\r";else if(j=="b")y+="\b";else if(j=="f")y+="\f";else if(j=="/")y+="/";else if(j=="\\")y+="\\";else if(j=="u")S=4;else if(j=="("){let Z=vo(a,f+1,0);s.push({type:"quote-interp",value:y,location:d}),y="",s=s.concat(Z.tokens),f=Z.i}else throw"invalid escape "+j;v=!1}else if(a[f]=="\\")v=!0;else if(a[f]==p){s.push({type:"quote",value:y,location:d});continue e}else v=!1,y+=a[f];r("unterminated string literal")}else if(os(g)){let p="";for(;os(a[f])||a[f]==".";)p+=a[f++];s.push({type:"number",value:Number.parseFloat(p),location:d}),f--}else if(g=="."){let p=a[f+1];if(rs(p)){f++;let y="";for(;rs(a[f])||os(a[f]);)y+=a[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=="$"){a[f+1],f++;let p="";for(;rs(a[f])||os(a[f]);)p+=a[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=="|")a[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=="/"&&a[f+1]=="/"&&(g="//",f++),a[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(a[f+1]!="=")throw"plain assignment = is not supported";f++,s.push({type:"op",op:"==",location:d})}else if(g=="!"){if(a[f+1]!="=")throw"unexpected ! at "+d;f++,s.push({type:"op",op:"!=",location:d})}else if(rs(g)){let p="";for(;rs(a[f])||os(a[f])||a[f]=="_";)p+=a[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 xl(a){return a?a.location:"<end>"}function at(a,i=0,u=[]){let s=i,r=a[s],f=[],d=[];for(;r&&u.indexOf(r.type)==-1;){if(r.type=="identifier-index")f.push(new io(r.value));else if(r.type=="number")f.push(new hs(r.value));else if(r.type=="quote")f.push(new oi(r.value));else if(r.type=="dot")f.push(new Np);else if(r.type=="dot-dot")f.push(new b0);else if(r.type=="identifier")if(r.value=="true"||r.value=="false")f.push(new Ap(r.value=="true"));else if(r.value=="null")f.push(new Ap(null));else{let g=r.value,p=[];if(a[s+1]&&a[s+1].type=="left-paren")for(s++;a[s].type!="right-paren";){let y=at(a,s+1,["semicolon","right-paren"]);p.push(y.node),s=y.i}f.push(new w0(g+"/"+p.length,p))}else if(r.type=="dot-square"){let g=c0(a,s);f.push(g.node),s=g.i}else if(r.type=="left-square"){let g=at(a,s+1,["right-square","colon"]);if(f.length){let p=yn(f);if(f=[],a[g.i].type=="colon"){g.node.length===0&&(g.node=new hs(0));let y=at(a,g.i+1,["right-square"]);y.node.length===0&&(y.node=new hs(-1)),f.push(new f0(p,g.node,y.node)),g=y}else g.node.length===0?f.push(new p0(p)):f.push(new o0(p,g.node))}else f.push(new g0(g.node));s=g.i}else if(r.type=="left-paren"){let g=at(a,s+1,["right-paren"]);f.push(g.node),s=g.i}else if(r.type=="left-brace"){let g=r0(a,s+1);f.push(g.node),s=g.i}else if(r.type=="at"){let g=a[++s];if(!g||g.type!="identifier")throw"expected identifier after @ at "+xl(g);let p=g.value;if(!ds[p])throw"not a valid format: "+p;let y;a[s+1]&&a[s+1].type=="quote-interp"&&({q:y,i:s}=Ep(a,s+1),s=s),f.push(new R0(p,y))}else if(r.type=="comma")d.push(yn(f)),f=[];else if(r.type=="pipe"||r.type=="as"){d.length&&(d.push(yn(f)),f=[new Op(d)],d=[]);let g=yn(f);if(r.type=="as"){let v=a[s+1];g=new sg(g,v.name),s+=2}let p=at(a,s+1,u),y=p.node;s=p.i,a[s]&&u.indexOf(a[s].type)!=-1&&s--,f=[new m0(g,y)]}else if(r.type=="question"){let g=f.pop();if(!g)throw"unexpected ? without preceding filter at "+xl(r);f.push(new z0(g))}else if(r.type=="op"){if(f.length==0&&r.op=="-"&&a[s+1].type=="number"){a[s+1].value=-a[s+1].value,r=a[++s];continue}let g=yn(f);r.op;let p=[g,r],y=at(a,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<a.length&&a[s].type=="op";){p.push(a[s]);let v=at(a,s+1,["op","comma","pipe","right-paren","right-brace","right-square","<end-of-program>"].concat(u));s=v.i,p.push(v.node)}f=[Tp(p)],a[s]&&s--}else if(r.type=="pipe-equals"){let g=yn(f),p=at(a,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 jp(g,y)]}else if(r.type=="op-equals"){let g=yn(f),p=at(a,s+1,["comma","pipe","right-paren","right-brace","right-square","<end-of-program>"].concat(u));s=p.i;let y=p.node;y=Tp([new Np,{type:"op",op:r.op},y]),f=[new jp(g,y)]}else if(r.type=="reduce"){let g=at(a,s+1,["as"]);s=g.i;let p=g.node;s++;let y=a[s].name;if(s++,a[s].type!="left-paren")throw"expected left-paren in reduce at "+xl(a[s]);g=at(a,s+1,["semicolon"]),s=g.i;let v=g.node;g=at(a,s+1,["right-paren"]),s=g.i;let S=g.node;f.push(new M0(p,y,v,S))}else if(r.type=="quote-interp"){let g;({q:g,i:s}=Ep(a,s)),f.push(g)}else if(r.type=="variable")f.push(new ug(r.name));else if(r.type=="if"){let g=[],p=[],y=null;for(;a[s]&&(a[s].type=="if"||a[s].type=="elif");){let v=at(a,s+1,["then"]);if(!a[v.i]||a[v.i].type!="then")throw"expected then at "+xl(a[v.i])+", from "+a[s].type+" at "+a[s].location;let S=at(a,v.i+1,["else","elif","end"]);if(S.i==v.i+1)throw"expected expression after then at "+xl(a[v.i+1])+", not "+a[v.i+1].type;s=S.i,g.push(v.node),p.push(S.node)}if(a[s]&&a[s].type=="else"){let v=at(a,s+1,["end"]);s=v.i,y=v.node}if(!a[s]||a[s].type!="end")throw"expected end at "+xl(a[s])+" from if at "+r.location;f.push(new C0(g,p,y))}else{if(r.type=="<end-of-program>"&&u.length==0)break;throw"could not handle token "+r.type+" at "+xl(r)+(u.length>0?", expected "+u.join("/"):"")}r=a[++s]}return d.length?(d.push(yn(f)),{node:new Op(d),i:s}):{node:yn(f),i:s}}function yn(a){return a.length==1?a[0]:new So(a)}function Ep(a,i){let u=a[i],s=[],r=[];s.push(u.value);let f=at(a,i+1,["right-paren"]);for(i=f.i+1,r.push(f.node);a[i].type=="quote-interp";)s.push(a[i].value),f=at(a,i+1,["right-paren"]),i=f.i+1,r.push(f.node);return s.push(a[i].value),{q:new d0(s,r),i}}function c0(a,i=0){let u=i;if(a[u],u++,a[u].type=="right-square")return{node:new ag,i:u};let s=at(a,u,["right-square","colon"]);if(a[s.i].type=="colon"){let r=s;return r.length===0&&(r.node=new hs(0)),s=at(a,s.i+1,["right-square"]),s.length===0&&(s.node=new hs(-1)),{node:new h0(r.node,s.node),i:s.i}}return{node:new ng(s.node),i:s.i}}function r0(a,i=0){let u=i,s=[];for(;a[u].type!="right-brace";){if(a[u].type=="identifier"){let r=a[u++];if(a[u].type=="colon"){let f=at(a,u+1,["comma","right-brace"]);u=f.i,s.push({key:new oi(r.value),value:f.node}),u--}else a[u].type=="comma"?s.push({key:new oi(r.value),value:new io(r.value)}):a[u].type=="right-brace"&&(s.push({key:new oi(r.value),value:new io(r.value)}),u--)}else if(a[u].type=="quote"){let r=a[u++];if(a[u].type=="colon"){let f=at(a,u+1,["comma","right-brace"]);u=f.i,s.push({key:new oi(r.value),value:f.node}),u--}else throw"unexpected "+a[u].type+", expected colon at "+xl(a[u])}else if(a[u].type=="left-paren"){let r=at(a,u+1,["right-paren"]);if(u=r.i+1,a[u].type=="colon"){let f=at(a,u+1,["comma","right-brace"]);u=f.i,s.push({key:r.node,value:f.node}),u--}else throw"unexpected "+a[u].type+", expected colon at "+xl(a[u])}else if(a[u].type=="variable"){let r=a[u++];if(a[u].type=="colon"){let f=at(a,u+1,["comma","right-brace"]);u=f.i,s.push({key:new ug(r.name),value:f.node}),u--}else throw"unexpected "+a[u].type+", expected colon at "+xl(a[u])}else throw"unexpected "+a[u].type+" at "+xl(a[u])+" in object at "+xl(a[i-1]);u++,a[u].type=="comma"&&u++}return{node:new y0(s),i:u}}function Tp(a){const i={"+":5,"-":5,"*":10,"/":10,"%":10,"//":2,"==":3,"!=":3,">":3,"<":3,">=":3,"<=":3};let u=[],s=[];for(let d of a)if(d.type=="op"){for(;s.length&&i[s[0].op]>=i[d.op];)u.push(s.shift());s.unshift(d)}else u.push(d);for(let d of s)u.push(d);let r={"+":Du,"*":v0,"-":S0,"/":_0,"%":x0,"//":j0,"==":ig,"!=":O0,"<":E0,">":T0,"<=":N0,">=":A0},f=[];for(let d of u)if(d.type=="op"){let g=f.pop(),p=f.pop();f.push(new r[d.op](p,g))}else f.push(d);return f[0]}function tg(a,i,u,s){let r=s[0];for(let f of r.apply(a,i)){let d=[];u.push({node:r,output:f,next:d,variables:JSON.parse(JSON.stringify(i.variables))}),s.length>1&&tg(f,i,d,s.slice(1))}}function lg(a,i,u,s){let r=[],f=this;for(;f.source;)f.filter&&r.unshift(f.filter),f=f.source;r.unshift(f),tg(a,i,u,r)}function B(a){if(a===null)return"null";if(typeof a=="number")return"number";if(typeof a=="string")return"string";if(typeof a=="boolean")return"boolean";if(a instanceof Array)return"array";if(typeof a=="object")return"object"}class ct{trace(i,u,s){for(let r of this.apply(i,u))s.push({node:this,output:r,next:[]})}toString(){return"<"+this.constructor.name+">"}*apply(i,u){throw"apply not implemented for "+this.constructor.name}}class So extends ct{constructor(i){super(),this.length=i.length;let u=i.pop();u&&(this.filter=u,this.source=i.length==1?i[0]:new So(i))}*apply(i,u){if(this.filter)for(let s of this.source.apply(i,u))yield*this.filter.apply(s,u)}*paths(i,u){if(!this.filter)return[];for(let s of this.source.paths(i,u))for(let r of this.filter.paths(i,u))yield s.concat(r)}trace=lg;toString(){return(this.source?this.source.toString():"")+(this.filter?this.filter.toString():"")}}class o0 extends ct{constructor(i,u){super(),this.lhs=i,this.index=u}*apply(i,u){for(let s of this.lhs.apply(i,u)){let r=B(s);for(let f of this.index.apply(i,u)){if(r=="array"&&B(f)!="number")throw"Cannot index array with "+B(f)+" "+JSON.stringify(f);if(r=="object"&&B(f)!="string")throw"Cannot index object with "+B(f)+" "+JSON.stringify(f);typeof f=="number"&&f<0&&B(s)=="array"?yield s[s.length+f]:yield typeof s[f]>"u"?null:s[f]}}}*paths(i,u){for(let s of this.lhs.paths(i,u))for(let r of this.index.apply(i,u))yield s.concat([r])}toString(){return this.lhs.toString()+"["+this.index.toString()+"]"}}class f0 extends ct{constructor(i,u,s){super(),this.lhs=i,this.from=u,this.to=s}*apply(i,u){for(let s of this.lhs.apply(i,u))for(let r of this.from.apply(i,u)){r<0&&(r+=s.length);for(let f of this.to.apply(i,u))f<0&&(f+=s.length),yield s.slice(r,f)}}*paths(i,u){for(let s of this.lhs.paths(i,u))for(let r of this.from.apply(i,u))for(let f of this.to.apply(i,u))yield s.concat([{start:r,end:f}])}toString(){return this.lhs.toString()+"["+this.from.toString()+":"+this.to.toString()+"]"}}class ng extends ct{constructor(i){super(),this.index=i}*apply(i,u){let s=B(i);for(let r of this.index.apply(i,u)){if(s=="array"&&B(r)!="number")throw"Cannot index array with "+B(r)+" "+JSON.stringify(r);if(s=="object"&&B(r)!="string")throw"Cannot index object with "+B(r)+" "+JSON.stringify(r);typeof r=="number"&&r<0&&B(i)=="array"?yield i[i.length+r]:yield typeof i[r]>"u"?null:i[r]}}*paths(i,u){for(let s of this.index.apply(i,u))yield[s]}}class io extends ng{constructor(i){super(new oi(i))}toString(){return"."+this.index.value}}class h0 extends ct{constructor(i,u){super(),this.from=i,this.to=u}*apply(i,u){for(let s of this.from.apply(i,u)){s<0&&(s+=i.length);for(let r of this.to.apply(i,u))r<0&&(r+=i.length),yield i.slice(s,r)}}*paths(i,u){for(let s of this.from.apply(i,u))for(let r of this.to.apply(i,u))yield[{start:s,end:r}]}toString(){return".["+this.from.toString()+":"+this.to.toString()+"]"}}class Np extends ct{constructor(){super()}*apply(i,u){yield i}*paths(i,u){yield[]}toString(){return"."}}class _o extends ct{constructor(i){super(),this.value=i}*apply(){yield this.value}*paths(i,u){yield this.value}toString(){return JSON.stringify(this.value)}}class oi extends _o{constructor(i){super(i)}}class d0 extends ct{constructor(i,u){super(),this.strings=i,this.interpolations=u}*apply(i,u){yield*this.applyEscape(i,ds.text,u)}*applyEscape(i,u,s,r=0){let f=this.strings[r];if(!this.interpolations[r])return yield f;for(let g of this.interpolations[r].apply(i,s))for(let p of this.applyEscape(i,u,s,r+1))yield f+u(g)+p}toString(){let i="";for(let u=0;u<this.strings.length;u++)i+=this.strings[u].replace("\\","\\\\").replace('"','\\"'),this.interpolations[u]&&(i+="\\("+this.interpolations[u].toString()+")");return'"'+i+'"'}}class hs extends _o{constructor(i){super(i)}toString(){return this.value.toString()}}class Ap extends _o{constructor(i){super(i)}toString(){return this.value?"true":"false"}}class p0 extends ct{constructor(i){super(),this.source=i,this.filter=new ag}*apply(i,u){for(let s of this.source.apply(i,u))yield*Object.values(s)}*paths(i,u){for(let[s,r]of this.zip(this.source.paths(i,u),this.source.apply(i,u)))if(B(r)=="array")for(let f=0;f<r.length;f++)yield s.concat([f]);else for(let f of Object.keys(r))yield s.concat([f])}*zip(i,u){let s=i[Symbol.iterator](),r=u[Symbol.iterator](),f=s.next(),d=r.next();for(;!f.done&&!d.done;)yield[f.value,d.value],f=s.next(),d=r.next()}toString(){return this.source.toString()+"[]"}trace=lg}class ag extends ct{constructor(){super()}*apply(i,u){B(i)=="array"?yield*i:yield*Object.values(i)}*paths(i,u){if(B(i)=="array")for(let s=0;s<i.length;s++)yield[s];else for(let s of Object.keys(i))yield[s]}toString(){return".[]"}}class Op extends ct{constructor(i){super(),this.branches=i}*apply(i,u){for(let s of this.branches)yield*s.apply(i,u)}*paths(i,u){for(let s of this.branches)yield*s.paths(i,u)}toString(){return this.branches.join(", ")}}class g0 extends ct{constructor(i){super(),this.body=i}*apply(i,u){yield Array.from(this.body.apply(i,u))}toString(){return"["+this.body+"]"}}class m0 extends ct{constructor(i,u){super(),this.lhs=i,this.rhs=u,this.isPipe=!0}toString(){return`${this.lhs} | ${this.rhs}`}*apply(i,u){for(let s of this.lhs.apply(i,u))for(let r of this.rhs.apply(s,u))yield r}*paths(i,u){for(let[s,r]of this.zip(this.lhs.paths(i,u),this.lhs.apply(i,u)))for(let f of this.rhs.paths(r,u))yield s.concat(f)}*zip(i,u){let s=i[Symbol.iterator](),r=u[Symbol.iterator](),f=s.next(),d=r.next();for(;!f.done&&!d.done;)yield[f.value,d.value],f=s.next(),d=r.next()}trace(i,u,s){for(let r of this.lhs.apply(i,u)){let f=[],d={};this.lhs instanceof sg&&(d.variableValue=u.variables[this.lhs.name]),s.push({node:this.lhs,output:r,next:f,variables:JSON.parse(JSON.stringify(u.variables)),...d}),this.rhs.trace(r,u,f)}}}class y0 extends ct{constructor(i){super(),this.fields=i}*apply(i,u){let s={},r=[];for(let{key:f,value:d}of this.fields)for(let g of f.apply(i,u)){r.push(g),s[g]=[];for(let p of d.apply(i,u))s[g].push(p)}yield*this.helper(r,s,0,{})}*helper(i,u,s,r){if(s>=i.length){yield Object.assign({},r);return}let f=i[s];for(let d of u[f])r[f]=d,yield*this.helper(i,u,s+1,r)}toString(){return"{"+this.fields.map(({key:i,value:u})=>i.toString()+": "+u.toString()).join(", ")+"}"}}class b0 extends ct{constructor(){super()}*apply(i,u){yield*this.recurse(i)}*recurse(i){yield i;let u=B(i);if(u=="array"||u=="object")for(let s of Object.values(i))yield*this.recurse(s)}*paths(i,u){yield*this.recursePaths(i,[])}*recursePaths(i,u){yield u;let s=B(i);if(s=="array")for(let r=0;r<i.length;r++)yield*this.recursePaths(i[r],u.concat([r]));else if(s=="object")for(let[r,f]of Object.entries(i))yield*this.recursePaths(f,u.concat([r]))}toString(){return".."}}class Ql extends ct{constructor(i,u){super(),this.l=i,this.r=u}*apply(i,u){for(let s of this.r.apply(i,u))for(let r of this.l.apply(i,u))yield this.combine(r,s,B(r),B(s))}trace(i,u,s){for(let r of this.l.apply(i,u)){let f=[];s.push({node:this.l,output:r,next:f,subsidiary:"left"});for(let d of this.r.apply(i,u)){let g=[];f.push({node:this.r,output:d,next:g,subsidiary:"right"});let p=this.combine(r,d,B(r),B(d)),y=[];g.push({node:this,output:p,next:y})}}}}class Du extends Ql{constructor(i,u){super(i,u)}combine(i,u,s,r){if(s=="number"&&r=="number")return i+u;if(i===null)return u;if(u===null)return i;if(s=="string"&&r=="string")return i+u;if(s=="array"&&r=="array")return i.concat(u);if(s=="object"&&r=="object")return Object.assign(Object.assign({},i),u);throw"type mismatch in +:"+s+" and "+r+" cannot be added"}toString(){return this.l+" + "+this.r}}class v0 extends Ql{constructor(i,u){super(i,u)}combine(i,u,s,r){if(s=="number"&&r=="number")return i*u;if(s=="number"&&r=="string")return this.repeat(u,i);if(s=="string"&&r=="number")return this.repeat(i,u);if(s=="object"&&r=="object")return this.merge(Object.assign({},i),u);throw"type mismatch in *:"+s+" and "+r+" cannot be multiplied"}repeat(i,u){if(u==0)return null;let s=[];for(let r=0;r<u;r++)s.push(i);return s.join("")}merge(i,u){for(let s of Object.keys(u))i.hasOwnProperty(s)?B(i[s])!="object"||B(u[s])!="object"?i[s]=u[s]:this.merge(i[s],u[s]):i[s]=u[s];return i}toString(){return this.l+" * "+this.r}}class S0 extends Ql{constructor(i,u){super(i,u)}combine(i,u,s,r){if(s=="number"&&r=="number")return i-u;if(i==null||u==null)throw"type mismatch in -";if(s=="array"&&r=="array")return i.filter(f=>u.indexOf(f)==-1);throw"type mismatch in -:"+s+" and "+r+" cannot be subtracted"}toString(){return this.l+" - "+this.r}}class _0 extends Ql{constructor(i,u){super(i,u)}combine(i,u,s,r){if(s=="number"&&r=="number")return i/u;if(s=="string"&&r=="string")return i.split(u);throw"type mismatch in -:"+s+" and "+r+" cannot be divided"}toString(){return this.l+" / "+this.r}}class x0 extends Ql{constructor(i,u){super(i,u)}combine(i,u,s,r){if(s=="number"&&r=="number")return i%u;throw"type mismatch in -:"+s+" and "+r+" cannot be divided (remainder)"}toString(){return this.l+" % "+this.r}}class E0 extends Ql{constructor(i,u){super(i,u)}combine(i,u,s,r){return El(i,u)<0}toString(){return this.l+" < "+this.r}}class T0 extends Ql{constructor(i,u){super(i,u)}combine(i,u,s,r){return El(i,u)>0}toString(){return this.l+" > "+this.r}}class N0 extends Ql{constructor(i,u){super(i,u)}combine(i,u,s,r){return El(i,u)<=0}toString(){return this.l+" <= "+this.r}}class A0 extends Ql{constructor(i,u){super(i,u)}combine(i,u,s,r){return El(i,u)>=0}toString(){return this.l+" >= "+this.r}}class ig extends Ql{constructor(i,u){super(i,u)}combine(i,u,s,r){if(s!=r)return!1;if(s=="number"||s=="string"||s=="boolean"||s=="null")return i==u;if(s=="array"){if(i.length!=u.length)return!1;for(let g=0;g<i.length;g++)if(!this.combine(i[g],u[g],B(i[g]),B(u[g])))return!1;return!0}let f=Object.keys(i),d=Object.keys(u);if(f.length!=d.length)return!1;for(let g of f)if(!u.hasOwnProperty(g)||!this.combine(i[g],u[g],B(i[g]),B(u[g])))return!1;return!0}toString(){return this.l+" == "+this.r}}class O0 extends ig{constructor(i,u){super(i,u)}combine(i,u,s,r){return!super.combine(i,u,s,r)}toString(){return this.l+" != "+this.r}}class j0 extends ct{constructor(i,u){super(),this.lhs=i,this.rhs=u}*apply(i,u){let s=!1;for(let r of this.lhs.apply(i,u))r!==null&&(s=!0),yield r;s||(yield*this.rhs.apply(i,u))}toString(){return this.l+" // "+this.r}}class jp extends ct{constructor(i,u){super(),this.l=i,this.r=u}*apply(i,u){i=JSON.parse(JSON.stringify(i));for(let s of this.l.paths(i,u)){let r=this.r.apply(this.get(i,s),u).next();r.done?i=this.update(i,s,null,!0):i=this.update(i,s,r.value)}yield i}get(i,u){let s=i;for(let r of u)s=s[r];return s}update(i,u,s,r=!1){let f=i,d=u.pop();for(let g of u)f=f[g];return typeof d>"u"?s:(f[d]=s,r&&delete f[d],i)}toString(){return this.l+" |= "+this.r}}class w0 extends ct{constructor(i,u){super(),this.name=i,this.args=u}apply(i,u){let s,r=u.userFuncArgs[this.name];if(r?s=function(f,d,g){return r.apply(f,d)}:s||(s=bn[this.name]),!s)throw"no such function "+this.name;return s(i,u,this.args)}paths(i,u){let s=u.userFuncArgs[this.name];if(s)return s.paths(i,u);let r=bn[this.name+"-paths"];if(!r)throw"no paths for "+this.name;return r(i,u,this.args)}trace(i,u,s){if(this.args.length==1&&!u.userFuncArgs[this.name]&&this.ordinary){let r=bn[this.name];if(r.params&&r.params.length>0&&r.params[0].mode=="defer")return super.trace(i,u,s);for(let f of this.args[0].apply(i,u)){let d=[],g="arg1";r.params&&r.params.length>0&&r.params[0].label&&(g=r.params[0].label),s.push({node:this.args[0],output:f,next:d,subsidiary:g});for(let p of r(i,u,[new k0(f)])){let y=[];d.push({node:this,output:p,next:y})}}}else return super.trace(i,u,s)}get ordinary(){let i=bn[this.name];return i?!(i.params&&i.params.length>0&&i.params[0].mode=="defer"):!0}toString(){return this.args.length==0?this.name.replace(/\/.*$/,""):this.name.replace(/\/.*$/,"")+"("+this.args.join("; ")+")"}}class R0 extends ct{constructor(i,u){super(),this.name=i,this.string=u}*apply(i,u){if(typeof this.string>"u")return yield ds[this.name](i);yield*this.string.applyEscape(i,ds[this.name],u)}toString(){return this.string?"@"+this.name+" "+this.string:"@"+this.name}}class z0 extends ct{constructor(i){super(),this.inner=i}*apply(i,u){try{for(let s of this.inner.apply(i,u))s!==null&&(yield s)}catch{}}*paths(i,u){try{for(let[s,r]of ao(this.inner.apply(i,u),this.inner.paths(i,u)))s!==null&&(yield r)}catch{}}toString(){return this.inner+"?"}}class sg extends ct{constructor(i,u){super(),this.value=i,this.name=u}*apply(i,u){for(let s of this.value.apply(i,u))u.variables[this.name]=s,yield i;delete u.variables[this.name]}toString(){return this.value+" as $"+this.name}}class ug extends ct{constructor(i){super(),this.name=i}*apply(i,u){yield u.variables[this.name]}toString(){return"$"+this.name}}class M0 extends ct{constructor(i,u,s,r){super(),this.generator=i,this.name=u,this.init=s,this.expr=r}*apply(i,u){for(let s of this.init.apply(i,u)){for(let r of this.generator.apply(i,u)){u.variables[this.name]=r;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 C0 extends ct{constructor(i,u,s){super(),this.conditions=i,this.thens=u,this.elseBranch=s}*apply(i,u){for(let[s,r]of ao(this.conditions,this.thens))for(let f of s.apply(i,u))if(f){for(let d of r.apply(i,u))yield d;return}if(this.elseBranch){yield*this.elseBranch.apply(i,u);return}yield i}toString(){let i="";for(let[u,s]of ao(this.conditions,this.thens))i+="if "+u+" then "+s+" el";return this.elseBranch?i+"se "+this.elseBranch+" end":i.slice(0,-2)+"end"}}class k0{constructor(i){this.value=i}*apply(i,u){yield this.value}toString(){return this.value.toString()}}const ds={text(a){return typeof a=="string"?a:Zl(a,"","","")},json(a){return Zl(a,"","","")},html(a){return typeof a!="string"&&(a=Zl(a,"","","")),a.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""")},uri(a){return typeof a!="string"&&(a=Zl(a,"","","")),encodeURIComponent(a)},urid(a){return typeof a!="string"&&(a=Zl(a,"","","")),decodeURIComponent(a)},csv(a){if(B(a)!="array")throw"cannot csv-format "+B(a)+", only array";return a.map(i=>{if(typeof i=="string")return'"'+i.replace(/"/g,'""')+'"';if(typeof i=="number")return""+i;if(i===null)return"";throw"type "+B(i)+" not valid in a csv row"}).join(",")},tsv(a){if(B(a)!="array")throw"cannot tsv-format "+B(a)+", only array";return a.map(i=>{if(typeof i=="string")return eg(i);if(typeof i=="number")return""+i;if(i===null)return"";throw"type "+B(i)+" not valid in a tsv row"}).join(" ")},base64(a){return typeof a!="string"&&(a=Zl(a,"","","")),btoa(a)},base64d(a){if(typeof a!="string")throw"can only base64-decode strings";return atob(a)},sh(a){let i=B(a);if(i=="string")return"'"+i.replace(/'/g,"'\\''")+"'";if(i=="number")return""+a;if(i=="boolean")return""+a;if(a===null)return"null";if(i==="array")return a.map(u=>{let s=B(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 i+" cannot be escaped for shell"}},bn={"tostring/0":function*(a){yield ds.text(a)},"empty/0":function*(a){},"fromjson/0":function*(a){yield JSON.parse(a)},"path/1":Object.assign(function*(a,i,u){yield*u[0].paths(a,i)},{params:[{mode:"defer"}]}),"select/1":Object.assign(function*(a,i,u){let s=u[0];for(let r of s.apply(a,i))r!==!1&&r!==null&&(yield a)},{params:[{label:"predicate",mode:"eval"}]}),"select/1-paths":function*(a,i,u){let s=u[0];for(let r of s.apply(a,i))r!==!1&&r!==null&&(yield[])},"length/0":function*(a){let i=B(a);if(i=="string"||i=="array")return yield a.length;if(i=="null")return yield 0;if(i=="object")return yield Object.keys(a).length;throw"cannot compute length of "+i},"keys/0":function*(a){yield*Object.keys(a).sort()},"has/1":Object.assign(function*(a,i,u){let s=u[0];for(let r of s.apply(a,i))yield a.hasOwnProperty(r)},{params:[{label:"key"}]}),"has/1-paths":function*(a,i,u){let s=u[0];for(let r of s.apply(a,i))a.hasOwnProperty(r)&&(yield[])},"in/1":Object.assign(function*(a,i,u){let s=u[0];for(let r of s.apply(a,i))yield r.hasOwnProperty(a)},{params:[{label:"object"}]}),"in/1-paths":function*(a,i,u){let s=u[0];for(let r of s.apply(a,i))r.hasOwnProperty(a)&&(yield[])},"contains/1":Object.assign(function*(a,i,u){let s=u[0],r=B(a);for(let f of s.apply(a,i)){let d=B(f);if(r!=d)throw r+" and "+d+" cannot have their containment checked";yield Hu(a,f)}},{params:[{label:"element"}]}),"inside/1":Object.assign(function*(a,i,u){let s=u[0],r=B(a);for(let f of s.apply(a,i)){let d=B(f);if(r!=d)throw r+" and "+d+" cannot have their containment checked";yield Hu(f,a)}},{params:[{label:"container"}]}),"to_entries/0":function*(a,i){let u=B(a);if(u=="array"){let s=[];for(let r=0;r<a.length;r++)s.push({key:r,value:a[r]});yield s}else if(u=="object")yield Object.entries(a).map(s=>({key:s[0],value:s[1]}));else throw"cannot make entries from "+u},"from_entries/0":function*(a,i){let u=B(a);if(u=="array"){let s={};for(let{key:r,value:f}of a)s[r]=f;yield s}else throw"cannot use entries from "+u},"type/0":function*(a){yield B(a)},"range/1":Object.assign(function*(a,i,u){for(let s of u[0].apply(a,i))for(let r=0;r<s;r++)yield r},{params:[{mode:"defer"}]}),"range/2":function*(a,i,u){for(let s of u[0].apply(a,i))for(let r of u[1].apply(a,i))for(let f=s;f<r;f++)yield f},"range/3":function*(a,i,u){for(let s of u[0].apply(a,i))for(let r of u[1].apply(a,i))for(let f of u[2].apply(a,i))for(let d=s;d<r;d+=f)yield d},"any/0":function*(a,i){if(B(a)!="array")throw"any/0 requires array as input, not "+B(a);for(let u of a)if(u)return yield!0;yield!1},"any/1":Object.assign(function*(a,i,u){if(B(a)!="array")throw"any/1 requires array as input, not "+B(a);for(let s of a)for(let r of u[0].apply(s,i))if(r)return yield!0;yield!1},{params:[{mode:"defer"}]}),"any/2":function*(a,i,u){let s=u[0],r=u[1];for(let f of s.apply(a,i))for(let d of r.apply(f,i))if(d)return yield!0;yield!1},"all/0":function*(a,i){if(B(a)!="array")throw"all/0 requires array as input, not "+B(a);for(let u of a)if(!u)return yield!1;yield!0},"all/1":Object.assign(function*(a,i,u){if(B(a)!="array")throw"all/1 requires array as input, not "+B(a);for(let s of a)for(let r of u[0].apply(s,i))if(!r)return yield!1;yield!0},{params:[{mode:"defer"}]}),"all/2":function*(a,i,u){let s=u[0],r=u[1];for(let f of s.apply(a,i))for(let d of r.apply(f,i))if(!d)return yield!1;yield!0},"add/0":function*(a,i){if(B(a)!="array")throw"can only add up arrays";if(a.length==0)return yield null;if(a.length==1)return yield a[0];let u=Du.prototype.combine(a[0],a[1],B(a[0]),B(a[1]));for(let s=2;s<a.length;s++)u=Du.prototype.combine(u,a[s],B(u),B(a[s]));yield u},"add/1":Object.assign(function*(a,i,u){let s=null;for(let r of u[0].apply(a,i))s=Du.prototype.combine(s,r,B(s),B(r));yield s},{params:[{label:"source"}]}),"tonumber/0":function*(a){yield Number.parseFloat(a)},"toboolean/0":function*(a){if(a==="false"||a===!1)yield!1;else if(a==="true"||a===!0)yield!0;else throw`cannot convert ${B(a)} (${Zl(a)}) to boolean`},"tojson/0":function*(a){yield JSON.stringify(a)},"fromjson/0":function*(a){yield JSON.parse(a)},"reverse/0":function*(a){if(B(a)!="array")throw"can only reverse arrays, not "+B(a);yield a.toReversed()},"sort/0":function*(a,i){if(B(a)!="array")throw"can only sort arrays, not "+B(a);yield Array.from(a).sort(El)},"sort_by/1":Object.assign(function*(a,i,u){if(B(a)!="array")throw"can only sort arrays, not "+B(a);let s=u[0],r=a.map(f=>({key:s.apply(f,i).next().value,value:f}));r.sort((f,d)=>El(f.key,d.key)),yield r.map(f=>f.value)},{params:[{mode:"defer"}]}),"explode/0":function*(a,i){if(B(a)!="string")throw"can only explode string, not "+B(a);let u=[];for(let s=0;s<a.length;s++){let r=a.charCodeAt(s);u.push(r),r>65535&&s++}yield u},"implode/0":function*(a,i){if(B(a)!="array")throw"can only implode array, not "+B(a);yield a.map(u=>String.fromCodePoint(u)).join("")},"split/1":Object.assign(function*(a,i,u){if(B(a)!="string")throw"can only split string, not "+B(a);for(let s of u[0].apply(a,i))yield a.split(s)},{params:[{label:"separator"}]}),"split/2":Object.assign(function*(a,i,u){if(B(a)!="string")throw"can only split string, not "+B(a);let s=u[1]?u[1].apply(a,i).next().value:"";s=ri(s);for(let r of u[0].apply(a,i)){let f=new RegExp(r,s);yield a.split(f)}},{params:[{label:"regex"},{label:"flags"}]}),"splits/1":Object.assign(function*(a,i,u){if(B(a)!="string")throw"can only split string, not "+B(a);for(let s of u[0].apply(a,i)){let r=new RegExp(s,"u");yield*a.split(r)}},{params:[{label:"regex"},{label:"flags"}]}),"splits/2":Object.assign(function*(a,i,u){if(B(a)!="string")throw"can only split string, not "+B(a);let s=u[1]?u[1].apply(a,i).next().value:"";s=ri(s);for(let r of u[0].apply(a,i)){let f=new RegExp(r,s);yield*a.split(f)}},{params:[{label:"regex"},{label:"flags"}]}),"join/1":Object.assign(function*(a,i,u){if(B(a)!="array")throw"can only join array, not "+B(a);let s=a.map(r=>{if(typeof r=="number")return""+r;if(typeof r=="string")return r;if(typeof r=="boolean")return""+r;if(r===null)return"";throw"cannot join "+B(r)});for(let r of u[0].apply(a,i))yield s.join(r)},{params:[{label:"delimiter"}]}),"getpath/1":Object.assign(function*(a,i,u){if(B(a)!="object"&&B(a)!="array")throw"can only get path from objects and arrays, not "+B(a);for(let s of u[0].apply(a,i)){let r=a;for(let f of s)if(r.hasOwnProperty(f))r=r[f];else{r=null;break}yield r}},{params:[{label:"paths"}]}),"setpath/2":Object.assign(function*(a,i,u){if(B(a)!="object"&&B(a)!="array"&&B(a)!="null")throw"can only set path on objects and arrays, not "+B(a);for(let s of u[0].apply(a,i)){let r=JSON.parse(JSON.stringify(a)),f=r;for(let d of s.slice(0,-1))r===null?B(d)=="number"?(r=[],f=r):(r={},f=r):f.hasOwnProperty(d)||(B(d)=="number"?f[d]=[]:f[d]={}),f=f[d];for(let d of u[1].apply(a,i)){let g=s[s.length-1];r===null?B(g)=="number"?(r=[],f=r):(r={},f=r):f.hasOwnProperty(g)||(B(g)=="number"?f=[]:f={}),f[g]=d}yield r}},{params:[{label:"paths"},{label:"value"}]}),"delpaths/1":Object.assign(function*(a,i,u){if(B(a)!="object"&&B(a)!="array")throw"can only delete paths from objects and arrays, not "+B(a);for(let s of u[0].apply(a,i)){let r=JSON.parse(JSON.stringify(a));for(let f of s){let d=r;for(let g of f.slice(0,-1))d.hasOwnProperty(g)||(d[g]={}),d=d[g];delete d[f[f.length-1]]}yield r}},{params:[{label:"paths"}]}),"ltrim/0":Object.assign(function*(a,i){if(B(a)!="string")throw"can only trim strings, not "+B(a);yield a.trimLeft()},{params:[]}),"rtrim/0":Object.assign(function*(a,i){if(B(a)!="string")throw"can only trim strings, not "+B(a);yield a.trimRight()},{params:[]}),"trim/0":Object.assign(function*(a,i){if(B(a)!="string")throw"can only trim strings, not "+B(a);yield a.trim()},{params:[]}),"trimstr/1":Object.assign(function*(a,i,u){if(B(a)!="string")throw"can only trim strings, not "+B(a);for(let s of u[0].apply(a,i)){let r=a;r.startsWith(s)&&(r=r.slice(s.length)),r.endsWith(s)&&(r=r.slice(0,-s.length)),yield r}},{params:[{label:"str"}]}),"ltrimstr/1":Object.assign(function*(a,i,u){if(B(a)!="string")throw"can only trim strings, not "+B(a);for(let s of u[0].apply(a,i)){let r=a;r.startsWith(s)&&(r=r.slice(s.length)),yield r}},{params:[{label:"str"}]}),"rtrimstr/1":Object.assign(function*(a,i,u){if(B(a)!="string")throw"can only trim strings, not "+B(a);for(let s of u[0].apply(a,i)){let r=a;r.endsWith(s)&&(r=r.slice(0,-s.length)),yield r}},{params:[{label:"str"}]}),"first/0":function*(a,i){if(B(a)!="array")throw"can only get first element of arrays, not "+B(a);if(a.length==0)return yield null;yield a[0]},"last/0":Object.assign(function*(a,i){if(B(a)!="array")throw"can only get last element of arrays, not "+B(a);if(a.length==0)return yield null;yield a[a.length-1]},{params:[]}),"nth/1":Object.assign(function*(a,i,u){if(B(a)!="array")throw"can only get nth element of arrays, not "+B(a);if(a.length==0)return yield null;for(let s of u[0].apply(a,i)){if(B(s)!="number")throw"nth index must be a number, not "+B(s);if(s<0)throw"negative indices not supported for nth";yield a[s]}},{params:[{label:"index"}]}),"first/1":Object.assign(function*(a,i,u){for(let s of u[0].apply(a,i))return yield s},{params:[{label:"generator"}]}),"last/1":Object.assign(function*(a,i,u){let s=null;for(let r of u[0].apply(a,i))s=r;yield s},{params:[{label:"generator"}]}),"limit/2":Object.assign(function*(a,i,u){for(let s of u[0].apply(a,i)){let r=0;for(let f of u[1].apply(a,i)){if(r>=s)break;yield f,r++}}},{params:[{label:"n"},{label:"expr"}]}),"skip/2":Object.assign(function*(a,i,u){for(let s of u[0].apply(a,i)){let r=0;for(let f of u[1].apply(a,i))r>=s&&(yield f),r++}},{params:[{label:"n"},{label:"expr"}]}),"walk/1":Object.assign(function*(a,i,u){yield*so(a,i,u[0])},{params:[{label:"generator"}]}),"ascii_upcase/0":function*(a,i){if(B(a)!="string")throw"can only convert strings to uppercase, not "+B(a);yield a.replace(/./g,u=>u.charCodeAt(0)>=97&&u.charCodeAt(0)<=122?u.toUpperCase():u)},"ascii_downcase/0":function*(a,i){if(B(a)!="string")throw"can only convert strings to lowercase, not "+B(a);yield a.replace(/./g,u=>u.charCodeAt(0)>=65&&u.charCodeAt(0)<=90?u.toLowerCase():u)},"sub/2":Object.assign(function*(a,i,u){yield*Cu(a,i,u[0],u[1])},{params:[{label:"regex"},{label:"tostring"}]}),"sub/3":Object.assign(function*(a,i,u){let s=u[2].apply(a,i).next().value||"";yield*Cu(a,i,u[0],u[1],s)},{params:[{label:"regex"},{label:"tostring"},{label:"flags"}]}),"gsub/2":Object.assign(function*(a,i,u){return yield*Cu(a,i,u[0],u[1],"g")},{params:[{label:"regex"},{label:"tostring"}]}),"gsub/3":Object.assign(function*(a,i,u){let s=u[2].apply(a,i).next().value||"g";yield*Cu(a,i,u[0],u[1],s)},{params:[{label:"regex"},{label:"tostring"},{label:"flags"}]}),"test/1":Object.assign(function*(a,i,u){for(let s of u[0].apply(a,i))yield new RegExp(s,"u").test(a)},{params:[{label:"regex"}]}),"test/2":Object.assign(function*(a,i,u){let s=u[0].apply(a,i).next().value||"";for(let r of u[0].apply(a,i))yield new RegExp(r,ri(s)).test(a)},{params:[{label:"regex"},{label:"flags"}]}),"capture/1":Object.assign(function*(a,i,u){for(let s of u[0].apply(a,i)){let f=new RegExp(s,"u").exec(a);f&&(yield f.groups)}},{params:[{label:"regex"}]}),"capture/2":Object.assign(function*(a,i,u){let s=u[1].apply(a,i).next().value||"";s=ri(s);for(let r of u[0].apply(a,i)){let d=new RegExp(r,s).exec(a);d&&(yield d.groups)}},{params:[{label:"regex"},{label:"flags"}]}),"match/1":Object.assign(function*(a,i,u){let s="u";u[1]&&(s=ri(u[1].apply(a,i).next().value||"")),s+="d";let r=s.indexOf("g")>=0,f=0;for(let d of u[0].apply(a,i)){let g=new RegExp(d,s),p=g.exec(a);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 S=null;if(p.indices.groups){for(let[O,j]of Object.entries(p.indices.groups))if(p.indices[v][0]==j[0]&&p.indices[v][1]==j[1]){S=O;break}}y.captures.push({offset:p.indices[v][0],length:p[v].length,string:p[v],name:S})}if(yield y,p=g.exec(a),f++>1e3||!r)break}}},{params:[{label:"regex"}]})};bn["match/2"]=bn["match/1"];function*Cu(a,i,u,s,r=""){r=ri(r);for(let f of u.apply(a,i)){let d=new RegExp(f,r),g,p=0,y=[];for(;(g=d.exec(a))&&(y.push(a.slice(p,g.index)),y.push(g.groups),p=g.index+g[0].length,!(r.indexOf("g")<0)););if(y.length==0)return yield a;let v=a.slice(p),S=[];for(let j=0;j<y.length;j+=2){let Z=y[j],$=y[j+1],Q=[];S.push(Q);for(let Y of s.apply($,i))Q.push(Z+Y)}let O=0;for(;;){let j="",Z=!1;for(let $=0;$<S.length;$++)typeof S[$][O]<"u"&&(Z=!0),j+=S[$][O]??"";if(!Z||(j+=v,yield j,O++,O>1e3))break}}}function ri(a){let i=["u"];if(a===null)return"u";for(let u of a)if(u=="g"||u=="i"||u=="m"||u=="s")i.push(u);else if(u=="p")i.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 i.join("")}function*so(a,i,u){if(B(a)=="array"){let s=[];for(let r of a)s.push(...so(r,i,u));return yield*u.apply(s,i)}else if(B(a)=="object"){let s={};for(let r of Object.keys(a))for(let f of so(a[r],i,u)){s[r]=f;break}return yield*u.apply(s,i)}yield*u.apply(a,i)}function Hu(a,i){let u=B(a),s=B(i);if(u!=s)return!1;if(u=="string")return a.indexOf(i)!=-1;if(u=="array"){for(let r of i){let f=!1;for(let d of a)if(Hu(d,r)){f=!0;break}if(!f)return!1}return!0}else if(u=="object"){for(let r of Object.keys(i))if(!a.hasOwnProperty(r)||!Hu(a[r],i[r]))return!1;return!0}else return a===i}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 D0(a,i){let u=Pp(a);return typeof i<"u"?u(i):u}const U0=Object.assign(D0,{compile:Pp,prettyPrint:Zl});vn.registerLanguage("json",a0);vn.registerLanguage("xml",i0);vn.registerLanguage("plaintext",s0);const wp=5*1024*1024;function B0(a){return a?a.includes("json")?"json":a.includes("xml")||a.includes("html")?"xml":"plaintext":"plaintext"}function q0({body:a,contentType:i,wrapEnabled:u,onToggleWrap:s}){const r=M.useRef(null),[f,d]=M.useState(!1),[g,p]=M.useState(""),y=M.useRef(null),v=M.useMemo(()=>B0(i),[i]),S=v==="json",O=M.useMemo(()=>{if(!S||!a)return null;try{return JSON.parse(a)}catch{return null}},[a,S]),{displayBody:j,truncated:Z,filterError:$}=M.useMemo(()=>{let Y=a||"",se=!1,te=null;if(Y.length>wp&&(Y=Y.slice(0,wp),se=!0),S)try{const J=JSON.parse(Y);Y=JSON.stringify(J,null,2)}catch{}if(g.trim()&&O!==null)try{const I=[...U0.compile(g.trim())(O)];I.length===1?Y=typeof I[0]=="string"?I[0]:JSON.stringify(I[0],null,2):Y=I.map(ge=>typeof ge=="string"?JSON.stringify(ge):JSON.stringify(ge,null,2)).join(`
|
|
108
|
+
`)}catch(J){te=J.message}return{displayBody:Y,truncated:se,filterError:te}},[a,S,g,O]);M.useEffect(()=>{if(r.current&&j)try{const Y=g.trim()&&!$?"json":v,se=vn.highlight(j,{language:Y});r.current.innerHTML=se.value}catch{r.current.textContent=j}},[j,v,g,$]);const Q=M.useCallback(async()=>{const Y=j||a||"";try{await navigator.clipboard.writeText(Y),d(!0),setTimeout(()=>d(!1),1500)}catch{const se=document.createElement("textarea");se.value=Y,document.body.appendChild(se),se.select(),document.execCommand("copy"),document.body.removeChild(se),d(!0),setTimeout(()=>d(!1),1500)}},[j,a]);return a?b.jsxs("div",{children:[b.jsxs("div",{className:"body-view__toolbar",children:[S&&b.jsxs("div",{className:"body-view__filter-group",children:[b.jsx("input",{ref:y,className:`body-view__filter${$?" body-view__filter--error":g.trim()?" body-view__filter--active":""}`,type:"text",placeholder:"jq filter, e.g. .data[0].name",value:g,onChange:Y=>p(Y.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:Q,children:f?"Copied!":"Copy"})]}),$&&b.jsx("div",{className:"body-view__filter-error",children:$}),b.jsx("pre",{className:`body-view__pre ${u?"body-view__pre--wrap":"body-view__pre--nowrap"}`,children:b.jsx("code",{ref:r,children:j})}),Z&&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 Rp({headers:a}){if(!a)return null;const i=Array.isArray(a)?a:Object.entries(a).map(([u,s])=>({name:u,value:s}));return i.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:i.map((u,s)=>{const r=u.name||u[0]||"",f=u.value||u[1]||"";return b.jsxs("tr",{children:[b.jsx("td",{children:r}),b.jsx("td",{children:String(f)})]},`${r}-${s}`)})})]})}function H0({responseHeaders:a,requestHeaders:i}){const[u,s]=M.useState(!1);return b.jsxs("div",{children:[b.jsx(Rp,{headers:a}),i&&b.jsxs("div",{children:[b.jsxs("div",{className:"headers-view__section-title",onClick:()=>s(r=>!r),children:[u?"▼":"▶"," Request Headers"]}),u&&b.jsx(Rp,{headers:i})]}),!a&&!i&&b.jsx("div",{style:{color:"var(--fg-muted)"},children:"No headers available"})]})}function L0(a){return a.startsWith("* ")?"verbose-view__line--comment":a.startsWith("> ")?"verbose-view__line--request":a.startsWith("< ")?"verbose-view__line--response":"verbose-view__line--other"}function G0({verbose:a}){const i=M.useMemo(()=>a?a.split(`
|
|
109
|
+
`):[],[a]);return a?b.jsx("div",{className:"verbose-view",children:i.map((u,s)=>b.jsx("div",{className:L0(u),children:u||" "},s))}):b.jsx("div",{style:{color:"var(--fg-muted)"},children:"No verbose output available"})}function Y0({curlCommand:a}){const[i,u]=M.useState(!1),s=M.useCallback(async()=>{if(a)try{await navigator.clipboard.writeText(a),u(!0),setTimeout(()=>u(!1),1500)}catch{const r=document.createElement("textarea");r.value=a,document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r),u(!0),setTimeout(()=>u(!1),1500)}},[a]);return a?b.jsxs("div",{className:"curl-view",children:[b.jsx("button",{className:"copy-btn curl-view__copy-btn",onClick:s,children:i?"Copied!":"Copy"}),b.jsx("pre",{className:"curl-view__pre",children:b.jsx("code",{children:a})})]}):b.jsx("div",{style:{color:"var(--fg-muted)"},children:"No curl command available"})}function X0(a,i){const u=a||"",s=i||"";if(u===""&&s==="")return[];const r=u===""?[]:u.split(`
|
|
110
|
+
`),f=s===""?[]:s.split(`
|
|
111
|
+
`),d=r.length,g=f.length;if(d===0)return f.map(Z=>({type:"add",line:Z}));if(g===0)return r.map(Z=>({type:"remove",line:Z}));const p=d+g,y=new Map;y.set(1,0);const v=[];e:for(let Z=0;Z<=p;Z++){v.push(new Map(y));for(let $=-Z;$<=Z;$+=2){let Q;$===-Z||$!==Z&&(y.get($-1)??-1)<(y.get($+1)??-1)?Q=y.get($+1)??0:Q=(y.get($-1)??0)+1;let Y=Q-$;for(;Q<d&&Y<g&&r[Q]===f[Y];)Q++,Y++;if(y.set($,Q),Q>=d&&Y>=g)break e}}let S=d,O=g;const j=[];for(let Z=v.length-1;Z>=0;Z--){const $=v[Z],Q=S-O;let Y,se;if(Z===0)Y=0,se=0;else{let te;Q===-Z||Q!==Z&&($.get(Q-1)??-1)<($.get(Q+1)??-1)?te=Q+1:te=Q-1,Y=$.get(te)??0,se=Y-te}for(;S>Y&&O>se;)S--,O--,j.unshift({type:"equal",line:r[S]});Z>0&&(S===Y&&O>se?(O--,j.unshift({type:"add",line:f[O]})):S>Y&&(S--,j.unshift({type:"remove",line:r[S]})))}return j}function Z0(a){let i=0,u=0,s=0;for(const r of a)r.type==="add"?i++:r.type==="remove"?u++:s++;return{added:i,removed:u,unchanged:s}}function ku(a){if(!a)return"";try{return JSON.stringify(JSON.parse(a),null,2)}catch{return a}}function Q0({oldBody:a,newBody:i}){const u=M.useMemo(()=>X0(ku(a),ku(i)),[a,i]),s=M.useMemo(()=>Z0(u),[u]);return!a&&!i?b.jsx("div",{style:{color:"var(--fg-muted)"},children:"No responses to compare"}):a===i||ku(a)===ku(i)?b.jsx("div",{className:"diff-view__identical",children:"Responses are identical"}):b.jsxs("div",{className:"diff-view",children:[b.jsxs("div",{className:"diff-view__stats",children:[s.added>0&&b.jsxs("span",{className:"diff-view__stat diff-view__stat--add",children:["+",s.added]}),s.removed>0&&b.jsxs("span",{className:"diff-view__stat diff-view__stat--remove",children:["-",s.removed]}),b.jsxs("span",{className:"diff-view__stat",children:[s.unchanged," unchanged"]})]}),b.jsx("pre",{className:"diff-view__pre",children:u.map((r,f)=>b.jsxs("div",{className:`diff-view__line diff-view__line--${r.type}`,children:[b.jsx("span",{className:"diff-view__gutter",children:r.type==="add"?"+":r.type==="remove"?"-":" "}),b.jsx("span",{className:"diff-view__text",children:r.line})]},f))})]})}function $0({validation:a,expanded:i,onToggle:u}){if(!a)return b.jsx("span",{className:"validation-details",children:b.jsx("span",{className:"validation-details__indicator--none",children:"—"})});const{valid:s,errors:r}=a;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:["✗"," ",(r||[]).length," error(s)"]})}),i&&!s&&r&&r.length>0&&b.jsx("div",{className:"validation-details__errors",children:r.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 zp(a){if(!a)return"";const i=Number(a);return i>=200&&i<300?"response-panel__status--2xx":i>=300&&i<400?"response-panel__status--3xx":i>=400&&i<500?"response-panel__status--4xx":i>=500?"response-panel__status--5xx":""}function V0(a){return a==null?"":a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(2)} MB`}function K0(a){if(!a)return"";const i=Date.now()-new Date(a).getTime(),u=Math.floor(i/1e3);if(u<60)return`${u}s ago`;const s=Math.floor(u/60);if(s<60)return`${s}m ago`;const r=Math.floor(s/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function J0({response:a,sending:i,history:u=[],previousBody:s,onSelectHistoryEntry:r,onClearHistory:f}){const[d,g]=M.useState("body"),[p,y]=M.useState(!0),[v,S]=M.useState(null),[O,j]=M.useState(!1),Z=M.useRef(null);if(M.useEffect(()=>{if(!O)return;function Y(se){Z.current&&!Z.current.contains(se.target)&&j(!1)}return document.addEventListener("mousedown",Y),()=>document.removeEventListener("mousedown",Y)},[O]),i)return b.jsxs("div",{className:"response-panel__loading",children:[b.jsx("span",{className:"request-panel__spinner"}),b.jsx("span",{children:"Sending request..."})]});if(!a)return b.jsx("div",{className:"response-panel__empty",children:"Send a request to see the response"});if(a.error&&!a.status)return b.jsxs("div",{className:"response-panel__empty",style:{color:"var(--method-delete)"},children:["Error: ",a.error]});const $=s!=null&&a.body!=null,Q=["Body","Headers","Verbose","Curl",...$?["Diff"]:[]];return b.jsxs("div",{children:[b.jsxs("div",{className:"response-panel__header",children:[b.jsxs("span",{className:`response-panel__status ${zp(a.status)}`,children:[a.status," ",a.status_text||a.statusText||""]}),a.timing?.total_ms!=null&&b.jsxs("span",{className:"response-panel__meta",children:[a.timing.total_ms," ms"]}),a.size_bytes!=null&&b.jsx("span",{className:"response-panel__meta",children:V0(a.size_bytes)}),a.validation!==void 0&&b.jsx($0,{validation:a.validation,expanded:v??!a.validation?.valid,onToggle:()=>S(Y=>Y===null?a.validation?.valid:!Y)}),u.length>0&&b.jsxs("div",{className:"response-panel__history",ref:Z,children:[b.jsxs("button",{className:"response-panel__history-btn",onClick:()=>j(Y=>!Y),children:["History (",u.length,")"]}),O&&b.jsxs("div",{className:"response-panel__history-dropdown",children:[u.map(Y=>b.jsxs("button",{className:"response-panel__history-item",onClick:()=>{r?.(Y.index),j(!1)},children:[b.jsx("span",{className:`response-panel__status ${zp(Y.status)}`,children:Y.status}),b.jsx("span",{className:"response-panel__history-time",children:Y.timing?.total_ms!=null?`${Y.timing.total_ms}ms`:""}),b.jsx("span",{className:"response-panel__history-ago",children:K0(Y.timestamp)})]},Y.index)),b.jsx("button",{className:"response-panel__history-clear",onClick:()=>{f?.(),j(!1)},children:"Clear history"})]})]})]}),b.jsx("div",{className:"response-panel__tabs",children:Q.map(Y=>b.jsx("button",{className:`response-panel__tab${d===Y.toLowerCase()?" response-panel__tab--active":""}`,onClick:()=>g(Y.toLowerCase()),children:Y},Y))}),d==="body"&&b.jsx(q0,{body:a.body,contentType:a.contentType||a.content_type||a.headers?.["content-type"],wrapEnabled:p,onToggleWrap:()=>y(Y=>!Y)}),d==="headers"&&b.jsx(H0,{responseHeaders:a.headers,requestHeaders:a.requestHeaders||a.request_headers}),d==="verbose"&&b.jsx(G0,{verbose:a.verbose}),d==="curl"&&b.jsx(Y0,{curlCommand:a.curl||a.curlCommand||a.curl_command}),d==="diff"&&$&&b.jsx(Q0,{oldBody:s,newBody:a.body})]})}function W0({pairs:a,onChange:i}){const u=(f,d,g)=>{const p=a.map((y,v)=>v===f?{...y,[d]:g}:y);i(p)},s=()=>{i([...a,{key:"",value:""}])},r=f=>{const d=a.filter((g,p)=>p!==f);i(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:a.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:()=>r(d),title:"Remove",children:"x"})})]},d))})]}),b.jsx("button",{className:"body-editor__kv-add",onClick:s,children:"+ Add Variable"})]})}function Mp(a){return!a||Object.keys(a).length===0?[{key:"",value:""}]:Object.entries(a).map(([i,u])=>({key:i,value:String(u)}))}function Cp(a){const i={};for(const{key:u,value:s}of a)u&&(i[u]=s);return i}function F0({environments:a,onSave:i,onClose:u}){const[s,r]=M.useState("base"),[f,d]=M.useState(""),[g,p]=M.useState({}),[y,v]=M.useState(!1);M.useEffect(()=>{if(!a)return;const Q={};Q.base=Mp(a.base),a.environments&&Object.entries(a.environments).forEach(([Y,se])=>{Q[Y]=Mp(se)}),p(Q)},[a]);const S=["base",...Object.keys(g).filter(Q=>Q!=="base").sort()],O=M.useCallback(()=>{const Q=f.trim();!Q||Q==="base"||g[Q]||(p(Y=>({...Y,[Q]:[{key:"",value:""}]})),d(""),r(Q))},[f,g]),j=M.useCallback(async Q=>{if(Q==="base")return;const Y=a?.environments&&Q in a.environments;try{Y&&await zy(Q),p(se=>{const te={...se};return delete te[Q],te}),r("base"),Y&&i&&i()}catch{}},[i,a]),Z=M.useCallback(async()=>{v(!0);try{g.base&&await jy(Cp(g.base));for(const[Q,Y]of Object.entries(g))Q!=="base"&&await wy(Q,Cp(Y));i&&i()}catch{}finally{v(!1)}},[g,i]),$=M.useCallback(Q=>{Q.key==="Escape"&&u()},[u]);return M.useEffect(()=>(document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)),[$]),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:S.map(Q=>b.jsx("button",{className:`env-editor__tab${s===Q?" env-editor__tab--active":""}`,onClick:()=>r(Q),children:Q==="base"?"Base":Q},Q))}),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:Q=>d(Q.target.value),onKeyDown:Q=>{Q.key==="Enter"&&O()}}),b.jsx("button",{className:"topbar__btn",onClick:O,children:"Add"})]}),g[s]&&b.jsx(W0,{pairs:g[s],onChange:Q=>p(Y=>({...Y,[s]:Q}))})]}),b.jsxs("div",{className:"env-editor__footer",children:[s!=="base"&&b.jsxs("button",{className:"env-editor__delete-btn",onClick:()=>j(s),children:['Delete "',s,'"']}),b.jsx("button",{className:"env-editor__save-btn",onClick:Z,disabled:y,children:y?"Saving...":"Save"})]})]})]})}function I0(a,i){const u=a.toLowerCase(),s=i.toLowerCase();let r=0;for(let f=0;f<s.length&&r<u.length;f++)s[f]===u[r]&&r++;return r===u.length}function Ir(a,i,u){return i?a.filter(s=>u(s).some(r=>r&&I0(i,r))):a}function P0({visible:a,onClose:i,projects:u,endpoints:s,actions:r,onSelectProject:f,onSelectEndpoint:d,onAction:g}){const[p,y]=M.useState(""),[v,S]=M.useState(0),O=M.useRef(null),j=M.useMemo(()=>{const J=[];if(!p)r&&r.length>0&&r.forEach(I=>J.push({type:"action",item:I})),u&&u.length>0&&u.forEach(I=>J.push({type:"project",item:I})),s&&s.length>0&&s.slice(0,20).forEach(I=>J.push({type:"endpoint",item:I}));else{const I=Ir(r||[],p,D=>[D.label]),ge=Ir(u||[],p,D=>[D.name,D.path]),oe=Ir(s||[],p,D=>[D.method,D.path,D.summary,...D.tags||[]]);I.slice(0,5).forEach(D=>J.push({type:"action",item:D})),ge.slice(0,5).forEach(D=>J.push({type:"project",item:D})),oe.forEach(D=>J.push({type:"endpoint",item:D}))}return J},[p,u,s,r]);M.useEffect(()=>{S(0)},[p]),M.useEffect(()=>{a&&O.current&&O.current.focus()},[a]),M.useEffect(()=>{a&&y("")},[a]);const Z=M.useCallback(J=>{J.type==="action"&&g?g(J.item):J.type==="project"&&f?f(J.item):J.type==="endpoint"&&d&&d(J.item)},[g,f,d]),$=M.useCallback(J=>{J.key==="Escape"?(J.preventDefault(),i()):J.key==="ArrowDown"?(J.preventDefault(),S(I=>Math.min(I+1,j.length-1))):J.key==="ArrowUp"?(J.preventDefault(),S(I=>Math.max(I-1,0))):J.key==="Enter"&&(J.preventDefault(),j[v]&&Z(j[v]))},[i,j,v,Z]);if(!a)return null;const Q=j.filter(J=>J.type==="action"),Y=j.filter(J=>J.type==="project"),se=j.filter(J=>J.type==="endpoint");let te=0;return b.jsxs("div",{className:"command-palette",children:[b.jsx("div",{className:"command-palette__backdrop",onClick:i}),b.jsxs("div",{className:"command-palette__dialog",children:[b.jsx("input",{ref:O,className:"command-palette__input",type:"text",placeholder:"Search actions, projects, and endpoints...",value:p,onChange:J=>y(J.target.value),onKeyDown:$}),b.jsxs("div",{className:"command-palette__results",children:[Q.length>0&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"command-palette__section-title",children:"Actions"}),Q.map(J=>{const I=te++;return b.jsxs("div",{className:`command-palette__item${I===v?" command-palette__item--active":""}`,onClick:()=>Z(J),onMouseEnter:()=>S(I),children:[b.jsx("span",{className:"command-palette__item-label",children:J.item.label}),J.item.shortcut&&b.jsx("span",{className:"command-palette__item-shortcut",children:J.item.shortcut})]},`act-${J.item.id}`)})]}),Y.length>0&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"command-palette__section-title",children:"Projects"}),Y.map(J=>{const I=te++;return b.jsxs("div",{className:`command-palette__item${I===v?" command-palette__item--active":""}`,onClick:()=>Z(J),onMouseEnter:()=>S(I),children:[b.jsx("span",{className:"command-palette__item-label",children:J.item.name||J.item.path}),J.item.name&&b.jsx("span",{className:"command-palette__item-detail",children:J.item.path})]},`proj-${J.item.path}`)})]}),se.length>0&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"command-palette__section-title",children:"Endpoints"}),se.map(J=>{const I=J.item,ge=te++;return b.jsxs("div",{className:`command-palette__item${ge===v?" command-palette__item--active":""}`,onClick:()=>Z(J),onMouseEnter:()=>S(ge),children:[b.jsx("span",{className:`endpoint-item__method endpoint-item__method--${(I.method||"").toLowerCase()}`,children:(I.method||"").toUpperCase()}),b.jsx("span",{className:"command-palette__item-label",children:I.path}),I.summary&&b.jsx("span",{className:"command-palette__item-detail",children:I.summary})]},`ep-${I.method}-${I.path}`)})]}),j.length===0&&p&&b.jsx("div",{style:{padding:"16px",color:"var(--fg-muted)",textAlign:"center"},children:"No results found"})]})]})]})}function ev({visible:a,onClose:i,projects:u,currentProject:s,onSwitch:r,onAdd:f,onRemove:d}){const[g,p]=M.useState(""),[y,v]=M.useState(0),[S,O]=M.useState(null),[j,Z]=M.useState(null),[$,Q]=M.useState(null),[Y,se]=M.useState("bookmarks"),te=M.useRef(null);M.useEffect(()=>{if(a){const D=s?.path||"",le=!!D;p(le?D+"/":""),v(0),O(le?D:null),Z(null),Q(null),se(le?"browse":"bookmarks"),setTimeout(()=>te.current?.focus(),0)}},[a]),M.useEffect(()=>{S!==null&&(Q(null),qy(S).then(D=>{Z(D),v(0)}).catch(D=>{Q(D.message||"Cannot browse"),Z(null)}))},[S]),M.useEffect(()=>{if(g.startsWith("/")||g.startsWith("~")){se("browse");const D=g.lastIndexOf("/"),le=D<=0?g.startsWith("~")?"~":"/":g.slice(0,D)||"/";le!==S&&O(le)}else Y==="browse"&&!g&&(se("bookmarks"),O(null),Z(null))},[g]);const I=M.useCallback(()=>{if(Y==="browse"&&j){const ke=g.slice((S||"").length).replace(/^\//,"").toLowerCase();let P=[];ke||(j.parent&&P.push({type:"parent",path:j.parent,label:"..",detail:j.parent}),j.has_spec&&P.push({type:"open",path:j.path,label:". (open this directory)",detail:`spec: ${j.spec_file}`,hasSpec:!0}));for(const Se of j.dirs)ke&&!Se.toLowerCase().includes(ke)||P.push({type:"dir",path:`${j.path}/${Se}`,label:Se,detail:null});return P}const D=g.toLowerCase();let le=[];if(u&&u.length>0){const ke=D?u.filter(P=>P.name.toLowerCase().includes(D)||P.path.toLowerCase().includes(D)):u;for(const P of ke)le.push({type:"project",path:P.path,label:P.name,detail:P.path,isCurrent:P.path===s?.path})}return le.length===0&&!D&&le.push({type:"hint",label:"Type a path (e.g. /home/user/my-api) to browse",detail:""}),le},[Y,j,S,g,u,s])(),ge=M.useCallback(async D=>{if(!(!D||D.type==="hint")){if(D.type==="parent"){const le=D.path;p(le+"/"),O(le),v(0);return}if(D.type==="dir"){p(D.path+"/"),O(D.path),v(0);return}try{await r(D.path),i()}catch(le){Q(le.message||"Failed to open project")}}},[r,i]),oe=M.useCallback(D=>{if(D.key==="Escape")D.preventDefault(),i();else if(D.key==="ArrowDown")D.preventDefault(),v(le=>Math.min(le+1,I.length-1));else if(D.key==="ArrowUp")D.preventDefault(),v(le=>Math.max(le-1,0));else if(D.key==="Enter")if(D.preventDefault(),Y==="browse"&&g&&!g.endsWith("/")){const le=g.replace(/\/$/,"");r(le).then(()=>i()).catch(ke=>{Q(ke.message||"Failed to open")})}else I[y]&&ge(I[y]);else if(D.key==="Tab"){D.preventDefault();const le=I[y];le&&(le.type==="dir"||le.type==="parent")&&ge(le)}},[i,I,y,ge,Y,g,r]);return a?b.jsxs("div",{className:"command-palette",children:[b.jsx("div",{className:"command-palette__backdrop",onClick:i}),b.jsxs("div",{className:"command-palette__dialog",children:[b.jsx("input",{ref:te,className:"command-palette__input",type:"text",placeholder:"Search bookmarks or type /path/to/project...",value:g,onChange:D=>p(D.target.value),onKeyDown:oe}),$&&b.jsx("div",{style:{padding:"8px 16px",fontSize:"12px",color:"var(--method-delete)"},children:$}),Y==="browse"&&j&&b.jsxs("div",{className:"command-palette__section-title",style:{display:"flex",justifyContent:"space-between"},children:[b.jsx("span",{children:j.path}),j.has_spec&&b.jsx("span",{style:{color:"var(--method-get)"},children:"spec found"})]}),b.jsxs("div",{className:"command-palette__results",children:[Y==="bookmarks"&&I.some(D=>D.type==="project")&&b.jsx("div",{className:"command-palette__section-title",children:"Bookmarked Projects"}),I.map((D,le)=>{if(D.type==="hint")return b.jsx("div",{style:{padding:"16px",color:"var(--fg-muted)",textAlign:"center",fontSize:"13px"},children:D.label},"hint");const ke=D.type==="parent"?"← ":D.type==="dir"?"📁 ":D.type==="open"?"→ ":D.isCurrent?"● ":"";return b.jsxs("div",{className:`command-palette__item${le===y?" command-palette__item--active":""}`,onClick:()=>ge(D),onMouseEnter:()=>v(le),children:[b.jsxs("span",{className:"command-palette__item-label",children:[ke,D.label]}),D.detail&&b.jsx("span",{className:"command-palette__item-detail",children:D.detail})]},`${D.type}-${D.path}`)}),I.length===0&&Y==="browse"&&b.jsx("div",{style:{padding:"16px",color:"var(--fg-muted)",textAlign:"center"},children:j?"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 kp({onResize:a,onResizeStart:i,direction:u="horizontal"}){const s=M.useRef(!1),r=M.useCallback(f=>{f.preventDefault(),s.current=!0;const d=f.clientX,g=f.clientY;i&&i();const p=v=>{if(!s.current)return;const S=u==="horizontal"?v.clientX-d:v.clientY-g;a(S)},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)},[a,i,u]);return b.jsx("div",{className:`resize-handle resize-handle--${u}`,onMouseDown:r})}function tv(a){return a==="auto"?window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark":a==="light"?"light":"dark"}function Dp(a){const i=tv(a);document.documentElement.setAttribute("data-theme",i);try{localStorage.setItem("apigrip:theme",a)}catch{}}function lv(){const[a,i]=M.useState(null),[u,s]=M.useState([]),[r,f]=M.useState([]),[d,g]=M.useState(null),[p,y]=M.useState(null),[v,S]=M.useState({}),[O,j]=M.useState(null),[Z,$]=M.useState(!1),[Q,Y]=M.useState(null),[se,te]=M.useState({global:{},project:{}}),[J,I]=M.useState(null),[ge,oe]=M.useState(null),[D,le]=M.useState(null),[ke,P]=M.useState({}),[Se,Ye]=M.useState(!1),[Ze,Qe]=M.useState(!1),[k,K]=M.useState(!1),[ae,Ae]=M.useState("tag"),[je,E]=M.useState({}),[L,F]=M.useState(""),[ne,be]=M.useState(0),[xe,De]=M.useState({}),[Et,Fe]=M.useState([]),[Xt,Sn]=M.useState(()=>{try{return Number(localStorage.getItem("apigrip:sidebarWidth"))||280}catch{return 280}}),[Cl,Ta]=M.useState(()=>{try{return Number(localStorage.getItem("apigrip:requestPanelRatio"))||.5}catch{return .5}}),ol=M.useRef(280),_n=M.useRef(.5),$l=M.useRef(null),In=M.useRef(null),Tl=M.useRef(null),xn=M.useRef(v),kl=M.useRef(d),Dl=M.useRef(null),Na=M.useRef(null);xn.current=v,kl.current=d;const It=M.useCallback((A,q,de)=>`apigrip:${A}:${q}:${de}`,[]),lt=M.useCallback((A,q,de)=>{try{localStorage.setItem(It("params",A,q),JSON.stringify(de))}catch{}},[It]),Pn=M.useCallback((A,q)=>{try{const de=localStorage.getItem(It("params",A,q));return de?JSON.parse(de):null}catch{return null}},[It]),Pt=M.useCallback((A,q,de)=>{try{localStorage.setItem(It("response",A,q),JSON.stringify(de))}catch{}},[It]),Ul=M.useCallback((A,q)=>{try{const de=localStorage.getItem(It("response",A,q));return de?JSON.parse(de):null}catch{return null}},[It]),Bl=M.useCallback(()=>{if(Tl.current&&kl.current){clearTimeout(Tl.current),Tl.current=null;const A=kl.current;fp(A.method,A.path,xn.current).catch(()=>{})}},[]),qt=M.useCallback(A=>{I(A),In.current&&clearTimeout(In.current),In.current=setTimeout(()=>I(null),3e3)},[]),Nl=M.useCallback(async()=>{const[A,q]=await Promise.allSettled([Hy(),Ru()]);te(A.status==="fulfilled"?A.value||{global:{},project:{}}:{global:{},project:{}}),s(q.status==="fulfilled"?q.value||[]:[]);const de=A.status==="fulfilled"&&(A.value?.global?.theme||A.value?.project?.theme)||"auto";Dp(de);try{const ve=await xy();i(ve),Y(ve.git||null)}catch{i(null),Y(null)}try{const ve=await rp();f(Array.isArray(ve)?ve:[])}catch{f([])}try{const ve=await op();oe(ve),le(ve.active||null);const Ht=await Jr();P(Ht||{})}catch{}},[]);M.useEffect(()=>{Nl()},[Nl]),M.useEffect(()=>{const A=Gy({onSpecReloaded:()=>{rp().then(q=>f(Array.isArray(q)?q:[])).catch(()=>{}),qt("Spec reloaded")},onSpecError:q=>{qt(`Spec error: ${q.message||"unknown"}`)},onGitChanged:q=>{Y(q)},onProjectSwitched:()=>{Nl()}});return()=>A.disconnect()},[Nl,qt]);const Aa=M.useCallback(async A=>{Bl(),g(A),be(0),De({});const q=Pn(A.method,A.path);q&&S(q);const de=Ul(A.method,A.path);j(de||null);try{const ve=await Ay(A.method,A.path);y(ve);const Al=await My(A.method,A.path)||{};S(Al),lt(A.method,A.path,Al)}catch(ve){console.error("Failed to load endpoint:",ve)}try{const ve=await hp(A.method,A.path);Fe(ve||[])}catch{Fe([])}},[Bl,Pn,Ul,lt]),fi=M.useCallback(A=>{S(A),d&&(lt(d.method,d.path,A),Tl.current&&clearTimeout(Tl.current),Tl.current=setTimeout(()=>{fp(d.method,d.path,A).catch(()=>{})},500))},[d,lt]),el=M.useCallback(async()=>{if(!p||Z)return;const A=`req-${Date.now()}`;Dl.current=A,Na.current=O?.body||null,$(!0),j(null);try{const de=(p.servers||[])[ne]||{},ve={method:p.method,path:p.path,params:v,server_index:ne,server_variables:xe,request_id:A},Ht=await Cy(ve);j(Ht),Pt(p.method,p.path,Ht);try{const Al=await hp(p.method,p.path);Fe(Al||[])}catch{}}catch(q){const de={error:q.message};j(de),Pt(p.method,p.path,de)}finally{Dl.current=null,$(!1)}},[p,v,Z,ne,xe,Pt]),Nt=M.useCallback(async()=>{const A=Dl.current;if(A){try{await ky(A)}catch{}Dl.current=null,$(!1),j({error:"Request cancelled"})}},[]),fl=M.useCallback(async A=>{if(p)try{const q=await Uy(p.method,p.path,A);q&&j(q)}catch(q){console.error("Failed to load history entry:",q)}},[p]),Ot=M.useCallback(async()=>{if(p)try{await By(p.method,p.path),Fe([])}catch(A){console.error("Failed to clear history:",A)}},[p]),Vl=M.useCallback(async A=>{try{await Ey(A),await Nl(),g(null),y(null),j(null),Fe([]),qt("Project switched")}catch(q){qt(`Failed to switch: ${q.message}`)}},[Nl,qt]),ea=M.useCallback(async A=>{await Ty(A);const q=await Ru();s(q||[])},[]),Oa=M.useCallback(async A=>{await Ny(A);const q=await Ru();s(q||[])},[]),Kl=M.useCallback(async A=>{try{await Ry(A),le(A);const q=await Jr();P(q||{})}catch(q){qt(`Failed to set env: ${q.message}`)}},[qt]),En=M.useCallback(async()=>{try{const A=await op();oe(A);const q=await Jr();P(q||{}),qt("Environments saved")}catch(A){qt(`Env error: ${A.message}`)}},[qt]),Jl=M.useCallback(()=>{ol.current=Xt},[Xt]),kt=M.useCallback(A=>{const q=Math.max(160,Math.min(600,ol.current+A));Sn(q);try{localStorage.setItem("apigrip:sidebarWidth",String(q))}catch{}},[]),x=M.useCallback(()=>{_n.current=Cl},[Cl]),H=M.useCallback(A=>{if(!$l.current)return;const q=$l.current.offsetWidth;if(q<=0)return;const de=Math.max(.2,Math.min(.8,_n.current+A/q));Ta(de);try{localStorage.setItem("apigrip:requestPanelRatio",String(de))}catch{}},[]),pe=navigator.platform?.startsWith("Mac")||navigator.userAgent?.includes("Mac")?"⌘":"Ctrl",Xe=M.useCallback(async()=>{const A=se?.global?.theme||se?.project?.theme||"auto",q=A==="auto"?"light":A==="light"?"dark":"auto";try{await Ly({global:{theme:q}}),Dp(q),te(de=>({...de,global:{...de.global,theme:q}}))}catch{}},[se]),qe=M.useCallback(async()=>{if(window.apigrip?.pickDirectory){const A=await window.apigrip.pickDirectory();A&&Vl(A)}else K(!0)},[Vl]),ue=M.useMemo(()=>[{id:"env-editor",label:"Edit Environments",shortcut:`${pe}+E`,handler:()=>Ye(!0)},{id:"open-project",label:"Open Project",shortcut:`${pe}+O`,handler:qe},{id:"toggle-theme",label:"Toggle Theme",shortcut:`${pe}+Shift+L`,handler:Xe},{id:"toggle-view",label:"Toggle View Mode (Tag/Tree)",shortcut:null,handler:()=>Ae(A=>A==="tag"?"tree":"tag")},{id:"send-request",label:"Send Request",shortcut:`${pe}+Enter`,handler:el}],[Xe,el,qe,pe]);return M.useEffect(()=>{Ze&&Ru().then(A=>s(A||[])).catch(()=>{})},[Ze]),M.useEffect(()=>{const A=window.matchMedia("(prefers-color-scheme: light)"),q=()=>{(se?.global?.theme||"auto")==="auto"&&document.documentElement.setAttribute("data-theme",A.matches?"light":"dark")};return A.addEventListener("change",q),()=>A.removeEventListener("change",q)},[se]),M.useEffect(()=>{function A(q){const de=q.ctrlKey||q.metaKey;de&&q.key==="p"&&(q.preventDefault(),Qe(ve=>!ve)),de&&q.key==="Enter"&&(q.preventDefault(),el()),de&&q.key==="o"&&(q.preventDefault(),qe()),de&&q.key==="e"&&(q.preventDefault(),Ye(ve=>!ve)),de&&q.shiftKey&&(q.key==="L"||q.key==="l")&&(q.preventDefault(),Xe())}return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[el,Xe,qe]),b.jsxs("div",{className:"app",children:[b.jsx(Yy,{project:a,git:Q,environments:ge,activeEnv:D,onSwitchProject:Vl,onSetActiveEnv:Kl,onOpenEnvEditor:()=>Ye(!0),onOpenProjectDialog:qe,toast:J,projects:u,servers:p?.servers||[],serverIndex:ne,onServerIndexChange:be,sending:Z,onSend:el,onCancel:Nt,hasEndpoint:!!p}),b.jsxs("div",{className:"app__body",children:[b.jsx("div",{className:"app__sidebar",style:{width:Xt},children:b.jsx($y,{endpoints:r,selectedEndpoint:d,onSelect:Aa,viewMode:ae,onToggleViewMode:()=>Ae(A=>A==="tag"?"tree":"tag"),treeCollapseState:je,onToggleTreeNode:A=>E(q=>({...q,[A]:!q[A]})),searchTerm:L,onSearchChange:F})}),b.jsx(kp,{direction:"horizontal",onResize:kt,onResizeStart:Jl}),b.jsxs("div",{className:"app__main",ref:$l,children:[b.jsx("div",{className:"app__request-panel",style:{flex:`${Cl} 0 0%`},children:b.jsx(n0,{spec:a,endpoint:p,params:v,onParamsChange:fi,serverIndex:ne,onServerIndexChange:be,serverVariables:xe,onServerVariablesChange:De,preferences:se,resolvedEnv:ke})}),b.jsx(kp,{direction:"horizontal",onResize:H,onResizeStart:x}),b.jsx("div",{className:"app__response-panel",style:{flex:`${1-Cl} 0 0%`},children:b.jsx(J0,{response:O,sending:Z,history:Et,previousBody:Na.current,onSelectHistoryEntry:fl,onClearHistory:Ot})})]})]}),Se&&b.jsx(F0,{environments:ge,onSave:En,onClose:()=>Ye(!1)}),Ze&&b.jsx(P0,{visible:Ze,onClose:()=>Qe(!1),projects:u,endpoints:r,actions:ue,onSelectProject:A=>{Vl(A.path),Qe(!1)},onSelectEndpoint:A=>{Aa(A),Qe(!1)},onAction:A=>{A.handler(),Qe(!1)}}),b.jsx(ev,{visible:k,onClose:()=>K(!1),projects:u,currentProject:a,onSwitch:Vl,onAdd:ea,onRemove:Oa})]})}Sy.createRoot(document.getElementById("root")).render(b.jsx(lv,{}));
|