apigrip 0.8.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const f of o)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 c(o){const f={};return o.integrity&&(f.integrity=o.integrity),o.referrerPolicy&&(f.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?f.credentials="include":o.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function s(o){if(o.ep)return;o.ep=!0;const f=c(o);fetch(o.href,f)}})();function Fy(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var qr={exports:{}},eu={};var Kd;function Iy(){if(Kd)return eu;Kd=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function c(s,o,f){var d=null;if(f!==void 0&&(d=""+f),o.key!==void 0&&(d=""+o.key),"key"in o){f={};for(var y in o)y!=="key"&&(f[y]=o[y])}else f=o;return o=f.ref,{$$typeof:a,type:s,key:d,ref:o!==void 0?o:null,props:f}}return eu.Fragment=i,eu.jsx=c,eu.jsxs=c,eu}var Jd;function Py(){return Jd||(Jd=1,qr.exports=Iy()),qr.exports}var m=Py(),Br={exports:{}},tu={},Hr={exports:{}},Lr={};var $d;function em(){return $d||($d=1,(function(a){function i(C,F){var oe=C.length;C.push(F);e:for(;0<oe;){var De=oe-1>>>1,qe=C[De];if(0<o(qe,F))C[De]=F,C[oe]=qe,oe=De;else break e}}function c(C){return C.length===0?null:C[0]}function s(C){if(C.length===0)return null;var F=C[0],oe=C.pop();if(oe!==F){C[0]=oe;e:for(var De=0,qe=C.length,_=qe>>>1;De<_;){var B=2*(De+1)-1,P=C[B],le=B+1,me=C[le];if(0>o(P,oe))le<qe&&0>o(me,P)?(C[De]=me,C[le]=oe,De=le):(C[De]=P,C[B]=oe,De=B);else if(le<qe&&0>o(me,oe))C[De]=me,C[le]=oe,De=le;else break e}}return F}function o(C,F){var oe=C.sortIndex-F.sortIndex;return oe!==0?oe:C.id-F.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,y=d.now();a.unstable_now=function(){return d.now()-y}}var g=[],b=[],E=1,j=null,G=3,L=!1,I=!1,Q=!1,V=!1,ee=typeof setTimeout=="function"?setTimeout:null,ye=typeof clearTimeout=="function"?clearTimeout:null,ne=typeof setImmediate<"u"?setImmediate:null;function $(C){for(var F=c(b);F!==null;){if(F.callback===null)s(b);else if(F.startTime<=C)s(b),F.sortIndex=F.expirationTime,i(g,F);else break;F=c(b)}}function Y(C){if(Q=!1,$(C),!I)if(c(g)!==null)I=!0,ce||(ce=!0,Te());else{var F=c(b);F!==null&&ot(Y,F.startTime-C)}}var ce=!1,se=-1,Z=5,ge=-1;function ct(){return V?!0:!(a.unstable_now()-ge<Z)}function te(){if(V=!1,ce){var C=a.unstable_now();ge=C;var F=!0;try{e:{I=!1,Q&&(Q=!1,ye(se),se=-1),L=!0;var oe=G;try{t:{for($(C),j=c(g);j!==null&&!(j.expirationTime>C&&ct());){var De=j.callback;if(typeof De=="function"){j.callback=null,G=j.priorityLevel;var qe=De(j.expirationTime<=C);if(C=a.unstable_now(),typeof qe=="function"){j.callback=qe,$(C),F=!0;break t}j===c(g)&&s(g),$(C)}else s(g);j=c(g)}if(j!==null)F=!0;else{var _=c(b);_!==null&&ot(Y,_.startTime-C),F=!1}}break e}finally{j=null,G=oe,L=!1}F=void 0}}finally{F?Te():ce=!1}}}var Te;if(typeof ne=="function")Te=function(){ne(te)};else if(typeof MessageChannel<"u"){var et=new MessageChannel,it=et.port2;et.port1.onmessage=te,Te=function(){it.postMessage(null)}}else Te=function(){ee(te,0)};function ot(C,F){se=ee(function(){C(a.unstable_now())},F)}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(C){C.callback=null},a.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<C?Math.floor(1e3/C):5},a.unstable_getCurrentPriorityLevel=function(){return G},a.unstable_next=function(C){switch(G){case 1:case 2:case 3:var F=3;break;default:F=G}var oe=G;G=F;try{return C()}finally{G=oe}},a.unstable_requestPaint=function(){V=!0},a.unstable_runWithPriority=function(C,F){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var oe=G;G=C;try{return F()}finally{G=oe}},a.unstable_scheduleCallback=function(C,F,oe){var De=a.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?De+oe:De):oe=De,C){case 1:var qe=-1;break;case 2:qe=250;break;case 5:qe=1073741823;break;case 4:qe=1e4;break;default:qe=5e3}return qe=oe+qe,C={id:E++,callback:F,priorityLevel:C,startTime:oe,expirationTime:qe,sortIndex:-1},oe>De?(C.sortIndex=oe,i(b,C),c(g)===null&&C===c(b)&&(Q?(ye(se),se=-1):Q=!0,ot(Y,oe-De))):(C.sortIndex=qe,i(g,C),I||L||(I=!0,ce||(ce=!0,Te()))),C},a.unstable_shouldYield=ct,a.unstable_wrapCallback=function(C){var F=G;return function(){var oe=G;G=F;try{return C.apply(this,arguments)}finally{G=oe}}}})(Lr)),Lr}var Wd;function tm(){return Wd||(Wd=1,Hr.exports=em()),Hr.exports}var Gr={exports:{}},be={};var Fd;function lm(){if(Fd)return be;Fd=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),G=Symbol.iterator;function L(_){return _===null||typeof _!="object"?null:(_=G&&_[G]||_["@@iterator"],typeof _=="function"?_:null)}var I={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q=Object.assign,V={};function ee(_,B,P){this.props=_,this.context=B,this.refs=V,this.updater=P||I}ee.prototype.isReactComponent={},ee.prototype.setState=function(_,B){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,B,"setState")},ee.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function ye(){}ye.prototype=ee.prototype;function ne(_,B,P){this.props=_,this.context=B,this.refs=V,this.updater=P||I}var $=ne.prototype=new ye;$.constructor=ne,Q($,ee.prototype),$.isPureReactComponent=!0;var Y=Array.isArray;function ce(){}var se={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function ge(_,B,P){var le=P.ref;return{$$typeof:a,type:_,key:B,ref:le!==void 0?le:null,props:P}}function ct(_,B){return ge(_.type,B,_.props)}function te(_){return typeof _=="object"&&_!==null&&_.$$typeof===a}function Te(_){var B={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(P){return B[P]})}var et=/\/+/g;function it(_,B){return typeof _=="object"&&_!==null&&_.key!=null?Te(""+_.key):B.toString(36)}function ot(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(ce,ce):(_.status="pending",_.then(function(B){_.status==="pending"&&(_.status="fulfilled",_.value=B)},function(B){_.status==="pending"&&(_.status="rejected",_.reason=B)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function C(_,B,P,le,me){var ve=typeof _;(ve==="undefined"||ve==="boolean")&&(_=null);var we=!1;if(_===null)we=!0;else switch(ve){case"bigint":case"string":case"number":we=!0;break;case"object":switch(_.$$typeof){case a:case i:we=!0;break;case E:return we=_._init,C(we(_._payload),B,P,le,me)}}if(we)return me=me(_),we=le===""?"."+it(_,0):le,Y(me)?(P="",we!=null&&(P=we.replace(et,"$&/")+"/"),C(me,B,P,"",function(Gt){return Gt})):me!=null&&(te(me)&&(me=ct(me,P+(me.key==null||_&&_.key===me.key?"":(""+me.key).replace(et,"$&/")+"/")+we)),B.push(me)),1;we=0;var Tt=le===""?".":le+":";if(Y(_))for(var Ke=0;Ke<_.length;Ke++)le=_[Ke],ve=Tt+it(le,Ke),we+=C(le,B,P,ve,me);else if(Ke=L(_),typeof Ke=="function")for(_=Ke.call(_),Ke=0;!(le=_.next()).done;)le=le.value,ve=Tt+it(le,Ke++),we+=C(le,B,P,ve,me);else if(ve==="object"){if(typeof _.then=="function")return C(ot(_),B,P,le,me);throw B=String(_),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return we}function F(_,B,P){if(_==null)return _;var le=[],me=0;return C(_,le,"","",function(ve){return B.call(P,ve,me++)}),le}function oe(_){if(_._status===-1){var B=_._result;B=B(),B.then(function(P){(_._status===0||_._status===-1)&&(_._status=1,_._result=P)},function(P){(_._status===0||_._status===-1)&&(_._status=2,_._result=P)}),_._status===-1&&(_._status=0,_._result=B)}if(_._status===1)return _._result.default;throw _._result}var De=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},qe={map:F,forEach:function(_,B,P){F(_,function(){B.apply(this,arguments)},P)},count:function(_){var B=0;return F(_,function(){B++}),B},toArray:function(_){return F(_,function(B){return B})||[]},only:function(_){if(!te(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return be.Activity=j,be.Children=qe,be.Component=ee,be.Fragment=c,be.Profiler=o,be.PureComponent=ne,be.StrictMode=s,be.Suspense=g,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=se,be.__COMPILER_RUNTIME={__proto__:null,c:function(_){return se.H.useMemoCache(_)}},be.cache=function(_){return function(){return _.apply(null,arguments)}},be.cacheSignal=function(){return null},be.cloneElement=function(_,B,P){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var le=Q({},_.props),me=_.key;if(B!=null)for(ve in B.key!==void 0&&(me=""+B.key),B)!Z.call(B,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&B.ref===void 0||(le[ve]=B[ve]);var ve=arguments.length-2;if(ve===1)le.children=P;else if(1<ve){for(var we=Array(ve),Tt=0;Tt<ve;Tt++)we[Tt]=arguments[Tt+2];le.children=we}return ge(_.type,me,le)},be.createContext=function(_){return _={$$typeof:d,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:f,_context:_},_},be.createElement=function(_,B,P){var le,me={},ve=null;if(B!=null)for(le in B.key!==void 0&&(ve=""+B.key),B)Z.call(B,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(me[le]=B[le]);var we=arguments.length-2;if(we===1)me.children=P;else if(1<we){for(var Tt=Array(we),Ke=0;Ke<we;Ke++)Tt[Ke]=arguments[Ke+2];me.children=Tt}if(_&&_.defaultProps)for(le in we=_.defaultProps,we)me[le]===void 0&&(me[le]=we[le]);return ge(_,ve,me)},be.createRef=function(){return{current:null}},be.forwardRef=function(_){return{$$typeof:y,render:_}},be.isValidElement=te,be.lazy=function(_){return{$$typeof:E,_payload:{_status:-1,_result:_},_init:oe}},be.memo=function(_,B){return{$$typeof:b,type:_,compare:B===void 0?null:B}},be.startTransition=function(_){var B=se.T,P={};se.T=P;try{var le=_(),me=se.S;me!==null&&me(P,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(ce,De)}catch(ve){De(ve)}finally{B!==null&&P.types!==null&&(B.types=P.types),se.T=B}},be.unstable_useCacheRefresh=function(){return se.H.useCacheRefresh()},be.use=function(_){return se.H.use(_)},be.useActionState=function(_,B,P){return se.H.useActionState(_,B,P)},be.useCallback=function(_,B){return se.H.useCallback(_,B)},be.useContext=function(_){return se.H.useContext(_)},be.useDebugValue=function(){},be.useDeferredValue=function(_,B){return se.H.useDeferredValue(_,B)},be.useEffect=function(_,B){return se.H.useEffect(_,B)},be.useEffectEvent=function(_){return se.H.useEffectEvent(_)},be.useId=function(){return se.H.useId()},be.useImperativeHandle=function(_,B,P){return se.H.useImperativeHandle(_,B,P)},be.useInsertionEffect=function(_,B){return se.H.useInsertionEffect(_,B)},be.useLayoutEffect=function(_,B){return se.H.useLayoutEffect(_,B)},be.useMemo=function(_,B){return se.H.useMemo(_,B)},be.useOptimistic=function(_,B){return se.H.useOptimistic(_,B)},be.useReducer=function(_,B,P){return se.H.useReducer(_,B,P)},be.useRef=function(_){return se.H.useRef(_)},be.useState=function(_){return se.H.useState(_)},be.useSyncExternalStore=function(_,B,P){return se.H.useSyncExternalStore(_,B,P)},be.useTransition=function(){return se.H.useTransition()},be.version="19.2.4",be}var Id;function to(){return Id||(Id=1,Gr.exports=lm()),Gr.exports}var Yr={exports:{}},qt={};var Pd;function nm(){if(Pd)return qt;Pd=1;var a=to();function i(g){var b="https://react.dev/errors/"+g;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)b+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+g+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var s={d:{f:c,r:function(){throw Error(i(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},o=Symbol.for("react.portal");function f(g,b,E){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:j==null?null:""+j,children:g,containerInfo:b,implementation:E}}var d=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(g,b){if(g==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,qt.createPortal=function(g,b){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(i(299));return f(g,b,null,E)},qt.flushSync=function(g){var b=d.T,E=s.p;try{if(d.T=null,s.p=2,g)return g()}finally{d.T=b,s.p=E,s.d.f()}},qt.preconnect=function(g,b){typeof g=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,s.d.C(g,b))},qt.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},qt.preinit=function(g,b){if(typeof g=="string"&&b&&typeof b.as=="string"){var E=b.as,j=y(E,b.crossOrigin),G=typeof b.integrity=="string"?b.integrity:void 0,L=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;E==="style"?s.d.S(g,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:j,integrity:G,fetchPriority:L}):E==="script"&&s.d.X(g,{crossOrigin:j,integrity:G,fetchPriority:L,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},qt.preinitModule=function(g,b){if(typeof g=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var E=y(b.as,b.crossOrigin);s.d.M(g,{crossOrigin:E,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&s.d.M(g)},qt.preload=function(g,b){if(typeof g=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var E=b.as,j=y(E,b.crossOrigin);s.d.L(g,E,{crossOrigin:j,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},qt.preloadModule=function(g,b){if(typeof g=="string")if(b){var E=y(b.as,b.crossOrigin);s.d.m(g,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:E,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else s.d.m(g)},qt.requestFormReset=function(g){s.d.r(g)},qt.unstable_batchedUpdates=function(g,b){return g(b)},qt.useFormState=function(g,b,E){return d.H.useFormState(g,b,E)},qt.useFormStatus=function(){return d.H.useHostTransitionStatus()},qt.version="19.2.4",qt}var ep;function am(){if(ep)return Yr.exports;ep=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(),Yr.exports=nm(),Yr.exports}var tp;function im(){if(tp)return tu;tp=1;var a=tm(),i=to(),c=am();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 o(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 y(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 g(e){if(f(e)!==e)throw Error(s(188))}function b(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 u=l.return;if(u===null)break;var r=u.alternate;if(r===null){if(n=u.return,n!==null){l=n;continue}break}if(u.child===r.child){for(r=u.child;r;){if(r===l)return g(u),e;if(r===n)return g(u),t;r=r.sibling}throw Error(s(188))}if(l.return!==n.return)l=u,n=r;else{for(var h=!1,p=u.child;p;){if(p===l){h=!0,l=u,n=r;break}if(p===n){h=!0,n=u,l=r;break}p=p.sibling}if(!h){for(p=r.child;p;){if(p===l){h=!0,l=r,n=u;break}if(p===n){h=!0,n=r,l=u;break}p=p.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 E(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=E(e),t!==null)return t;e=e.sibling}return null}var j=Object.assign,G=Symbol.for("react.element"),L=Symbol.for("react.transitional.element"),I=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),ye=Symbol.for("react.consumer"),ne=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),se=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),ge=Symbol.for("react.activity"),ct=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function Te(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var et=Symbol.for("react.client.reference");function it(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===et?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Q:return"Fragment";case ee:return"Profiler";case V:return"StrictMode";case Y:return"Suspense";case ce:return"SuspenseList";case ge:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case I:return"Portal";case ne:return e.displayName||"Context";case ye:return(e._context.displayName||"Context")+".Consumer";case $:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case se:return t=e.displayName||null,t!==null?t:it(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return it(e(t))}catch{}}return null}var ot=Array.isArray,C=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},De=[],qe=-1;function _(e){return{current:e}}function B(e){0>qe||(e.current=De[qe],De[qe]=null,qe--)}function P(e,t){qe++,De[qe]=e.current,e.current=t}var le=_(null),me=_(null),ve=_(null),we=_(null);function Tt(e,t){switch(P(ve,t),P(me,e),P(le,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=yd(t),e=md(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(le),P(le,e)}function Ke(){B(le),B(me),B(ve)}function Gt(e){e.memoizedState!==null&&P(we,e);var t=le.current,l=md(t,e.type);t!==l&&(P(me,e),P(le,l))}function gn(e){me.current===e&&(B(le),B(me)),we.current===e&&(B(we),Wi._currentValue=oe)}var Nl,va;function ul(e){if(Nl===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Nl=t&&t[1]||"",va=-1<l.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Nl+e+va}var yn=!1;function Gl(e,t){if(!e||yn)return"";yn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(w){var z=w}Reflect.construct(e,[],H)}else{try{H.call()}catch(w){z=w}e.call(H.prototype)}}else{try{throw Error()}catch(w){z=w}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(w){if(w&&z&&typeof w.stack=="string")return[w.stack,z.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=n.DetermineComponentFrameRoot(),h=r[0],p=r[1];if(h&&p){var v=h.split(`
|
|
4
|
+
`),A=p.split(`
|
|
5
|
+
`);for(u=n=0;n<v.length&&!v[n].includes("DetermineComponentFrameRoot");)n++;for(;u<A.length&&!A[u].includes("DetermineComponentFrameRoot");)u++;if(n===v.length||u===A.length)for(n=v.length-1,u=A.length-1;1<=n&&0<=u&&v[n]!==A[u];)u--;for(;1<=n&&0<=u;n--,u--)if(v[n]!==A[u]){if(n!==1||u!==1)do if(n--,u--,0>u||v[n]!==A[u]){var D=`
|
|
6
|
+
`+v[n].replace(" at new "," at ");return e.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",e.displayName)),D}while(1<=n&&0<=u);break}}}finally{yn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?ul(l):""}function Jn(e,t){switch(e.tag){case 26:case 27:case 5:return ul(e.type);case 16:return ul("Lazy");case 13:return e.child!==t&&t!==null?ul("Suspense Fallback"):ul("Suspense");case 19:return ul("SuspenseList");case 0:case 15:return Gl(e.type,!1);case 11:return Gl(e.type.render,!1);case 1:return Gl(e.type,!0);case 31:return ul("Activity");default:return""}}function Sl(e){try{var t="",l=null;do t+=Jn(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
|
|
7
|
+
Error generating stack: `+n.message+`
|
|
8
|
+
`+n.stack}}var mn=Object.prototype.hasOwnProperty,zl=a.unstable_scheduleCallback,Rl=a.unstable_cancelCallback,sl=a.unstable_shouldYield,Yl=a.unstable_requestPaint,ut=a.unstable_now,bn=a.unstable_getCurrentPriorityLevel,cl=a.unstable_ImmediatePriority,wl=a.unstable_UserBlockingPriority,jt=a.unstable_NormalPriority,Ml=a.unstable_LowPriority,$n=a.unstable_IdlePriority,ii=a.log,Xl=a.unstable_setDisableYieldValue,Ql=null,At=null;function rl(e){if(typeof ii=="function"&&Xl(e),At&&typeof At.setStrictMode=="function")try{At.setStrictMode(Ql,e)}catch{}}var dt=Math.clz32?Math.clz32:xa,ui=Math.log,Wn=Math.LN2;function xa(e){return e>>>=0,e===0?32:31-(ui(e)/Wn|0)|0}var Zl=256,vn=262144,Vl=4194304;function Dt(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 u=0,r=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var p=n&134217727;return p!==0?(n=p&~r,n!==0?u=Dt(n):(h&=p,h!==0?u=Dt(h):l||(l=p&~e,l!==0&&(u=Dt(l))))):(p=n&~r,p!==0?u=Dt(p):h!==0?u=Dt(h):l||(l=n&~e,l!==0&&(u=Dt(l)))),u===0?0:t!==0&&t!==u&&(t&r)===0&&(r=u&-u,l=t&-t,r>=l||r===32&&(l&4194048)!==0)?t:u}function U(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function K(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 he(){var e=Vl;return Vl<<=1,(Vl&62914560)===0&&(Vl=4194304),e}function Be(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ge(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function N(e,t,l,n,u,r){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 p=e.entanglements,v=e.expirationTimes,A=e.hiddenUpdates;for(l=h&~l;0<l;){var D=31-dt(l),H=1<<D;p[D]=0,v[D]=-1;var z=A[D];if(z!==null)for(A[D]=null,D=0;D<z.length;D++){var w=z[D];w!==null&&(w.lane&=-536870913)}l&=~H}n!==0&&R(e,n,0),r!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=r&~(h&~t))}function R(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-dt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function W(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-dt(l),u=1<<n;u&t|e[n]&t&&(e[n]|=t),l&=~u}}function Se(e,t){var l=t&-t;return l=(l&42)!==0?1:Le(l),(l&(e.suspendedLanes|t))!==0?0:l}function Le(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 Yt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Sa(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:Ld(e.type))}function _a(e,t){var l=F.p;try{return F.p=e,t()}finally{F.p=l}}var Cl=Math.random().toString(36).slice(2),pt="__reactFiber$"+Cl,kt="__reactProps$"+Cl,xn="__reactContainer$"+Cl,si="__reactEvents$"+Cl,ou="__reactListeners$"+Cl,Ea="__reactHandles$"+Cl,fu="__reactResources$"+Cl,Fn="__reactMarker$"+Cl;function ci(e){delete e[pt],delete e[kt],delete e[si],delete e[ou],delete e[Ea]}function Bt(e){var t=e[pt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[xn]||l[pt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Td(e);e!==null;){if(l=e[pt])return l;e=Td(e)}return t}e=l,l=e.parentNode}return null}function Kl(e){if(e=e[pt]||e[xn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Sn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function _n(e){var t=e[fu];return t||(t=e[fu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[Fn]=!0}var hu=new Set,In={};function Jl(e,t){X(e,t),X(e+"Capture",t)}function X(e,t){for(In[e]=t,e=0;e<t.length;e++)hu.add(t[e])}var re=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),je={},Ye={};function gt(e){return mn.call(Ye,e)?!0:mn.call(je,e)?!1:re.test(e)?Ye[e]=!0:(je[e]=!0,!1)}function Ut(e,t,l){if(gt(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 Ft(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 Xt(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 Ie(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function It(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function du(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 u=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(h){l=""+h,r.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 Ta(e){if(!e._valueTracker){var t=It(e)?"checked":"value";e._valueTracker=du(e,t,""+e[t])}}function ri(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=It(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}function ja(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 Us=/[\n"\\]/g;function Qt(e){return e.replace(Us,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function oi(e,t,l,n,u,r,h,p){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=""+Ie(t)):e.value!==""+Ie(t)&&(e.value=""+Ie(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?Oa(e,h,Ie(t)):l!=null?Oa(e,h,Ie(l)):n!=null&&e.removeAttribute("value"),u==null&&r!=null&&(e.defaultChecked=!!r),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+Ie(p):e.removeAttribute("name")}function Pn(e,t,l,n,u,r,h,p){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||l!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){Ta(e);return}l=l!=null?""+Ie(l):"",t=t!=null?""+Ie(t):l,p||t===e.value||(e.value=t),e.defaultValue=t}n=n??u,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=p?e.checked:!!n,e.defaultChecked=!!n,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Ta(e)}function Oa(e,t,l){t==="number"&&ja(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function zt(e,t,l,n){if(e=e.options,t){t={};for(var u=0;u<l.length;u++)t["$"+l[u]]=!0;for(l=0;l<e.length;l++)u=t.hasOwnProperty("$"+e[l].value),e[l].selected!==u&&(e[l].selected=u),u&&n&&(e[l].defaultSelected=!0)}else{for(l=""+Ie(l),t=null,u=0;u<e.length;u++){if(e[u].value===l){e[u].selected=!0,n&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function pu(e,t,l){if(t!=null&&(t=""+Ie(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Ie(l):""}function Aa(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(s(92));if(ot(n)){if(1<n.length)throw Error(s(93));n=n[0]}l=n}l==null&&(l=""),t=l}l=Ie(t),e.defaultValue=l,n=e.textContent,n===l&&n!==""&&n!==null&&(e.value=n),Ta(e)}function pe(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var gu=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 vt(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||gu.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Xe(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 u in t)n=t[u],t.hasOwnProperty(u)&&l[u]!==n&&vt(e,u,n)}else for(var r in t)t.hasOwnProperty(r)&&vt(e,r,t[r])}function En(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 $l=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"]]),fi=/^[\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 Tn(e){return fi.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function J(){}var ie=null;function xe(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ne=null,rt=null;function ol(e){var t=Kl(e);if(t&&(e=t.stateNode)){var l=e[kt]||null;e:switch(e=t.stateNode,t.type){case"input":if(oi(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 u=n[kt]||null;if(!u)throw Error(s(90));oi(n,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&ri(n)}break e;case"textarea":pu(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&zt(e,!!l.multiple,t,!1)}}}var hi=!1;function yu(e,t,l){if(hi)return e(t,l);hi=!0;try{var n=e(t);return n}finally{if(hi=!1,(Ne!==null||rt!==null)&&(ns(),Ne&&(t=Ne,e=rt,rt=Ne=null,ol(t),e)))for(t=0;t<e.length;t++)ol(e[t])}}function di(e,t){var l=e.stateNode;if(l===null)return null;var n=l[kt]||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 Wl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qs=!1;if(Wl)try{var pi={};Object.defineProperty(pi,"passive",{get:function(){qs=!0}}),window.addEventListener("test",pi,pi),window.removeEventListener("test",pi,pi)}catch{qs=!1}var jn=null,Bs=null,mu=null;function yo(){if(mu)return mu;var e,t=Bs,l=t.length,n,u="value"in jn?jn.value:jn.textContent,r=u.length;for(e=0;e<l&&t[e]===u[e];e++);var h=l-e;for(n=1;n<=h&&t[l-n]===u[r-n];n++);return mu=u.slice(e,1<n?1-n:void 0)}function bu(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 vu(){return!0}function mo(){return!1}function Zt(e){function t(l,n,u,r,h){this._reactName=l,this._targetInst=u,this.type=n,this.nativeEvent=r,this.target=h,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(l=e[p],this[p]=l?l(r):r[p]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?vu:mo,this.isPropagationStopped=mo,this}return j(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=vu)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=vu)},persist:function(){},isPersistent:vu}),t}var ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xu=Zt(ea),gi=j({},ea,{view:0,detail:0}),$p=Zt(gi),Hs,Ls,yi,Su=j({},gi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ys,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!==yi&&(yi&&e.type==="mousemove"?(Hs=e.screenX-yi.screenX,Ls=e.screenY-yi.screenY):Ls=Hs=0,yi=e),Hs)},movementY:function(e){return"movementY"in e?e.movementY:Ls}}),bo=Zt(Su),Wp=j({},Su,{dataTransfer:0}),Fp=Zt(Wp),Ip=j({},gi,{relatedTarget:0}),Gs=Zt(Ip),Pp=j({},ea,{animationName:0,elapsedTime:0,pseudoElement:0}),eg=Zt(Pp),tg=j({},ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lg=Zt(tg),ng=j({},ea,{data:0}),vo=Zt(ng),ag={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ig={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ug={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ug[e])?!!t[e]:!1}function Ys(){return sg}var cg=j({},gi,{key:function(e){if(e.key){var t=ag[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ig[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ys,charCode:function(e){return e.type==="keypress"?bu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rg=Zt(cg),og=j({},Su,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xo=Zt(og),fg=j({},gi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ys}),hg=Zt(fg),dg=j({},ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),pg=Zt(dg),gg=j({},Su,{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}),yg=Zt(gg),mg=j({},ea,{newState:0,oldState:0}),bg=Zt(mg),vg=[9,13,27,32],Xs=Wl&&"CompositionEvent"in window,mi=null;Wl&&"documentMode"in document&&(mi=document.documentMode);var xg=Wl&&"TextEvent"in window&&!mi,So=Wl&&(!Xs||mi&&8<mi&&11>=mi),_o=" ",Eo=!1;function To(e,t){switch(e){case"keyup":return vg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Na=!1;function Sg(e,t){switch(e){case"compositionend":return jo(t);case"keypress":return t.which!==32?null:(Eo=!0,_o);case"textInput":return e=t.data,e===_o&&Eo?null:e;default:return null}}function _g(e,t){if(Na)return e==="compositionend"||!Xs&&To(e,t)?(e=yo(),mu=Bs=jn=null,Na=!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 So&&t.locale!=="ko"?null:t.data;default:return null}}var Eg={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 Oo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Eg[e.type]:t==="textarea"}function Ao(e,t,l,n){Ne?rt?rt.push(n):rt=[n]:Ne=n,t=os(t,"onChange"),0<t.length&&(l=new xu("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var bi=null,vi=null;function Tg(e){od(e,0)}function _u(e){var t=Sn(e);if(ri(t))return e}function No(e,t){if(e==="change")return t}var zo=!1;if(Wl){var Qs;if(Wl){var Zs="oninput"in document;if(!Zs){var Ro=document.createElement("div");Ro.setAttribute("oninput","return;"),Zs=typeof Ro.oninput=="function"}Qs=Zs}else Qs=!1;zo=Qs&&(!document.documentMode||9<document.documentMode)}function wo(){bi&&(bi.detachEvent("onpropertychange",Mo),vi=bi=null)}function Mo(e){if(e.propertyName==="value"&&_u(vi)){var t=[];Ao(t,vi,e,xe(e)),yu(Tg,t)}}function jg(e,t,l){e==="focusin"?(wo(),bi=t,vi=l,bi.attachEvent("onpropertychange",Mo)):e==="focusout"&&wo()}function Og(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _u(vi)}function Ag(e,t){if(e==="click")return _u(t)}function Ng(e,t){if(e==="input"||e==="change")return _u(t)}function zg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pt=typeof Object.is=="function"?Object.is:zg;function xi(e,t){if(Pt(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 u=l[n];if(!mn.call(t,u)||!Pt(e[u],t[u]))return!1}return!0}function Co(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Do(e,t){var l=Co(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=Co(l)}}function ko(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ko(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Uo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ja(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=ja(e.document)}return t}function Vs(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 Rg=Wl&&"documentMode"in document&&11>=document.documentMode,za=null,Ks=null,Si=null,Js=!1;function qo(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Js||za==null||za!==ja(n)||(n=za,"selectionStart"in n&&Vs(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}),Si&&xi(Si,n)||(Si=n,n=os(Ks,"onSelect"),0<n.length&&(t=new xu("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=za)))}function ta(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Ra={animationend:ta("Animation","AnimationEnd"),animationiteration:ta("Animation","AnimationIteration"),animationstart:ta("Animation","AnimationStart"),transitionrun:ta("Transition","TransitionRun"),transitionstart:ta("Transition","TransitionStart"),transitioncancel:ta("Transition","TransitionCancel"),transitionend:ta("Transition","TransitionEnd")},$s={},Bo={};Wl&&(Bo=document.createElement("div").style,"AnimationEvent"in window||(delete Ra.animationend.animation,delete Ra.animationiteration.animation,delete Ra.animationstart.animation),"TransitionEvent"in window||delete Ra.transitionend.transition);function la(e){if($s[e])return $s[e];if(!Ra[e])return e;var t=Ra[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Bo)return $s[e]=t[l];return e}var Ho=la("animationend"),Lo=la("animationiteration"),Go=la("animationstart"),wg=la("transitionrun"),Mg=la("transitionstart"),Cg=la("transitioncancel"),Yo=la("transitionend"),Xo=new Map,Ws="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(" ");Ws.push("scrollEnd");function _l(e,t){Xo.set(e,t),Jl(t,[e])}var Eu=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)},fl=[],wa=0,Fs=0;function Tu(){for(var e=wa,t=Fs=wa=0;t<e;){var l=fl[t];fl[t++]=null;var n=fl[t];fl[t++]=null;var u=fl[t];fl[t++]=null;var r=fl[t];if(fl[t++]=null,n!==null&&u!==null){var h=n.pending;h===null?u.next=u:(u.next=h.next,h.next=u),n.pending=u}r!==0&&Qo(l,u,r)}}function ju(e,t,l,n){fl[wa++]=e,fl[wa++]=t,fl[wa++]=l,fl[wa++]=n,Fs|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Is(e,t,l,n){return ju(e,t,l,n),Ou(e)}function na(e,t){return ju(e,null,null,t),Ou(e)}function Qo(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var u=!1,r=e.return;r!==null;)r.childLanes|=l,n=r.alternate,n!==null&&(n.childLanes|=l),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(u=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,u&&t!==null&&(u=31-dt(l),e=r.hiddenUpdates,n=e[u],n===null?e[u]=[t]:n.push(t),t.lane=l|536870912),r):null}function Ou(e){if(50<Xi)throw Xi=0,sr=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ma={};function Dg(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 el(e,t,l,n){return new Dg(e,t,l,n)}function Ps(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fl(e,t){var l=e.alternate;return l===null?(l=el(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 Zo(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 Au(e,t,l,n,u,r){var h=0;if(n=e,typeof e=="function")Ps(e)&&(h=1);else if(typeof e=="string")h=Hy(e,l,le.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ge:return e=el(31,l,t,u),e.elementType=ge,e.lanes=r,e;case Q:return aa(l.children,u,r,t);case V:h=8,u|=24;break;case ee:return e=el(12,l,t,u|2),e.elementType=ee,e.lanes=r,e;case Y:return e=el(13,l,t,u),e.elementType=Y,e.lanes=r,e;case ce:return e=el(19,l,t,u),e.elementType=ce,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ne:h=10;break e;case ye:h=9;break e;case $:h=11;break e;case se:h=14;break e;case Z:h=16,n=null;break e}h=29,l=Error(s(130,e===null?"null":typeof e,"")),n=null}return t=el(h,l,t,u),t.elementType=e,t.type=n,t.lanes=r,t}function aa(e,t,l,n){return e=el(7,e,n,t),e.lanes=l,e}function ec(e,t,l){return e=el(6,e,null,t),e.lanes=l,e}function Vo(e){var t=el(18,null,null,0);return t.stateNode=e,t}function tc(e,t,l){return t=el(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ko=new WeakMap;function hl(e,t){if(typeof e=="object"&&e!==null){var l=Ko.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Sl(t)},Ko.set(e,t),t)}return{value:e,source:t,stack:Sl(t)}}var Ca=[],Da=0,Nu=null,_i=0,dl=[],pl=0,On=null,Dl=1,kl="";function Il(e,t){Ca[Da++]=_i,Ca[Da++]=Nu,Nu=e,_i=t}function Jo(e,t,l){dl[pl++]=Dl,dl[pl++]=kl,dl[pl++]=On,On=e;var n=Dl;e=kl;var u=32-dt(n)-1;n&=~(1<<u),l+=1;var r=32-dt(t)+u;if(30<r){var h=u-u%5;r=(n&(1<<h)-1).toString(32),n>>=h,u-=h,Dl=1<<32-dt(t)+u|l<<u|n,kl=r+e}else Dl=1<<r|l<<u|n,kl=e}function lc(e){e.return!==null&&(Il(e,1),Jo(e,1,0))}function nc(e){for(;e===Nu;)Nu=Ca[--Da],Ca[Da]=null,_i=Ca[--Da],Ca[Da]=null;for(;e===On;)On=dl[--pl],dl[pl]=null,kl=dl[--pl],dl[pl]=null,Dl=dl[--pl],dl[pl]=null}function $o(e,t){dl[pl++]=Dl,dl[pl++]=kl,dl[pl++]=On,Dl=t.id,kl=t.overflow,On=e}var Rt=null,tt=null,Me=!1,An=null,gl=!1,ac=Error(s(519));function Nn(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ei(hl(t,e)),ac}function Wo(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[pt]=e,t[kt]=n,l){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(l=0;l<Zi.length;l++)Ae(Zi[l],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),Pn(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Aa(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||pd(t.textContent,l)?(n.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),n.onScroll!=null&&Ae("scroll",t),n.onScrollEnd!=null&&Ae("scrollend",t),n.onClick!=null&&(t.onclick=J),t=!0):t=!1,t||Nn(e,!0)}function Fo(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:gl=!1;return;case 27:case 3:gl=!0;return;default:Rt=Rt.return}}function ka(e){if(e!==Rt)return!1;if(!Me)return Fo(e),Me=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||_r(e.type,e.memoizedProps)),l=!l),l&&tt&&Nn(e),Fo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));tt=Ed(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));tt=Ed(e)}else t===27?(t=tt,Yn(e.type)?(e=Ar,Ar=null,tt=e):tt=t):tt=Rt?ml(e.stateNode.nextSibling):null;return!0}function ia(){tt=Rt=null,Me=!1}function ic(){var e=An;return e!==null&&($t===null?$t=e:$t.push.apply($t,e),An=null),e}function Ei(e){An===null?An=[e]:An.push(e)}var uc=_(null),ua=null,Pl=null;function zn(e,t,l){P(uc,t._currentValue),t._currentValue=l}function en(e){e._currentValue=uc.current,B(uc)}function sc(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 cc(e,t,l,n){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var r=u.dependencies;if(r!==null){var h=u.child;r=r.firstContext;e:for(;r!==null;){var p=r;r=u;for(var v=0;v<t.length;v++)if(p.context===t[v]){r.lanes|=l,p=r.alternate,p!==null&&(p.lanes|=l),sc(r.return,l,e),n||(h=null);break e}r=p.next}}else if(u.tag===18){if(h=u.return,h===null)throw Error(s(341));h.lanes|=l,r=h.alternate,r!==null&&(r.lanes|=l),sc(h,l,e),h=null}else h=u.child;if(h!==null)h.return=u;else for(h=u;h!==null;){if(h===e){h=null;break}if(u=h.sibling,u!==null){u.return=h.return,h=u;break}h=h.return}u=h}}function Ua(e,t,l,n){e=null;for(var u=t,r=!1;u!==null;){if(!r){if((u.flags&524288)!==0)r=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var h=u.alternate;if(h===null)throw Error(s(387));if(h=h.memoizedProps,h!==null){var p=u.type;Pt(u.pendingProps.value,h.value)||(e!==null?e.push(p):e=[p])}}else if(u===we.current){if(h=u.alternate,h===null)throw Error(s(387));h.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Wi):e=[Wi])}u=u.return}e!==null&&cc(t,e,l,n),t.flags|=262144}function zu(e){for(e=e.firstContext;e!==null;){if(!Pt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function sa(e){ua=e,Pl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wt(e){return Io(ua,e)}function Ru(e,t){return ua===null&&sa(e),Io(e,t)}function Io(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Pl===null){if(e===null)throw Error(s(308));Pl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Pl=Pl.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()})}},Ug=a.unstable_scheduleCallback,qg=a.unstable_NormalPriority,xt={$$typeof:ne,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rc(){return{controller:new kg,data:new Map,refCount:0}}function Ti(e){e.refCount--,e.refCount===0&&Ug(qg,function(){e.controller.abort()})}var ji=null,oc=0,qa=0,Ba=null;function Bg(e,t){if(ji===null){var l=ji=[];oc=0,qa=dr(),Ba={status:"pending",value:void 0,then:function(n){l.push(n)}}}return oc++,t.then(Po,Po),t}function Po(){if(--oc===0&&ji!==null){Ba!==null&&(Ba.status="fulfilled");var e=ji;ji=null,qa=0,Ba=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Hg(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(u){l.push(u)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var u=0;u<l.length;u++)(0,l[u])(t)},function(u){for(n.status="rejected",n.reason=u,u=0;u<l.length;u++)(0,l[u])(void 0)}),n}var ef=C.S;C.S=function(e,t){Bh=ut(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Bg(e,t),ef!==null&&ef(e,t)};var ca=_(null);function fc(){var e=ca.current;return e!==null?e:Fe.pooledCache}function wu(e,t){t===null?P(ca,ca.current):P(ca,t.pool)}function tf(){var e=fc();return e===null?null:{parent:xt._currentValue,pool:e}}var Ha=Error(s(460)),hc=Error(s(474)),Mu=Error(s(542)),Cu={then:function(){}};function lf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function nf(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(J,J),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uf(e),e;default:if(typeof t.status=="string")t.then(J,J);else{if(e=Fe,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=n}},function(n){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uf(e),e}throw oa=t,Ha}}function ra(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(oa=l,Ha):l}}var oa=null;function af(){if(oa===null)throw Error(s(459));var e=oa;return oa=null,e}function uf(e){if(e===Ha||e===Mu)throw Error(s(483))}var La=null,Oi=0;function Du(e){var t=Oi;return Oi+=1,La===null&&(La=[]),nf(La,e,t)}function Ai(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ku(e,t){throw t.$$typeof===G?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function sf(e){function t(T,S){if(e){var O=T.deletions;O===null?(T.deletions=[S],T.flags|=16):O.push(S)}}function l(T,S){if(!e)return null;for(;S!==null;)t(T,S),S=S.sibling;return null}function n(T){for(var S=new Map;T!==null;)T.key!==null?S.set(T.key,T):S.set(T.index,T),T=T.sibling;return S}function u(T,S){return T=Fl(T,S),T.index=0,T.sibling=null,T}function r(T,S,O){return T.index=O,e?(O=T.alternate,O!==null?(O=O.index,O<S?(T.flags|=67108866,S):O):(T.flags|=67108866,S)):(T.flags|=1048576,S)}function h(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function p(T,S,O,q){return S===null||S.tag!==6?(S=ec(O,T.mode,q),S.return=T,S):(S=u(S,O),S.return=T,S)}function v(T,S,O,q){var fe=O.type;return fe===Q?D(T,S,O.props.children,q,O.key):S!==null&&(S.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Z&&ra(fe)===S.type)?(S=u(S,O.props),Ai(S,O),S.return=T,S):(S=Au(O.type,O.key,O.props,null,T.mode,q),Ai(S,O),S.return=T,S)}function A(T,S,O,q){return S===null||S.tag!==4||S.stateNode.containerInfo!==O.containerInfo||S.stateNode.implementation!==O.implementation?(S=tc(O,T.mode,q),S.return=T,S):(S=u(S,O.children||[]),S.return=T,S)}function D(T,S,O,q,fe){return S===null||S.tag!==7?(S=aa(O,T.mode,q,fe),S.return=T,S):(S=u(S,O),S.return=T,S)}function H(T,S,O){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=ec(""+S,T.mode,O),S.return=T,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case L:return O=Au(S.type,S.key,S.props,null,T.mode,O),Ai(O,S),O.return=T,O;case I:return S=tc(S,T.mode,O),S.return=T,S;case Z:return S=ra(S),H(T,S,O)}if(ot(S)||Te(S))return S=aa(S,T.mode,O,null),S.return=T,S;if(typeof S.then=="function")return H(T,Du(S),O);if(S.$$typeof===ne)return H(T,Ru(T,S),O);ku(T,S)}return null}function z(T,S,O,q){var fe=S!==null?S.key:null;if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return fe!==null?null:p(T,S,""+O,q);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case L:return O.key===fe?v(T,S,O,q):null;case I:return O.key===fe?A(T,S,O,q):null;case Z:return O=ra(O),z(T,S,O,q)}if(ot(O)||Te(O))return fe!==null?null:D(T,S,O,q,null);if(typeof O.then=="function")return z(T,S,Du(O),q);if(O.$$typeof===ne)return z(T,S,Ru(T,O),q);ku(T,O)}return null}function w(T,S,O,q,fe){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return T=T.get(O)||null,p(S,T,""+q,fe);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case L:return T=T.get(q.key===null?O:q.key)||null,v(S,T,q,fe);case I:return T=T.get(q.key===null?O:q.key)||null,A(S,T,q,fe);case Z:return q=ra(q),w(T,S,O,q,fe)}if(ot(q)||Te(q))return T=T.get(O)||null,D(S,T,q,fe,null);if(typeof q.then=="function")return w(T,S,O,Du(q),fe);if(q.$$typeof===ne)return w(T,S,O,Ru(S,q),fe);ku(S,q)}return null}function ae(T,S,O,q){for(var fe=null,ke=null,ue=S,Ee=S=0,Re=null;ue!==null&&Ee<O.length;Ee++){ue.index>Ee?(Re=ue,ue=null):Re=ue.sibling;var Ue=z(T,ue,O[Ee],q);if(Ue===null){ue===null&&(ue=Re);break}e&&ue&&Ue.alternate===null&&t(T,ue),S=r(Ue,S,Ee),ke===null?fe=Ue:ke.sibling=Ue,ke=Ue,ue=Re}if(Ee===O.length)return l(T,ue),Me&&Il(T,Ee),fe;if(ue===null){for(;Ee<O.length;Ee++)ue=H(T,O[Ee],q),ue!==null&&(S=r(ue,S,Ee),ke===null?fe=ue:ke.sibling=ue,ke=ue);return Me&&Il(T,Ee),fe}for(ue=n(ue);Ee<O.length;Ee++)Re=w(ue,T,Ee,O[Ee],q),Re!==null&&(e&&Re.alternate!==null&&ue.delete(Re.key===null?Ee:Re.key),S=r(Re,S,Ee),ke===null?fe=Re:ke.sibling=Re,ke=Re);return e&&ue.forEach(function(Kn){return t(T,Kn)}),Me&&Il(T,Ee),fe}function de(T,S,O,q){if(O==null)throw Error(s(151));for(var fe=null,ke=null,ue=S,Ee=S=0,Re=null,Ue=O.next();ue!==null&&!Ue.done;Ee++,Ue=O.next()){ue.index>Ee?(Re=ue,ue=null):Re=ue.sibling;var Kn=z(T,ue,Ue.value,q);if(Kn===null){ue===null&&(ue=Re);break}e&&ue&&Kn.alternate===null&&t(T,ue),S=r(Kn,S,Ee),ke===null?fe=Kn:ke.sibling=Kn,ke=Kn,ue=Re}if(Ue.done)return l(T,ue),Me&&Il(T,Ee),fe;if(ue===null){for(;!Ue.done;Ee++,Ue=O.next())Ue=H(T,Ue.value,q),Ue!==null&&(S=r(Ue,S,Ee),ke===null?fe=Ue:ke.sibling=Ue,ke=Ue);return Me&&Il(T,Ee),fe}for(ue=n(ue);!Ue.done;Ee++,Ue=O.next())Ue=w(ue,T,Ee,Ue.value,q),Ue!==null&&(e&&Ue.alternate!==null&&ue.delete(Ue.key===null?Ee:Ue.key),S=r(Ue,S,Ee),ke===null?fe=Ue:ke.sibling=Ue,ke=Ue);return e&&ue.forEach(function(Wy){return t(T,Wy)}),Me&&Il(T,Ee),fe}function We(T,S,O,q){if(typeof O=="object"&&O!==null&&O.type===Q&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case L:e:{for(var fe=O.key;S!==null;){if(S.key===fe){if(fe=O.type,fe===Q){if(S.tag===7){l(T,S.sibling),q=u(S,O.props.children),q.return=T,T=q;break e}}else if(S.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Z&&ra(fe)===S.type){l(T,S.sibling),q=u(S,O.props),Ai(q,O),q.return=T,T=q;break e}l(T,S);break}else t(T,S);S=S.sibling}O.type===Q?(q=aa(O.props.children,T.mode,q,O.key),q.return=T,T=q):(q=Au(O.type,O.key,O.props,null,T.mode,q),Ai(q,O),q.return=T,T=q)}return h(T);case I:e:{for(fe=O.key;S!==null;){if(S.key===fe)if(S.tag===4&&S.stateNode.containerInfo===O.containerInfo&&S.stateNode.implementation===O.implementation){l(T,S.sibling),q=u(S,O.children||[]),q.return=T,T=q;break e}else{l(T,S);break}else t(T,S);S=S.sibling}q=tc(O,T.mode,q),q.return=T,T=q}return h(T);case Z:return O=ra(O),We(T,S,O,q)}if(ot(O))return ae(T,S,O,q);if(Te(O)){if(fe=Te(O),typeof fe!="function")throw Error(s(150));return O=fe.call(O),de(T,S,O,q)}if(typeof O.then=="function")return We(T,S,Du(O),q);if(O.$$typeof===ne)return We(T,S,Ru(T,O),q);ku(T,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,S!==null&&S.tag===6?(l(T,S.sibling),q=u(S,O),q.return=T,T=q):(l(T,S),q=ec(O,T.mode,q),q.return=T,T=q),h(T)):l(T,S)}return function(T,S,O,q){try{Oi=0;var fe=We(T,S,O,q);return La=null,fe}catch(ue){if(ue===Ha||ue===Mu)throw ue;var ke=el(29,ue,null,T.mode);return ke.lanes=q,ke.return=T,ke}}}var fa=sf(!0),cf=sf(!1),Rn=!1;function dc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pc(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 wn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Mn(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(He&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=Ou(e),Qo(e,null,l),t}return ju(e,n,t,l),Ou(e)}function Ni(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,W(e,l)}}function gc(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var u=null,r=null;if(l=l.firstBaseUpdate,l!==null){do{var h={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};r===null?u=r=h:r=r.next=h,l=l.next}while(l!==null);r===null?u=r=t:r=r.next=t}else u=r=t;l={baseState:n.baseState,firstBaseUpdate:u,lastBaseUpdate:r,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 yc=!1;function zi(){if(yc){var e=Ba;if(e!==null)throw e}}function Ri(e,t,l,n){yc=!1;var u=e.updateQueue;Rn=!1;var r=u.firstBaseUpdate,h=u.lastBaseUpdate,p=u.shared.pending;if(p!==null){u.shared.pending=null;var v=p,A=v.next;v.next=null,h===null?r=A:h.next=A,h=v;var D=e.alternate;D!==null&&(D=D.updateQueue,p=D.lastBaseUpdate,p!==h&&(p===null?D.firstBaseUpdate=A:p.next=A,D.lastBaseUpdate=v))}if(r!==null){var H=u.baseState;h=0,D=A=v=null,p=r;do{var z=p.lane&-536870913,w=z!==p.lane;if(w?(ze&z)===z:(n&z)===z){z!==0&&z===qa&&(yc=!0),D!==null&&(D=D.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var ae=e,de=p;z=t;var We=l;switch(de.tag){case 1:if(ae=de.payload,typeof ae=="function"){H=ae.call(We,H,z);break e}H=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=de.payload,z=typeof ae=="function"?ae.call(We,H,z):ae,z==null)break e;H=j({},H,z);break e;case 2:Rn=!0}}z=p.callback,z!==null&&(e.flags|=64,w&&(e.flags|=8192),w=u.callbacks,w===null?u.callbacks=[z]:w.push(z))}else w={lane:z,tag:p.tag,payload:p.payload,callback:p.callback,next:null},D===null?(A=D=w,v=H):D=D.next=w,h|=z;if(p=p.next,p===null){if(p=u.shared.pending,p===null)break;w=p,p=w.next,w.next=null,u.lastBaseUpdate=w,u.shared.pending=null}}while(!0);D===null&&(v=H),u.baseState=v,u.firstBaseUpdate=A,u.lastBaseUpdate=D,r===null&&(u.shared.lanes=0),qn|=h,e.lanes=h,e.memoizedState=H}}function rf(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function of(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)rf(l[e],t)}var Ga=_(null),Uu=_(0);function ff(e,t){e=on,P(Uu,e),P(Ga,t),on=e|t.baseLanes}function mc(){P(Uu,on),P(Ga,Ga.current)}function bc(){on=Uu.current,B(Ga),B(Uu)}var tl=_(null),yl=null;function Cn(e){var t=e.alternate;P(yt,yt.current&1),P(tl,e),yl===null&&(t===null||Ga.current!==null||t.memoizedState!==null)&&(yl=e)}function vc(e){P(yt,yt.current),P(tl,e),yl===null&&(yl=e)}function hf(e){e.tag===22?(P(yt,yt.current),P(tl,e),yl===null&&(yl=e)):Dn()}function Dn(){P(yt,yt.current),P(tl,tl.current)}function ll(e){B(tl),yl===e&&(yl=null),B(yt)}var yt=_(0);function qu(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||jr(l)||Or(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 tn=0,_e=null,Je=null,St=null,Bu=!1,Ya=!1,ha=!1,Hu=0,wi=0,Xa=null,Lg=0;function ft(){throw Error(s(321))}function xc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Pt(e[l],t[l]))return!1;return!0}function Sc(e,t,l,n,u,r){return tn=r,_e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,C.H=e===null||e.memoizedState===null?$f:Uc,ha=!1,r=l(n,u),ha=!1,Ya&&(r=pf(t,l,n,u)),df(e),r}function df(e){C.H=Di;var t=Je!==null&&Je.next!==null;if(tn=0,St=Je=_e=null,Bu=!1,wi=0,Xa=null,t)throw Error(s(300));e===null||_t||(e=e.dependencies,e!==null&&zu(e)&&(_t=!0))}function pf(e,t,l,n){_e=e;var u=0;do{if(Ya&&(Xa=null),wi=0,Ya=!1,25<=u)throw Error(s(301));if(u+=1,St=Je=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}C.H=Wf,r=t(l,n)}while(Ya);return r}function Gg(){var e=C.H,t=e.useState()[0];return t=typeof t.then=="function"?Mi(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(_e.flags|=1024),t}function _c(){var e=Hu!==0;return Hu=0,e}function Ec(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Tc(e){if(Bu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Bu=!1}tn=0,St=Je=_e=null,Ya=!1,wi=Hu=0,Xa=null}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?_e.memoizedState=St=e:St=St.next=e,St}function mt(){if(Je===null){var e=_e.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=St===null?_e.memoizedState:St.next;if(t!==null)St=t,Je=e;else{if(e===null)throw _e.alternate===null?Error(s(467)):Error(s(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},St===null?_e.memoizedState=St=e:St=St.next=e}return St}function Lu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Mi(e){var t=wi;return wi+=1,Xa===null&&(Xa=[]),e=nf(Xa,e,t),t=_e,(St===null?t.memoizedState:St.next)===null&&(t=t.alternate,C.H=t===null||t.memoizedState===null?$f:Uc),e}function Gu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Mi(e);if(e.$$typeof===ne)return wt(e)}throw Error(s(438,String(e)))}function jc(e){var t=null,l=_e.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=_e.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Lu(),_e.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]=ct;return t.index++,l}function ln(e,t){return typeof t=="function"?t(e):t}function Yu(e){var t=mt();return Oc(t,Je,e)}function Oc(e,t,l){var n=e.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=l;var u=e.baseQueue,r=n.pending;if(r!==null){if(u!==null){var h=u.next;u.next=r.next,r.next=h}t.baseQueue=u=r,n.pending=null}if(r=e.baseState,u===null)e.memoizedState=r;else{t=u.next;var p=h=null,v=null,A=t,D=!1;do{var H=A.lane&-536870913;if(H!==A.lane?(ze&H)===H:(tn&H)===H){var z=A.revertLane;if(z===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),H===qa&&(D=!0);else if((tn&z)===z){A=A.next,z===qa&&(D=!0);continue}else H={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},v===null?(p=v=H,h=r):v=v.next=H,_e.lanes|=z,qn|=z;H=A.action,ha&&l(r,H),r=A.hasEagerState?A.eagerState:l(r,H)}else z={lane:H,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},v===null?(p=v=z,h=r):v=v.next=z,_e.lanes|=H,qn|=H;A=A.next}while(A!==null&&A!==t);if(v===null?h=r:v.next=p,!Pt(r,e.memoizedState)&&(_t=!0,D&&(l=Ba,l!==null)))throw l;e.memoizedState=r,e.baseState=h,e.baseQueue=v,n.lastRenderedState=r}return u===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Ac(e){var t=mt(),l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=e;var n=l.dispatch,u=l.pending,r=t.memoizedState;if(u!==null){l.pending=null;var h=u=u.next;do r=e(r,h.action),h=h.next;while(h!==u);Pt(r,t.memoizedState)||(_t=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),l.lastRenderedState=r}return[r,n]}function gf(e,t,l){var n=_e,u=mt(),r=Me;if(r){if(l===void 0)throw Error(s(407));l=l()}else l=t();var h=!Pt((Je||u).memoizedState,l);if(h&&(u.memoizedState=l,_t=!0),u=u.queue,Rc(bf.bind(null,n,u,e),[e]),u.getSnapshot!==t||h||St!==null&&St.memoizedState.tag&1){if(n.flags|=2048,Qa(9,{destroy:void 0},mf.bind(null,n,u,l,t),null),Fe===null)throw Error(s(349));r||(tn&127)!==0||yf(n,t,l)}return l}function yf(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=_e.updateQueue,t===null?(t=Lu(),_e.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function mf(e,t,l,n){t.value=l,t.getSnapshot=n,vf(t)&&xf(e)}function bf(e,t,l){return l(function(){vf(t)&&xf(e)})}function vf(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Pt(e,l)}catch{return!0}}function xf(e){var t=na(e,2);t!==null&&Wt(t,e,2)}function Nc(e){var t=Ht();if(typeof e=="function"){var l=e;if(e=l(),ha){rl(!0);try{l()}finally{rl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ln,lastRenderedState:e},t}function Sf(e,t,l,n){return e.baseState=l,Oc(e,Je,typeof n=="function"?n:ln)}function Yg(e,t,l,n,u){if(Zu(e))throw Error(s(485));if(e=t.action,e!==null){var r={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){r.listeners.push(h)}};C.T!==null?l(!0):r.isTransition=!1,n(r),l=t.pending,l===null?(r.next=t.pending=r,_f(t,r)):(r.next=l.next,t.pending=l.next=r)}}function _f(e,t){var l=t.action,n=t.payload,u=e.state;if(t.isTransition){var r=C.T,h={};C.T=h;try{var p=l(u,n),v=C.S;v!==null&&v(h,p),Ef(e,t,p)}catch(A){zc(e,t,A)}finally{r!==null&&h.types!==null&&(r.types=h.types),C.T=r}}else try{r=l(u,n),Ef(e,t,r)}catch(A){zc(e,t,A)}}function Ef(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){Tf(e,t,n)},function(n){return zc(e,t,n)}):Tf(e,t,l)}function Tf(e,t,l){t.status="fulfilled",t.value=l,jf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,_f(e,l)))}function zc(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,jf(t),t=t.next;while(t!==n)}e.action=null}function jf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Of(e,t){return t}function Af(e,t){if(Me){var l=Fe.formState;if(l!==null){e:{var n=_e;if(Me){if(tt){t:{for(var u=tt,r=gl;u.nodeType!==8;){if(!r){u=null;break t}if(u=ml(u.nextSibling),u===null){u=null;break t}}r=u.data,u=r==="F!"||r==="F"?u:null}if(u){tt=ml(u.nextSibling),n=u.data==="F!";break e}}Nn(n)}n=!1}n&&(t=l[0])}}return l=Ht(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Of,lastRenderedState:t},l.queue=n,l=Vf.bind(null,_e,n),n.dispatch=l,n=Nc(!1),r=kc.bind(null,_e,!1,n.queue),n=Ht(),u={state:t,dispatch:null,action:e,pending:null},n.queue=u,l=Yg.bind(null,_e,u,r,l),u.dispatch=l,n.memoizedState=e,[t,l,!1]}function Nf(e){var t=mt();return zf(t,Je,e)}function zf(e,t,l){if(t=Oc(e,t,Of)[0],e=Yu(ln)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Mi(t)}catch(h){throw h===Ha?Mu:h}else n=t;t=mt();var u=t.queue,r=u.dispatch;return l!==t.memoizedState&&(_e.flags|=2048,Qa(9,{destroy:void 0},Xg.bind(null,u,l),null)),[n,r,e]}function Xg(e,t){e.action=t}function Rf(e){var t=mt(),l=Je;if(l!==null)return zf(t,l,e);mt(),t=t.memoizedState,l=mt();var n=l.queue.dispatch;return l.memoizedState=e,[t,n,!1]}function Qa(e,t,l,n){return e={tag:e,create:l,deps:n,inst:t,next:null},t=_e.updateQueue,t===null&&(t=Lu(),_e.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 wf(){return mt().memoizedState}function Xu(e,t,l,n){var u=Ht();_e.flags|=e,u.memoizedState=Qa(1|t,{destroy:void 0},l,n===void 0?null:n)}function Qu(e,t,l,n){var u=mt();n=n===void 0?null:n;var r=u.memoizedState.inst;Je!==null&&n!==null&&xc(n,Je.memoizedState.deps)?u.memoizedState=Qa(t,r,l,n):(_e.flags|=e,u.memoizedState=Qa(1|t,r,l,n))}function Mf(e,t){Xu(8390656,8,e,t)}function Rc(e,t){Qu(2048,8,e,t)}function Qg(e){_e.flags|=4;var t=_e.updateQueue;if(t===null)t=Lu(),_e.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Cf(e){var t=mt().memoizedState;return Qg({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Df(e,t){return Qu(4,2,e,t)}function kf(e,t){return Qu(4,4,e,t)}function Uf(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 qf(e,t,l){l=l!=null?l.concat([e]):null,Qu(4,4,Uf.bind(null,t,e),l)}function wc(){}function Bf(e,t){var l=mt();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&xc(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function Hf(e,t){var l=mt();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&xc(t,n[1]))return n[0];if(n=e(),ha){rl(!0);try{e()}finally{rl(!1)}}return l.memoizedState=[n,t],n}function Mc(e,t,l){return l===void 0||(tn&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Lh(),_e.lanes|=e,qn|=e,l)}function Lf(e,t,l,n){return Pt(l,t)?l:Ga.current!==null?(e=Mc(e,l,n),Pt(e,t)||(_t=!0),e):(tn&42)===0||(tn&1073741824)!==0&&(ze&261930)===0?(_t=!0,e.memoizedState=l):(e=Lh(),_e.lanes|=e,qn|=e,t)}function Gf(e,t,l,n,u){var r=F.p;F.p=r!==0&&8>r?r:8;var h=C.T,p={};C.T=p,kc(e,!1,t,l);try{var v=u(),A=C.S;if(A!==null&&A(p,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){var D=Hg(v,n);Ci(e,t,D,il(e))}else Ci(e,t,n,il(e))}catch(H){Ci(e,t,{then:function(){},status:"rejected",reason:H},il())}finally{F.p=r,h!==null&&p.types!==null&&(h.types=p.types),C.T=h}}function Zg(){}function Cc(e,t,l,n){if(e.tag!==5)throw Error(s(476));var u=Yf(e).queue;Gf(e,u,t,oe,l===null?Zg:function(){return Xf(e),l(n)})}function Yf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ln,lastRenderedState:oe},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ln,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Xf(e){var t=Yf(e);t.next===null&&(t=e.alternate.memoizedState),Ci(e,t.next.queue,{},il())}function Dc(){return wt(Wi)}function Qf(){return mt().memoizedState}function Zf(){return mt().memoizedState}function Vg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=il();e=wn(l);var n=Mn(t,e,l);n!==null&&(Wt(n,t,l),Ni(n,t,l)),t={cache:rc()},e.payload=t;return}t=t.return}}function Kg(e,t,l){var n=il();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Zu(e)?Kf(t,l):(l=Is(e,t,l,n),l!==null&&(Wt(l,e,n),Jf(l,t,n)))}function Vf(e,t,l){var n=il();Ci(e,t,l,n)}function Ci(e,t,l,n){var u={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Zu(e))Kf(t,u);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var h=t.lastRenderedState,p=r(h,l);if(u.hasEagerState=!0,u.eagerState=p,Pt(p,h))return ju(e,t,u,0),Fe===null&&Tu(),!1}catch{}if(l=Is(e,t,u,n),l!==null)return Wt(l,e,n),Jf(l,t,n),!0}return!1}function kc(e,t,l,n){if(n={lane:2,revertLane:dr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Zu(e)){if(t)throw Error(s(479))}else t=Is(e,l,n,2),t!==null&&Wt(t,e,2)}function Zu(e){var t=e.alternate;return e===_e||t!==null&&t===_e}function Kf(e,t){Ya=Bu=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Jf(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,W(e,l)}}var Di={readContext:wt,use:Gu,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};Di.useEffectEvent=ft;var $f={readContext:wt,use:Gu,useCallback:function(e,t){return Ht().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:Mf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Xu(4194308,4,Uf.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Xu(4194308,4,e,t)},useInsertionEffect:function(e,t){Xu(4,2,e,t)},useMemo:function(e,t){var l=Ht();t=t===void 0?null:t;var n=e();if(ha){rl(!0);try{e()}finally{rl(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=Ht();if(l!==void 0){var u=l(t);if(ha){rl(!0);try{l(t)}finally{rl(!1)}}}else u=t;return n.memoizedState=n.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},n.queue=e,e=e.dispatch=Kg.bind(null,_e,e),[n.memoizedState,e]},useRef:function(e){var t=Ht();return e={current:e},t.memoizedState=e},useState:function(e){e=Nc(e);var t=e.queue,l=Vf.bind(null,_e,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:wc,useDeferredValue:function(e,t){var l=Ht();return Mc(l,e,t)},useTransition:function(){var e=Nc(!1);return e=Gf.bind(null,_e,e.queue,!0,!1),Ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=_e,u=Ht();if(Me){if(l===void 0)throw Error(s(407));l=l()}else{if(l=t(),Fe===null)throw Error(s(349));(ze&127)!==0||yf(n,t,l)}u.memoizedState=l;var r={value:l,getSnapshot:t};return u.queue=r,Mf(bf.bind(null,n,r,e),[e]),n.flags|=2048,Qa(9,{destroy:void 0},mf.bind(null,n,r,l,t),null),l},useId:function(){var e=Ht(),t=Fe.identifierPrefix;if(Me){var l=kl,n=Dl;l=(n&~(1<<32-dt(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Hu++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Lg++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Dc,useFormState:Af,useActionState:Af,useOptimistic:function(e){var t=Ht();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=kc.bind(null,_e,!0,l),l.dispatch=t,[e,t]},useMemoCache:jc,useCacheRefresh:function(){return Ht().memoizedState=Vg.bind(null,_e)},useEffectEvent:function(e){var t=Ht(),l={impl:e};return t.memoizedState=l,function(){if((He&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},Uc={readContext:wt,use:Gu,useCallback:Bf,useContext:wt,useEffect:Rc,useImperativeHandle:qf,useInsertionEffect:Df,useLayoutEffect:kf,useMemo:Hf,useReducer:Yu,useRef:wf,useState:function(){return Yu(ln)},useDebugValue:wc,useDeferredValue:function(e,t){var l=mt();return Lf(l,Je.memoizedState,e,t)},useTransition:function(){var e=Yu(ln)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Mi(e),t]},useSyncExternalStore:gf,useId:Qf,useHostTransitionStatus:Dc,useFormState:Nf,useActionState:Nf,useOptimistic:function(e,t){var l=mt();return Sf(l,Je,e,t)},useMemoCache:jc,useCacheRefresh:Zf};Uc.useEffectEvent=Cf;var Wf={readContext:wt,use:Gu,useCallback:Bf,useContext:wt,useEffect:Rc,useImperativeHandle:qf,useInsertionEffect:Df,useLayoutEffect:kf,useMemo:Hf,useReducer:Ac,useRef:wf,useState:function(){return Ac(ln)},useDebugValue:wc,useDeferredValue:function(e,t){var l=mt();return Je===null?Mc(l,e,t):Lf(l,Je.memoizedState,e,t)},useTransition:function(){var e=Ac(ln)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:Mi(e),t]},useSyncExternalStore:gf,useId:Qf,useHostTransitionStatus:Dc,useFormState:Rf,useActionState:Rf,useOptimistic:function(e,t){var l=mt();return Je!==null?Sf(l,Je,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:jc,useCacheRefresh:Zf};Wf.useEffectEvent=Cf;function qc(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:j({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Bc={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=il(),u=wn(n);u.payload=t,l!=null&&(u.callback=l),t=Mn(e,u,n),t!==null&&(Wt(t,e,n),Ni(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=il(),u=wn(n);u.tag=1,u.payload=t,l!=null&&(u.callback=l),t=Mn(e,u,n),t!==null&&(Wt(t,e,n),Ni(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=il(),n=wn(l);n.tag=2,t!=null&&(n.callback=t),t=Mn(e,n,l),t!==null&&(Wt(t,e,l),Ni(t,e,l))}};function Ff(e,t,l,n,u,r,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,r,h):t.prototype&&t.prototype.isPureReactComponent?!xi(l,n)||!xi(u,r):!0}function If(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&&Bc.enqueueReplaceState(t,t.state,null)}function da(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=j({},l));for(var u in e)l[u]===void 0&&(l[u]=e[u])}return l}function Pf(e){Eu(e)}function eh(e){console.error(e)}function th(e){Eu(e)}function Vu(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function lh(e,t,l){try{var n=e.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Hc(e,t,l){return l=wn(l),l.tag=3,l.payload={element:null},l.callback=function(){Vu(e,t)},l}function nh(e){return e=wn(e),e.tag=3,e}function ah(e,t,l,n){var u=l.type.getDerivedStateFromError;if(typeof u=="function"){var r=n.value;e.payload=function(){return u(r)},e.callback=function(){lh(t,l,n)}}var h=l.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){lh(t,l,n),typeof u!="function"&&(Bn===null?Bn=new Set([this]):Bn.add(this));var p=n.stack;this.componentDidCatch(n.value,{componentStack:p!==null?p:""})})}function Jg(e,t,l,n,u){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&Ua(t,l,u,!0),l=tl.current,l!==null){switch(l.tag){case 31:case 13:return yl===null?as():l.alternate===null&&ht===0&&(ht=3),l.flags&=-257,l.flags|=65536,l.lanes=u,n===Cu?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),or(e,n,u)),!1;case 22:return l.flags|=65536,n===Cu?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)),or(e,n,u)),!1}throw Error(s(435,l.tag))}return or(e,n,u),as(),!1}if(Me)return t=tl.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,n!==ac&&(e=Error(s(422),{cause:n}),Ei(hl(e,l)))):(n!==ac&&(t=Error(s(423),{cause:n}),Ei(hl(t,l))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,n=hl(n,l),u=Hc(e.stateNode,n,u),gc(e,u),ht!==4&&(ht=2)),!1;var r=Error(s(520),{cause:n});if(r=hl(r,l),Yi===null?Yi=[r]:Yi.push(r),ht!==4&&(ht=2),t===null)return!0;n=hl(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=u&-u,l.lanes|=e,e=Hc(l.stateNode,n,e),gc(l,e),!1;case 1:if(t=l.type,r=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(Bn===null||!Bn.has(r))))return l.flags|=65536,u&=-u,l.lanes|=u,u=nh(u),ah(u,e,l,n),gc(l,u),!1}l=l.return}while(l!==null);return!1}var Lc=Error(s(461)),_t=!1;function Mt(e,t,l,n){t.child=e===null?cf(t,null,l,n):fa(t,e.child,l,n)}function ih(e,t,l,n,u){l=l.render;var r=t.ref;if("ref"in n){var h={};for(var p in n)p!=="ref"&&(h[p]=n[p])}else h=n;return sa(t),n=Sc(e,t,l,h,r,u),p=_c(),e!==null&&!_t?(Ec(e,t,u),nn(e,t,u)):(Me&&p&&lc(t),t.flags|=1,Mt(e,t,n,u),t.child)}function uh(e,t,l,n,u){if(e===null){var r=l.type;return typeof r=="function"&&!Ps(r)&&r.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=r,sh(e,t,r,n,u)):(e=Au(l.type,null,n,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!Jc(e,u)){var h=r.memoizedProps;if(l=l.compare,l=l!==null?l:xi,l(h,n)&&e.ref===t.ref)return nn(e,t,u)}return t.flags|=1,e=Fl(r,n),e.ref=t.ref,e.return=t,t.child=e}function sh(e,t,l,n,u){if(e!==null){var r=e.memoizedProps;if(xi(r,n)&&e.ref===t.ref)if(_t=!1,t.pendingProps=n=r,Jc(e,u))(e.flags&131072)!==0&&(_t=!0);else return t.lanes=e.lanes,nn(e,t,u)}return Gc(e,t,l,n,u)}function ch(e,t,l,n){var u=n.children,r=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(r=r!==null?r.baseLanes|l:l,e!==null){for(n=t.child=e.child,u=0;n!==null;)u=u|n.lanes|n.childLanes,n=n.sibling;n=u&~r}else n=0,t.child=null;return rh(e,t,r,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wu(t,r!==null?r.cachePool:null),r!==null?ff(t,r):mc(),hf(t);else return n=t.lanes=536870912,rh(e,t,r!==null?r.baseLanes|l:l,l,n)}else r!==null?(wu(t,r.cachePool),ff(t,r),Dn(),t.memoizedState=null):(e!==null&&wu(t,null),mc(),Dn());return Mt(e,t,u,l),t.child}function ki(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rh(e,t,l,n,u){var r=fc();return r=r===null?null:{parent:xt._currentValue,pool:r},t.memoizedState={baseLanes:l,cachePool:r},e!==null&&wu(t,null),mc(),hf(t),e!==null&&Ua(e,t,n,!0),t.childLanes=u,null}function Ku(e,t){return t=$u({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function oh(e,t,l){return fa(t,e.child,null,l),e=Ku(t,t.pendingProps),e.flags|=2,ll(t),t.memoizedState=null,e}function $g(e,t,l){var n=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Me){if(n.mode==="hidden")return e=Ku(t,n),t.lanes=536870912,ki(null,e);if(vc(t),(e=tt)?(e=_d(e,gl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:On!==null?{id:Dl,overflow:kl}:null,retryLane:536870912,hydrationErrors:null},l=Vo(e),l.return=t,t.child=l,Rt=t,tt=null)):e=null,e===null)throw Nn(t);return t.lanes=536870912,null}return Ku(t,n)}var r=e.memoizedState;if(r!==null){var h=r.dehydrated;if(vc(t),u)if(t.flags&256)t.flags&=-257,t=oh(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(_t||Ua(e,t,l,!1),u=(l&e.childLanes)!==0,_t||u){if(n=Fe,n!==null&&(h=Se(n,l),h!==0&&h!==r.retryLane))throw r.retryLane=h,na(e,h),Wt(n,e,h),Lc;as(),t=oh(e,t,l)}else e=r.treeContext,tt=ml(h.nextSibling),Rt=t,Me=!0,An=null,gl=!1,e!==null&&$o(t,e),t=Ku(t,n),t.flags|=4096;return t}return e=Fl(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ju(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 Gc(e,t,l,n,u){return sa(t),l=Sc(e,t,l,n,void 0,u),n=_c(),e!==null&&!_t?(Ec(e,t,u),nn(e,t,u)):(Me&&n&&lc(t),t.flags|=1,Mt(e,t,l,u),t.child)}function fh(e,t,l,n,u,r){return sa(t),t.updateQueue=null,l=pf(t,n,l,u),df(e),n=_c(),e!==null&&!_t?(Ec(e,t,r),nn(e,t,r)):(Me&&n&&lc(t),t.flags|=1,Mt(e,t,l,r),t.child)}function hh(e,t,l,n,u){if(sa(t),t.stateNode===null){var r=Ma,h=l.contextType;typeof h=="object"&&h!==null&&(r=wt(h)),r=new l(n,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Bc,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=n,r.state=t.memoizedState,r.refs={},dc(t),h=l.contextType,r.context=typeof h=="object"&&h!==null?wt(h):Ma,r.state=t.memoizedState,h=l.getDerivedStateFromProps,typeof h=="function"&&(qc(t,l,h,n),r.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(h=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),h!==r.state&&Bc.enqueueReplaceState(r,r.state,null),Ri(t,n,r,u),zi(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){r=t.stateNode;var p=t.memoizedProps,v=da(l,p);r.props=v;var A=r.context,D=l.contextType;h=Ma,typeof D=="object"&&D!==null&&(h=wt(D));var H=l.getDerivedStateFromProps;D=typeof H=="function"||typeof r.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,D||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(p||A!==h)&&If(t,r,n,h),Rn=!1;var z=t.memoizedState;r.state=z,Ri(t,n,r,u),zi(),A=t.memoizedState,p||z!==A||Rn?(typeof H=="function"&&(qc(t,l,H,n),A=t.memoizedState),(v=Rn||Ff(t,l,v,n,z,A,h))?(D||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=A),r.props=n,r.state=A,r.context=h,n=v):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{r=t.stateNode,pc(e,t),h=t.memoizedProps,D=da(l,h),r.props=D,H=t.pendingProps,z=r.context,A=l.contextType,v=Ma,typeof A=="object"&&A!==null&&(v=wt(A)),p=l.getDerivedStateFromProps,(A=typeof p=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(h!==H||z!==v)&&If(t,r,n,v),Rn=!1,z=t.memoizedState,r.state=z,Ri(t,n,r,u),zi();var w=t.memoizedState;h!==H||z!==w||Rn||e!==null&&e.dependencies!==null&&zu(e.dependencies)?(typeof p=="function"&&(qc(t,l,p,n),w=t.memoizedState),(D=Rn||Ff(t,l,D,n,z,w,v)||e!==null&&e.dependencies!==null&&zu(e.dependencies))?(A||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(n,w,v),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(n,w,v)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=w),r.props=n,r.state=w,r.context=v,n=D):(typeof r.componentDidUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),n=!1)}return r=n,Ju(e,t),n=(t.flags&128)!==0,r||n?(r=t.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&n?(t.child=fa(t,e.child,null,u),t.child=fa(t,null,l,u)):Mt(e,t,l,u),t.memoizedState=r.state,e=t.child):e=nn(e,t,u),e}function dh(e,t,l,n){return ia(),t.flags|=256,Mt(e,t,l,n),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:tf()}}function Qc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=al),e}function ph(e,t,l){var n=t.pendingProps,u=!1,r=(t.flags&128)!==0,h;if((h=r)||(h=e!==null&&e.memoizedState===null?!1:(yt.current&2)!==0),h&&(u=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Me){if(u?Cn(t):Dn(),(e=tt)?(e=_d(e,gl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:On!==null?{id:Dl,overflow:kl}:null,retryLane:536870912,hydrationErrors:null},l=Vo(e),l.return=t,t.child=l,Rt=t,tt=null)):e=null,e===null)throw Nn(t);return Or(e)?t.lanes=32:t.lanes=536870912,null}var p=n.children;return n=n.fallback,u?(Dn(),u=t.mode,p=$u({mode:"hidden",children:p},u),n=aa(n,u,l,null),p.return=t,n.return=t,p.sibling=n,t.child=p,n=t.child,n.memoizedState=Xc(l),n.childLanes=Qc(e,h,l),t.memoizedState=Yc,ki(null,n)):(Cn(t),Zc(t,p))}var v=e.memoizedState;if(v!==null&&(p=v.dehydrated,p!==null)){if(r)t.flags&256?(Cn(t),t.flags&=-257,t=Vc(e,t,l)):t.memoizedState!==null?(Dn(),t.child=e.child,t.flags|=128,t=null):(Dn(),p=n.fallback,u=t.mode,n=$u({mode:"visible",children:n.children},u),p=aa(p,u,l,null),p.flags|=2,n.return=t,p.return=t,n.sibling=p,t.child=n,fa(t,e.child,null,l),n=t.child,n.memoizedState=Xc(l),n.childLanes=Qc(e,h,l),t.memoizedState=Yc,t=ki(null,n));else if(Cn(t),Or(p)){if(h=p.nextSibling&&p.nextSibling.dataset,h)var A=h.dgst;h=A,n=Error(s(419)),n.stack="",n.digest=h,Ei({value:n,source:null,stack:null}),t=Vc(e,t,l)}else if(_t||Ua(e,t,l,!1),h=(l&e.childLanes)!==0,_t||h){if(h=Fe,h!==null&&(n=Se(h,l),n!==0&&n!==v.retryLane))throw v.retryLane=n,na(e,n),Wt(h,e,n),Lc;jr(p)||as(),t=Vc(e,t,l)}else jr(p)?(t.flags|=192,t.child=e.child,t=null):(e=v.treeContext,tt=ml(p.nextSibling),Rt=t,Me=!0,An=null,gl=!1,e!==null&&$o(t,e),t=Zc(t,n.children),t.flags|=4096);return t}return u?(Dn(),p=n.fallback,u=t.mode,v=e.child,A=v.sibling,n=Fl(v,{mode:"hidden",children:n.children}),n.subtreeFlags=v.subtreeFlags&65011712,A!==null?p=Fl(A,p):(p=aa(p,u,l,null),p.flags|=2),p.return=t,n.return=t,n.sibling=p,t.child=n,ki(null,n),n=t.child,p=e.child.memoizedState,p===null?p=Xc(l):(u=p.cachePool,u!==null?(v=xt._currentValue,u=u.parent!==v?{parent:v,pool:v}:u):u=tf(),p={baseLanes:p.baseLanes|l,cachePool:u}),n.memoizedState=p,n.childLanes=Qc(e,h,l),t.memoizedState=Yc,ki(e.child,n)):(Cn(t),l=e.child,e=l.sibling,l=Fl(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 Zc(e,t){return t=$u({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function $u(e,t){return e=el(22,e,null,t),e.lanes=0,e}function Vc(e,t,l){return fa(t,e.child,null,l),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gh(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),sc(e.return,t,l)}function Kc(e,t,l,n,u,r){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:u,treeForkCount:r}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=n,h.tail=l,h.tailMode=u,h.treeForkCount=r)}function yh(e,t,l){var n=t.pendingProps,u=n.revealOrder,r=n.tail;n=n.children;var h=yt.current,p=(h&2)!==0;if(p?(h=h&1|2,t.flags|=128):h&=1,P(yt,h),Mt(e,t,n,l),n=Me?_i:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&gh(e,l,t);else if(e.tag===19)gh(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(u){case"forwards":for(l=t.child,u=null;l!==null;)e=l.alternate,e!==null&&qu(e)===null&&(u=l),l=l.sibling;l=u,l===null?(u=t.child,t.child=null):(u=l.sibling,l.sibling=null),Kc(t,!1,u,l,r,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&qu(e)===null){t.child=u;break}e=u.sibling,u.sibling=l,l=u,u=e}Kc(t,!0,l,null,r,n);break;case"together":Kc(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function nn(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),qn|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ua(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=Fl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Fl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Jc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&zu(e)))}function Wg(e,t,l){switch(t.tag){case 3:Tt(t,t.stateNode.containerInfo),zn(t,xt,e.memoizedState.cache),ia();break;case 27:case 5:Gt(t);break;case 4:Tt(t,t.stateNode.containerInfo);break;case 10:zn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,vc(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Cn(t),t.flags|=128,null):(l&t.child.childLanes)!==0?ph(e,t,l):(Cn(t),e=nn(e,t,l),e!==null?e.sibling:null);Cn(t);break;case 19:var u=(e.flags&128)!==0;if(n=(l&t.childLanes)!==0,n||(Ua(e,t,l,!1),n=(l&t.childLanes)!==0),u){if(n)return yh(e,t,l);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),P(yt,yt.current),n)break;return null;case 22:return t.lanes=0,ch(e,t,l,t.pendingProps);case 24:zn(t,xt,e.memoizedState.cache)}return nn(e,t,l)}function mh(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)_t=!0;else{if(!Jc(e,l)&&(t.flags&128)===0)return _t=!1,Wg(e,t,l);_t=(e.flags&131072)!==0}else _t=!1,Me&&(t.flags&1048576)!==0&&Jo(t,_i,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=ra(t.elementType),t.type=e,typeof e=="function")Ps(e)?(n=da(e,n),t.tag=1,t=hh(null,t,e,n,l)):(t.tag=0,t=Gc(null,t,e,n,l));else{if(e!=null){var u=e.$$typeof;if(u===$){t.tag=11,t=ih(null,t,e,n,l);break e}else if(u===se){t.tag=14,t=uh(null,t,e,n,l);break e}}throw t=it(e)||e,Error(s(306,t,""))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,u=da(n,t.pendingProps),hh(e,t,n,u,l);case 3:e:{if(Tt(t,t.stateNode.containerInfo),e===null)throw Error(s(387));n=t.pendingProps;var r=t.memoizedState;u=r.element,pc(e,t),Ri(t,n,null,l);var h=t.memoizedState;if(n=h.cache,zn(t,xt,n),n!==r.cache&&cc(t,[xt],l,!0),zi(),n=h.element,r.isDehydrated)if(r={element:n,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=dh(e,t,n,l);break e}else if(n!==u){u=hl(Error(s(424)),t),Ei(u),t=dh(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,tt=ml(e.firstChild),Rt=t,Me=!0,An=null,gl=!0,l=cf(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ia(),n===u){t=nn(e,t,l);break e}Mt(e,t,n,l)}t=t.child}return t;case 26:return Ju(e,t),e===null?(l=Nd(t.type,null,t.pendingProps,null))?t.memoizedState=l:Me||(l=t.type,e=t.pendingProps,n=fs(ve.current).createElement(l),n[pt]=t,n[kt]=e,Ct(n,l,e),bt(n),t.stateNode=n):t.memoizedState=Nd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Gt(t),e===null&&Me&&(n=t.stateNode=jd(t.type,t.pendingProps,ve.current),Rt=t,gl=!0,u=tt,Yn(t.type)?(Ar=u,tt=ml(n.firstChild)):tt=u),Mt(e,t,t.pendingProps.children,l),Ju(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((u=n=tt)&&(n=Oy(n,t.type,t.pendingProps,gl),n!==null?(t.stateNode=n,Rt=t,tt=ml(n.firstChild),gl=!1,u=!0):u=!1),u||Nn(t)),Gt(t),u=t.type,r=t.pendingProps,h=e!==null?e.memoizedProps:null,n=r.children,_r(u,r)?n=null:h!==null&&_r(u,h)&&(t.flags|=32),t.memoizedState!==null&&(u=Sc(e,t,Gg,null,null,l),Wi._currentValue=u),Ju(e,t),Mt(e,t,n,l),t.child;case 6:return e===null&&Me&&((e=l=tt)&&(l=Ay(l,t.pendingProps,gl),l!==null?(t.stateNode=l,Rt=t,tt=null,e=!0):e=!1),e||Nn(t)),null;case 13:return ph(e,t,l);case 4:return Tt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=fa(t,null,n,l):Mt(e,t,n,l),t.child;case 11:return ih(e,t,t.type,t.pendingProps,l);case 7:return Mt(e,t,t.pendingProps,l),t.child;case 8:return Mt(e,t,t.pendingProps.children,l),t.child;case 12:return Mt(e,t,t.pendingProps.children,l),t.child;case 10:return n=t.pendingProps,zn(t,t.type,n.value),Mt(e,t,n.children,l),t.child;case 9:return u=t.type._context,n=t.pendingProps.children,sa(t),u=wt(u),n=n(u),t.flags|=1,Mt(e,t,n,l),t.child;case 14:return uh(e,t,t.type,t.pendingProps,l);case 15:return sh(e,t,t.type,t.pendingProps,l);case 19:return yh(e,t,l);case 31:return $g(e,t,l);case 22:return ch(e,t,l,t.pendingProps);case 24:return sa(t),n=wt(xt),e===null?(u=fc(),u===null&&(u=Fe,r=rc(),u.pooledCache=r,r.refCount++,r!==null&&(u.pooledCacheLanes|=l),u=r),t.memoizedState={parent:n,cache:u},dc(t),zn(t,xt,u)):((e.lanes&l)!==0&&(pc(e,t),Ri(t,null,null,l),zi()),u=e.memoizedState,r=t.memoizedState,u.parent!==n?(u={parent:n,cache:n},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),zn(t,xt,n)):(n=r.cache,zn(t,xt,n),n!==u.cache&&cc(t,[xt],l,!0))),Mt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function an(e){e.flags|=4}function $c(e,t,l,n,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Qh())e.flags|=8192;else throw oa=Cu,hc}else e.flags&=-16777217}function bh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cd(t))if(Qh())e.flags|=8192;else throw oa=Cu,hc}function Wu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?he():536870912,e.lanes|=t,Ja|=t)}function Ui(e,t){if(!Me)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 lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var u=e.child;u!==null;)l|=u.lanes|u.childLanes,n|=u.subtreeFlags&65011712,n|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)l|=u.lanes|u.childLanes,n|=u.subtreeFlags,n|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function Fg(e,t,l){var n=t.pendingProps;switch(nc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return lt(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),en(xt),Ke(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ka(t)?an(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ic())),lt(t),null;case 26:var u=t.type,r=t.memoizedState;return e===null?(an(t),r!==null?(lt(t),bh(t,r)):(lt(t),$c(t,u,null,n,l))):r?r!==e.memoizedState?(an(t),lt(t),bh(t,r)):(lt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&an(t),lt(t),$c(t,u,e,n,l)),null;case 27:if(gn(t),l=ve.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&an(t);else{if(!n){if(t.stateNode===null)throw Error(s(166));return lt(t),null}e=le.current,ka(t)?Wo(t):(e=jd(u,n,l),t.stateNode=e,an(t))}return lt(t),null;case 5:if(gn(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&an(t);else{if(!n){if(t.stateNode===null)throw Error(s(166));return lt(t),null}if(r=le.current,ka(t))Wo(t);else{var h=fs(ve.current);switch(r){case 1:r=h.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:r=h.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":r=h.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":r=h.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":r=h.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof n.is=="string"?h.createElement("select",{is:n.is}):h.createElement("select"),n.multiple?r.multiple=!0:n.size&&(r.size=n.size);break;default:r=typeof n.is=="string"?h.createElement(u,{is:n.is}):h.createElement(u)}}r[pt]=t,r[kt]=n;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)r.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=r;e:switch(Ct(r,u,n),u){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&an(t)}}return lt(t),$c(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&an(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(s(166));if(e=ve.current,ka(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,u=Rt,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[pt]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||pd(e.nodeValue,l)),e||Nn(t,!0)}else e=fs(e).createTextNode(n),e[pt]=t,t.stateNode=e}return lt(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=ka(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[pt]=t}else ia(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),e=!1}else l=ic(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(ll(t),t):(ll(t),null);if((t.flags&128)!==0)throw Error(s(558))}return lt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=ka(t),n!==null&&n.dehydrated!==null){if(e===null){if(!u)throw Error(s(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(s(317));u[pt]=t}else ia(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),u=!1}else u=ic(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(ll(t),t):(ll(t),null)}return ll(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,u=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(u=n.alternate.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==u&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Wu(t,t.updateQueue),lt(t),null);case 4:return Ke(),e===null&&mr(t.stateNode.containerInfo),lt(t),null;case 10:return en(t.type),lt(t),null;case 19:if(B(yt),n=t.memoizedState,n===null)return lt(t),null;if(u=(t.flags&128)!==0,r=n.rendering,r===null)if(u)Ui(n,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=qu(e),r!==null){for(t.flags|=128,Ui(n,!1),e=r.updateQueue,t.updateQueue=e,Wu(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Zo(l,e),l=l.sibling;return P(yt,yt.current&1|2),Me&&Il(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&ut()>ts&&(t.flags|=128,u=!0,Ui(n,!1),t.lanes=4194304)}else{if(!u)if(e=qu(r),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Wu(t,e),Ui(n,!0),n.tail===null&&n.tailMode==="hidden"&&!r.alternate&&!Me)return lt(t),null}else 2*ut()-n.renderingStartTime>ts&&l!==536870912&&(t.flags|=128,u=!0,Ui(n,!1),t.lanes=4194304);n.isBackwards?(r.sibling=t.child,t.child=r):(e=n.last,e!==null?e.sibling=r:t.child=r,n.last=r)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=ut(),e.sibling=null,l=yt.current,P(yt,u?l&1|2:l&1),Me&&Il(t,n.treeForkCount),e):(lt(t),null);case 22:case 23:return ll(t),bc(),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&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),l=t.updateQueue,l!==null&&Wu(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&&B(ca),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),en(xt),lt(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Ig(e,t){switch(nc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return en(xt),Ke(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return gn(t),null;case 31:if(t.memoizedState!==null){if(ll(t),t.alternate===null)throw Error(s(340));ia()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ll(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));ia()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(yt),null;case 4:return Ke(),null;case 10:return en(t.type),null;case 22:case 23:return ll(t),bc(),e!==null&&B(ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return en(xt),null;case 25:return null;default:return null}}function vh(e,t){switch(nc(t),t.tag){case 3:en(xt),Ke();break;case 26:case 27:case 5:gn(t);break;case 4:Ke();break;case 31:t.memoizedState!==null&&ll(t);break;case 13:ll(t);break;case 19:B(yt);break;case 10:en(t.type);break;case 22:case 23:ll(t),bc(),e!==null&&B(ca);break;case 24:en(xt)}}function qi(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var u=n.next;l=u;do{if((l.tag&e)===e){n=void 0;var r=l.create,h=l.inst;n=r(),h.destroy=n}l=l.next}while(l!==u)}}catch(p){Ze(t,t.return,p)}}function kn(e,t,l){try{var n=t.updateQueue,u=n!==null?n.lastEffect:null;if(u!==null){var r=u.next;n=r;do{if((n.tag&e)===e){var h=n.inst,p=h.destroy;if(p!==void 0){h.destroy=void 0,u=t;var v=l,A=p;try{A()}catch(D){Ze(u,v,D)}}}n=n.next}while(n!==r)}}catch(D){Ze(t,t.return,D)}}function xh(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{of(t,l)}catch(n){Ze(e,e.return,n)}}}function Sh(e,t,l){l.props=da(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){Ze(e,t,n)}}function Bi(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(u){Ze(e,t,u)}}function Ul(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(u){Ze(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(u){Ze(e,t,u)}else l.current=null}function _h(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(u){Ze(e,e.return,u)}}function Wc(e,t,l){try{var n=e.stateNode;xy(n,e.type,l,t),n[kt]=t}catch(u){Ze(e,e.return,u)}}function Eh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Yn(e.type)||e.tag===4}function Fc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Eh(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&&Yn(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 Ic(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=J));else if(n!==4&&(n===27&&Yn(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Ic(e,t,l),e=e.sibling;e!==null;)Ic(e,t,l),e=e.sibling}function Fu(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&&Yn(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Fu(e,t,l),e=e.sibling;e!==null;)Fu(e,t,l),e=e.sibling}function Th(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Ct(t,n,l),t[pt]=e,t[kt]=l}catch(r){Ze(e,e.return,r)}}var un=!1,Et=!1,Pc=!1,jh=typeof WeakSet=="function"?WeakSet:Set,Nt=null;function Pg(e,t){if(e=e.containerInfo,xr=bs,e=Uo(e),Vs(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 u=n.anchorOffset,r=n.focusNode;n=n.focusOffset;try{l.nodeType,r.nodeType}catch{l=null;break e}var h=0,p=-1,v=-1,A=0,D=0,H=e,z=null;t:for(;;){for(var w;H!==l||u!==0&&H.nodeType!==3||(p=h+u),H!==r||n!==0&&H.nodeType!==3||(v=h+n),H.nodeType===3&&(h+=H.nodeValue.length),(w=H.firstChild)!==null;)z=H,H=w;for(;;){if(H===e)break t;if(z===l&&++A===u&&(p=h),z===r&&++D===n&&(v=h),(w=H.nextSibling)!==null)break;H=z,z=H.parentNode}H=w}l=p===-1||v===-1?null:{start:p,end:v}}else l=null}l=l||{start:0,end:0}}else l=null;for(Sr={focusedElem:e,selectionRange:l},bs=!1,Nt=t;Nt!==null;)if(t=Nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Nt=e;else for(;Nt!==null;){switch(t=Nt,r=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++)u=e[l],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&r!==null){e=void 0,l=t,u=r.memoizedProps,r=r.memoizedState,n=l.stateNode;try{var ae=da(l.type,u);e=n.getSnapshotBeforeUpdate(ae,r),n.__reactInternalSnapshotBeforeUpdate=e}catch(de){Ze(l,l.return,de)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Tr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Tr(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,Nt=e;break}Nt=t.return}}function Oh(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:cn(e,l),n&4&&qi(5,l);break;case 1:if(cn(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(h){Ze(l,l.return,h)}else{var u=da(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Ze(l,l.return,h)}}n&64&&xh(l),n&512&&Bi(l,l.return);break;case 3:if(cn(e,l),n&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{of(e,t)}catch(h){Ze(l,l.return,h)}}break;case 27:t===null&&n&4&&Th(l);case 26:case 5:cn(e,l),t===null&&n&4&&_h(l),n&512&&Bi(l,l.return);break;case 12:cn(e,l);break;case 31:cn(e,l),n&4&&zh(e,l);break;case 13:cn(e,l),n&4&&Rh(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=cy.bind(null,l),Ny(e,l))));break;case 22:if(n=l.memoizedState!==null||un,!n){t=t!==null&&t.memoizedState!==null||Et,u=un;var r=Et;un=n,(Et=t)&&!r?rn(e,l,(l.subtreeFlags&8772)!==0):cn(e,l),un=u,Et=r}break;case 30:break;default:cn(e,l)}}function Ah(e){var t=e.alternate;t!==null&&(e.alternate=null,Ah(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ci(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 st=null,Vt=!1;function sn(e,t,l){for(l=l.child;l!==null;)Nh(e,t,l),l=l.sibling}function Nh(e,t,l){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(Ql,l)}catch{}switch(l.tag){case 26:Et||Ul(l,t),sn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Et||Ul(l,t);var n=st,u=Vt;Yn(l.type)&&(st=l.stateNode,Vt=!1),sn(e,t,l),Ki(l.stateNode),st=n,Vt=u;break;case 5:Et||Ul(l,t);case 6:if(n=st,u=Vt,st=null,sn(e,t,l),st=n,Vt=u,st!==null)if(Vt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(l.stateNode)}catch(r){Ze(l,t,r)}else try{st.removeChild(l.stateNode)}catch(r){Ze(l,t,r)}break;case 18:st!==null&&(Vt?(e=st,xd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),li(e)):xd(st,l.stateNode));break;case 4:n=st,u=Vt,st=l.stateNode.containerInfo,Vt=!0,sn(e,t,l),st=n,Vt=u;break;case 0:case 11:case 14:case 15:kn(2,l,t),Et||kn(4,l,t),sn(e,t,l);break;case 1:Et||(Ul(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&Sh(l,t,n)),sn(e,t,l);break;case 21:sn(e,t,l);break;case 22:Et=(n=Et)||l.memoizedState!==null,sn(e,t,l),Et=n;break;default:sn(e,t,l)}}function zh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{li(e)}catch(l){Ze(t,t.return,l)}}}function Rh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{li(e)}catch(l){Ze(t,t.return,l)}}function ey(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new jh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new jh),t;default:throw Error(s(435,e.tag))}}function Iu(e,t){var l=ey(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var u=ry.bind(null,e,n);n.then(u,u)}})}function Kt(e,t){var l=t.deletions;if(l!==null)for(var n=0;n<l.length;n++){var u=l[n],r=e,h=t,p=h;e:for(;p!==null;){switch(p.tag){case 27:if(Yn(p.type)){st=p.stateNode,Vt=!1;break e}break;case 5:st=p.stateNode,Vt=!1;break e;case 3:case 4:st=p.stateNode.containerInfo,Vt=!0;break e}p=p.return}if(st===null)throw Error(s(160));Nh(r,h,u),st=null,Vt=!1,r=u.alternate,r!==null&&(r.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wh(t,e),t=t.sibling}var El=null;function wh(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&&(kn(3,e,e.return),qi(3,e),kn(5,e,e.return));break;case 1:Kt(t,e),Jt(e),n&512&&(Et||l===null||Ul(l,l.return)),n&64&&un&&(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 u=El;if(Kt(t,e),Jt(e),n&512&&(Et||l===null||Ul(l,l.return)),n&4){var r=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,u=u.ownerDocument||u;t:switch(n){case"title":r=u.getElementsByTagName("title")[0],(!r||r[Fn]||r[pt]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=u.createElement(n),u.head.insertBefore(r,u.querySelector("head > title"))),Ct(r,n,l),r[pt]=e,bt(r),n=r;break e;case"link":var h=wd("link","href",u).get(n+(l.href||""));if(h){for(var p=0;p<h.length;p++)if(r=h[p],r.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&r.getAttribute("rel")===(l.rel==null?null:l.rel)&&r.getAttribute("title")===(l.title==null?null:l.title)&&r.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){h.splice(p,1);break t}}r=u.createElement(n),Ct(r,n,l),u.head.appendChild(r);break;case"meta":if(h=wd("meta","content",u).get(n+(l.content||""))){for(p=0;p<h.length;p++)if(r=h[p],r.getAttribute("content")===(l.content==null?null:""+l.content)&&r.getAttribute("name")===(l.name==null?null:l.name)&&r.getAttribute("property")===(l.property==null?null:l.property)&&r.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&r.getAttribute("charset")===(l.charSet==null?null:l.charSet)){h.splice(p,1);break t}}r=u.createElement(n),Ct(r,n,l),u.head.appendChild(r);break;default:throw Error(s(468,n))}r[pt]=e,bt(r),n=r}e.stateNode=n}else Md(u,e.type,e.stateNode);else e.stateNode=Rd(u,n,e.memoizedProps);else r!==n?(r===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):r.count--,n===null?Md(u,e.type,e.stateNode):Rd(u,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Wc(e,e.memoizedProps,l.memoizedProps)}break;case 27:Kt(t,e),Jt(e),n&512&&(Et||l===null||Ul(l,l.return)),l!==null&&n&4&&Wc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Kt(t,e),Jt(e),n&512&&(Et||l===null||Ul(l,l.return)),e.flags&32){u=e.stateNode;try{pe(u,"")}catch(ae){Ze(e,e.return,ae)}}n&4&&e.stateNode!=null&&(u=e.memoizedProps,Wc(e,u,l!==null?l.memoizedProps:u)),n&1024&&(Pc=!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(ae){Ze(e,e.return,ae)}}break;case 3:if(ps=null,u=El,El=hs(t.containerInfo),Kt(t,e),El=u,Jt(e),n&4&&l!==null&&l.memoizedState.isDehydrated)try{li(t.containerInfo)}catch(ae){Ze(e,e.return,ae)}Pc&&(Pc=!1,Mh(e));break;case 4:n=El,El=hs(e.stateNode.containerInfo),Kt(t,e),Jt(e),El=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,Iu(e,n)));break;case 13:Kt(t,e),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(es=ut()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Iu(e,n)));break;case 22:u=e.memoizedState!==null;var v=l!==null&&l.memoizedState!==null,A=un,D=Et;if(un=A||u,Et=D||v,Kt(t,e),Et=D,un=A,Jt(e),n&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(l===null||v||un||Et||pa(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){v=l=t;try{if(r=v.stateNode,u)h=r.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{p=v.stateNode;var H=v.memoizedProps.style,z=H!=null&&H.hasOwnProperty("display")?H.display:null;p.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ae){Ze(v,v.return,ae)}}}else if(t.tag===6){if(l===null){v=t;try{v.stateNode.nodeValue=u?"":v.memoizedProps}catch(ae){Ze(v,v.return,ae)}}}else if(t.tag===18){if(l===null){v=t;try{var w=v.stateNode;u?Sd(w,!0):Sd(v.stateNode,!1)}catch(ae){Ze(v,v.return,ae)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,Iu(e,l))));break;case 19:Kt(t,e),Jt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Iu(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(Eh(n)){l=n;break}n=n.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var u=l.stateNode,r=Fc(e);Fu(e,r,u);break;case 5:var h=l.stateNode;l.flags&32&&(pe(h,""),l.flags&=-33);var p=Fc(e);Fu(e,p,h);break;case 3:case 4:var v=l.stateNode.containerInfo,A=Fc(e);Ic(e,A,v);break;default:throw Error(s(161))}}catch(D){Ze(e,e.return,D)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function cn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Oh(e,t.alternate,t),t=t.sibling}function pa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:kn(4,t,t.return),pa(t);break;case 1:Ul(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Sh(t,t.return,l),pa(t);break;case 27:Ki(t.stateNode);case 26:case 5:Ul(t,t.return),pa(t);break;case 22:t.memoizedState===null&&pa(t);break;case 30:pa(t);break;default:pa(t)}e=e.sibling}}function rn(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,u=e,r=t,h=r.flags;switch(r.tag){case 0:case 11:case 15:rn(u,r,l),qi(4,r);break;case 1:if(rn(u,r,l),n=r,u=n.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(A){Ze(n,n.return,A)}if(n=r,u=n.updateQueue,u!==null){var p=n.stateNode;try{var v=u.shared.hiddenCallbacks;if(v!==null)for(u.shared.hiddenCallbacks=null,u=0;u<v.length;u++)rf(v[u],p)}catch(A){Ze(n,n.return,A)}}l&&h&64&&xh(r),Bi(r,r.return);break;case 27:Th(r);case 26:case 5:rn(u,r,l),l&&n===null&&h&4&&_h(r),Bi(r,r.return);break;case 12:rn(u,r,l);break;case 31:rn(u,r,l),l&&h&4&&zh(u,r);break;case 13:rn(u,r,l),l&&h&4&&Rh(u,r);break;case 22:r.memoizedState===null&&rn(u,r,l),Bi(r,r.return);break;case 30:break;default:rn(u,r,l)}t=t.sibling}}function er(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&&Ti(l))}function tr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ti(e))}function Tl(e,t,l,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ch(e,t,l,n),t=t.sibling}function Ch(e,t,l,n){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,l,n),u&2048&&qi(9,t);break;case 1:Tl(e,t,l,n);break;case 3:Tl(e,t,l,n),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ti(e)));break;case 12:if(u&2048){Tl(e,t,l,n),e=t.stateNode;try{var r=t.memoizedProps,h=r.id,p=r.onPostCommit;typeof p=="function"&&p(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(v){Ze(t,t.return,v)}}else Tl(e,t,l,n);break;case 31:Tl(e,t,l,n);break;case 13:Tl(e,t,l,n);break;case 23:break;case 22:r=t.stateNode,h=t.alternate,t.memoizedState!==null?r._visibility&2?Tl(e,t,l,n):Hi(e,t):r._visibility&2?Tl(e,t,l,n):(r._visibility|=2,Za(e,t,l,n,(t.subtreeFlags&10256)!==0||!1)),u&2048&&er(h,t);break;case 24:Tl(e,t,l,n),u&2048&&tr(t.alternate,t);break;default:Tl(e,t,l,n)}}function Za(e,t,l,n,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,h=t,p=l,v=n,A=h.flags;switch(h.tag){case 0:case 11:case 15:Za(r,h,p,v,u),qi(8,h);break;case 23:break;case 22:var D=h.stateNode;h.memoizedState!==null?D._visibility&2?Za(r,h,p,v,u):Hi(r,h):(D._visibility|=2,Za(r,h,p,v,u)),u&&A&2048&&er(h.alternate,h);break;case 24:Za(r,h,p,v,u),u&&A&2048&&tr(h.alternate,h);break;default:Za(r,h,p,v,u)}t=t.sibling}}function Hi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,u=n.flags;switch(n.tag){case 22:Hi(l,n),u&2048&&er(n.alternate,n);break;case 24:Hi(l,n),u&2048&&tr(n.alternate,n);break;default:Hi(l,n)}t=t.sibling}}var Li=8192;function Va(e,t,l){if(e.subtreeFlags&Li)for(e=e.child;e!==null;)Dh(e,t,l),e=e.sibling}function Dh(e,t,l){switch(e.tag){case 26:Va(e,t,l),e.flags&Li&&e.memoizedState!==null&&Ly(l,El,e.memoizedState,e.memoizedProps);break;case 5:Va(e,t,l);break;case 3:case 4:var n=El;El=hs(e.stateNode.containerInfo),Va(e,t,l),El=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Li,Li=16777216,Va(e,t,l),Li=n):Va(e,t,l));break;default:Va(e,t,l)}}function kh(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 Gi(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];Nt=n,qh(n,e)}kh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Uh(e),e=e.sibling}function Uh(e){switch(e.tag){case 0:case 11:case 15:Gi(e),e.flags&2048&&kn(9,e,e.return);break;case 3:Gi(e);break;case 12:Gi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Pu(e)):Gi(e);break;default:Gi(e)}}function Pu(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];Nt=n,qh(n,e)}kh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:kn(8,t,t.return),Pu(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Pu(t));break;default:Pu(t)}e=e.sibling}}function qh(e,t){for(;Nt!==null;){var l=Nt;switch(l.tag){case 0:case 11:case 15:kn(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:Ti(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,Nt=n;else e:for(l=e;Nt!==null;){n=Nt;var u=n.sibling,r=n.return;if(Ah(n),n===l){Nt=null;break e}if(u!==null){u.return=r,Nt=u;break e}Nt=r}}}var ty={getCacheForType:function(e){var t=wt(xt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return wt(xt).controller.signal}},ly=typeof WeakMap=="function"?WeakMap:Map,He=0,Fe=null,Oe=null,ze=0,Qe=0,nl=null,Un=!1,Ka=!1,lr=!1,on=0,ht=0,qn=0,ga=0,nr=0,al=0,Ja=0,Yi=null,$t=null,ar=!1,es=0,Bh=0,ts=1/0,ls=null,Bn=null,Ot=0,Hn=null,$a=null,fn=0,ir=0,ur=null,Hh=null,Xi=0,sr=null;function il(){return(He&2)!==0&&ze!==0?ze&-ze:C.T!==null?dr():Sa()}function Lh(){if(al===0)if((ze&536870912)===0||Me){var e=vn;vn<<=1,(vn&3932160)===0&&(vn=262144),al=e}else al=536870912;return e=tl.current,e!==null&&(e.flags|=32),al}function Wt(e,t,l){(e===Fe&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)&&(Wa(e,0),Ln(e,ze,al,!1)),Ge(e,l),((He&2)===0||e!==Fe)&&(e===Fe&&((He&2)===0&&(ga|=l),ht===4&&Ln(e,ze,al,!1)),ql(e))}function Gh(e,t,l){if((He&6)!==0)throw Error(s(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||U(e,t),u=n?iy(e,t):rr(e,t,!0),r=n;do{if(u===0){Ka&&!n&&Ln(e,t,0,!1);break}else{if(l=e.current.alternate,r&&!ny(l)){u=rr(e,t,!1),r=!1;continue}if(u===2){if(r=t,e.errorRecoveryDisabledLanes&r)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var p=e;u=Yi;var v=p.current.memoizedState.isDehydrated;if(v&&(Wa(p,h).flags|=256),h=rr(p,h,!1),h!==2){if(lr&&!v){p.errorRecoveryDisabledLanes|=r,ga|=r,u=4;break e}r=$t,$t=u,r!==null&&($t===null?$t=r:$t.push.apply($t,r))}u=h}if(r=!1,u!==2)continue}}if(u===1){Wa(e,0),Ln(e,t,0,!0);break}e:{switch(n=e,r=u,r){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Ln(n,t,al,!Un);break e;case 2:$t=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(u=es+300-ut(),10<u)){if(Ln(n,t,al,!Un),x(n,0,!0)!==0)break e;fn=t,n.timeoutHandle=bd(Yh.bind(null,n,l,$t,ls,ar,t,al,ga,Ja,Un,r,"Throttled",-0,0),u);break e}Yh(n,l,$t,ls,ar,t,al,ga,Ja,Un,r,null,-0,0)}}break}while(!0);ql(e)}function Yh(e,t,l,n,u,r,h,p,v,A,D,H,z,w){if(e.timeoutHandle=-1,H=t.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:J},Dh(t,r,H);var ae=(r&62914560)===r?es-ut():(r&4194048)===r?Bh-ut():0;if(ae=Gy(H,ae),ae!==null){fn=r,e.cancelPendingCommit=ae(Wh.bind(null,e,t,r,l,n,u,h,p,v,D,H,null,z,w)),Ln(e,r,h,!A);return}}Wh(e,t,r,l,n,u,h,p,v)}function ny(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 u=l[n],r=u.getSnapshot;u=u.value;try{if(!Pt(r(),u))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 Ln(e,t,l,n){t&=~nr,t&=~ga,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var u=t;0<u;){var r=31-dt(u),h=1<<r;n[r]=-1,u&=~h}l!==0&&R(e,l,t)}function ns(){return(He&6)===0?(Qi(0),!1):!0}function cr(){if(Oe!==null){if(Qe===0)var e=Oe.return;else e=Oe,Pl=ua=null,Tc(e),La=null,Oi=0,e=Oe;for(;e!==null;)vh(e.alternate,e),e=e.return;Oe=null}}function Wa(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Ey(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),fn=0,cr(),Fe=e,Oe=l=Fl(e.current,null),ze=t,Qe=0,nl=null,Un=!1,Ka=U(e,t),lr=!1,Ja=al=nr=ga=qn=ht=0,$t=Yi=null,ar=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var u=31-dt(n),r=1<<u;t|=e[u],n&=~r}return on=t,Tu(),l}function Xh(e,t){_e=null,C.H=Di,t===Ha||t===Mu?(t=af(),Qe=3):t===hc?(t=af(),Qe=4):Qe=t===Lc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,nl=t,Oe===null&&(ht=1,Vu(e,hl(t,e.current)))}function Qh(){var e=tl.current;return e===null?!0:(ze&4194048)===ze?yl===null:(ze&62914560)===ze||(ze&536870912)!==0?e===yl:!1}function Zh(){var e=C.H;return C.H=Di,e===null?Di:e}function Vh(){var e=C.A;return C.A=ty,e}function as(){ht=4,Un||(ze&4194048)!==ze&&tl.current!==null||(Ka=!0),(qn&134217727)===0&&(ga&134217727)===0||Fe===null||Ln(Fe,ze,al,!1)}function rr(e,t,l){var n=He;He|=2;var u=Zh(),r=Vh();(Fe!==e||ze!==t)&&(ls=null,Wa(e,t)),t=!1;var h=ht;e:do try{if(Qe!==0&&Oe!==null){var p=Oe,v=nl;switch(Qe){case 8:cr(),h=6;break e;case 3:case 2:case 9:case 6:tl.current===null&&(t=!0);var A=Qe;if(Qe=0,nl=null,Fa(e,p,v,A),l&&Ka){h=0;break e}break;default:A=Qe,Qe=0,nl=null,Fa(e,p,v,A)}}ay(),h=ht;break}catch(D){Xh(e,D)}while(!0);return t&&e.shellSuspendCounter++,Pl=ua=null,He=n,C.H=u,C.A=r,Oe===null&&(Fe=null,ze=0,Tu()),h}function ay(){for(;Oe!==null;)Kh(Oe)}function iy(e,t){var l=He;He|=2;var n=Zh(),u=Vh();Fe!==e||ze!==t?(ls=null,ts=ut()+500,Wa(e,t)):Ka=U(e,t);e:do try{if(Qe!==0&&Oe!==null){t=Oe;var r=nl;t:switch(Qe){case 1:Qe=0,nl=null,Fa(e,t,r,1);break;case 2:case 9:if(lf(r)){Qe=0,nl=null,Jh(t);break}t=function(){Qe!==2&&Qe!==9||Fe!==e||(Qe=7),ql(e)},r.then(t,t);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:lf(r)?(Qe=0,nl=null,Jh(t)):(Qe=0,nl=null,Fa(e,t,r,7));break;case 5:var h=null;switch(Oe.tag){case 26:h=Oe.memoizedState;case 5:case 27:var p=Oe;if(h?Cd(h):p.stateNode.complete){Qe=0,nl=null;var v=p.sibling;if(v!==null)Oe=v;else{var A=p.return;A!==null?(Oe=A,is(A)):Oe=null}break t}}Qe=0,nl=null,Fa(e,t,r,5);break;case 6:Qe=0,nl=null,Fa(e,t,r,6);break;case 8:cr(),ht=6;break e;default:throw Error(s(462))}}uy();break}catch(D){Xh(e,D)}while(!0);return Pl=ua=null,C.H=n,C.A=u,He=l,Oe!==null?0:(Fe=null,ze=0,Tu(),ht)}function uy(){for(;Oe!==null&&!sl();)Kh(Oe)}function Kh(e){var t=mh(e.alternate,e,on);e.memoizedProps=e.pendingProps,t===null?is(e):Oe=t}function Jh(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=fh(l,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=fh(l,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:Tc(t);default:vh(l,t),t=Oe=Zo(t,on),t=mh(l,t,on)}e.memoizedProps=e.pendingProps,t===null?is(e):Oe=t}function Fa(e,t,l,n){Pl=ua=null,Tc(t),La=null,Oi=0;var u=t.return;try{if(Jg(e,u,t,l,ze)){ht=1,Vu(e,hl(l,e.current)),Oe=null;return}}catch(r){if(u!==null)throw Oe=u,r;ht=1,Vu(e,hl(l,e.current)),Oe=null;return}t.flags&32768?(Me||n===1?e=!0:Ka||(ze&536870912)!==0?e=!1:(Un=e=!0,(n===2||n===9||n===3||n===6)&&(n=tl.current,n!==null&&n.tag===13&&(n.flags|=16384))),$h(t,e)):is(t)}function is(e){var t=e;do{if((t.flags&32768)!==0){$h(t,Un);return}e=t.return;var l=Fg(t.alternate,t,on);if(l!==null){Oe=l;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);ht===0&&(ht=5)}function $h(e,t){do{var l=Ig(e.alternate,e);if(l!==null){l.flags&=32767,Oe=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Oe=e;return}Oe=e=l}while(e!==null);ht=6,Oe=null}function Wh(e,t,l,n,u,r,h,p,v){e.cancelPendingCommit=null;do us();while(Ot!==0);if((He&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(r=t.lanes|t.childLanes,r|=Fs,N(e,l,r,h,p,v),e===Fe&&(Oe=Fe=null,ze=0),$a=t,Hn=e,fn=l,ir=r,ur=u,Hh=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,oy(jt,function(){return td(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=C.T,C.T=null,u=F.p,F.p=2,h=He,He|=4;try{Pg(e,t,l)}finally{He=h,F.p=u,C.T=n}}Ot=1,Fh(),Ih(),Ph()}}function Fh(){if(Ot===1){Ot=0;var e=Hn,t=$a,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=C.T,C.T=null;var n=F.p;F.p=2;var u=He;He|=4;try{wh(t,e);var r=Sr,h=Uo(e.containerInfo),p=r.focusedElem,v=r.selectionRange;if(h!==p&&p&&p.ownerDocument&&ko(p.ownerDocument.documentElement,p)){if(v!==null&&Vs(p)){var A=v.start,D=v.end;if(D===void 0&&(D=A),"selectionStart"in p)p.selectionStart=A,p.selectionEnd=Math.min(D,p.value.length);else{var H=p.ownerDocument||document,z=H&&H.defaultView||window;if(z.getSelection){var w=z.getSelection(),ae=p.textContent.length,de=Math.min(v.start,ae),We=v.end===void 0?de:Math.min(v.end,ae);!w.extend&&de>We&&(h=We,We=de,de=h);var T=Do(p,de),S=Do(p,We);if(T&&S&&(w.rangeCount!==1||w.anchorNode!==T.node||w.anchorOffset!==T.offset||w.focusNode!==S.node||w.focusOffset!==S.offset)){var O=H.createRange();O.setStart(T.node,T.offset),w.removeAllRanges(),de>We?(w.addRange(O),w.extend(S.node,S.offset)):(O.setEnd(S.node,S.offset),w.addRange(O))}}}}for(H=[],w=p;w=w.parentNode;)w.nodeType===1&&H.push({element:w,left:w.scrollLeft,top:w.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<H.length;p++){var q=H[p];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}bs=!!xr,Sr=xr=null}finally{He=u,F.p=n,C.T=l}}e.current=t,Ot=2}}function Ih(){if(Ot===2){Ot=0;var e=Hn,t=$a,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=C.T,C.T=null;var n=F.p;F.p=2;var u=He;He|=4;try{Oh(e,t.alternate,t)}finally{He=u,F.p=n,C.T=l}}Ot=3}}function Ph(){if(Ot===4||Ot===3){Ot=0,Yl();var e=Hn,t=$a,l=fn,n=Hh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ot=5:(Ot=0,$a=Hn=null,ed(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Bn=null),Yt(l),t=t.stateNode,At&&typeof At.onCommitFiberRoot=="function")try{At.onCommitFiberRoot(Ql,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=C.T,u=F.p,F.p=2,C.T=null;try{for(var r=e.onRecoverableError,h=0;h<n.length;h++){var p=n[h];r(p.value,{componentStack:p.stack})}}finally{C.T=t,F.p=u}}(fn&3)!==0&&us(),ql(e),u=e.pendingLanes,(l&261930)!==0&&(u&42)!==0?e===sr?Xi++:(Xi=0,sr=e):Xi=0,Qi(0)}}function ed(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ti(t)))}function us(){return Fh(),Ih(),Ph(),td()}function td(){if(Ot!==5)return!1;var e=Hn,t=ir;ir=0;var l=Yt(fn),n=C.T,u=F.p;try{F.p=32>l?32:l,C.T=null,l=ur,ur=null;var r=Hn,h=fn;if(Ot=0,$a=Hn=null,fn=0,(He&6)!==0)throw Error(s(331));var p=He;if(He|=4,Uh(r.current),Ch(r,r.current,h,l),He=p,Qi(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(Ql,r)}catch{}return!0}finally{F.p=u,C.T=n,ed(e,t)}}function ld(e,t,l){t=hl(l,t),t=Hc(e.stateNode,t,2),e=Mn(e,t,2),e!==null&&(Ge(e,2),ql(e))}function Ze(e,t,l){if(e.tag===3)ld(e,e,l);else for(;t!==null;){if(t.tag===3){ld(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Bn===null||!Bn.has(n))){e=hl(l,e),l=nh(2),n=Mn(t,l,2),n!==null&&(ah(l,n,t,e),Ge(n,2),ql(n));break}}t=t.return}}function or(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new ly;var u=new Set;n.set(t,u)}else u=n.get(t),u===void 0&&(u=new Set,n.set(t,u));u.has(l)||(lr=!0,u.add(l),e=sy.bind(null,e,t,l),t.then(e,e))}function sy(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Fe===e&&(ze&l)===l&&(ht===4||ht===3&&(ze&62914560)===ze&&300>ut()-es?(He&2)===0&&Wa(e,0):nr|=l,Ja===ze&&(Ja=0)),ql(e)}function nd(e,t){t===0&&(t=he()),e=na(e,t),e!==null&&(Ge(e,t),ql(e))}function cy(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),nd(e,l)}function ry(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,u=e.memoizedState;u!==null&&(l=u.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),nd(e,l)}function oy(e,t){return zl(e,t)}var ss=null,Ia=null,fr=!1,cs=!1,hr=!1,Gn=0;function ql(e){e!==Ia&&e.next===null&&(Ia===null?ss=Ia=e:Ia=Ia.next=e),cs=!0,fr||(fr=!0,hy())}function Qi(e,t){if(!hr&&cs){hr=!0;do for(var l=!1,n=ss;n!==null;){if(e!==0){var u=n.pendingLanes;if(u===0)var r=0;else{var h=n.suspendedLanes,p=n.pingedLanes;r=(1<<31-dt(42|e)+1)-1,r&=u&~(h&~p),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(l=!0,sd(n,r))}else r=ze,r=x(n,n===Fe?r:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(r&3)===0||U(n,r)||(l=!0,sd(n,r));n=n.next}while(l);hr=!1}}function fy(){ad()}function ad(){cs=fr=!1;var e=0;Gn!==0&&_y()&&(e=Gn);for(var t=ut(),l=null,n=ss;n!==null;){var u=n.next,r=id(n,t);r===0?(n.next=null,l===null?ss=u:l.next=u,u===null&&(Ia=l)):(l=n,(e!==0||(r&3)!==0)&&(cs=!0)),n=u}Ot!==0&&Ot!==5||Qi(e),Gn!==0&&(Gn=0)}function id(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var h=31-dt(r),p=1<<h,v=u[h];v===-1?((p&l)===0||(p&n)!==0)&&(u[h]=K(p,t)):v<=t&&(e.expiredLanes|=p),r&=~p}if(t=Fe,l=ze,l=x(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Rl(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||U(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&Rl(n),Yt(l)){case 2:case 8:l=wl;break;case 32:l=jt;break;case 268435456:l=$n;break;default:l=jt}return n=ud.bind(null,e),l=zl(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&Rl(n),e.callbackPriority=2,e.callbackNode=null,2}function ud(e,t){if(Ot!==0&&Ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(us()&&e.callbackNode!==l)return null;var n=ze;return n=x(e,e===Fe?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Gh(e,n,t),id(e,ut()),e.callbackNode!=null&&e.callbackNode===l?ud.bind(null,e):null)}function sd(e,t){if(us())return null;Gh(e,t,!0)}function hy(){Ty(function(){(He&6)!==0?zl(cl,fy):ad()})}function dr(){if(Gn===0){var e=qa;e===0&&(e=Zl,Zl<<=1,(Zl&261888)===0&&(Zl=256)),Gn=e}return Gn}function cd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Tn(""+e)}function rd(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 dy(e,t,l,n,u){if(t==="submit"&&l&&l.stateNode===u){var r=cd((u[kt]||null).action),h=n.submitter;h&&(t=(t=h[kt]||null)?cd(t.formAction):h.getAttribute("formAction"),t!==null&&(r=t,h=null));var p=new xu("action","action",null,n,u);e.push({event:p,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Gn!==0){var v=h?rd(u,h):new FormData(u);Cc(l,{pending:!0,data:v,method:u.method,action:r},null,v)}}else typeof r=="function"&&(p.preventDefault(),v=h?rd(u,h):new FormData(u),Cc(l,{pending:!0,data:v,method:u.method,action:r},r,v))},currentTarget:u}]})}}for(var pr=0;pr<Ws.length;pr++){var gr=Ws[pr],py=gr.toLowerCase(),gy=gr[0].toUpperCase()+gr.slice(1);_l(py,"on"+gy)}_l(Ho,"onAnimationEnd"),_l(Lo,"onAnimationIteration"),_l(Go,"onAnimationStart"),_l("dblclick","onDoubleClick"),_l("focusin","onFocus"),_l("focusout","onBlur"),_l(wg,"onTransitionRun"),_l(Mg,"onTransitionStart"),_l(Cg,"onTransitionCancel"),_l(Yo,"onTransitionEnd"),X("onMouseEnter",["mouseout","mouseover"]),X("onMouseLeave",["mouseout","mouseover"]),X("onPointerEnter",["pointerout","pointerover"]),X("onPointerLeave",["pointerout","pointerover"]),Jl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zi="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(" "),yy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zi));function od(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],u=n.event;n=n.listeners;e:{var r=void 0;if(t)for(var h=n.length-1;0<=h;h--){var p=n[h],v=p.instance,A=p.currentTarget;if(p=p.listener,v!==r&&u.isPropagationStopped())break e;r=p,u.currentTarget=A;try{r(u)}catch(D){Eu(D)}u.currentTarget=null,r=v}else for(h=0;h<n.length;h++){if(p=n[h],v=p.instance,A=p.currentTarget,p=p.listener,v!==r&&u.isPropagationStopped())break e;r=p,u.currentTarget=A;try{r(u)}catch(D){Eu(D)}u.currentTarget=null,r=v}}}}function Ae(e,t){var l=t[si];l===void 0&&(l=t[si]=new Set);var n=e+"__bubble";l.has(n)||(fd(t,e,2,!1),l.add(n))}function yr(e,t,l){var n=0;t&&(n|=4),fd(l,e,n,t)}var rs="_reactListening"+Math.random().toString(36).slice(2);function mr(e){if(!e[rs]){e[rs]=!0,hu.forEach(function(l){l!=="selectionchange"&&(yy.has(l)||yr(l,!1,e),yr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[rs]||(t[rs]=!0,yr("selectionchange",!1,t))}}function fd(e,t,l,n){switch(Ld(t)){case 2:var u=Qy;break;case 8:u=Zy;break;default:u=Mr}l=u.bind(null,t,l,e),u=void 0,!qs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),n?u!==void 0?e.addEventListener(t,l,{capture:!0,passive:u}):e.addEventListener(t,l,!0):u!==void 0?e.addEventListener(t,l,{passive:u}):e.addEventListener(t,l,!1)}function br(e,t,l,n,u){var r=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 p=n.stateNode.containerInfo;if(p===u)break;if(h===4)for(h=n.return;h!==null;){var v=h.tag;if((v===3||v===4)&&h.stateNode.containerInfo===u)return;h=h.return}for(;p!==null;){if(h=Bt(p),h===null)return;if(v=h.tag,v===5||v===6||v===26||v===27){n=r=h;continue e}p=p.parentNode}}n=n.return}yu(function(){var A=r,D=xe(l),H=[];e:{var z=Xo.get(e);if(z!==void 0){var w=xu,ae=e;switch(e){case"keypress":if(bu(l)===0)break e;case"keydown":case"keyup":w=rg;break;case"focusin":ae="focus",w=Gs;break;case"focusout":ae="blur",w=Gs;break;case"beforeblur":case"afterblur":w=Gs;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":w=bo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":w=Fp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":w=hg;break;case Ho:case Lo:case Go:w=eg;break;case Yo:w=pg;break;case"scroll":case"scrollend":w=$p;break;case"wheel":w=yg;break;case"copy":case"cut":case"paste":w=lg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":w=xo;break;case"toggle":case"beforetoggle":w=bg}var de=(t&4)!==0,We=!de&&(e==="scroll"||e==="scrollend"),T=de?z!==null?z+"Capture":null:z;de=[];for(var S=A,O;S!==null;){var q=S;if(O=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||O===null||T===null||(q=di(S,T),q!=null&&de.push(Vi(S,q,O))),We)break;S=S.return}0<de.length&&(z=new w(z,ae,null,l,D),H.push({event:z,listeners:de}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",w=e==="mouseout"||e==="pointerout",z&&l!==ie&&(ae=l.relatedTarget||l.fromElement)&&(Bt(ae)||ae[xn]))break e;if((w||z)&&(z=D.window===D?D:(z=D.ownerDocument)?z.defaultView||z.parentWindow:window,w?(ae=l.relatedTarget||l.toElement,w=A,ae=ae?Bt(ae):null,ae!==null&&(We=f(ae),de=ae.tag,ae!==We||de!==5&&de!==27&&de!==6)&&(ae=null)):(w=null,ae=A),w!==ae)){if(de=bo,q="onMouseLeave",T="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(de=xo,q="onPointerLeave",T="onPointerEnter",S="pointer"),We=w==null?z:Sn(w),O=ae==null?z:Sn(ae),z=new de(q,S+"leave",w,l,D),z.target=We,z.relatedTarget=O,q=null,Bt(D)===A&&(de=new de(T,S+"enter",ae,l,D),de.target=O,de.relatedTarget=We,q=de),We=q,w&&ae)t:{for(de=my,T=w,S=ae,O=0,q=T;q;q=de(q))O++;q=0;for(var fe=S;fe;fe=de(fe))q++;for(;0<O-q;)T=de(T),O--;for(;0<q-O;)S=de(S),q--;for(;O--;){if(T===S||S!==null&&T===S.alternate){de=T;break t}T=de(T),S=de(S)}de=null}else de=null;w!==null&&hd(H,z,w,de,!1),ae!==null&&We!==null&&hd(H,We,ae,de,!0)}}e:{if(z=A?Sn(A):window,w=z.nodeName&&z.nodeName.toLowerCase(),w==="select"||w==="input"&&z.type==="file")var ke=No;else if(Oo(z))if(zo)ke=Ng;else{ke=Og;var ue=jg}else w=z.nodeName,!w||w.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?A&&En(A.elementType)&&(ke=No):ke=Ag;if(ke&&(ke=ke(e,A))){Ao(H,ke,l,D);break e}ue&&ue(e,z,A),e==="focusout"&&A&&z.type==="number"&&A.memoizedProps.value!=null&&Oa(z,"number",z.value)}switch(ue=A?Sn(A):window,e){case"focusin":(Oo(ue)||ue.contentEditable==="true")&&(za=ue,Ks=A,Si=null);break;case"focusout":Si=Ks=za=null;break;case"mousedown":Js=!0;break;case"contextmenu":case"mouseup":case"dragend":Js=!1,qo(H,l,D);break;case"selectionchange":if(Rg)break;case"keydown":case"keyup":qo(H,l,D)}var Ee;if(Xs)e:{switch(e){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else Na?To(e,l)&&(Re="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Re="onCompositionStart");Re&&(So&&l.locale!=="ko"&&(Na||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&Na&&(Ee=yo()):(jn=D,Bs="value"in jn?jn.value:jn.textContent,Na=!0)),ue=os(A,Re),0<ue.length&&(Re=new vo(Re,e,null,l,D),H.push({event:Re,listeners:ue}),Ee?Re.data=Ee:(Ee=jo(l),Ee!==null&&(Re.data=Ee)))),(Ee=xg?Sg(e,l):_g(e,l))&&(Re=os(A,"onBeforeInput"),0<Re.length&&(ue=new vo("onBeforeInput","beforeinput",null,l,D),H.push({event:ue,listeners:Re}),ue.data=Ee)),dy(H,e,A,l,D)}od(H,t)})}function Vi(e,t,l){return{instance:e,listener:t,currentTarget:l}}function os(e,t){for(var l=t+"Capture",n=[];e!==null;){var u=e,r=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||r===null||(u=di(e,l),u!=null&&n.unshift(Vi(e,u,r)),u=di(e,t),u!=null&&n.push(Vi(e,u,r))),e.tag===3)return n;e=e.return}return[]}function my(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function hd(e,t,l,n,u){for(var r=t._reactName,h=[];l!==null&&l!==n;){var p=l,v=p.alternate,A=p.stateNode;if(p=p.tag,v!==null&&v===n)break;p!==5&&p!==26&&p!==27||A===null||(v=A,u?(A=di(l,r),A!=null&&h.unshift(Vi(l,A,v))):u||(A=di(l,r),A!=null&&h.push(Vi(l,A,v)))),l=l.return}h.length!==0&&e.push({event:t,listeners:h})}var by=/\r\n?/g,vy=/\u0000|\uFFFD/g;function dd(e){return(typeof e=="string"?e:""+e).replace(by,`
|
|
9
|
+
`).replace(vy,"")}function pd(e,t){return t=dd(t),dd(e)===t}function $e(e,t,l,n,u,r){switch(l){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||pe(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&pe(e,""+n);break;case"className":Ft(e,"class",n);break;case"tabIndex":Ft(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ft(e,l,n);break;case"style":Xe(e,n,r);break;case"data":if(t!=="object"){Ft(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=Tn(""+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 r=="function"&&(l==="formAction"?(t!=="input"&&$e(e,t,"name",u.name,u,null),$e(e,t,"formEncType",u.formEncType,u,null),$e(e,t,"formMethod",u.formMethod,u,null),$e(e,t,"formTarget",u.formTarget,u,null)):($e(e,t,"encType",u.encType,u,null),$e(e,t,"method",u.method,u,null),$e(e,t,"target",u.target,u,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=Tn(""+n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=J);break;case"onScroll":n!=null&&Ae("scroll",e);break;case"onScrollEnd":n!=null&&Ae("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(u.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=Tn(""+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":Ae("beforetoggle",e),Ae("toggle",e),Ut(e,"popover",n);break;case"xlinkActuate":Xt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Xt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Xt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Xt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Xt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Xt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Xt(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=$l.get(l)||l,Ut(e,l,n))}}function vr(e,t,l,n,u,r){switch(l){case"style":Xe(e,n,r);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(s(61));if(l=n.__html,l!=null){if(u.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"children":typeof n=="string"?pe(e,n):(typeof n=="number"||typeof n=="bigint")&&pe(e,""+n);break;case"onScroll":n!=null&&Ae("scroll",e);break;case"onScrollEnd":n!=null&&Ae("scrollend",e);break;case"onClick":n!=null&&(e.onclick=J);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!In.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(u=l.endsWith("Capture"),t=l.slice(2,u?l.length-7:void 0),r=e[kt]||null,r=r!=null?r[l]:null,typeof r=="function"&&e.removeEventListener(t,r,u),typeof n=="function")){typeof r!="function"&&r!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,n,u);break e}l in e?e[l]=n:n===!0?e.setAttribute(l,""):Ut(e,l,n)}}}function Ct(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var n=!1,u=!1,r;for(r in l)if(l.hasOwnProperty(r)){var h=l[r];if(h!=null)switch(r){case"src":n=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:$e(e,t,r,h,l,null)}}u&&$e(e,t,"srcSet",l.srcSet,l,null),n&&$e(e,t,"src",l.src,l,null);return;case"input":Ae("invalid",e);var p=r=h=u=null,v=null,A=null;for(n in l)if(l.hasOwnProperty(n)){var D=l[n];if(D!=null)switch(n){case"name":u=D;break;case"type":h=D;break;case"checked":v=D;break;case"defaultChecked":A=D;break;case"value":r=D;break;case"defaultValue":p=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(s(137,t));break;default:$e(e,t,n,D,l,null)}}Pn(e,r,p,v,A,h,u,!1);return;case"select":Ae("invalid",e),n=h=r=null;for(u in l)if(l.hasOwnProperty(u)&&(p=l[u],p!=null))switch(u){case"value":r=p;break;case"defaultValue":h=p;break;case"multiple":n=p;default:$e(e,t,u,p,l,null)}t=r,l=h,e.multiple=!!n,t!=null?zt(e,!!n,t,!1):l!=null&&zt(e,!!n,l,!0);return;case"textarea":Ae("invalid",e),r=u=n=null;for(h in l)if(l.hasOwnProperty(h)&&(p=l[h],p!=null))switch(h){case"value":n=p;break;case"defaultValue":u=p;break;case"children":r=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(s(91));break;default:$e(e,t,h,p,l,null)}Aa(e,n,u,r);return;case"option":for(v in l)l.hasOwnProperty(v)&&(n=l[v],n!=null)&&(v==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":$e(e,t,v,n,l,null));return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(n=0;n<Zi.length;n++)Ae(Zi[n],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("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(A in l)if(l.hasOwnProperty(A)&&(n=l[A],n!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:$e(e,t,A,n,l,null)}return;default:if(En(t)){for(D in l)l.hasOwnProperty(D)&&(n=l[D],n!==void 0&&vr(e,t,D,n,l,void 0));return}}for(p in l)l.hasOwnProperty(p)&&(n=l[p],n!=null&&$e(e,t,p,n,l,null))}function xy(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 u=null,r=null,h=null,p=null,v=null,A=null,D=null;for(w in l){var H=l[w];if(l.hasOwnProperty(w)&&H!=null)switch(w){case"checked":break;case"value":break;case"defaultValue":v=H;default:n.hasOwnProperty(w)||$e(e,t,w,null,n,H)}}for(var z in n){var w=n[z];if(H=l[z],n.hasOwnProperty(z)&&(w!=null||H!=null))switch(z){case"type":r=w;break;case"name":u=w;break;case"checked":A=w;break;case"defaultChecked":D=w;break;case"value":h=w;break;case"defaultValue":p=w;break;case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(s(137,t));break;default:w!==H&&$e(e,t,z,w,n,H)}}oi(e,h,p,v,A,D,r,u);return;case"select":w=h=p=z=null;for(r in l)if(v=l[r],l.hasOwnProperty(r)&&v!=null)switch(r){case"value":break;case"multiple":w=v;default:n.hasOwnProperty(r)||$e(e,t,r,null,n,v)}for(u in n)if(r=n[u],v=l[u],n.hasOwnProperty(u)&&(r!=null||v!=null))switch(u){case"value":z=r;break;case"defaultValue":p=r;break;case"multiple":h=r;default:r!==v&&$e(e,t,u,r,n,v)}t=p,l=h,n=w,z!=null?zt(e,!!l,z,!1):!!n!=!!l&&(t!=null?zt(e,!!l,t,!0):zt(e,!!l,l?[]:"",!1));return;case"textarea":w=z=null;for(p in l)if(u=l[p],l.hasOwnProperty(p)&&u!=null&&!n.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:$e(e,t,p,null,n,u)}for(h in n)if(u=n[h],r=l[h],n.hasOwnProperty(h)&&(u!=null||r!=null))switch(h){case"value":z=u;break;case"defaultValue":w=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(s(91));break;default:u!==r&&$e(e,t,h,u,n,r)}pu(e,z,w);return;case"option":for(var ae in l)z=l[ae],l.hasOwnProperty(ae)&&z!=null&&!n.hasOwnProperty(ae)&&(ae==="selected"?e.selected=!1:$e(e,t,ae,null,n,z));for(v in n)z=n[v],w=l[v],n.hasOwnProperty(v)&&z!==w&&(z!=null||w!=null)&&(v==="selected"?e.selected=z&&typeof z!="function"&&typeof z!="symbol":$e(e,t,v,z,n,w));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 de in l)z=l[de],l.hasOwnProperty(de)&&z!=null&&!n.hasOwnProperty(de)&&$e(e,t,de,null,n,z);for(A in n)if(z=n[A],w=l[A],n.hasOwnProperty(A)&&z!==w&&(z!=null||w!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(s(137,t));break;default:$e(e,t,A,z,n,w)}return;default:if(En(t)){for(var We in l)z=l[We],l.hasOwnProperty(We)&&z!==void 0&&!n.hasOwnProperty(We)&&vr(e,t,We,void 0,n,z);for(D in n)z=n[D],w=l[D],!n.hasOwnProperty(D)||z===w||z===void 0&&w===void 0||vr(e,t,D,z,n,w);return}}for(var T in l)z=l[T],l.hasOwnProperty(T)&&z!=null&&!n.hasOwnProperty(T)&&$e(e,t,T,null,n,z);for(H in n)z=n[H],w=l[H],!n.hasOwnProperty(H)||z===w||z==null&&w==null||$e(e,t,H,z,n,w)}function gd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Sy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var u=l[n],r=u.transferSize,h=u.initiatorType,p=u.duration;if(r&&p&&gd(h)){for(h=0,p=u.responseEnd,n+=1;n<l.length;n++){var v=l[n],A=v.startTime;if(A>p)break;var D=v.transferSize,H=v.initiatorType;D&&gd(H)&&(v=v.responseEnd,h+=D*(v<p?1:(p-A)/(v-A)))}if(--n,t+=8*(r+h)/(u.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 xr=null,Sr=null;function fs(e){return e.nodeType===9?e:e.ownerDocument}function yd(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 md(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 _r(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 Er=null;function _y(){var e=window.event;return e&&e.type==="popstate"?e===Er?!1:(Er=e,!0):(Er=null,!1)}var bd=typeof setTimeout=="function"?setTimeout:void 0,Ey=typeof clearTimeout=="function"?clearTimeout:void 0,vd=typeof Promise=="function"?Promise:void 0,Ty=typeof queueMicrotask=="function"?queueMicrotask:typeof vd<"u"?function(e){return vd.resolve(null).then(e).catch(jy)}:bd;function jy(e){setTimeout(function(){throw e})}function Yn(e){return e==="head"}function xd(e,t){var l=t,n=0;do{var u=l.nextSibling;if(e.removeChild(l),u&&u.nodeType===8)if(l=u.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(u),li(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Ki(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Ki(l);for(var r=l.firstChild;r;){var h=r.nextSibling,p=r.nodeName;r[Fn]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&r.rel.toLowerCase()==="stylesheet"||l.removeChild(r),r=h}}else l==="body"&&Ki(e.ownerDocument.body);l=u}while(l);li(t)}function Sd(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 Tr(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":Tr(l),ci(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Oy(e,t,l,n){for(;e.nodeType===1;){var u=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Fn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=ml(e.nextSibling),e===null)break}return null}function Ay(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=ml(e.nextSibling),e===null))return null;return e}function _d(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ml(e.nextSibling),e===null))return null;return e}function jr(e){return e.data==="$?"||e.data==="$~"}function Or(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ny(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 ml(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 Ar=null;function Ed(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return ml(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Td(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 jd(e,t,l){switch(t=fs(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 Ki(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ci(e)}var bl=new Map,Od=new Set;function hs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var hn=F.d;F.d={f:zy,r:Ry,D:wy,C:My,L:Cy,m:Dy,X:Uy,S:ky,M:qy};function zy(){var e=hn.f(),t=ns();return e||t}function Ry(e){var t=Kl(e);t!==null&&t.tag===5&&t.type==="form"?Xf(t):hn.r(e)}var Pa=typeof document>"u"?null:document;function Ad(e,t,l){var n=Pa;if(n&&typeof t=="string"&&t){var u=Qt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof l=="string"&&(u+='[crossorigin="'+l+'"]'),Od.has(u)||(Od.add(u),e={rel:e,crossOrigin:l,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),Ct(t,"link",e),bt(t),n.head.appendChild(t)))}}function wy(e){hn.D(e),Ad("dns-prefetch",e,null)}function My(e,t){hn.C(e,t),Ad("preconnect",e,t)}function Cy(e,t,l){hn.L(e,t,l);var n=Pa;if(n&&e&&t){var u='link[rel="preload"][as="'+Qt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(u+='[imagesrcset="'+Qt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(u+='[imagesizes="'+Qt(l.imageSizes)+'"]')):u+='[href="'+Qt(e)+'"]';var r=u;switch(t){case"style":r=ei(e);break;case"script":r=ti(e)}bl.has(r)||(e=j({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),bl.set(r,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(Ji(r))||t==="script"&&n.querySelector($i(r))||(t=n.createElement("link"),Ct(t,"link",e),bt(t),n.head.appendChild(t)))}}function Dy(e,t){hn.m(e,t);var l=Pa;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Qt(n)+'"][href="'+Qt(e)+'"]',r=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=ti(e)}if(!bl.has(r)&&(e=j({rel:"modulepreload",href:e},t),bl.set(r,e),l.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector($i(r)))return}n=l.createElement("link"),Ct(n,"link",e),bt(n),l.head.appendChild(n)}}}function ky(e,t,l){hn.S(e,t,l);var n=Pa;if(n&&e){var u=_n(n).hoistableStyles,r=ei(e);t=t||"default";var h=u.get(r);if(!h){var p={loading:0,preload:null};if(h=n.querySelector(Ji(r)))p.loading=5;else{e=j({rel:"stylesheet",href:e,"data-precedence":t},l),(l=bl.get(r))&&Nr(e,l);var v=h=n.createElement("link");bt(v),Ct(v,"link",e),v._p=new Promise(function(A,D){v.onload=A,v.onerror=D}),v.addEventListener("load",function(){p.loading|=1}),v.addEventListener("error",function(){p.loading|=2}),p.loading|=4,ds(h,t,n)}h={type:"stylesheet",instance:h,count:1,state:p},u.set(r,h)}}}function Uy(e,t){hn.X(e,t);var l=Pa;if(l&&e){var n=_n(l).hoistableScripts,u=ti(e),r=n.get(u);r||(r=l.querySelector($i(u)),r||(e=j({src:e,async:!0},t),(t=bl.get(u))&&zr(e,t),r=l.createElement("script"),bt(r),Ct(r,"link",e),l.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(u,r))}}function qy(e,t){hn.M(e,t);var l=Pa;if(l&&e){var n=_n(l).hoistableScripts,u=ti(e),r=n.get(u);r||(r=l.querySelector($i(u)),r||(e=j({src:e,async:!0,type:"module"},t),(t=bl.get(u))&&zr(e,t),r=l.createElement("script"),bt(r),Ct(r,"link",e),l.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(u,r))}}function Nd(e,t,l,n){var u=(u=ve.current)?hs(u):null;if(!u)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=ei(l.href),l=_n(u).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=ei(l.href);var r=_n(u).hoistableStyles,h=r.get(e);if(h||(u=u.ownerDocument||u,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,h),(r=u.querySelector(Ji(e)))&&!r._p&&(h.instance=r,h.state.loading=5),bl.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},bl.set(e,l),r||By(u,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=ti(l),l=_n(u).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 ei(e){return'href="'+Qt(e)+'"'}function Ji(e){return'link[rel="stylesheet"]['+e+"]"}function zd(e){return j({},e,{"data-precedence":e.precedence,precedence:null})}function By(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}),Ct(t,"link",l),bt(t),e.head.appendChild(t))}function ti(e){return'[src="'+Qt(e)+'"]'}function $i(e){return"script[async]"+e}function Rd(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,bt(n),n;var u=j({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),bt(n),Ct(n,"style",u),ds(n,l.precedence,e),t.instance=n;case"stylesheet":u=ei(l.href);var r=e.querySelector(Ji(u));if(r)return t.state.loading|=4,t.instance=r,bt(r),r;n=zd(l),(u=bl.get(u))&&Nr(n,u),r=(e.ownerDocument||e).createElement("link"),bt(r);var h=r;return h._p=new Promise(function(p,v){h.onload=p,h.onerror=v}),Ct(r,"link",n),t.state.loading|=4,ds(r,l.precedence,e),t.instance=r;case"script":return r=ti(l.src),(u=e.querySelector($i(r)))?(t.instance=u,bt(u),u):(n=l,(u=bl.get(r))&&(n=j({},l),zr(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),bt(u),Ct(u,"link",n),e.head.appendChild(u),t.instance=u);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,ds(n,l.precedence,e));return t.instance}function ds(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=n.length?n[n.length-1]:null,r=u,h=0;h<n.length;h++){var p=n[h];if(p.dataset.precedence===t)r=p;else if(r!==u)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Nr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function zr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ps=null;function wd(e,t,l){if(ps===null){var n=new Map,u=ps=new Map;u.set(l,n)}else u=ps,n=u.get(l),n||(n=new Map,u.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),u=0;u<l.length;u++){var r=l[u];if(!(r[Fn]||r[pt]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var h=r.getAttribute(t)||"";h=e+h;var p=n.get(h);p?p.push(r):n.set(h,[r])}}return n}function Md(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Hy(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 Cd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ly(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 u=ei(n.href),r=t.querySelector(Ji(u));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=gs.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=r,bt(r);return}r=t.ownerDocument||t,n=zd(n),(u=bl.get(u))&&Nr(n,u),r=r.createElement("link"),bt(r);var h=r;h._p=new Promise(function(p,v){h.onload=p,h.onerror=v}),Ct(r,"link",n),l.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=gs.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Rr=0;function Gy(e,t){return e.stylesheets&&e.count===0&&ms(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&ms(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&Rr===0&&(Rr=62500*Sy());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ms(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>Rr?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function gs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ms(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ys=null;function ms(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ys=new Map,t.forEach(Yy,e),ys=null,gs.call(e))}function Yy(e,t){if(!(t.state.loading&4)){var l=ys.get(e);if(l)var n=l.get(null);else{l=new Map,ys.set(e,l);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<u.length;r++){var h=u[r];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(l.set(h.dataset.precedence,h),n=h)}n&&l.set(null,n)}u=t.instance,h=u.getAttribute("data-precedence"),r=l.get(h)||n,r===n&&l.set(null,u),l.set(h,u),this.count++,n=gs.bind(this),u.addEventListener("load",n),u.addEventListener("error",n),r?r.parentNode.insertBefore(u,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Wi={$$typeof:ne,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function Xy(e,t,l,n,u,r,h,p,v){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=Be(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Be(0),this.hiddenUpdates=Be(null),this.identifierPrefix=n,this.onUncaughtError=u,this.onCaughtError=r,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map}function Dd(e,t,l,n,u,r,h,p,v,A,D,H){return e=new Xy(e,t,l,h,v,A,D,H,p),t=1,r===!0&&(t|=24),r=el(3,null,null,t),e.current=r,r.stateNode=e,t=rc(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:n,isDehydrated:l,cache:t},dc(r),e}function kd(e){return e?(e=Ma,e):Ma}function Ud(e,t,l,n,u,r){u=kd(u),n.context===null?n.context=u:n.pendingContext=u,n=wn(t),n.payload={element:l},r=r===void 0?null:r,r!==null&&(n.callback=r),l=Mn(e,n,t),l!==null&&(Wt(l,e,t),Ni(l,e,t))}function qd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function wr(e,t){qd(e,t),(e=e.alternate)&&qd(e,t)}function Bd(e){if(e.tag===13||e.tag===31){var t=na(e,67108864);t!==null&&Wt(t,e,67108864),wr(e,67108864)}}function Hd(e){if(e.tag===13||e.tag===31){var t=il();t=Le(t);var l=na(e,t);l!==null&&Wt(l,e,t),wr(e,t)}}var bs=!0;function Qy(e,t,l,n){var u=C.T;C.T=null;var r=F.p;try{F.p=2,Mr(e,t,l,n)}finally{F.p=r,C.T=u}}function Zy(e,t,l,n){var u=C.T;C.T=null;var r=F.p;try{F.p=8,Mr(e,t,l,n)}finally{F.p=r,C.T=u}}function Mr(e,t,l,n){if(bs){var u=Cr(n);if(u===null)br(e,t,n,vs,l),Gd(e,n);else if(Ky(u,e,t,l,n))n.stopPropagation();else if(Gd(e,n),t&4&&-1<Vy.indexOf(e)){for(;u!==null;){var r=Kl(u);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var h=Dt(r.pendingLanes);if(h!==0){var p=r;for(p.pendingLanes|=2,p.entangledLanes|=2;h;){var v=1<<31-dt(h);p.entanglements[1]|=v,h&=~v}ql(r),(He&6)===0&&(ts=ut()+500,Qi(0))}}break;case 31:case 13:p=na(r,2),p!==null&&Wt(p,r,2),ns(),wr(r,2)}if(r=Cr(n),r===null&&br(e,t,n,vs,l),r===u)break;u=r}u!==null&&n.stopPropagation()}else br(e,t,n,null,l)}}function Cr(e){return e=xe(e),Dr(e)}var vs=null;function Dr(e){if(vs=null,e=Bt(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=y(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 vs=e,null}function Ld(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(bn()){case cl:return 2;case wl:return 8;case jt:case Ml:return 32;case $n:return 268435456;default:return 32}default:return 32}}var kr=!1,Xn=null,Qn=null,Zn=null,Fi=new Map,Ii=new Map,Vn=[],Vy="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 Gd(e,t){switch(e){case"focusin":case"focusout":Xn=null;break;case"dragenter":case"dragleave":Qn=null;break;case"mouseover":case"mouseout":Zn=null;break;case"pointerover":case"pointerout":Fi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ii.delete(t.pointerId)}}function Pi(e,t,l,n,u,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:r,targetContainers:[u]},t!==null&&(t=Kl(t),t!==null&&Bd(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Ky(e,t,l,n,u){switch(t){case"focusin":return Xn=Pi(Xn,e,t,l,n,u),!0;case"dragenter":return Qn=Pi(Qn,e,t,l,n,u),!0;case"mouseover":return Zn=Pi(Zn,e,t,l,n,u),!0;case"pointerover":var r=u.pointerId;return Fi.set(r,Pi(Fi.get(r)||null,e,t,l,n,u)),!0;case"gotpointercapture":return r=u.pointerId,Ii.set(r,Pi(Ii.get(r)||null,e,t,l,n,u)),!0}return!1}function Yd(e){var t=Bt(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,_a(e.priority,function(){Hd(l)});return}}else if(t===31){if(t=y(l),t!==null){e.blockedOn=t,_a(e.priority,function(){Hd(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 xs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Cr(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);ie=n,l.target.dispatchEvent(n),ie=null}else return t=Kl(l),t!==null&&Bd(t),e.blockedOn=l,!1;t.shift()}return!0}function Xd(e,t,l){xs(e)&&l.delete(t)}function Jy(){kr=!1,Xn!==null&&xs(Xn)&&(Xn=null),Qn!==null&&xs(Qn)&&(Qn=null),Zn!==null&&xs(Zn)&&(Zn=null),Fi.forEach(Xd),Ii.forEach(Xd)}function Ss(e,t){e.blockedOn===t&&(e.blockedOn=null,kr||(kr=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Jy)))}var _s=null;function Qd(e){_s!==e&&(_s=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){_s===e&&(_s=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],u=e[t+2];if(typeof n!="function"){if(Dr(n||l)===null)continue;break}var r=Kl(l);r!==null&&(e.splice(t,3),t-=3,Cc(r,{pending:!0,data:u,method:l.method,action:n},n,u))}}))}function li(e){function t(v){return Ss(v,e)}Xn!==null&&Ss(Xn,e),Qn!==null&&Ss(Qn,e),Zn!==null&&Ss(Zn,e),Fi.forEach(t),Ii.forEach(t);for(var l=0;l<Vn.length;l++){var n=Vn[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Vn.length&&(l=Vn[0],l.blockedOn===null);)Yd(l),l.blockedOn===null&&Vn.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var u=l[n],r=l[n+1],h=u[kt]||null;if(typeof r=="function")h||Qd(l);else if(h){var p=null;if(r&&r.hasAttribute("formAction")){if(u=r,h=r[kt]||null)p=h.formAction;else if(Dr(u)!==null)continue}else p=h.action;typeof p=="function"?l[n+1]=p:(l.splice(n,3),n-=3),Qd(l)}}}function Zd(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(h){return u=h})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,u=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),u!==null&&(u(),u=null)}}}function Ur(e){this._internalRoot=e}Es.prototype.render=Ur.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var l=t.current,n=il();Ud(l,n,e,t,null,null)},Es.prototype.unmount=Ur.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ud(e.current,2,null,e,null,null),ns(),t[xn]=null}};function Es(e){this._internalRoot=e}Es.prototype.unstable_scheduleHydration=function(e){if(e){var t=Sa();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Vn.length&&t!==0&&t<Vn[l].priority;l++);Vn.splice(l,0,e),l===0&&Yd(e)}};var Vd=i.version;if(Vd!=="19.2.4")throw Error(s(527,Vd,"19.2.4"));F.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=b(t),e=e!==null?E(e):null,e=e===null?null:e.stateNode,e};var $y={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:C,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ts=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ts.isDisabled&&Ts.supportsFiber)try{Ql=Ts.inject($y),At=Ts}catch{}}return tu.createRoot=function(e,t){if(!o(e))throw Error(s(299));var l=!1,n="",u=Pf,r=eh,h=th;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Dd(e,1,!1,null,null,l,n,null,u,r,h,Zd),e[xn]=t.current,mr(e),new Ur(t)},tu.hydrateRoot=function(e,t,l){if(!o(e))throw Error(s(299));var n=!1,u="",r=Pf,h=eh,p=th,v=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(u=l.identifierPrefix),l.onUncaughtError!==void 0&&(r=l.onUncaughtError),l.onCaughtError!==void 0&&(h=l.onCaughtError),l.onRecoverableError!==void 0&&(p=l.onRecoverableError),l.formState!==void 0&&(v=l.formState)),t=Dd(e,1,!0,t,l??null,n,u,v,r,h,p,Zd),t.context=kd(null),l=t.current,n=il(),n=Le(n),u=wn(n),u.callback=null,Mn(l,u,n),l=n,t.current.lanes=l,Ge(t,l),ql(t),e[xn]=t.current,mr(e),new Es(t)},tu.version="19.2.4",tu}var lp;function um(){if(lp)return Br.exports;lp=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(),Br.exports=im(),Br.exports}var sm=um(),M=to();const cm="/api";async function nt(a,i,c){const s={method:a,headers:{}};c!==void 0&&(s.headers["Content-Type"]="application/json",s.body=JSON.stringify(c));const o=await fetch(`${cm}${i}`,s);if(!o.ok){const d=await o.text().catch(()=>"");throw new Error(`${o.status} ${o.statusText}: ${d}`)}return(o.headers.get("content-type")||"").includes("application/json")?o.json():o.text()}function rm(){return nt("GET","/project")}function om(a){return nt("PUT","/project/switch",{path:a})}function js(){return nt("GET","/projects")}function fm(a,i){return nt("POST","/projects",{path:a,spec:i})}function hm(a){return nt("DELETE","/projects",{path:a})}function np(){return nt("GET","/project/spec/endpoints")}function dm(a,i){return nt("GET",`/project/spec/endpoint?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}`)}function pm(a,i,c){let s=`?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}`;return s+=`&contentType=${encodeURIComponent(c)}`,nt("GET",`/project/spec/endpoint/sample${s}`)}function ap(){return nt("GET","/project/environments")}function Xr(){return nt("GET","/project/environments/resolved")}function gm(a){return nt("PUT","/project/environments/base",a)}function ym(a,i){return nt("PUT",`/project/environments/${encodeURIComponent(a)}`,i)}function mm(a){return nt("PUT","/project/environments/active",{name:a})}function bm(a){return nt("DELETE",`/project/environments/${encodeURIComponent(a)}`)}function vm(a,i){return nt("GET",`/project/params?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}`)}function ip(a,i,c){return nt("PUT",`/project/params?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}`,c)}function xm(a){return nt("POST","/project/request/send",a)}function Sm(a){return nt("POST","/project/request/cancel",{request_id:a})}function _m(a,i,c,s){return nt("POST","/project/request/validate",{method:a,path:i,body:c,content_type:s})}function up(a,i,c){let s=`?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}`;return nt("GET",`/project/request/history${s}`)}function Em(a,i,c){return nt("GET",`/project/request/history/entry?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}&index=${encodeURIComponent(c)}`)}function Tm(a,i){return nt("DELETE",`/project/request/history?method=${encodeURIComponent(a)}&path=${encodeURIComponent(i)}`)}function jm(a){return nt("GET",`/browse?path=${encodeURIComponent(a||"~")}`)}function Om(){return nt("GET","/preferences")}function Am(a){return nt("PATCH","/preferences",a)}function Nm({onSpecReloaded:a,onSpecError:i,onGitChanged:c,onProjectSwitched:s}={}){const o=new EventSource("/api/events");return o.addEventListener("spec:reloaded",f=>{const d=f.data?JSON.parse(f.data):{};a&&a(d)}),o.addEventListener("spec:error",f=>{const d=f.data?JSON.parse(f.data):{};i&&i(d)}),o.addEventListener("git:changed",f=>{const d=f.data?JSON.parse(f.data):{};c&&c(d)}),o.addEventListener("project:switched",f=>{const d=f.data?JSON.parse(f.data):{};s&&s(d)}),o.onerror=()=>{},{disconnect(){o.close()}}}function zm({project:a,git:i,environments:c,activeEnv:s,onSwitchProject:o,onSetActiveEnv:f,onOpenEnvEditor:d,onOpenProjectDialog:y,toast:g,projects:b,servers:E,serverIndex:j,onServerIndexChange:G,sending:L,onSend:I,onCancel:Q,hasEndpoint:V}){const ee=[];c&&(ee.push("Base"),c.environments&&Object.keys(c.environments).forEach(ne=>ee.push(ne)));const ye=a?.name||a?.path||"No project";return m.jsxs("div",{className:"topbar",children:[m.jsxs("div",{className:"topbar__section",children:[m.jsx("span",{className:"topbar__label",children:"Project"}),m.jsxs("select",{className:"topbar__select",value:a?.path||"",onChange:ne=>{ne.target.value&&o&&o(ne.target.value)},children:[(!b||b.length===0)&&m.jsx("option",{value:"",children:ye}),b&&b.map(ne=>m.jsx("option",{value:ne.path,children:ne.name||ne.path},ne.path))]}),m.jsx("button",{className:"topbar__btn",onClick:y,title:"Open project",children:"Open"})]}),c&&m.jsxs("div",{className:"topbar__section",children:[m.jsx("span",{className:"topbar__label",children:"Env"}),m.jsx("select",{className:"topbar__select",value:s||"Base",onChange:ne=>{f&&f(ne.target.value==="Base"?null:ne.target.value)},children:ee.map(ne=>m.jsx("option",{value:ne,children:ne},ne))}),m.jsx("button",{className:"topbar__btn",onClick:d,title:"Edit environments (Ctrl+E)",children:"Edit"})]}),m.jsxs("div",{className:"topbar__section--right",children:[E&&E.length>0&&m.jsxs("div",{className:"topbar__section",children:[m.jsx("span",{className:"topbar__label",children:"Server"}),m.jsx("select",{className:"topbar__select",value:j,onChange:ne=>G(Number(ne.target.value)),children:E.map((ne,$)=>m.jsxs("option",{value:$,children:[ne.url,ne.description?` - ${ne.description}`:""]},$))})]}),V&&m.jsx("div",{className:"topbar__section",children:L?m.jsxs("button",{className:"topbar__send-btn topbar__send-btn--cancel",onClick:Q,children:[m.jsx("span",{className:"topbar__spinner"}),"Cancel"]}):m.jsx("button",{className:"topbar__send-btn",onClick:I,children:"Send"})}),i&&m.jsxs("div",{className:"topbar__git",children:[m.jsx("span",{className:"topbar__git-branch",children:i.branch||"detached"}),i.commit&&m.jsx("span",{className:"topbar__git-commit",children:i.commit}),i.dirty&&m.jsx("span",{className:"topbar__git-dirty",children:"*"})]}),g&&m.jsx("span",{className:"topbar__toast",children:g},g)]})]})}function lo({endpoint:a,selected:i,onSelect:c}){const s=`endpoint-item__method endpoint-item__method--${(a.method||"").toLowerCase()}`,o=`endpoint-item${i?" endpoint-item--selected":""}`;return m.jsxs("div",{className:o,onClick:()=>c(a),children:[m.jsx("span",{className:s,children:(a.method||"").toUpperCase()}),m.jsx("span",{className:"endpoint-item__path",children:a.path}),a.summary&&m.jsx("span",{className:"endpoint-item__summary",children:a.summary})]})}function Rm({endpoints:a,selectedEndpoint:i,onSelect:c}){const s=M.useMemo(()=>{const f={};for(const d of a){const y=d.tags&&d.tags.length>0?d.tags:["default"];for(const g of y)f[g]||(f[g]=[]),f[g].push(d)}return f},[a]),o=Object.keys(s).sort();return m.jsx(m.Fragment,{children:o.map(f=>m.jsxs("div",{children:[m.jsx("div",{className:"endpoint-list__tag-header",children:f}),s[f].map(d=>m.jsx(lo,{endpoint:d,selected:i&&i.method===d.method&&i.path===d.path,onSelect:c},`${d.method}-${d.path}`))]},f))})}function wm(a){const i={__children:{},__endpoints:[]};for(const c of a){const s=c.path.replace(/^\//,"").split("/").filter(Boolean);let o=i;for(const f of s)o.__children[f]||(o.__children[f]={__children:{},__endpoints:[]}),o=o.__children[f];o.__endpoints.push(c)}return i}function Ap({name:a,node:i,depth:c,selectedEndpoint:s,onSelect:o,collapseState:f,onToggle:d}){const y=`${c}-${a}`,g=f[y]??!1,b=Object.keys(i.__children).sort();return!(b.length>0||i.__endpoints.length>0)&&!a?null:m.jsxs("div",{children:[a&&m.jsxs("div",{className:"endpoint-list__tree-folder",style:{paddingLeft:`${12+c*16}px`},onClick:()=>d(y),children:[m.jsx("span",{children:g?"▶":"▼"}),m.jsxs("span",{children:["/",a]})]}),!g&&m.jsxs("div",{children:[i.__endpoints.map(j=>m.jsx(lo,{endpoint:j,selected:s&&s.method===j.method&&s.path===j.path,onSelect:o},`${j.method}-${j.path}`)),b.map(j=>m.jsx(Ap,{name:j,node:i.__children[j],depth:c+1,selectedEndpoint:s,onSelect:o,collapseState:f,onToggle:d},j))]})]})}function Mm({endpoints:a,selectedEndpoint:i,onSelect:c,collapseState:s,onToggle:o}){const f=M.useMemo(()=>wm(a),[a]),d=Object.keys(f.__children).sort();return m.jsxs(m.Fragment,{children:[f.__endpoints.map(y=>m.jsx(lo,{endpoint:y,selected:i&&i.method===y.method&&i.path===y.path,onSelect:c},`${y.method}-${y.path}`)),d.map(y=>m.jsx(Ap,{name:y,node:f.__children[y],depth:0,selectedEndpoint:i,onSelect:c,collapseState:s,onToggle:o},y))]})}function Cm({endpoints:a,selectedEndpoint:i,onSelect:c,viewMode:s,onToggleViewMode:o,treeCollapseState:f,onToggleTreeNode:d,searchTerm:y,onSearchChange:g}){const b=M.useMemo(()=>{if(!y)return a||[];const E=y.toLowerCase();return(a||[]).filter(j=>j.path.toLowerCase().includes(E)||(j.method||"").toLowerCase().includes(E)||(j.summary||"").toLowerCase().includes(E))},[a,y]);return m.jsxs("div",{className:"endpoint-list",children:[m.jsx("div",{className:"endpoint-list__search",children:m.jsx("input",{className:"endpoint-list__search-input",type:"text",placeholder:"Search endpoints...",value:y,onChange:E=>g(E.target.value)})}),m.jsxs("div",{className:"endpoint-list__toolbar",children:[m.jsx("button",{className:`endpoint-list__view-btn${s==="tag"?" endpoint-list__view-btn--active":""}`,onClick:s!=="tag"?o:void 0,children:"Tags"}),m.jsx("button",{className:`endpoint-list__view-btn${s==="tree"?" endpoint-list__view-btn--active":""}`,onClick:s!=="tree"?o:void 0,children:"Tree"})]}),m.jsxs("div",{className:"endpoint-list__items",children:[s==="tag"?m.jsx(Rm,{endpoints:b,selectedEndpoint:i,onSelect:c}):m.jsx(Mm,{endpoints:b,selectedEndpoint:i,onSelect:c,collapseState:f||{},onToggle:d}),b.length===0&&m.jsx("div",{style:{padding:"16px",color:"var(--fg-muted)",textAlign:"center"},children:"No endpoints found"})]})]})}const Kr=/(\{\{\s*\w+\s*\}\})/g;function Dm(a){if(!a)return" ";const i=a.split(Kr);return i.length===1?a||" ":i.map((c,s)=>Kr.test(c)?m.jsx("mark",{className:"hl-var",children:c},s):c)}function km({className:a,value:i,...c}){const s=i&&Kr.test(i),o=M.useRef(null),f=M.useRef(null),[d,y]=M.useState(0);return M.useEffect(()=>{f.current&&(f.current.scrollLeft=d)},[d]),s?m.jsxs("div",{className:"hl-wrap",children:[m.jsx("div",{className:"hl-backdrop",ref:f,"aria-hidden":"true",children:Dm(i)}),m.jsx("input",{ref:o,className:`${a} hl-input`,value:i,onScroll:g=>y(g.target.scrollLeft),...c})]}):m.jsx("input",{className:a,value:i,...c})}function Um(a,i){return!a||!i||typeof a!="string"||!/\{\{\s*(\w+)\s*\}\}/g.test(a)?null:a.replace(/\{\{\s*(\w+)\s*\}\}/g,(s,o)=>i[o]!==void 0?i[o]:s)}function Qr({parameters:a,values:i,onChange:c,resolvedEnv:s}){return!a||a.length===0?null:m.jsx("div",{className:"param-form",children:a.map(o=>{const f=o.name,d=i[f]??"",y=Um(d,s);return m.jsxs("div",{className:"param-form__field",children:[m.jsxs("label",{className:"param-form__label",children:[f,o.required&&m.jsx("span",{className:"param-form__required",children:"*"})]}),o.description&&m.jsx("span",{className:"param-form__desc",children:o.description}),m.jsx(km,{className:"param-form__input",type:"text",value:d,placeholder:o.schema?.default!=null?String(o.schema.default):"",onChange:g=>c(f,g.target.value),title:y||void 0}),y&&y!==d&&m.jsx("span",{className:"param-form__resolved",children:y})]},f)})})}function Jr({schema:a,depth:i=0}){if(!a)return null;const c=i*16;if(a.type==="object"&&a.properties){const s=new Set(a.required||[]);return m.jsx("div",{style:{paddingLeft:c},children:Object.entries(a.properties).map(([o,f])=>m.jsxs("div",{className:"schema-view__prop",children:[m.jsx("span",{className:"schema-view__name",children:o}),m.jsx("span",{className:"schema-view__type",children:f.type||(f.items?"array":"object")}),s.has(o)&&m.jsx("span",{className:"schema-view__required",children:"required"}),f.description&&m.jsx("span",{className:"schema-view__desc",children:f.description}),f.enum&&m.jsxs("span",{className:"schema-view__enum",children:["enum: ",f.enum.join(", ")]}),f.type==="object"&&f.properties&&m.jsx(Jr,{schema:f,depth:i+1}),f.type==="array"&&f.items?.type==="object"&&f.items.properties&&m.jsx(Jr,{schema:f.items,depth:i+1})]},o))})}return null}function qm({endpoint:a,body:i,contentType:c,onBodyChange:s,onContentTypeChange:o,resolvedEnv:f}){const[d,y]=M.useState(null),[g,b]=M.useState(!1),[E,j]=M.useState(!1),G=M.useRef(null),I=(a?.request_body||a?.requestBody)?.content||{},Q=Object.keys(I),V=c||Q[0]||"application/json",ee=V.includes("json"),ye=V==="application/x-www-form-urlencoded",ne=V.includes("multipart"),$=ye||ne,Y=M.useMemo(()=>{if(!$||!i)return[{key:"",value:"",type:"text"}];try{const te=JSON.parse(i);if(Array.isArray(te))return te.length>0?te:[{key:"",value:"",type:"text"}]}catch{}return[{key:"",value:"",type:"text"}]},[i,$]);M.useEffect(()=>{if(!i||!a){y(null);return}return G.current&&clearTimeout(G.current),G.current=setTimeout(async()=>{try{const te=await _m(a.method,a.path,i,V);y(te)}catch{y(null)}},600),()=>{G.current&&clearTimeout(G.current)}},[i,a,V]);const ce=M.useCallback(async()=>{if(a){b(!0);try{const te=await pm(a.method,a.path,V),Te=te?.sample??te;if(Te==null)return;const et=typeof Te=="string"?Te:JSON.stringify(Te,null,2);s(et)}catch{}finally{b(!1)}}},[a,V,s]),se=M.useCallback(te=>{s(JSON.stringify(te))},[s]),Z=M.useCallback((te,Te,et)=>{const it=Y.map((ot,C)=>C===te?{...ot,[Te]:et}:ot);se(it)},[Y,se]),ge=M.useCallback(()=>{se([...Y,{key:"",value:"",type:"text"}])},[Y,se]),ct=M.useCallback(te=>{const Te=Y.filter((et,it)=>it!==te);se(Te.length>0?Te:[{key:"",value:"",type:"text"}])},[Y,se]);return m.jsxs("div",{children:[m.jsxs("div",{className:"body-editor__toolbar",children:[Q.length>1&&m.jsx("select",{className:"body-editor__content-type",value:V,onChange:te=>o(te.target.value),children:Q.map(te=>m.jsx("option",{value:te,children:te},te))}),Q.length===1&&m.jsx("span",{style:{fontSize:"12px",color:"var(--fg-muted)",fontFamily:"var(--font-mono)"},children:V}),m.jsx("button",{className:"body-editor__sample-btn",onClick:ce,disabled:g,children:g?"Generating...":"Generate Sample"})]}),!$&&m.jsx("textarea",{className:"body-editor__textarea",value:i||"",onChange:te=>s(te.target.value),placeholder:ee?`{
|
|
10
|
+
|
|
11
|
+
}`:"Request body...",spellCheck:!1}),$&&m.jsxs("div",{children:[m.jsxs("table",{className:"body-editor__kv-table",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:"Key"}),m.jsx("th",{children:"Value"}),ne&&m.jsx("th",{children:"Type"}),m.jsx("th",{})]})}),m.jsx("tbody",{children:Y.map((te,Te)=>m.jsxs("tr",{children:[m.jsx("td",{children:m.jsx("input",{className:"body-editor__kv-input",type:"text",value:te.key||"",onChange:et=>Z(Te,"key",et.target.value),placeholder:"key"})}),m.jsx("td",{children:m.jsx("input",{className:"body-editor__kv-input",type:"text",value:te.value||"",onChange:et=>Z(Te,"value",et.target.value),placeholder:"value"})}),ne&&m.jsx("td",{children:m.jsxs("select",{className:"body-editor__kv-input",value:te.type||"text",onChange:et=>Z(Te,"type",et.target.value),children:[m.jsx("option",{value:"text",children:"text"}),m.jsx("option",{value:"file",children:"file"})]})}),m.jsx("td",{children:m.jsx("button",{className:"body-editor__kv-remove",onClick:()=>ct(Te),title:"Remove row",children:"x"})})]},Te))})]}),m.jsx("button",{className:"body-editor__kv-add",onClick:ge,children:"+ Add Row"})]}),d&&m.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&&m.jsx("div",{className:"validation-details__errors",children:d.errors.map((te,Te)=>m.jsxs("div",{className:"validation-details__error",children:[te.path&&m.jsx("div",{className:"validation-details__error-path",children:te.path}),m.jsx("div",{className:"validation-details__error-msg",children:te.message||"Validation error"}),(te.expected||te.actual)&&m.jsxs("div",{className:"validation-details__error-detail",children:[te.expected&&m.jsxs(m.Fragment,{children:["Expected: ",String(te.expected)," "]}),te.actual&&m.jsxs(m.Fragment,{children:["Actual: ",String(te.actual)]})]})]},Te))})]}),!d&&i&&m.jsx("div",{className:"body-editor__validation body-editor__validation--none",children:"— No schema validation"}),I[V]?.schema&&m.jsxs("div",{className:"body-editor__schema",children:[m.jsxs("button",{className:"body-editor__schema-toggle",onClick:()=>j(te=>!te),children:[m.jsx("span",{children:"Schema"}),m.jsx("span",{className:`endpoint-doc__toggle-icon${E?" endpoint-doc__toggle-icon--expanded":""}`,children:"▶"})]}),E&&m.jsx("div",{className:"body-editor__schema-body",children:m.jsx(Jr,{schema:I[V].schema})})]})]})}function no(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ba=no();function Np(a){ba=a}var ya={exec:()=>null};function Ce(a,i=""){let c=typeof a=="string"?a:a.source,s={replace:(o,f)=>{let d=typeof f=="string"?f:f.source;return d=d.replace(Lt.caret,"$1"),c=c.replace(o,d),s},getRegex:()=>new RegExp(c,i)};return s}var Bm=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Lt={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)}}>`)},Hm=/^(?:[ \t]*(?:\n|$))+/,Lm=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Gm=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ru=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ym=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ao=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,zp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Rp=Ce(zp).replace(/bull/g,ao).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(),Xm=Ce(zp).replace(/bull/g,ao).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(),io=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Qm=/^[^\n]+/,uo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Zm=Ce(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",uo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Vm=Ce(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ao).getRegex(),Cs="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",so=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Km=Ce("^ {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",so).replace("tag",Cs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wp=Ce(io).replace("hr",ru).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",Cs).getRegex(),Jm=Ce(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wp).getRegex(),co={blockquote:Jm,code:Lm,def:Zm,fences:Gm,heading:Ym,hr:ru,html:Km,lheading:Rp,list:Vm,newline:Hm,paragraph:wp,table:ya,text:Qm},sp=Ce("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ru).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",Cs).getRegex(),$m={...co,lheading:Xm,table:sp,paragraph:Ce(io).replace("hr",ru).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",sp).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",Cs).getRegex()},Wm={...co,html:Ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",so).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:ya,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ce(io).replace("hr",ru).replace("heading",` *#{1,6} *[^
|
|
12
|
+
]`).replace("lheading",Rp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Fm=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Im=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Mp=/^( {2,}|\\)\n(?!\s*$)/,Pm=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ds=/[\p{P}\p{S}]/u,ro=/[\s\p{P}\p{S}]/u,Cp=/[^\s\p{P}\p{S}]/u,e0=Ce(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ro).getRegex(),Dp=/(?!~)[\p{P}\p{S}]/u,t0=/(?!~)[\s\p{P}\p{S}]/u,l0=/(?:[^\s\p{P}\p{S}]|~)/u,kp=/(?![*_])[\p{P}\p{S}]/u,n0=/(?![*_])[\s\p{P}\p{S}]/u,a0=/(?:[^\s\p{P}\p{S}]|[*_])/u,i0=Ce(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Bm?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Up=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,u0=Ce(Up,"u").replace(/punct/g,Ds).getRegex(),s0=Ce(Up,"u").replace(/punct/g,Dp).getRegex(),qp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",c0=Ce(qp,"gu").replace(/notPunctSpace/g,Cp).replace(/punctSpace/g,ro).replace(/punct/g,Ds).getRegex(),r0=Ce(qp,"gu").replace(/notPunctSpace/g,l0).replace(/punctSpace/g,t0).replace(/punct/g,Dp).getRegex(),o0=Ce("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Cp).replace(/punctSpace/g,ro).replace(/punct/g,Ds).getRegex(),f0=Ce(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,kp).getRegex(),h0="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",d0=Ce(h0,"gu").replace(/notPunctSpace/g,a0).replace(/punctSpace/g,n0).replace(/punct/g,kp).getRegex(),p0=Ce(/\\(punct)/,"gu").replace(/punct/g,Ds).getRegex(),g0=Ce(/^<(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(),y0=Ce(so).replace("(?:-->|$)","-->").getRegex(),m0=Ce("^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",y0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),zs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,b0=Ce(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",zs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Bp=Ce(/^!?\[(label)\]\[(ref)\]/).replace("label",zs).replace("ref",uo).getRegex(),Hp=Ce(/^!?\[(ref)\](?:\[\])?/).replace("ref",uo).getRegex(),v0=Ce("reflink|nolink(?!\\()","g").replace("reflink",Bp).replace("nolink",Hp).getRegex(),cp=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,oo={_backpedal:ya,anyPunctuation:p0,autolink:g0,blockSkip:i0,br:Mp,code:Im,del:ya,delLDelim:ya,delRDelim:ya,emStrongLDelim:u0,emStrongRDelimAst:c0,emStrongRDelimUnd:o0,escape:Fm,link:b0,nolink:Hp,punctuation:e0,reflink:Bp,reflinkSearch:v0,tag:m0,text:Pm,url:ya},x0={...oo,link:Ce(/^!?\[(label)\]\((.*?)\)/).replace("label",zs).getRegex(),reflink:Ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",zs).getRegex()},$r={...oo,emStrongRDelimAst:r0,emStrongLDelim:s0,delLDelim:f0,delRDelim:d0,url:Ce(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",cp).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:Ce(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",cp).getRegex()},S0={...$r,br:Ce(Mp).replace("{2,}","*").getRegex(),text:Ce($r.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Os={normal:co,gfm:$m,pedantic:Wm},lu={normal:oo,gfm:$r,breaks:S0,pedantic:x0},_0={"&":"&","<":"<",">":">",'"':""","'":"'"},rp=a=>_0[a];function Bl(a,i){if(i){if(Lt.escapeTest.test(a))return a.replace(Lt.escapeReplace,rp)}else if(Lt.escapeTestNoEncode.test(a))return a.replace(Lt.escapeReplaceNoEncode,rp);return a}function op(a){try{a=encodeURI(a).replace(Lt.percentDecode,"%")}catch{return null}return a}function fp(a,i){let c=a.replace(Lt.findPipe,(f,d,y)=>{let g=!1,b=d;for(;--b>=0&&y[b]==="\\";)g=!g;return g?"|":" |"}),s=c.split(Lt.splitPipe),o=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(;o<s.length;o++)s[o]=s[o].trim().replace(Lt.slashPipe,"|");return s}function nu(a,i,c){let s=a.length;if(s===0)return"";let o=0;for(;o<s&&a.charAt(s-o-1)===i;)o++;return a.slice(0,s-o)}function E0(a,i){if(a.indexOf(i[1])===-1)return-1;let c=0;for(let s=0;s<a.length;s++)if(a[s]==="\\")s++;else if(a[s]===i[0])c++;else if(a[s]===i[1]&&(c--,c<0))return s;return c>0?-2:-1}function T0(a,i=0){let c=i,s="";for(let o of a)if(o===" "){let f=4-c%4;s+=" ".repeat(f),c+=f}else s+=o,c++;return s}function hp(a,i,c,s,o){let f=i.href,d=i.title||null,y=a[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let g={type:a[0].charAt(0)==="!"?"image":"link",raw:c,href:f,title:d,text:y,tokens:s.inlineTokens(y)};return s.state.inLink=!1,g}function j0(a,i,c){let s=a.match(c.other.indentCodeCompensation);if(s===null)return i;let o=s[1];return i.split(`
|
|
13
|
+
`).map(f=>{let d=f.match(c.other.beginningSpace);if(d===null)return f;let[y]=d;return y.length>=o.length?f.slice(o.length):f}).join(`
|
|
14
|
+
`)}var Rs=class{options;rules;lexer;constructor(a){this.options=a||ba}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 c=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?c:nu(c,`
|
|
15
|
+
`)}}}fences(a){let i=this.rules.block.fences.exec(a);if(i){let c=i[0],s=j0(c,i[3]||"",this.rules);return{type:"code",raw:c,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 c=i[2].trim();if(this.rules.other.endingHash.test(c)){let s=nu(c,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(c=s.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:c,tokens:this.lexer.inline(c)}}}hr(a){let i=this.rules.block.hr.exec(a);if(i)return{type:"hr",raw:nu(i[0],`
|
|
16
|
+
`)}}blockquote(a){let i=this.rules.block.blockquote.exec(a);if(i){let c=nu(i[0],`
|
|
17
|
+
`).split(`
|
|
18
|
+
`),s="",o="",f=[];for(;c.length>0;){let d=!1,y=[],g;for(g=0;g<c.length;g++)if(this.rules.other.blockquoteStart.test(c[g]))y.push(c[g]),d=!0;else if(!d)y.push(c[g]);else break;c=c.slice(g);let b=y.join(`
|
|
19
|
+
`),E=b.replace(this.rules.other.blockquoteSetextReplace,`
|
|
20
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
21
|
+
${b}`:b,o=o?`${o}
|
|
22
|
+
${E}`:E;let j=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(E,f,!0),this.lexer.state.top=j,c.length===0)break;let G=f.at(-1);if(G?.type==="code")break;if(G?.type==="blockquote"){let L=G,I=L.raw+`
|
|
23
|
+
`+c.join(`
|
|
24
|
+
`),Q=this.blockquote(I);f[f.length-1]=Q,s=s.substring(0,s.length-L.raw.length)+Q.raw,o=o.substring(0,o.length-L.text.length)+Q.text;break}else if(G?.type==="list"){let L=G,I=L.raw+`
|
|
25
|
+
`+c.join(`
|
|
26
|
+
`),Q=this.list(I);f[f.length-1]=Q,s=s.substring(0,s.length-G.raw.length)+Q.raw,o=o.substring(0,o.length-L.raw.length)+Q.raw,c=I.substring(f.at(-1).raw.length).split(`
|
|
27
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:f,text:o}}}list(a){let i=this.rules.block.list.exec(a);if(i){let c=i[1].trim(),s=c.length>1,o={type:"list",raw:"",ordered:s,start:s?+c.slice(0,-1):"",loose:!1,items:[]};c=s?`\\d{1,9}\\${c.slice(-1)}`:`\\${c}`,this.options.pedantic&&(c=s?c:"[*+-]");let f=this.rules.other.listItemRegex(c),d=!1;for(;a;){let g=!1,b="",E="";if(!(i=f.exec(a))||this.rules.block.hr.test(a))break;b=i[0],a=a.substring(b.length);let j=T0(i[2].split(`
|
|
28
|
+
`,1)[0],i[1].length),G=a.split(`
|
|
29
|
+
`,1)[0],L=!j.trim(),I=0;if(this.options.pedantic?(I=2,E=j.trimStart()):L?I=i[1].length+1:(I=j.search(this.rules.other.nonSpaceChar),I=I>4?1:I,E=j.slice(I),I+=i[1].length),L&&this.rules.other.blankLine.test(G)&&(b+=G+`
|
|
30
|
+
`,a=a.substring(G.length+1),g=!0),!g){let Q=this.rules.other.nextBulletRegex(I),V=this.rules.other.hrRegex(I),ee=this.rules.other.fencesBeginRegex(I),ye=this.rules.other.headingBeginRegex(I),ne=this.rules.other.htmlBeginRegex(I),$=this.rules.other.blockquoteBeginRegex(I);for(;a;){let Y=a.split(`
|
|
31
|
+
`,1)[0],ce;if(G=Y,this.options.pedantic?(G=G.replace(this.rules.other.listReplaceNesting," "),ce=G):ce=G.replace(this.rules.other.tabCharGlobal," "),ee.test(G)||ye.test(G)||ne.test(G)||$.test(G)||Q.test(G)||V.test(G))break;if(ce.search(this.rules.other.nonSpaceChar)>=I||!G.trim())E+=`
|
|
32
|
+
`+ce.slice(I);else{if(L||j.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||ee.test(j)||ye.test(j)||V.test(j))break;E+=`
|
|
33
|
+
`+G}L=!G.trim(),b+=Y+`
|
|
34
|
+
`,a=a.substring(Y.length+1),j=ce.slice(I)}}o.loose||(d?o.loose=!0:this.rules.other.doubleBlankLine.test(b)&&(d=!0)),o.items.push({type:"list_item",raw:b,task:!!this.options.gfm&&this.rules.other.listIsTask.test(E),loose:!1,text:E,tokens:[]}),o.raw+=b}let y=o.items.at(-1);if(y)y.raw=y.raw.trimEnd(),y.text=y.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let g of o.items){if(this.lexer.state.top=!1,g.tokens=this.lexer.blockTokens(g.text,[]),g.task){if(g.text=g.text.replace(this.rules.other.listReplaceTask,""),g.tokens[0]?.type==="text"||g.tokens[0]?.type==="paragraph"){g.tokens[0].raw=g.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),g.tokens[0].text=g.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let E=this.lexer.inlineQueue.length-1;E>=0;E--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[E].src)){this.lexer.inlineQueue[E].src=this.lexer.inlineQueue[E].src.replace(this.rules.other.listReplaceTask,"");break}}let b=this.rules.other.listTaskCheckbox.exec(g.raw);if(b){let E={type:"checkbox",raw:b[0]+" ",checked:b[0]!=="[ ]"};g.checked=E.checked,o.loose?g.tokens[0]&&["paragraph","text"].includes(g.tokens[0].type)&&"tokens"in g.tokens[0]&&g.tokens[0].tokens?(g.tokens[0].raw=E.raw+g.tokens[0].raw,g.tokens[0].text=E.raw+g.tokens[0].text,g.tokens[0].tokens.unshift(E)):g.tokens.unshift({type:"paragraph",raw:E.raw,text:E.raw,tokens:[E]}):g.tokens.unshift(E)}}if(!o.loose){let b=g.tokens.filter(j=>j.type==="space"),E=b.length>0&&b.some(j=>this.rules.other.anyLine.test(j.raw));o.loose=E}}if(o.loose)for(let g of o.items){g.loose=!0;for(let b of g.tokens)b.type==="text"&&(b.type="paragraph")}return o}}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 c=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"):"",o=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:c,raw:i[0],href:s,title:o}}}table(a){let i=this.rules.block.table.exec(a);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let c=fp(i[1]),s=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
35
|
+
`):[],f={type:"table",raw:i[0],header:[],align:[],rows:[]};if(c.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<c.length;d++)f.header.push({text:c[d],tokens:this.lexer.inline(c[d]),header:!0,align:f.align[d]});for(let d of o)f.rows.push(fp(d,f.header.length).map((y,g)=>({text:y,tokens:this.lexer.inline(y),header:!1,align:f.align[g]})));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 c=i[1].charAt(i[1].length-1)===`
|
|
36
|
+
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:c,tokens:this.lexer.inline(c)}}}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 c=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(c)){if(!this.rules.other.endAngleBracket.test(c))return;let f=nu(c.slice(0,-1),"\\");if((c.length-f.length)%2===0)return}else{let f=E0(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],o="";if(this.options.pedantic){let f=this.rules.other.pedanticHrefTitle.exec(s);f&&(s=f[1],o=f[3])}else o=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(c)?s=s.slice(1):s=s.slice(1,-1)),hp(i,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(a,i){let c;if((c=this.rules.inline.reflink.exec(a))||(c=this.rules.inline.nolink.exec(a))){let s=(c[2]||c[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=i[s.toLowerCase()];if(!o){let f=c[0].charAt(0);return{type:"text",raw:f,text:f}}return hp(c,o,c[0],this.lexer,this.rules)}}emStrong(a,i,c=""){let s=this.rules.inline.emStrongLDelim.exec(a);if(!(!s||s[3]&&c.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!c||this.rules.inline.punctuation.exec(c))){let o=[...s[0]].length-1,f,d,y=o,g=0,b=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(b.lastIndex=0,i=i.slice(-1*a.length+o);(s=b.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]){y+=d;continue}else if((s[5]||s[6])&&o%3&&!((o+d)%3)){g+=d;continue}if(y-=d,y>0)continue;d=Math.min(d,d+y+g);let E=[...s[0]][0].length,j=a.slice(0,o+s.index+E+d);if(Math.min(o,d)%2){let L=j.slice(1,-1);return{type:"em",raw:j,text:L,tokens:this.lexer.inlineTokens(L)}}let G=j.slice(2,-2);return{type:"strong",raw:j,text:G,tokens:this.lexer.inlineTokens(G)}}}}codespan(a){let i=this.rules.inline.code.exec(a);if(i){let c=i[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(c),o=this.rules.other.startingSpaceChar.test(c)&&this.rules.other.endingSpaceChar.test(c);return s&&o&&(c=c.substring(1,c.length-1)),{type:"codespan",raw:i[0],text:c}}}br(a){let i=this.rules.inline.br.exec(a);if(i)return{type:"br",raw:i[0]}}del(a,i,c=""){let s=this.rules.inline.delLDelim.exec(a);if(s&&(!s[1]||!c||this.rules.inline.punctuation.exec(c))){let o=[...s[0]].length-1,f,d,y=o,g=this.rules.inline.delRDelim;for(g.lastIndex=0,i=i.slice(-1*a.length+o);(s=g.exec(i))!=null;){if(f=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!f||(d=[...f].length,d!==o))continue;if(s[3]||s[4]){y+=d;continue}if(y-=d,y>0)continue;d=Math.min(d,d+y);let b=[...s[0]][0].length,E=a.slice(0,o+s.index+b+d),j=E.slice(o,-o);return{type:"del",raw:E,text:j,tokens:this.lexer.inlineTokens(j)}}}}autolink(a){let i=this.rules.inline.autolink.exec(a);if(i){let c,s;return i[2]==="@"?(c=i[1],s="mailto:"+c):(c=i[1],s=c),{type:"link",raw:i[0],text:c,href:s,tokens:[{type:"text",raw:c,text:c}]}}}url(a){let i;if(i=this.rules.inline.url.exec(a)){let c,s;if(i[2]==="@")c=i[0],s="mailto:"+c;else{let o;do o=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(o!==i[0]);c=i[0],i[1]==="www."?s="http://"+i[0]:s=i[0]}return{type:"link",raw:i[0],text:c,href:s,tokens:[{type:"text",raw:c,text:c}]}}}inlineText(a){let i=this.rules.inline.text.exec(a);if(i){let c=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:c}}}},jl=class Wr{tokens;options;state;inlineQueue;tokenizer;constructor(i){this.tokens=[],this.tokens.links=Object.create(null),this.options=i||ba,this.options.tokenizer=this.options.tokenizer||new Rs,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 c={other:Lt,block:Os.normal,inline:lu.normal};this.options.pedantic?(c.block=Os.pedantic,c.inline=lu.pedantic):this.options.gfm&&(c.block=Os.gfm,this.options.breaks?c.inline=lu.breaks:c.inline=lu.gfm),this.tokenizer.rules=c}static get rules(){return{block:Os,inline:lu}}static lex(i,c){return new Wr(c).lex(i)}static lexInline(i,c){return new Wr(c).inlineTokens(i)}lex(i){i=i.replace(Lt.carriageReturn,`
|
|
37
|
+
`),this.blockTokens(i,this.tokens);for(let c=0;c<this.inlineQueue.length;c++){let s=this.inlineQueue[c];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,c=[],s=!1){for(this.options.pedantic&&(i=i.replace(Lt.tabCharGlobal," ").replace(Lt.spaceLine,""));i;){let o;if(this.options.extensions?.block?.some(d=>(o=d.call({lexer:this},i,c))?(i=i.substring(o.raw.length),c.push(o),!0):!1))continue;if(o=this.tokenizer.space(i)){i=i.substring(o.raw.length);let d=c.at(-1);o.raw.length===1&&d!==void 0?d.raw+=`
|
|
38
|
+
`:c.push(o);continue}if(o=this.tokenizer.code(i)){i=i.substring(o.raw.length);let d=c.at(-1);d?.type==="paragraph"||d?.type==="text"?(d.raw+=(d.raw.endsWith(`
|
|
39
|
+
`)?"":`
|
|
40
|
+
`)+o.raw,d.text+=`
|
|
41
|
+
`+o.text,this.inlineQueue.at(-1).src=d.text):c.push(o);continue}if(o=this.tokenizer.fences(i)){i=i.substring(o.raw.length),c.push(o);continue}if(o=this.tokenizer.heading(i)){i=i.substring(o.raw.length),c.push(o);continue}if(o=this.tokenizer.hr(i)){i=i.substring(o.raw.length),c.push(o);continue}if(o=this.tokenizer.blockquote(i)){i=i.substring(o.raw.length),c.push(o);continue}if(o=this.tokenizer.list(i)){i=i.substring(o.raw.length),c.push(o);continue}if(o=this.tokenizer.html(i)){i=i.substring(o.raw.length),c.push(o);continue}if(o=this.tokenizer.def(i)){i=i.substring(o.raw.length);let d=c.at(-1);d?.type==="paragraph"||d?.type==="text"?(d.raw+=(d.raw.endsWith(`
|
|
42
|
+
`)?"":`
|
|
43
|
+
`)+o.raw,d.text+=`
|
|
44
|
+
`+o.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},c.push(o));continue}if(o=this.tokenizer.table(i)){i=i.substring(o.raw.length),c.push(o);continue}if(o=this.tokenizer.lheading(i)){i=i.substring(o.raw.length),c.push(o);continue}let f=i;if(this.options.extensions?.startBlock){let d=1/0,y=i.slice(1),g;this.options.extensions.startBlock.forEach(b=>{g=b.call({lexer:this},y),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(f=i.substring(0,d+1))}if(this.state.top&&(o=this.tokenizer.paragraph(f))){let d=c.at(-1);s&&d?.type==="paragraph"?(d.raw+=(d.raw.endsWith(`
|
|
45
|
+
`)?"":`
|
|
46
|
+
`)+o.raw,d.text+=`
|
|
47
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):c.push(o),s=f.length!==i.length,i=i.substring(o.raw.length);continue}if(o=this.tokenizer.text(i)){i=i.substring(o.raw.length);let d=c.at(-1);d?.type==="text"?(d.raw+=(d.raw.endsWith(`
|
|
48
|
+
`)?"":`
|
|
49
|
+
`)+o.raw,d.text+=`
|
|
50
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):c.push(o);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,c}inline(i,c=[]){return this.inlineQueue.push({src:i,tokens:c}),c}inlineTokens(i,c=[]){let s=i,o=null;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)g.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let f;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)f=o[2]?o[2].length:0,s=s.slice(0,o.index+f)+"["+"a".repeat(o[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,y="";for(;i;){d||(y=""),d=!1;let g;if(this.options.extensions?.inline?.some(E=>(g=E.call({lexer:this},i,c))?(i=i.substring(g.raw.length),c.push(g),!0):!1))continue;if(g=this.tokenizer.escape(i)){i=i.substring(g.raw.length),c.push(g);continue}if(g=this.tokenizer.tag(i)){i=i.substring(g.raw.length),c.push(g);continue}if(g=this.tokenizer.link(i)){i=i.substring(g.raw.length),c.push(g);continue}if(g=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(g.raw.length);let E=c.at(-1);g.type==="text"&&E?.type==="text"?(E.raw+=g.raw,E.text+=g.text):c.push(g);continue}if(g=this.tokenizer.emStrong(i,s,y)){i=i.substring(g.raw.length),c.push(g);continue}if(g=this.tokenizer.codespan(i)){i=i.substring(g.raw.length),c.push(g);continue}if(g=this.tokenizer.br(i)){i=i.substring(g.raw.length),c.push(g);continue}if(g=this.tokenizer.del(i,s,y)){i=i.substring(g.raw.length),c.push(g);continue}if(g=this.tokenizer.autolink(i)){i=i.substring(g.raw.length),c.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(i))){i=i.substring(g.raw.length),c.push(g);continue}let b=i;if(this.options.extensions?.startInline){let E=1/0,j=i.slice(1),G;this.options.extensions.startInline.forEach(L=>{G=L.call({lexer:this},j),typeof G=="number"&&G>=0&&(E=Math.min(E,G))}),E<1/0&&E>=0&&(b=i.substring(0,E+1))}if(g=this.tokenizer.inlineText(b)){i=i.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(y=g.raw.slice(-1)),d=!0;let E=c.at(-1);E?.type==="text"?(E.raw+=g.raw,E.text+=g.text):c.push(g);continue}if(i){let E="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(E);break}else throw new Error(E)}}return c}},ws=class{options;parser;constructor(a){this.options=a||ba}space(a){return""}code({text:a,lang:i,escaped:c}){let s=(i||"").match(Lt.notSpaceStart)?.[0],o=a.replace(Lt.endingNewline,"")+`
|
|
51
|
+
`;return s?'<pre><code class="language-'+Bl(s)+'">'+(c?o:Bl(o,!0))+`</code></pre>
|
|
52
|
+
`:"<pre><code>"+(c?o:Bl(o,!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,c=a.start,s="";for(let d=0;d<a.items.length;d++){let y=a.items[d];s+=this.listitem(y)}let o=i?"ol":"ul",f=i&&c!==1?' start="'+c+'"':"";return"<"+o+f+`>
|
|
58
|
+
`+s+"</"+o+`>
|
|
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="",c="";for(let o=0;o<a.header.length;o++)c+=this.tablecell(a.header[o]);i+=this.tablerow({text:c});let s="";for(let o=0;o<a.rows.length;o++){let f=a.rows[o];c="";for(let d=0;d<f.length;d++)c+=this.tablecell(f[d]);s+=this.tablerow({text:c})}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),c=a.header?"th":"td";return(a.align?`<${c} align="${a.align}">`:`<${c}>`)+i+`</${c}>
|
|
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>${Bl(a,!0)}</code>`}br(a){return"<br>"}del({tokens:a}){return`<del>${this.parser.parseInline(a)}</del>`}link({href:a,title:i,tokens:c}){let s=this.parser.parseInline(c),o=op(a);if(o===null)return s;a=o;let f='<a href="'+a+'"';return i&&(f+=' title="'+Bl(i)+'"'),f+=">"+s+"</a>",f}image({href:a,title:i,text:c,tokens:s}){s&&(c=this.parser.parseInline(s,this.parser.textRenderer));let o=op(a);if(o===null)return Bl(c);a=o;let f=`<img src="${a}" alt="${Bl(c)}"`;return i&&(f+=` title="${Bl(i)}"`),f+=">",f}text(a){return"tokens"in a&&a.tokens?this.parser.parseInline(a.tokens):"escaped"in a&&a.escaped?a.text:Bl(a.text)}},fo=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}},Ol=class Fr{options;renderer;textRenderer;constructor(i){this.options=i||ba,this.options.renderer=this.options.renderer||new ws,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new fo}static parse(i,c){return new Fr(c).parse(i)}static parseInline(i,c){return new Fr(c).parseInline(i)}parse(i){let c="";for(let s=0;s<i.length;s++){let o=i[s];if(this.options.extensions?.renderers?.[o.type]){let d=o,y=this.options.extensions.renderers[d.type].call({parser:this},d);if(y!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(d.type)){c+=y||"";continue}}let f=o;switch(f.type){case"space":{c+=this.renderer.space(f);break}case"hr":{c+=this.renderer.hr(f);break}case"heading":{c+=this.renderer.heading(f);break}case"code":{c+=this.renderer.code(f);break}case"table":{c+=this.renderer.table(f);break}case"blockquote":{c+=this.renderer.blockquote(f);break}case"list":{c+=this.renderer.list(f);break}case"checkbox":{c+=this.renderer.checkbox(f);break}case"html":{c+=this.renderer.html(f);break}case"def":{c+=this.renderer.def(f);break}case"paragraph":{c+=this.renderer.paragraph(f);break}case"text":{c+=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 c}parseInline(i,c=this.renderer){let s="";for(let o=0;o<i.length;o++){let f=i[o];if(this.options.extensions?.renderers?.[f.type]){let y=this.options.extensions.renderers[f.type].call({parser:this},f);if(y!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(f.type)){s+=y||"";continue}}let d=f;switch(d.type){case"escape":{s+=c.text(d);break}case"html":{s+=c.html(d);break}case"link":{s+=c.link(d);break}case"image":{s+=c.image(d);break}case"checkbox":{s+=c.checkbox(d);break}case"strong":{s+=c.strong(d);break}case"em":{s+=c.em(d);break}case"codespan":{s+=c.codespan(d);break}case"br":{s+=c.br(d);break}case"del":{s+=c.del(d);break}case"text":{s+=c.text(d);break}default:{let y='Token with "'+d.type+'" type was not found.';if(this.options.silent)return console.error(y),"";throw new Error(y)}}}return s}},uu=class{options;block;constructor(a){this.options=a||ba}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?jl.lex:jl.lexInline}provideParser(){return this.block?Ol.parse:Ol.parseInline}},O0=class{defaults=no();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ol;Renderer=ws;TextRenderer=fo;Lexer=jl;Tokenizer=Rs;Hooks=uu;constructor(...a){this.use(...a)}walkTokens(a,i){let c=[];for(let s of a)switch(c=c.concat(i.call(this,s)),s.type){case"table":{let o=s;for(let f of o.header)c=c.concat(this.walkTokens(f.tokens,i));for(let f of o.rows)for(let d of f)c=c.concat(this.walkTokens(d.tokens,i));break}case"list":{let o=s;c=c.concat(this.walkTokens(o.items,i));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(f=>{let d=o[f].flat(1/0);c=c.concat(this.walkTokens(d,i))}):o.tokens&&(c=c.concat(this.walkTokens(o.tokens,i)))}}return c}use(...a){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return a.forEach(c=>{let s={...c};if(s.async=this.defaults.async||s.async||!1,c.extensions&&(c.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let f=i.renderers[o.name];f?i.renderers[o.name]=function(...d){let y=o.renderer.apply(this,d);return y===!1&&(y=f.apply(this,d)),y}:i.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let f=i[o.level];f?f.unshift(o.tokenizer):i[o.level]=[o.tokenizer],o.start&&(o.level==="block"?i.startBlock?i.startBlock.push(o.start):i.startBlock=[o.start]:o.level==="inline"&&(i.startInline?i.startInline.push(o.start):i.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(i.childTokens[o.name]=o.childTokens)}),s.extensions=i),c.renderer){let o=this.defaults.renderer||new ws(this.defaults);for(let f in c.renderer){if(!(f in o))throw new Error(`renderer '${f}' does not exist`);if(["options","parser"].includes(f))continue;let d=f,y=c.renderer[d],g=o[d];o[d]=(...b)=>{let E=y.apply(o,b);return E===!1&&(E=g.apply(o,b)),E||""}}s.renderer=o}if(c.tokenizer){let o=this.defaults.tokenizer||new Rs(this.defaults);for(let f in c.tokenizer){if(!(f in o))throw new Error(`tokenizer '${f}' does not exist`);if(["options","rules","lexer"].includes(f))continue;let d=f,y=c.tokenizer[d],g=o[d];o[d]=(...b)=>{let E=y.apply(o,b);return E===!1&&(E=g.apply(o,b)),E}}s.tokenizer=o}if(c.hooks){let o=this.defaults.hooks||new uu;for(let f in c.hooks){if(!(f in o))throw new Error(`hook '${f}' does not exist`);if(["options","block"].includes(f))continue;let d=f,y=c.hooks[d],g=o[d];uu.passThroughHooks.has(f)?o[d]=b=>{if(this.defaults.async&&uu.passThroughHooksRespectAsync.has(f))return(async()=>{let j=await y.call(o,b);return g.call(o,j)})();let E=y.call(o,b);return g.call(o,E)}:o[d]=(...b)=>{if(this.defaults.async)return(async()=>{let j=await y.apply(o,b);return j===!1&&(j=await g.apply(o,b)),j})();let E=y.apply(o,b);return E===!1&&(E=g.apply(o,b)),E}}s.hooks=o}if(c.walkTokens){let o=this.defaults.walkTokens,f=c.walkTokens;s.walkTokens=function(d){let y=[];return y.push(f.call(this,d)),o&&(y=y.concat(o.call(this,d))),y}}this.defaults={...this.defaults,...s}}),this}setOptions(a){return this.defaults={...this.defaults,...a},this}lexer(a,i){return jl.lex(a,i??this.defaults)}parser(a,i){return Ol.parse(a,i??this.defaults)}parseMarkdown(a){return(i,c)=>{let s={...c},o={...this.defaults,...s},f=this.onError(!!o.silent,!!o.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(o.hooks&&(o.hooks.options=o,o.hooks.block=a),o.async)return(async()=>{let d=o.hooks?await o.hooks.preprocess(i):i,y=await(o.hooks?await o.hooks.provideLexer():a?jl.lex:jl.lexInline)(d,o),g=o.hooks?await o.hooks.processAllTokens(y):y;o.walkTokens&&await Promise.all(this.walkTokens(g,o.walkTokens));let b=await(o.hooks?await o.hooks.provideParser():a?Ol.parse:Ol.parseInline)(g,o);return o.hooks?await o.hooks.postprocess(b):b})().catch(f);try{o.hooks&&(i=o.hooks.preprocess(i));let d=(o.hooks?o.hooks.provideLexer():a?jl.lex:jl.lexInline)(i,o);o.hooks&&(d=o.hooks.processAllTokens(d)),o.walkTokens&&this.walkTokens(d,o.walkTokens);let y=(o.hooks?o.hooks.provideParser():a?Ol.parse:Ol.parseInline)(d,o);return o.hooks&&(y=o.hooks.postprocess(y)),y}catch(d){return f(d)}}}onError(a,i){return c=>{if(c.message+=`
|
|
69
|
+
Please report this to https://github.com/markedjs/marked.`,a){let s="<p>An error occurred:</p><pre>"+Bl(c.message+"",!0)+"</pre>";return i?Promise.resolve(s):s}if(i)return Promise.reject(c);throw c}}},ma=new O0;function Ve(a,i){return ma.parse(a,i)}Ve.options=Ve.setOptions=function(a){return ma.setOptions(a),Ve.defaults=ma.defaults,Np(Ve.defaults),Ve};Ve.getDefaults=no;Ve.defaults=ba;Ve.use=function(...a){return ma.use(...a),Ve.defaults=ma.defaults,Np(Ve.defaults),Ve};Ve.walkTokens=function(a,i){return ma.walkTokens(a,i)};Ve.parseInline=ma.parseInline;Ve.Parser=Ol;Ve.parser=Ol.parse;Ve.Renderer=ws;Ve.TextRenderer=fo;Ve.Lexer=jl;Ve.lexer=jl.lex;Ve.Tokenizer=Rs;Ve.Hooks=uu;Ve.parse=Ve;Ve.options;Ve.setOptions;Ve.use;Ve.walkTokens;Ve.parseInline;Ol.parse;jl.lex;function A0({endpoint:a,collapsed:i,onToggle:c}){if(!a)return null;const s=a.summary||a.operationId||"",o=a.description||"",f=a.deprecated||!1,d=M.useMemo(()=>{if(!o)return"";try{return Ve(o)}catch{return o}},[o]);return!s&&!o&&!f?null:m.jsxs("div",{className:"endpoint-doc",children:[m.jsxs("button",{className:"endpoint-doc__toggle",onClick:c,children:[m.jsx("span",{children:s||"Documentation"}),m.jsx("span",{className:`endpoint-doc__toggle-icon${i?"":" endpoint-doc__toggle-icon--expanded"}`,children:"▶"})]}),!i&&m.jsxs("div",{className:"endpoint-doc__body",children:[f&&m.jsx("div",{className:"endpoint-doc__deprecated",children:"Deprecated - This endpoint is marked as deprecated"}),d&&m.jsx("div",{dangerouslySetInnerHTML:{__html:d}})]})]})}function N0({spec:a,endpoint:i,params:c,onParamsChange:s,serverIndex:o,onServerIndexChange:f,serverVariables:d,onServerVariablesChange:y,preferences:g,resolvedEnv:b}){const[E,j]=M.useState(!1),L=(i?.servers||[])[o]||{},I=M.useMemo(()=>{const ce=(L.url||"").match(/\{([^}]+)\}/g);return ce?ce.map(se=>se.slice(1,-1)):[]},[L.url]);if(!i)return m.jsx("div",{style:{color:"var(--fg-muted)",padding:"32px",textAlign:"center"},children:"Select an endpoint to begin"});const Q=i.parameters||[],V=Q.filter(Y=>Y.in==="path"),ee=Q.filter(Y=>Y.in==="query"),ye=Q.filter(Y=>Y.in==="header"),ne=(Y,ce,se)=>{s({...c,[Y]:{...c[Y]||{},[ce]:se}})},$=i.request_body||i.requestBody;return m.jsxs("div",{children:[I.length>0&&m.jsxs("div",{className:"request-panel__section",children:[m.jsx("div",{className:"request-panel__section-title",children:"Server Variables"}),m.jsx("div",{className:"request-panel__server-vars",children:I.map(Y=>{const ce=L.variables?.[Y];return m.jsxs("div",{className:"param-form__field",children:[m.jsx("label",{className:"param-form__label",children:Y}),ce?.description&&m.jsx("span",{className:"param-form__desc",children:ce.description}),m.jsx("input",{className:"param-form__input",type:"text",value:d[Y]??ce?.default??"",placeholder:ce?.default||"",onChange:se=>y({...d,[Y]:se.target.value})})]},Y)})})]}),V.length>0&&m.jsxs("div",{className:"request-panel__section",children:[m.jsx("div",{className:"request-panel__section-title",children:"Path Parameters"}),m.jsx(Qr,{parameters:V,values:c.path||{},onChange:(Y,ce)=>ne("path",Y,ce),resolvedEnv:b})]}),ee.length>0&&m.jsxs("div",{className:"request-panel__section",children:[m.jsx("div",{className:"request-panel__section-title",children:"Query Parameters"}),m.jsx(Qr,{parameters:ee,values:c.query||{},onChange:(Y,ce)=>ne("query",Y,ce),resolvedEnv:b})]}),ye.length>0&&m.jsxs("div",{className:"request-panel__section",children:[m.jsx("div",{className:"request-panel__section-title",children:"Headers"}),m.jsx(Qr,{parameters:ye,values:c.header||{},onChange:(Y,ce)=>ne("header",Y,ce),resolvedEnv:b})]}),$&&m.jsxs("div",{className:"request-panel__section",children:[m.jsx("div",{className:"request-panel__section-title",children:"Request Body"}),m.jsx(qm,{endpoint:i,body:c.body||"",contentType:c.contentType||"",onBodyChange:Y=>s({...c,body:Y}),onContentTypeChange:Y=>s({...c,contentType:Y}),resolvedEnv:b})]}),m.jsx(A0,{endpoint:i,collapsed:E,onToggle:()=>j(Y=>!Y)})]})}var Zr,dp;function z0(){if(dp)return Zr;dp=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(U=>{const K=x[U],he=typeof K;(he==="object"||he==="function")&&!Object.isFrozen(K)&&a(K)}),x}class i{constructor(U){U.data===void 0&&(U.data={}),this.data=U.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function c(x){return x.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(x,...U){const K=Object.create(null);for(const he in x)K[he]=x[he];return U.forEach(function(he){for(const Be in he)K[Be]=he[Be]}),K}const o="</span>",f=x=>!!x.scope,d=(x,{prefix:U})=>{if(x.startsWith("language:"))return x.replace("language:","language-");if(x.includes(".")){const K=x.split(".");return[`${U}${K.shift()}`,...K.map((he,Be)=>`${he}${"_".repeat(Be+1)}`)].join(" ")}return`${U}${x}`};class y{constructor(U,K){this.buffer="",this.classPrefix=K.classPrefix,U.walk(this)}addText(U){this.buffer+=c(U)}openNode(U){if(!f(U))return;const K=d(U.scope,{prefix:this.classPrefix});this.span(K)}closeNode(U){f(U)&&(this.buffer+=o)}value(){return this.buffer}span(U){this.buffer+=`<span class="${U}">`}}const g=(x={})=>{const U={children:[]};return Object.assign(U,x),U};class b{constructor(){this.rootNode=g(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(U){this.top.children.push(U)}openNode(U){const K=g({scope:U});this.add(K),this.stack.push(K)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(U){return this.constructor._walk(U,this.rootNode)}static _walk(U,K){return typeof K=="string"?U.addText(K):K.children&&(U.openNode(K),K.children.forEach(he=>this._walk(U,he)),U.closeNode(K)),U}static _collapse(U){typeof U!="string"&&U.children&&(U.children.every(K=>typeof K=="string")?U.children=[U.children.join("")]:U.children.forEach(K=>{b._collapse(K)}))}}class E extends b{constructor(U){super(),this.options=U}addText(U){U!==""&&this.add(U)}startScope(U){this.openNode(U)}endScope(){this.closeNode()}__addSublanguage(U,K){const he=U.root;K&&(he.scope=`language:${K}`),this.add(he)}toHTML(){return new y(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function j(x){return x?typeof x=="string"?x:x.source:null}function G(x){return Q("(?=",x,")")}function L(x){return Q("(?:",x,")*")}function I(x){return Q("(?:",x,")?")}function Q(...x){return x.map(K=>j(K)).join("")}function V(x){const U=x[x.length-1];return typeof U=="object"&&U.constructor===Object?(x.splice(x.length-1,1),U):{}}function ee(...x){return"("+(V(x).capture?"":"?:")+x.map(he=>j(he)).join("|")+")"}function ye(x){return new RegExp(x.toString()+"|").exec("").length-1}function ne(x,U){const K=x&&x.exec(U);return K&&K.index===0}const $=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Y(x,{joinWith:U}){let K=0;return x.map(he=>{K+=1;const Be=K;let Ge=j(he),N="";for(;Ge.length>0;){const R=$.exec(Ge);if(!R){N+=Ge;break}N+=Ge.substring(0,R.index),Ge=Ge.substring(R.index+R[0].length),R[0][0]==="\\"&&R[1]?N+="\\"+String(Number(R[1])+Be):(N+=R[0],R[0]==="("&&K++)}return N}).map(he=>`(${he})`).join(U)}const ce=/\b\B/,se="[a-zA-Z]\\w*",Z="[a-zA-Z_]\\w*",ge="\\b\\d+(\\.\\d+)?",ct="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",te="\\b(0b[01]+)",Te="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",et=(x={})=>{const U=/^#![ ]*\//;return x.binary&&(x.begin=Q(U,/.*\b/,x.binary,/\b.*/)),s({scope:"meta",begin:U,end:/$/,relevance:0,"on:begin":(K,he)=>{K.index!==0&&he.ignoreMatch()}},x)},it={begin:"\\\\[\\s\\S]",relevance:0},ot={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[it]},C={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[it]},F={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/},oe=function(x,U,K={}){const he=s({scope:"comment",begin:x,end:U,contains:[]},K);he.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 Be=ee("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 he.contains.push({begin:Q(/[ ]+/,"(",Be,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),he},De=oe("//","$"),qe=oe("/\\*","\\*/"),_=oe("#","$"),B={scope:"number",begin:ge,relevance:0},P={scope:"number",begin:ct,relevance:0},le={scope:"number",begin:te,relevance:0},me={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[it,{begin:/\[/,end:/\]/,relevance:0,contains:[it]}]},ve={scope:"title",begin:se,relevance:0},we={scope:"title",begin:Z,relevance:0},Tt={begin:"\\.\\s*"+Z,relevance:0};var Gt=Object.freeze({__proto__:null,APOS_STRING_MODE:ot,BACKSLASH_ESCAPE:it,BINARY_NUMBER_MODE:le,BINARY_NUMBER_RE:te,COMMENT:oe,C_BLOCK_COMMENT_MODE:qe,C_LINE_COMMENT_MODE:De,C_NUMBER_MODE:P,C_NUMBER_RE:ct,END_SAME_AS_BEGIN:function(x){return Object.assign(x,{"on:begin":(U,K)=>{K.data._beginMatch=U[1]},"on:end":(U,K)=>{K.data._beginMatch!==U[1]&&K.ignoreMatch()}})},HASH_COMMENT_MODE:_,IDENT_RE:se,MATCH_NOTHING_RE:ce,METHOD_GUARD:Tt,NUMBER_MODE:B,NUMBER_RE:ge,PHRASAL_WORDS_MODE:F,QUOTE_STRING_MODE:C,REGEXP_MODE:me,RE_STARTERS_RE:Te,SHEBANG:et,TITLE_MODE:ve,UNDERSCORE_IDENT_RE:Z,UNDERSCORE_TITLE_MODE:we});function gn(x,U){x.input[x.index-1]==="."&&U.ignoreMatch()}function Nl(x,U){x.className!==void 0&&(x.scope=x.className,delete x.className)}function va(x,U){U&&x.beginKeywords&&(x.begin="\\b("+x.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",x.__beforeBegin=gn,x.keywords=x.keywords||x.beginKeywords,delete x.beginKeywords,x.relevance===void 0&&(x.relevance=0))}function ul(x,U){Array.isArray(x.illegal)&&(x.illegal=ee(...x.illegal))}function yn(x,U){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 Gl(x,U){x.relevance===void 0&&(x.relevance=1)}const Jn=(x,U)=>{if(!x.beforeMatch)return;if(x.starts)throw new Error("beforeMatch cannot be used with starts");const K=Object.assign({},x);Object.keys(x).forEach(he=>{delete x[he]}),x.keywords=K.keywords,x.begin=Q(K.beforeMatch,G(K.begin)),x.starts={relevance:0,contains:[Object.assign(K,{endsParent:!0})]},x.relevance=0,delete K.beforeMatch},Sl=["of","and","for","in","not","or","if","then","parent","list","value"],mn="keyword";function zl(x,U,K=mn){const he=Object.create(null);return typeof x=="string"?Be(K,x.split(" ")):Array.isArray(x)?Be(K,x):Object.keys(x).forEach(function(Ge){Object.assign(he,zl(x[Ge],U,Ge))}),he;function Be(Ge,N){U&&(N=N.map(R=>R.toLowerCase())),N.forEach(function(R){const W=R.split("|");he[W[0]]=[Ge,Rl(W[0],W[1])]})}}function Rl(x,U){return U?Number(U):sl(x)?0:1}function sl(x){return Sl.includes(x.toLowerCase())}const Yl={},ut=x=>{console.error(x)},bn=(x,...U)=>{console.log(`WARN: ${x}`,...U)},cl=(x,U)=>{Yl[`${x}/${U}`]||(console.log(`Deprecated as of ${x}. ${U}`),Yl[`${x}/${U}`]=!0)},wl=new Error;function jt(x,U,{key:K}){let he=0;const Be=x[K],Ge={},N={};for(let R=1;R<=U.length;R++)N[R+he]=Be[R],Ge[R+he]=!0,he+=ye(U[R-1]);x[K]=N,x[K]._emit=Ge,x[K]._multi=!0}function Ml(x){if(Array.isArray(x.begin)){if(x.skip||x.excludeBegin||x.returnBegin)throw ut("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),wl;if(typeof x.beginScope!="object"||x.beginScope===null)throw ut("beginScope must be object"),wl;jt(x,x.begin,{key:"beginScope"}),x.begin=Y(x.begin,{joinWith:""})}}function $n(x){if(Array.isArray(x.end)){if(x.skip||x.excludeEnd||x.returnEnd)throw ut("skip, excludeEnd, returnEnd not compatible with endScope: {}"),wl;if(typeof x.endScope!="object"||x.endScope===null)throw ut("endScope must be object"),wl;jt(x,x.end,{key:"endScope"}),x.end=Y(x.end,{joinWith:""})}}function ii(x){x.scope&&typeof x.scope=="object"&&x.scope!==null&&(x.beginScope=x.scope,delete x.scope)}function Xl(x){ii(x),typeof x.beginScope=="string"&&(x.beginScope={_wrap:x.beginScope}),typeof x.endScope=="string"&&(x.endScope={_wrap:x.endScope}),Ml(x),$n(x)}function Ql(x){function U(N,R){return new RegExp(j(N),"m"+(x.case_insensitive?"i":"")+(x.unicodeRegex?"u":"")+(R?"g":""))}class K{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(R,W){W.position=this.position++,this.matchIndexes[this.matchAt]=W,this.regexes.push([W,R]),this.matchAt+=ye(R)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const R=this.regexes.map(W=>W[1]);this.matcherRe=U(Y(R,{joinWith:"|"}),!0),this.lastIndex=0}exec(R){this.matcherRe.lastIndex=this.lastIndex;const W=this.matcherRe.exec(R);if(!W)return null;const Se=W.findIndex((Yt,Sa)=>Sa>0&&Yt!==void 0),Le=this.matchIndexes[Se];return W.splice(0,Se),Object.assign(W,Le)}}class he{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(R){if(this.multiRegexes[R])return this.multiRegexes[R];const W=new K;return this.rules.slice(R).forEach(([Se,Le])=>W.addRule(Se,Le)),W.compile(),this.multiRegexes[R]=W,W}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(R,W){this.rules.push([R,W]),W.type==="begin"&&this.count++}exec(R){const W=this.getMatcher(this.regexIndex);W.lastIndex=this.lastIndex;let Se=W.exec(R);if(this.resumingScanAtSamePosition()&&!(Se&&Se.index===this.lastIndex)){const Le=this.getMatcher(0);Le.lastIndex=this.lastIndex+1,Se=Le.exec(R)}return Se&&(this.regexIndex+=Se.position+1,this.regexIndex===this.count&&this.considerAll()),Se}}function Be(N){const R=new he;return N.contains.forEach(W=>R.addRule(W.begin,{rule:W,type:"begin"})),N.terminatorEnd&&R.addRule(N.terminatorEnd,{type:"end"}),N.illegal&&R.addRule(N.illegal,{type:"illegal"}),R}function Ge(N,R){const W=N;if(N.isCompiled)return W;[Nl,yn,Xl,Jn].forEach(Le=>Le(N,R)),x.compilerExtensions.forEach(Le=>Le(N,R)),N.__beforeBegin=null,[va,ul,Gl].forEach(Le=>Le(N,R)),N.isCompiled=!0;let Se=null;return typeof N.keywords=="object"&&N.keywords.$pattern&&(N.keywords=Object.assign({},N.keywords),Se=N.keywords.$pattern,delete N.keywords.$pattern),Se=Se||/\w+/,N.keywords&&(N.keywords=zl(N.keywords,x.case_insensitive)),W.keywordPatternRe=U(Se,!0),R&&(N.begin||(N.begin=/\B|\b/),W.beginRe=U(W.begin),!N.end&&!N.endsWithParent&&(N.end=/\B|\b/),N.end&&(W.endRe=U(W.end)),W.terminatorEnd=j(W.end)||"",N.endsWithParent&&R.terminatorEnd&&(W.terminatorEnd+=(N.end?"|":"")+R.terminatorEnd)),N.illegal&&(W.illegalRe=U(N.illegal)),N.contains||(N.contains=[]),N.contains=[].concat(...N.contains.map(function(Le){return rl(Le==="self"?N:Le)})),N.contains.forEach(function(Le){Ge(Le,W)}),N.starts&&Ge(N.starts,R),W.matcher=Be(W),W}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||{}),Ge(x)}function At(x){return x?x.endsWithParent||At(x.starts):!1}function rl(x){return x.variants&&!x.cachedVariants&&(x.cachedVariants=x.variants.map(function(U){return s(x,{variants:null},U)})),x.cachedVariants?x.cachedVariants:At(x)?s(x,{starts:x.starts?s(x.starts):null}):Object.isFrozen(x)?s(x):x}var dt="11.11.1";class ui extends Error{constructor(U,K){super(U),this.name="HTMLInjectionError",this.html=K}}const Wn=c,xa=s,Zl=Symbol("nomatch"),vn=7,Vl=function(x){const U=Object.create(null),K=Object.create(null),he=[];let Be=!0;const Ge="Could not find the language '{}', did you forget to load/include a language module?",N={disableAutodetect:!0,name:"Plain text",contains:[]};let R={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:E};function W(X){return R.noHighlightRe.test(X)}function Se(X){let re=X.className+" ";re+=X.parentNode?X.parentNode.className:"";const je=R.languageDetectRe.exec(re);if(je){const Ye=Bt(je[1]);return Ye||(bn(Ge.replace("{}",je[1])),bn("Falling back to no-highlight mode for this block.",X)),Ye?je[1]:"no-highlight"}return re.split(/\s+/).find(Ye=>W(Ye)||Bt(Ye))}function Le(X,re,je){let Ye="",gt="";typeof re=="object"?(Ye=X,je=re.ignoreIllegals,gt=re.language):(cl("10.7.0","highlight(lang, code, ...args) has been deprecated."),cl("10.7.0",`Please use highlight(code, options) instead.
|
|
70
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),gt=X,Ye=re),je===void 0&&(je=!0);const Ut={code:Ye,language:gt};In("before:highlight",Ut);const Ft=Ut.result?Ut.result:Yt(Ut.language,Ut.code,je);return Ft.code=Ut.code,In("after:highlight",Ft),Ft}function Yt(X,re,je,Ye){const gt=Object.create(null);function Ut(J,ie){return J.keywords[ie]}function Ft(){if(!pe.keywords){vt.addText(Xe);return}let J=0;pe.keywordPatternRe.lastIndex=0;let ie=pe.keywordPatternRe.exec(Xe),xe="";for(;ie;){xe+=Xe.substring(J,ie.index);const Ne=zt.case_insensitive?ie[0].toLowerCase():ie[0],rt=Ut(pe,Ne);if(rt){const[ol,hi]=rt;if(vt.addText(xe),xe="",gt[Ne]=(gt[Ne]||0)+1,gt[Ne]<=vn&&(En+=hi),ol.startsWith("_"))xe+=ie[0];else{const yu=zt.classNameAliases[ol]||ol;It(ie[0],yu)}}else xe+=ie[0];J=pe.keywordPatternRe.lastIndex,ie=pe.keywordPatternRe.exec(Xe)}xe+=Xe.substring(J),vt.addText(xe)}function Xt(){if(Xe==="")return;let J=null;if(typeof pe.subLanguage=="string"){if(!U[pe.subLanguage]){vt.addText(Xe);return}J=Yt(pe.subLanguage,Xe,!0,gu[pe.subLanguage]),gu[pe.subLanguage]=J._top}else J=_a(Xe,pe.subLanguage.length?pe.subLanguage:null);pe.relevance>0&&(En+=J.relevance),vt.__addSublanguage(J._emitter,J.language)}function Ie(){pe.subLanguage!=null?Xt():Ft(),Xe=""}function It(J,ie){J!==""&&(vt.startScope(ie),vt.addText(J),vt.endScope())}function du(J,ie){let xe=1;const Ne=ie.length-1;for(;xe<=Ne;){if(!J._emit[xe]){xe++;continue}const rt=zt.classNameAliases[J[xe]]||J[xe],ol=ie[xe];rt?It(ol,rt):(Xe=ol,Ft(),Xe=""),xe++}}function Ta(J,ie){return J.scope&&typeof J.scope=="string"&&vt.openNode(zt.classNameAliases[J.scope]||J.scope),J.beginScope&&(J.beginScope._wrap?(It(Xe,zt.classNameAliases[J.beginScope._wrap]||J.beginScope._wrap),Xe=""):J.beginScope._multi&&(du(J.beginScope,ie),Xe="")),pe=Object.create(J,{parent:{value:pe}}),pe}function ri(J,ie,xe){let Ne=ne(J.endRe,xe);if(Ne){if(J["on:end"]){const rt=new i(J);J["on:end"](ie,rt),rt.isMatchIgnored&&(Ne=!1)}if(Ne){for(;J.endsParent&&J.parent;)J=J.parent;return J}}if(J.endsWithParent)return ri(J.parent,ie,xe)}function ja(J){return pe.matcher.regexIndex===0?(Xe+=J[0],1):(Tn=!0,0)}function Us(J){const ie=J[0],xe=J.rule,Ne=new i(xe),rt=[xe.__beforeBegin,xe["on:begin"]];for(const ol of rt)if(ol&&(ol(J,Ne),Ne.isMatchIgnored))return ja(ie);return xe.skip?Xe+=ie:(xe.excludeBegin&&(Xe+=ie),Ie(),!xe.returnBegin&&!xe.excludeBegin&&(Xe=ie)),Ta(xe,J),xe.returnBegin?0:ie.length}function Qt(J){const ie=J[0],xe=re.substring(J.index),Ne=ri(pe,J,xe);if(!Ne)return Zl;const rt=pe;pe.endScope&&pe.endScope._wrap?(Ie(),It(ie,pe.endScope._wrap)):pe.endScope&&pe.endScope._multi?(Ie(),du(pe.endScope,J)):rt.skip?Xe+=ie:(rt.returnEnd||rt.excludeEnd||(Xe+=ie),Ie(),rt.excludeEnd&&(Xe=ie));do pe.scope&&vt.closeNode(),!pe.skip&&!pe.subLanguage&&(En+=pe.relevance),pe=pe.parent;while(pe!==Ne.parent);return Ne.starts&&Ta(Ne.starts,J),rt.returnEnd?0:ie.length}function oi(){const J=[];for(let ie=pe;ie!==zt;ie=ie.parent)ie.scope&&J.unshift(ie.scope);J.forEach(ie=>vt.openNode(ie))}let Pn={};function Oa(J,ie){const xe=ie&&ie[0];if(Xe+=J,xe==null)return Ie(),0;if(Pn.type==="begin"&&ie.type==="end"&&Pn.index===ie.index&&xe===""){if(Xe+=re.slice(ie.index,ie.index+1),!Be){const Ne=new Error(`0 width match regex (${X})`);throw Ne.languageName=X,Ne.badRule=Pn.rule,Ne}return 1}if(Pn=ie,ie.type==="begin")return Us(ie);if(ie.type==="illegal"&&!je){const Ne=new Error('Illegal lexeme "'+xe+'" for mode "'+(pe.scope||"<unnamed>")+'"');throw Ne.mode=pe,Ne}else if(ie.type==="end"){const Ne=Qt(ie);if(Ne!==Zl)return Ne}if(ie.type==="illegal"&&xe==="")return Xe+=`
|
|
71
|
+
`,1;if(fi>1e5&&fi>ie.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Xe+=xe,xe.length}const zt=Bt(X);if(!zt)throw ut(Ge.replace("{}",X)),new Error('Unknown language: "'+X+'"');const pu=Ql(zt);let Aa="",pe=Ye||pu;const gu={},vt=new R.__emitter(R);oi();let Xe="",En=0,$l=0,fi=0,Tn=!1;try{if(zt.__emitTokens)zt.__emitTokens(re,vt);else{for(pe.matcher.considerAll();;){fi++,Tn?Tn=!1:pe.matcher.considerAll(),pe.matcher.lastIndex=$l;const J=pe.matcher.exec(re);if(!J)break;const ie=re.substring($l,J.index),xe=Oa(ie,J);$l=J.index+xe}Oa(re.substring($l))}return vt.finalize(),Aa=vt.toHTML(),{language:X,value:Aa,relevance:En,illegal:!1,_emitter:vt,_top:pe}}catch(J){if(J.message&&J.message.includes("Illegal"))return{language:X,value:Wn(re),illegal:!0,relevance:0,_illegalBy:{message:J.message,index:$l,context:re.slice($l-100,$l+100),mode:J.mode,resultSoFar:Aa},_emitter:vt};if(Be)return{language:X,value:Wn(re),illegal:!1,relevance:0,errorRaised:J,_emitter:vt,_top:pe};throw J}}function Sa(X){const re={value:Wn(X),illegal:!1,relevance:0,_top:N,_emitter:new R.__emitter(R)};return re._emitter.addText(X),re}function _a(X,re){re=re||R.languages||Object.keys(U);const je=Sa(X),Ye=re.filter(Bt).filter(Sn).map(Ie=>Yt(Ie,X,!1));Ye.unshift(je);const gt=Ye.sort((Ie,It)=>{if(Ie.relevance!==It.relevance)return It.relevance-Ie.relevance;if(Ie.language&&It.language){if(Bt(Ie.language).supersetOf===It.language)return 1;if(Bt(It.language).supersetOf===Ie.language)return-1}return 0}),[Ut,Ft]=gt,Xt=Ut;return Xt.secondBest=Ft,Xt}function Cl(X,re,je){const Ye=re&&K[re]||je;X.classList.add("hljs"),X.classList.add(`language-${Ye}`)}function pt(X){let re=null;const je=Se(X);if(W(je))return;if(In("before:highlightElement",{el:X,language:je}),X.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",X);return}if(X.children.length>0&&(R.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(X)),R.throwUnescapedHTML))throw new ui("One of your code blocks includes unescaped HTML.",X.innerHTML);re=X;const Ye=re.textContent,gt=je?Le(Ye,{language:je,ignoreIllegals:!0}):_a(Ye);X.innerHTML=gt.value,X.dataset.highlighted="yes",Cl(X,je,gt.language),X.result={language:gt.language,re:gt.relevance,relevance:gt.relevance},gt.secondBest&&(X.secondBest={language:gt.secondBest.language,relevance:gt.secondBest.relevance}),In("after:highlightElement",{el:X,result:gt,text:Ye})}function kt(X){R=xa(R,X)}const xn=()=>{Ea(),cl("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function si(){Ea(),cl("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ou=!1;function Ea(){function X(){Ea()}if(document.readyState==="loading"){ou||window.addEventListener("DOMContentLoaded",X,!1),ou=!0;return}document.querySelectorAll(R.cssSelector).forEach(pt)}function fu(X,re){let je=null;try{je=re(x)}catch(Ye){if(ut("Language definition for '{}' could not be registered.".replace("{}",X)),Be)ut(Ye);else throw Ye;je=N}je.name||(je.name=X),U[X]=je,je.rawDefinition=re.bind(null,x),je.aliases&&Kl(je.aliases,{languageName:X})}function Fn(X){delete U[X];for(const re of Object.keys(K))K[re]===X&&delete K[re]}function ci(){return Object.keys(U)}function Bt(X){return X=(X||"").toLowerCase(),U[X]||U[K[X]]}function Kl(X,{languageName:re}){typeof X=="string"&&(X=[X]),X.forEach(je=>{K[je.toLowerCase()]=re})}function Sn(X){const re=Bt(X);return re&&!re.disableAutodetect}function _n(X){X["before:highlightBlock"]&&!X["before:highlightElement"]&&(X["before:highlightElement"]=re=>{X["before:highlightBlock"](Object.assign({block:re.el},re))}),X["after:highlightBlock"]&&!X["after:highlightElement"]&&(X["after:highlightElement"]=re=>{X["after:highlightBlock"](Object.assign({block:re.el},re))})}function bt(X){_n(X),he.push(X)}function hu(X){const re=he.indexOf(X);re!==-1&&he.splice(re,1)}function In(X,re){const je=X;he.forEach(function(Ye){Ye[je]&&Ye[je](re)})}function Jl(X){return cl("10.7.0","highlightBlock will be removed entirely in v12.0"),cl("10.7.0","Please use highlightElement now."),pt(X)}Object.assign(x,{highlight:Le,highlightAuto:_a,highlightAll:Ea,highlightElement:pt,highlightBlock:Jl,configure:kt,initHighlighting:xn,initHighlightingOnLoad:si,registerLanguage:fu,unregisterLanguage:Fn,listLanguages:ci,getLanguage:Bt,registerAliases:Kl,autoDetection:Sn,inherit:xa,addPlugin:bt,removePlugin:hu}),x.debugMode=function(){Be=!1},x.safeMode=function(){Be=!0},x.versionString=dt,x.regex={concat:Q,lookahead:G,either:ee,optional:I,anyNumberOfTimes:L};for(const X in Gt)typeof Gt[X]=="object"&&a(Gt[X]);return Object.assign(x,Gt),x},Dt=Vl({});return Dt.newInstance=()=>Vl({}),Zr=Dt,Dt.HighlightJS=Dt,Dt.default=Dt,Zr}var R0=z0();const ks=Fy(R0);function w0(a){const i={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},c={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],o={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:s},contains:[i,c,a.QUOTE_STRING_MODE,o,a.C_NUMBER_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function M0(a){const i=a.regex,c=i.concat(/[\p{L}_]/u,i.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,o={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:/\)/}),y=a.inherit(a.APOS_STRING_MODE,{className:"string"}),g=a.inherit(a.QUOTE_STRING_MODE,{className:"string"}),b={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:[o]},{begin:/'/,end:/'/,contains:[o]},{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,g,y,d,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[f,d,g,y]}]}]},a.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[g]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[b],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[b],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:i.concat(/</,i.lookahead(i.concat(c,i.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:c,relevance:0,starts:b}]},{className:"tag",begin:i.concat(/<\//,i.lookahead(i.concat(c,/>/))),contains:[{className:"name",begin:c,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function C0(a){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Lp(a){let i=Pe(ho(a).tokens);const c=s=>i.node.apply(s,{userFuncArgs:{},variables:{}});return c.filter=i,c.ast=i.node,c.trace=s=>{let o=[];return i.node.trace(s,{userFuncArgs:{},variables:{}},o),{node:null,output:s,next:o}},c}function D0(a){return Pe(ho(a).tokens).node}function au(a){return a>="a"&&a<="z"||a>="A"&&a<="Z"||a==="_"}function iu(a){return a>="0"&&a<="9"}function Hl(a,i="",c=" ",s=`
|
|
72
|
+
`){let o=c?" ":"";if(typeof a>"u")return a;if(a===null)return"null";if(a instanceof Array){let f="[",d=!0;for(let y of Object.values(a))f+=(d?"":",")+s+i+c+Hl(y,i+c,c,s),d=!1;return f+=s+i+"]",f}else if(typeof a=="object"){let f="{",d=!0;for(let y of Object.keys(a))f+=(d?"":",")+s+i+c+'"'+y+'":'+o+Hl(a[y],i+c,c,s),d=!1;return f+=s+i+"}",f}else{if(typeof a=="string")return'"'+Gp(a)+'"';if(typeof a=="number")return""+a;if(typeof a=="boolean")return a?"true":"false"}}function Gp(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*Ir(a,i){let c=a[Symbol.iterator](),s=i[Symbol.iterator](),o=c.next(),f=s.next();for(;!o.done&&!f.done;)yield[o.value,f.value],o=c.next(),f=s.next()}function xl(a,i){let c=k(a),s=k(i);if(c!=s)return xl.typeOrder.indexOf(c)-xl.typeOrder.indexOf(s);if(c=="boolean"){if(a&&!i)return 1;if(!a&&i)return-1}else{if(c=="number")return a-i;if(c=="string"){if(a<i)return-1;if(i<a)return 1}else if(c=="array"){for(let o=0;o<a.length;o++){let f=a[o],d=i[o];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 y=xl(f,d);if(y!=0)return y}return 0}else if(c=="object"){let o=Object.keys(a).sort(),f=Object.keys(i).sort(),d=xl(o,f);if(d)return d;for(let y of o)if(d=xl(a[y],i[y]),d)return d}}return 0}xl.typeOrder=["null","boolean","number","string","array","object"];function pp(a,i,c=!1){let s=D0(i),o=(f,d)=>s.apply(f,d);return c&&(o=(f,d)=>s.paths(f,d)),function*(f,d,y){let g=d.userFuncArgs;d.userFuncArgs=Object.create(g);for(let b=0;b<a.length;b++){let E=a[b],j=y[b];d.userFuncArgs[E+"/0"]=j}yield*o(f,d),d.userFuncArgs=g}}function Al(a,i,c){let s=a+"/"+i.length;pn[s]=pp(i,c),pn[s].params=Array.prototype.map.call(i,o=>({label:o,mode:"defer"})),pn[s+"-paths"]=pp(i,c,!0)}function ho(a,i=0,c){let s=[];function o(d){throw d}let f;e:for(f=i;f<a.length;f++){let d=f,y=a[f];if(y!=" ")if(y=='"'||y=="'"){let g=y,b="",E=!1,j,G=0;for(f++;f<a.length;f++)if(j)j--,G*=16,G+=Number.parseInt(a[f],16),j==0&&(b+=String.fromCharCode(G),G=0);else if(E){let L=a[f];if(L=='"'||L=="'")b+=L;else if(L=="n")b+=`
|
|
73
|
+
`;else if(L=="t")b+=" ";else if(L=="r")b+="\r";else if(L=="b")b+="\b";else if(L=="f")b+="\f";else if(L=="/")b+="/";else if(L=="\\")b+="\\";else if(L=="u")j=4;else if(L=="("){let I=ho(a,f+1,0);s.push({type:"quote-interp",value:b,location:d}),b="",s=s.concat(I.tokens),f=I.i}else throw"invalid escape "+L;E=!1}else if(a[f]=="\\")E=!0;else if(a[f]==g){s.push({type:"quote",value:b,location:d});continue e}else E=!1,b+=a[f];o("unterminated string literal")}else if(iu(y)){let g="";for(;iu(a[f])||a[f]==".";)g+=a[f++];s.push({type:"number",value:Number.parseFloat(g),location:d}),f--}else if(y=="."){let g=a[f+1];if(au(g)){f++;let b="";for(;au(a[f])||iu(a[f]);)b+=a[f++];s.push({type:"identifier-index",value:b,location:d}),f--}else g=="["?(f++,s.push({type:"dot-square",location:d})):g=="."?(f++,s.push({type:"dot-dot",location:d})):s.push({type:"dot",location:d})}else if(y=="$"){a[f+1],f++;let g="";for(;au(a[f])||iu(a[f]);)g+=a[f],f++;s.push({type:"variable",name:g,location:d}),f--}else if(y=="[")s.push({type:"left-square",location:d});else if(y=="]")s.push({type:"right-square",location:d});else if(y=="(")s.push({type:"left-paren",location:d}),c++;else if(y==")"){if(s.push({type:"right-paren",location:d}),c--,c<0)return{tokens:s,i:f}}else if(y=="{")s.push({type:"left-brace",location:d});else if(y=="}")s.push({type:"right-brace",location:d});else if(y==",")s.push({type:"comma",location:d});else if(y==";")s.push({type:"semicolon",location:d});else if(y=="@")s.push({type:"at",location:d});else if(y=="?")s.push({type:"question",location:d});else if(y=="|")a[f+1]=="="?(s.push({type:"pipe-equals",location:d}),f++):s.push({type:"pipe",location:d});else if(y=="+"||y=="*"||y=="-"||y=="/"||y=="%"||y=="<"||y==">")y=="/"&&a[f+1]=="/"&&(y="//",f++),a[f+1]=="="?(y=="<"||y==">"?s.push({type:"op",op:y+"=",location:d}):s.push({type:"op-equals",op:y,location:d}),f++):s.push({type:"op",op:y});else if(y=="="){if(a[f+1]!="=")throw"plain assignment = is not supported";f++,s.push({type:"op",op:"==",location:d})}else if(y=="!"){if(a[f+1]!="=")throw"unexpected ! at "+d;f++,s.push({type:"op",op:"!=",location:d})}else if(au(y)){let g="";for(;au(a[f])||iu(a[f])||a[f]=="_";)g+=a[f++];g=="as"||g=="reduce"||g=="foreach"||g=="import"||g=="include"||g=="def"||g=="if"||g=="then"||g=="else"||g=="end"||g=="elif"?s.push({type:g,location:d}):s.push({type:"identifier",value:g,location:d}),f--}else y==":"&&s.push({type:"colon",location:d})}return s.push({type:"<end-of-program>",location:f}),{tokens:s,i:f}}function vl(a){return a?a.location:"<end>"}function Pe(a,i=0,c=[]){let s=i,o=a[s],f=[],d=[];for(;o&&c.indexOf(o.type)==-1;){if(o.type=="identifier-index")f.push(new Pr(o.value));else if(o.type=="number")f.push(new su(o.value));else if(o.type=="quote")f.push(new ai(o.value));else if(o.type=="dot")f.push(new mp);else if(o.type=="dot-dot")f.push(new Z0);else if(o.type=="identifier")if(o.value=="true"||o.value=="false")f.push(new bp(o.value=="true"));else if(o.value=="null")f.push(new bp(null));else{let y=o.value,g=[];if(a[s+1]&&a[s+1].type=="left-paren")for(s++;a[s].type!="right-paren";){let b=Pe(a,s+1,["semicolon","right-paren"]);g.push(b.node),s=b.i}f.push(new lb(y+"/"+g.length,g))}else if(o.type=="dot-square"){let y=k0(a,s);f.push(y.node),s=y.i}else if(o.type=="left-square"){let y=Pe(a,s+1,["right-square","colon"]);if(f.length){let g=dn(f);if(f=[],a[y.i].type=="colon"){y.node.length===0&&(y.node=new su(0));let b=Pe(a,y.i+1,["right-square"]);b.node.length===0&&(b.node=new su(-1)),f.push(new B0(g,y.node,b.node)),y=b}else y.node.length===0?f.push(new G0(g)):f.push(new q0(g,y.node))}else f.push(new Y0(y.node));s=y.i}else if(o.type=="left-paren"){let y=Pe(a,s+1,["right-paren"]);f.push(y.node),s=y.i}else if(o.type=="left-brace"){let y=U0(a,s+1);f.push(y.node),s=y.i}else if(o.type=="at"){let y=a[++s];if(!y||y.type!="identifier")throw"expected identifier after @ at "+vl(y);let g=y.value;if(!cu[g])throw"not a valid format: "+g;let b;a[s+1]&&a[s+1].type=="quote-interp"&&({q:b,i:s}=gp(a,s+1),s=s),f.push(new nb(g,b))}else if(o.type=="comma")d.push(dn(f)),f=[];else if(o.type=="pipe"||o.type=="as"){d.length&&(d.push(dn(f)),f=[new vp(d)],d=[]);let y=dn(f);if(o.type=="as"){let E=a[s+1];y=new Kp(y,E.name),s+=2}let g=Pe(a,s+1,c),b=g.node;s=g.i,a[s]&&c.indexOf(a[s].type)!=-1&&s--,f=[new X0(y,b)]}else if(o.type=="question"){let y=f.pop();if(!y)throw"unexpected ? without preceding filter at "+vl(o);f.push(new ab(y))}else if(o.type=="op"){if(f.length==0&&o.op=="-"&&a[s+1].type=="number"){a[s+1].value=-a[s+1].value,o=a[++s];continue}let y=dn(f);o.op;let g=[y,o],b=Pe(a,s+1,["op","comma","pipe","right-paren","right-brace","right-square","<end-of-program>"].concat(c));for(s=b.i,g.push(b.node);s<a.length&&a[s].type=="op";){g.push(a[s]);let E=Pe(a,s+1,["op","comma","pipe","right-paren","right-brace","right-square","<end-of-program>"].concat(c));s=E.i,g.push(E.node)}f=[yp(g)],a[s]&&s--}else if(o.type=="pipe-equals"){let y=dn(f),g=Pe(a,s+1,["comma","pipe","right-paren","right-brace","right-square","<end-of-program>"].concat(c));s=g.i-1;let b=g.node;f=[new xp(y,b)]}else if(o.type=="op-equals"){let y=dn(f),g=Pe(a,s+1,["comma","pipe","right-paren","right-brace","right-square","<end-of-program>"].concat(c));s=g.i;let b=g.node;b=yp([new mp,{type:"op",op:o.op},b]),f=[new xp(y,b)]}else if(o.type=="reduce"){let y=Pe(a,s+1,["as"]);s=y.i;let g=y.node;s++;let b=a[s].name;if(s++,a[s].type!="left-paren")throw"expected left-paren in reduce at "+vl(a[s]);y=Pe(a,s+1,["semicolon"]),s=y.i;let E=y.node;y=Pe(a,s+1,["right-paren"]),s=y.i;let j=y.node;f.push(new ib(g,b,E,j))}else if(o.type=="quote-interp"){let y;({q:y,i:s}=gp(a,s)),f.push(y)}else if(o.type=="variable")f.push(new Jp(o.name));else if(o.type=="if"){let y=[],g=[],b=null;for(;a[s]&&(a[s].type=="if"||a[s].type=="elif");){let E=Pe(a,s+1,["then"]);if(!a[E.i]||a[E.i].type!="then")throw"expected then at "+vl(a[E.i])+", from "+a[s].type+" at "+a[s].location;let j=Pe(a,E.i+1,["else","elif","end"]);if(j.i==E.i+1)throw"expected expression after then at "+vl(a[E.i+1])+", not "+a[E.i+1].type;s=j.i,y.push(E.node),g.push(j.node)}if(a[s]&&a[s].type=="else"){let E=Pe(a,s+1,["end"]);s=E.i,b=E.node}if(!a[s]||a[s].type!="end")throw"expected end at "+vl(a[s])+" from if at "+o.location;f.push(new ub(y,g,b))}else{if(o.type=="<end-of-program>"&&c.length==0)break;throw"could not handle token "+o.type+" at "+vl(o)+(c.length>0?", expected "+c.join("/"):"")}o=a[++s]}return d.length?(d.push(dn(f)),{node:new vp(d),i:s}):{node:dn(f),i:s}}function dn(a){return a.length==1?a[0]:new po(a)}function gp(a,i){let c=a[i],s=[],o=[];s.push(c.value);let f=Pe(a,i+1,["right-paren"]);for(i=f.i+1,o.push(f.node);a[i].type=="quote-interp";)s.push(a[i].value),f=Pe(a,i+1,["right-paren"]),i=f.i+1,o.push(f.node);return s.push(a[i].value),{q:new L0(s,o),i}}function k0(a,i=0){let c=i;if(a[c],c++,a[c].type=="right-square")return{node:new Zp,i:c};let s=Pe(a,c,["right-square","colon"]);if(a[s.i].type=="colon"){let o=s;return o.length===0&&(o.node=new su(0)),s=Pe(a,s.i+1,["right-square"]),s.length===0&&(s.node=new su(-1)),{node:new H0(o.node,s.node),i:s.i}}return{node:new Qp(s.node),i:s.i}}function U0(a,i=0){let c=i,s=[];for(;a[c].type!="right-brace";){if(a[c].type=="identifier"){let o=a[c++];if(a[c].type=="colon"){let f=Pe(a,c+1,["comma","right-brace"]);c=f.i,s.push({key:new ai(o.value),value:f.node}),c--}else a[c].type=="comma"?s.push({key:new ai(o.value),value:new Pr(o.value)}):a[c].type=="right-brace"&&(s.push({key:new ai(o.value),value:new Pr(o.value)}),c--)}else if(a[c].type=="quote"){let o=a[c++];if(a[c].type=="colon"){let f=Pe(a,c+1,["comma","right-brace"]);c=f.i,s.push({key:new ai(o.value),value:f.node}),c--}else throw"unexpected "+a[c].type+", expected colon at "+vl(a[c])}else if(a[c].type=="left-paren"){let o=Pe(a,c+1,["right-paren"]);if(c=o.i+1,a[c].type=="colon"){let f=Pe(a,c+1,["comma","right-brace"]);c=f.i,s.push({key:o.node,value:f.node}),c--}else throw"unexpected "+a[c].type+", expected colon at "+vl(a[c])}else if(a[c].type=="variable"){let o=a[c++];if(a[c].type=="colon"){let f=Pe(a,c+1,["comma","right-brace"]);c=f.i,s.push({key:new Jp(o.name),value:f.node}),c--}else throw"unexpected "+a[c].type+", expected colon at "+vl(a[c])}else throw"unexpected "+a[c].type+" at "+vl(a[c])+" in object at "+vl(a[i-1]);c++,a[c].type=="comma"&&c++}return{node:new Q0(s),i:c}}function yp(a){const i={"+":5,"-":5,"*":10,"/":10,"%":10,"//":2,"==":3,"!=":3,">":3,"<":3,">=":3,"<=":3};let c=[],s=[];for(let d of a)if(d.type=="op"){for(;s.length&&i[s[0].op]>=i[d.op];)c.push(s.shift());s.unshift(d)}else c.push(d);for(let d of s)c.push(d);let o={"+":Ns,"*":V0,"-":K0,"/":J0,"%":$0,"//":tb,"==":Vp,"!=":eb,"<":W0,">":F0,"<=":I0,">=":P0},f=[];for(let d of c)if(d.type=="op"){let y=f.pop(),g=f.pop();f.push(new o[d.op](g,y))}else f.push(d);return f[0]}function Yp(a,i,c,s){let o=s[0];for(let f of o.apply(a,i)){let d=[];c.push({node:o,output:f,next:d,variables:JSON.parse(JSON.stringify(i.variables))}),s.length>1&&Yp(f,i,d,s.slice(1))}}function Xp(a,i,c,s){let o=[],f=this;for(;f.source;)f.filter&&o.unshift(f.filter),f=f.source;o.unshift(f),Yp(a,i,c,o)}function k(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 at{trace(i,c,s){for(let o of this.apply(i,c))s.push({node:this,output:o,next:[]})}toString(){return"<"+this.constructor.name+">"}*apply(i,c){throw"apply not implemented for "+this.constructor.name}}class po extends at{constructor(i){super(),this.length=i.length;let c=i.pop();c&&(this.filter=c,this.source=i.length==1?i[0]:new po(i))}*apply(i,c){if(this.filter)for(let s of this.source.apply(i,c))yield*this.filter.apply(s,c)}*paths(i,c){if(!this.filter)return[];for(let s of this.source.paths(i,c))for(let o of this.filter.paths(i,c))yield s.concat(o)}trace=Xp;toString(){return(this.source?this.source.toString():"")+(this.filter?this.filter.toString():"")}}class q0 extends at{constructor(i,c){super(),this.lhs=i,this.index=c}*apply(i,c){for(let s of this.lhs.apply(i,c)){let o=k(s);for(let f of this.index.apply(i,c)){if(o=="array"&&k(f)!="number")throw"Cannot index array with "+k(f)+" "+JSON.stringify(f);if(o=="object"&&k(f)!="string")throw"Cannot index object with "+k(f)+" "+JSON.stringify(f);typeof f=="number"&&f<0&&k(s)=="array"?yield s[s.length+f]:yield typeof s[f]>"u"?null:s[f]}}}*paths(i,c){for(let s of this.lhs.paths(i,c))for(let o of this.index.apply(i,c))yield s.concat([o])}toString(){return this.lhs.toString()+"["+this.index.toString()+"]"}}class B0 extends at{constructor(i,c,s){super(),this.lhs=i,this.from=c,this.to=s}*apply(i,c){for(let s of this.lhs.apply(i,c))for(let o of this.from.apply(i,c)){o<0&&(o+=s.length);for(let f of this.to.apply(i,c))f<0&&(f+=s.length),yield s.slice(o,f)}}*paths(i,c){for(let s of this.lhs.paths(i,c))for(let o of this.from.apply(i,c))for(let f of this.to.apply(i,c))yield s.concat([{start:o,end:f}])}toString(){return this.lhs.toString()+"["+this.from.toString()+":"+this.to.toString()+"]"}}class Qp extends at{constructor(i){super(),this.index=i}*apply(i,c){let s=k(i);for(let o of this.index.apply(i,c)){if(s=="array"&&k(o)!="number")throw"Cannot index array with "+k(o)+" "+JSON.stringify(o);if(s=="object"&&k(o)!="string")throw"Cannot index object with "+k(o)+" "+JSON.stringify(o);typeof o=="number"&&o<0&&k(i)=="array"?yield i[i.length+o]:yield typeof i[o]>"u"?null:i[o]}}*paths(i,c){for(let s of this.index.apply(i,c))yield[s]}}class Pr extends Qp{constructor(i){super(new ai(i))}toString(){return"."+this.index.value}}class H0 extends at{constructor(i,c){super(),this.from=i,this.to=c}*apply(i,c){for(let s of this.from.apply(i,c)){s<0&&(s+=i.length);for(let o of this.to.apply(i,c))o<0&&(o+=i.length),yield i.slice(s,o)}}*paths(i,c){for(let s of this.from.apply(i,c))for(let o of this.to.apply(i,c))yield[{start:s,end:o}]}toString(){return".["+this.from.toString()+":"+this.to.toString()+"]"}}class mp extends at{constructor(){super()}*apply(i,c){yield i}*paths(i,c){yield[]}toString(){return"."}}class go extends at{constructor(i){super(),this.value=i}*apply(){yield this.value}*paths(i,c){yield this.value}toString(){return JSON.stringify(this.value)}}class ai extends go{constructor(i){super(i)}}class L0 extends at{constructor(i,c){super(),this.strings=i,this.interpolations=c}*apply(i,c){yield*this.applyEscape(i,cu.text,c)}*applyEscape(i,c,s,o=0){let f=this.strings[o];if(!this.interpolations[o])return yield f;for(let y of this.interpolations[o].apply(i,s))for(let g of this.applyEscape(i,c,s,o+1))yield f+c(y)+g}toString(){let i="";for(let c=0;c<this.strings.length;c++)i+=this.strings[c].replace("\\","\\\\").replace('"','\\"'),this.interpolations[c]&&(i+="\\("+this.interpolations[c].toString()+")");return'"'+i+'"'}}class su extends go{constructor(i){super(i)}toString(){return this.value.toString()}}class bp extends go{constructor(i){super(i)}toString(){return this.value?"true":"false"}}class G0 extends at{constructor(i){super(),this.source=i,this.filter=new Zp}*apply(i,c){for(let s of this.source.apply(i,c))yield*Object.values(s)}*paths(i,c){for(let[s,o]of this.zip(this.source.paths(i,c),this.source.apply(i,c)))if(k(o)=="array")for(let f=0;f<o.length;f++)yield s.concat([f]);else for(let f of Object.keys(o))yield s.concat([f])}*zip(i,c){let s=i[Symbol.iterator](),o=c[Symbol.iterator](),f=s.next(),d=o.next();for(;!f.done&&!d.done;)yield[f.value,d.value],f=s.next(),d=o.next()}toString(){return this.source.toString()+"[]"}trace=Xp}class Zp extends at{constructor(){super()}*apply(i,c){k(i)=="array"?yield*i:yield*Object.values(i)}*paths(i,c){if(k(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 vp extends at{constructor(i){super(),this.branches=i}*apply(i,c){for(let s of this.branches)yield*s.apply(i,c)}*paths(i,c){for(let s of this.branches)yield*s.paths(i,c)}toString(){return this.branches.join(", ")}}class Y0 extends at{constructor(i){super(),this.body=i}*apply(i,c){yield Array.from(this.body.apply(i,c))}toString(){return"["+this.body+"]"}}class X0 extends at{constructor(i,c){super(),this.lhs=i,this.rhs=c,this.isPipe=!0}toString(){return`${this.lhs} | ${this.rhs}`}*apply(i,c){for(let s of this.lhs.apply(i,c))for(let o of this.rhs.apply(s,c))yield o}*paths(i,c){for(let[s,o]of this.zip(this.lhs.paths(i,c),this.lhs.apply(i,c)))for(let f of this.rhs.paths(o,c))yield s.concat(f)}*zip(i,c){let s=i[Symbol.iterator](),o=c[Symbol.iterator](),f=s.next(),d=o.next();for(;!f.done&&!d.done;)yield[f.value,d.value],f=s.next(),d=o.next()}trace(i,c,s){for(let o of this.lhs.apply(i,c)){let f=[],d={};this.lhs instanceof Kp&&(d.variableValue=c.variables[this.lhs.name]),s.push({node:this.lhs,output:o,next:f,variables:JSON.parse(JSON.stringify(c.variables)),...d}),this.rhs.trace(o,c,f)}}}class Q0 extends at{constructor(i){super(),this.fields=i}*apply(i,c){let s={},o=[];for(let{key:f,value:d}of this.fields)for(let y of f.apply(i,c)){o.push(y),s[y]=[];for(let g of d.apply(i,c))s[y].push(g)}yield*this.helper(o,s,0,{})}*helper(i,c,s,o){if(s>=i.length){yield Object.assign({},o);return}let f=i[s];for(let d of c[f])o[f]=d,yield*this.helper(i,c,s+1,o)}toString(){return"{"+this.fields.map(({key:i,value:c})=>i.toString()+": "+c.toString()).join(", ")+"}"}}class Z0 extends at{constructor(){super()}*apply(i,c){yield*this.recurse(i)}*recurse(i){yield i;let c=k(i);if(c=="array"||c=="object")for(let s of Object.values(i))yield*this.recurse(s)}*paths(i,c){yield*this.recursePaths(i,[])}*recursePaths(i,c){yield c;let s=k(i);if(s=="array")for(let o=0;o<i.length;o++)yield*this.recursePaths(i[o],c.concat([o]));else if(s=="object")for(let[o,f]of Object.entries(i))yield*this.recursePaths(f,c.concat([o]))}toString(){return".."}}class Ll extends at{constructor(i,c){super(),this.l=i,this.r=c}*apply(i,c){for(let s of this.r.apply(i,c))for(let o of this.l.apply(i,c))yield this.combine(o,s,k(o),k(s))}trace(i,c,s){for(let o of this.l.apply(i,c)){let f=[];s.push({node:this.l,output:o,next:f,subsidiary:"left"});for(let d of this.r.apply(i,c)){let y=[];f.push({node:this.r,output:d,next:y,subsidiary:"right"});let g=this.combine(o,d,k(o),k(d)),b=[];y.push({node:this,output:g,next:b})}}}}class Ns extends Ll{constructor(i,c){super(i,c)}combine(i,c,s,o){if(s=="number"&&o=="number")return i+c;if(i===null)return c;if(c===null)return i;if(s=="string"&&o=="string")return i+c;if(s=="array"&&o=="array")return i.concat(c);if(s=="object"&&o=="object")return Object.assign(Object.assign({},i),c);throw"type mismatch in +:"+s+" and "+o+" cannot be added"}toString(){return this.l+" + "+this.r}}class V0 extends Ll{constructor(i,c){super(i,c)}combine(i,c,s,o){if(s=="number"&&o=="number")return i*c;if(s=="number"&&o=="string")return this.repeat(c,i);if(s=="string"&&o=="number")return this.repeat(i,c);if(s=="object"&&o=="object")return this.merge(Object.assign({},i),c);throw"type mismatch in *:"+s+" and "+o+" cannot be multiplied"}repeat(i,c){if(c==0)return null;let s=[];for(let o=0;o<c;o++)s.push(i);return s.join("")}merge(i,c){for(let s of Object.keys(c))i.hasOwnProperty(s)?k(i[s])!="object"||k(c[s])!="object"?i[s]=c[s]:this.merge(i[s],c[s]):i[s]=c[s];return i}toString(){return this.l+" * "+this.r}}class K0 extends Ll{constructor(i,c){super(i,c)}combine(i,c,s,o){if(s=="number"&&o=="number")return i-c;if(i==null||c==null)throw"type mismatch in -";if(s=="array"&&o=="array")return i.filter(f=>c.indexOf(f)==-1);throw"type mismatch in -:"+s+" and "+o+" cannot be subtracted"}toString(){return this.l+" - "+this.r}}class J0 extends Ll{constructor(i,c){super(i,c)}combine(i,c,s,o){if(s=="number"&&o=="number")return i/c;if(s=="string"&&o=="string")return i.split(c);throw"type mismatch in -:"+s+" and "+o+" cannot be divided"}toString(){return this.l+" / "+this.r}}class $0 extends Ll{constructor(i,c){super(i,c)}combine(i,c,s,o){if(s=="number"&&o=="number")return i%c;throw"type mismatch in -:"+s+" and "+o+" cannot be divided (remainder)"}toString(){return this.l+" % "+this.r}}class W0 extends Ll{constructor(i,c){super(i,c)}combine(i,c,s,o){return xl(i,c)<0}toString(){return this.l+" < "+this.r}}class F0 extends Ll{constructor(i,c){super(i,c)}combine(i,c,s,o){return xl(i,c)>0}toString(){return this.l+" > "+this.r}}class I0 extends Ll{constructor(i,c){super(i,c)}combine(i,c,s,o){return xl(i,c)<=0}toString(){return this.l+" <= "+this.r}}class P0 extends Ll{constructor(i,c){super(i,c)}combine(i,c,s,o){return xl(i,c)>=0}toString(){return this.l+" >= "+this.r}}class Vp extends Ll{constructor(i,c){super(i,c)}combine(i,c,s,o){if(s!=o)return!1;if(s=="number"||s=="string"||s=="boolean"||s=="null")return i==c;if(s=="array"){if(i.length!=c.length)return!1;for(let y=0;y<i.length;y++)if(!this.combine(i[y],c[y],k(i[y]),k(c[y])))return!1;return!0}let f=Object.keys(i),d=Object.keys(c);if(f.length!=d.length)return!1;for(let y of f)if(!c.hasOwnProperty(y)||!this.combine(i[y],c[y],k(i[y]),k(c[y])))return!1;return!0}toString(){return this.l+" == "+this.r}}class eb extends Vp{constructor(i,c){super(i,c)}combine(i,c,s,o){return!super.combine(i,c,s,o)}toString(){return this.l+" != "+this.r}}class tb extends at{constructor(i,c){super(),this.lhs=i,this.rhs=c}*apply(i,c){let s=!1;for(let o of this.lhs.apply(i,c))o!==null&&(s=!0),yield o;s||(yield*this.rhs.apply(i,c))}toString(){return this.l+" // "+this.r}}class xp extends at{constructor(i,c){super(),this.l=i,this.r=c}*apply(i,c){i=JSON.parse(JSON.stringify(i));for(let s of this.l.paths(i,c)){let o=this.r.apply(this.get(i,s),c).next();o.done?i=this.update(i,s,null,!0):i=this.update(i,s,o.value)}yield i}get(i,c){let s=i;for(let o of c)s=s[o];return s}update(i,c,s,o=!1){let f=i,d=c.pop();for(let y of c)f=f[y];return typeof d>"u"?s:(f[d]=s,o&&delete f[d],i)}toString(){return this.l+" |= "+this.r}}class lb extends at{constructor(i,c){super(),this.name=i,this.args=c}apply(i,c){let s,o=c.userFuncArgs[this.name];if(o?s=function(f,d,y){return o.apply(f,d)}:s||(s=pn[this.name]),!s)throw"no such function "+this.name;return s(i,c,this.args)}paths(i,c){let s=c.userFuncArgs[this.name];if(s)return s.paths(i,c);let o=pn[this.name+"-paths"];if(!o)throw"no paths for "+this.name;return o(i,c,this.args)}trace(i,c,s){if(this.args.length==1&&!c.userFuncArgs[this.name]&&this.ordinary){let o=pn[this.name];if(o.params&&o.params.length>0&&o.params[0].mode=="defer")return super.trace(i,c,s);for(let f of this.args[0].apply(i,c)){let d=[],y="arg1";o.params&&o.params.length>0&&o.params[0].label&&(y=o.params[0].label),s.push({node:this.args[0],output:f,next:d,subsidiary:y});for(let g of o(i,c,[new sb(f)])){let b=[];d.push({node:this,output:g,next:b})}}}else return super.trace(i,c,s)}get ordinary(){let i=pn[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 nb extends at{constructor(i,c){super(),this.name=i,this.string=c}*apply(i,c){if(typeof this.string>"u")return yield cu[this.name](i);yield*this.string.applyEscape(i,cu[this.name],c)}toString(){return this.string?"@"+this.name+" "+this.string:"@"+this.name}}class ab extends at{constructor(i){super(),this.inner=i}*apply(i,c){try{for(let s of this.inner.apply(i,c))s!==null&&(yield s)}catch{}}*paths(i,c){try{for(let[s,o]of Ir(this.inner.apply(i,c),this.inner.paths(i,c)))s!==null&&(yield o)}catch{}}toString(){return this.inner+"?"}}class Kp extends at{constructor(i,c){super(),this.value=i,this.name=c}*apply(i,c){for(let s of this.value.apply(i,c))c.variables[this.name]=s,yield i;delete c.variables[this.name]}toString(){return this.value+" as $"+this.name}}class Jp extends at{constructor(i){super(),this.name=i}*apply(i,c){yield c.variables[this.name]}toString(){return"$"+this.name}}class ib extends at{constructor(i,c,s,o){super(),this.generator=i,this.name=c,this.init=s,this.expr=o}*apply(i,c){for(let s of this.init.apply(i,c)){for(let o of this.generator.apply(i,c)){c.variables[this.name]=o;for(let f of this.expr.apply(s,c))s=f}delete c.variables[this.name],yield s}}toString(){return"reduce "+this.generator+" as $"+this.name+"("+this.init+"; "+this.expr+")"}}class ub extends at{constructor(i,c,s){super(),this.conditions=i,this.thens=c,this.elseBranch=s}*apply(i,c){for(let[s,o]of Ir(this.conditions,this.thens))for(let f of s.apply(i,c))if(f){for(let d of o.apply(i,c))yield d;return}if(this.elseBranch){yield*this.elseBranch.apply(i,c);return}yield i}toString(){let i="";for(let[c,s]of Ir(this.conditions,this.thens))i+="if "+c+" then "+s+" el";return this.elseBranch?i+"se "+this.elseBranch+" end":i.slice(0,-2)+"end"}}class sb{constructor(i){this.value=i}*apply(i,c){yield this.value}toString(){return this.value.toString()}}const cu={text(a){return typeof a=="string"?a:Hl(a,"","","")},json(a){return Hl(a,"","","")},html(a){return typeof a!="string"&&(a=Hl(a,"","","")),a.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""")},uri(a){return typeof a!="string"&&(a=Hl(a,"","","")),encodeURIComponent(a)},urid(a){return typeof a!="string"&&(a=Hl(a,"","","")),decodeURIComponent(a)},csv(a){if(k(a)!="array")throw"cannot csv-format "+k(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 "+k(i)+" not valid in a csv row"}).join(",")},tsv(a){if(k(a)!="array")throw"cannot tsv-format "+k(a)+", only array";return a.map(i=>{if(typeof i=="string")return Gp(i);if(typeof i=="number")return""+i;if(i===null)return"";throw"type "+k(i)+" not valid in a tsv row"}).join(" ")},base64(a){return typeof a!="string"&&(a=Hl(a,"","","")),btoa(a)},base64d(a){if(typeof a!="string")throw"can only base64-decode strings";return atob(a)},sh(a){let i=k(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(c=>{let s=k(c);if(s=="string")return"'"+c.replace(/'/g,"'\\''")+"'";if(s=="number")return""+c;if(s=="boolean")return""+c;if(c===null)return"null";throw s+" cannot be escaped for shell"}).join(" ");throw i+" cannot be escaped for shell"}},pn={"tostring/0":function*(a){yield cu.text(a)},"empty/0":function*(a){},"fromjson/0":function*(a){yield JSON.parse(a)},"path/1":Object.assign(function*(a,i,c){yield*c[0].paths(a,i)},{params:[{mode:"defer"}]}),"select/1":Object.assign(function*(a,i,c){let s=c[0];for(let o of s.apply(a,i))o!==!1&&o!==null&&(yield a)},{params:[{label:"predicate",mode:"eval"}]}),"select/1-paths":function*(a,i,c){let s=c[0];for(let o of s.apply(a,i))o!==!1&&o!==null&&(yield[])},"length/0":function*(a){let i=k(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,c){let s=c[0];for(let o of s.apply(a,i))yield a.hasOwnProperty(o)},{params:[{label:"key"}]}),"has/1-paths":function*(a,i,c){let s=c[0];for(let o of s.apply(a,i))a.hasOwnProperty(o)&&(yield[])},"in/1":Object.assign(function*(a,i,c){let s=c[0];for(let o of s.apply(a,i))yield o.hasOwnProperty(a)},{params:[{label:"object"}]}),"in/1-paths":function*(a,i,c){let s=c[0];for(let o of s.apply(a,i))o.hasOwnProperty(a)&&(yield[])},"contains/1":Object.assign(function*(a,i,c){let s=c[0],o=k(a);for(let f of s.apply(a,i)){let d=k(f);if(o!=d)throw o+" and "+d+" cannot have their containment checked";yield Ms(a,f)}},{params:[{label:"element"}]}),"inside/1":Object.assign(function*(a,i,c){let s=c[0],o=k(a);for(let f of s.apply(a,i)){let d=k(f);if(o!=d)throw o+" and "+d+" cannot have their containment checked";yield Ms(f,a)}},{params:[{label:"container"}]}),"to_entries/0":function*(a,i){let c=k(a);if(c=="array"){let s=[];for(let o=0;o<a.length;o++)s.push({key:o,value:a[o]});yield s}else if(c=="object")yield Object.entries(a).map(s=>({key:s[0],value:s[1]}));else throw"cannot make entries from "+c},"from_entries/0":function*(a,i){let c=k(a);if(c=="array"){let s={};for(let{key:o,value:f}of a)s[o]=f;yield s}else throw"cannot use entries from "+c},"type/0":function*(a){yield k(a)},"range/1":Object.assign(function*(a,i,c){for(let s of c[0].apply(a,i))for(let o=0;o<s;o++)yield o},{params:[{mode:"defer"}]}),"range/2":function*(a,i,c){for(let s of c[0].apply(a,i))for(let o of c[1].apply(a,i))for(let f=s;f<o;f++)yield f},"range/3":function*(a,i,c){for(let s of c[0].apply(a,i))for(let o of c[1].apply(a,i))for(let f of c[2].apply(a,i))for(let d=s;d<o;d+=f)yield d},"any/0":function*(a,i){if(k(a)!="array")throw"any/0 requires array as input, not "+k(a);for(let c of a)if(c)return yield!0;yield!1},"any/1":Object.assign(function*(a,i,c){if(k(a)!="array")throw"any/1 requires array as input, not "+k(a);for(let s of a)for(let o of c[0].apply(s,i))if(o)return yield!0;yield!1},{params:[{mode:"defer"}]}),"any/2":function*(a,i,c){let s=c[0],o=c[1];for(let f of s.apply(a,i))for(let d of o.apply(f,i))if(d)return yield!0;yield!1},"all/0":function*(a,i){if(k(a)!="array")throw"all/0 requires array as input, not "+k(a);for(let c of a)if(!c)return yield!1;yield!0},"all/1":Object.assign(function*(a,i,c){if(k(a)!="array")throw"all/1 requires array as input, not "+k(a);for(let s of a)for(let o of c[0].apply(s,i))if(!o)return yield!1;yield!0},{params:[{mode:"defer"}]}),"all/2":function*(a,i,c){let s=c[0],o=c[1];for(let f of s.apply(a,i))for(let d of o.apply(f,i))if(!d)return yield!1;yield!0},"add/0":function*(a,i){if(k(a)!="array")throw"can only add up arrays";if(a.length==0)return yield null;if(a.length==1)return yield a[0];let c=Ns.prototype.combine(a[0],a[1],k(a[0]),k(a[1]));for(let s=2;s<a.length;s++)c=Ns.prototype.combine(c,a[s],k(c),k(a[s]));yield c},"add/1":Object.assign(function*(a,i,c){let s=null;for(let o of c[0].apply(a,i))s=Ns.prototype.combine(s,o,k(s),k(o));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 ${k(a)} (${Hl(a)}) to boolean`},"tojson/0":function*(a){yield JSON.stringify(a)},"fromjson/0":function*(a){yield JSON.parse(a)},"reverse/0":function*(a){if(k(a)!="array")throw"can only reverse arrays, not "+k(a);yield a.toReversed()},"sort/0":function*(a,i){if(k(a)!="array")throw"can only sort arrays, not "+k(a);yield Array.from(a).sort(xl)},"sort_by/1":Object.assign(function*(a,i,c){if(k(a)!="array")throw"can only sort arrays, not "+k(a);let s=c[0],o=a.map(f=>({key:s.apply(f,i).next().value,value:f}));o.sort((f,d)=>xl(f.key,d.key)),yield o.map(f=>f.value)},{params:[{mode:"defer"}]}),"explode/0":function*(a,i){if(k(a)!="string")throw"can only explode string, not "+k(a);let c=[];for(let s=0;s<a.length;s++){let o=a.charCodeAt(s);c.push(o),o>65535&&s++}yield c},"implode/0":function*(a,i){if(k(a)!="array")throw"can only implode array, not "+k(a);yield a.map(c=>String.fromCodePoint(c)).join("")},"split/1":Object.assign(function*(a,i,c){if(k(a)!="string")throw"can only split string, not "+k(a);for(let s of c[0].apply(a,i))yield a.split(s)},{params:[{label:"separator"}]}),"split/2":Object.assign(function*(a,i,c){if(k(a)!="string")throw"can only split string, not "+k(a);let s=c[1]?c[1].apply(a,i).next().value:"";s=ni(s);for(let o of c[0].apply(a,i)){let f=new RegExp(o,s);yield a.split(f)}},{params:[{label:"regex"},{label:"flags"}]}),"splits/1":Object.assign(function*(a,i,c){if(k(a)!="string")throw"can only split string, not "+k(a);for(let s of c[0].apply(a,i)){let o=new RegExp(s,"u");yield*a.split(o)}},{params:[{label:"regex"},{label:"flags"}]}),"splits/2":Object.assign(function*(a,i,c){if(k(a)!="string")throw"can only split string, not "+k(a);let s=c[1]?c[1].apply(a,i).next().value:"";s=ni(s);for(let o of c[0].apply(a,i)){let f=new RegExp(o,s);yield*a.split(f)}},{params:[{label:"regex"},{label:"flags"}]}),"join/1":Object.assign(function*(a,i,c){if(k(a)!="array")throw"can only join array, not "+k(a);let s=a.map(o=>{if(typeof o=="number")return""+o;if(typeof o=="string")return o;if(typeof o=="boolean")return""+o;if(o===null)return"";throw"cannot join "+k(o)});for(let o of c[0].apply(a,i))yield s.join(o)},{params:[{label:"delimiter"}]}),"getpath/1":Object.assign(function*(a,i,c){if(k(a)!="object"&&k(a)!="array")throw"can only get path from objects and arrays, not "+k(a);for(let s of c[0].apply(a,i)){let o=a;for(let f of s)if(o.hasOwnProperty(f))o=o[f];else{o=null;break}yield o}},{params:[{label:"paths"}]}),"setpath/2":Object.assign(function*(a,i,c){if(k(a)!="object"&&k(a)!="array"&&k(a)!="null")throw"can only set path on objects and arrays, not "+k(a);for(let s of c[0].apply(a,i)){let o=JSON.parse(JSON.stringify(a)),f=o;for(let d of s.slice(0,-1))o===null?k(d)=="number"?(o=[],f=o):(o={},f=o):f.hasOwnProperty(d)||(k(d)=="number"?f[d]=[]:f[d]={}),f=f[d];for(let d of c[1].apply(a,i)){let y=s[s.length-1];o===null?k(y)=="number"?(o=[],f=o):(o={},f=o):f.hasOwnProperty(y)||(k(y)=="number"?f=[]:f={}),f[y]=d}yield o}},{params:[{label:"paths"},{label:"value"}]}),"delpaths/1":Object.assign(function*(a,i,c){if(k(a)!="object"&&k(a)!="array")throw"can only delete paths from objects and arrays, not "+k(a);for(let s of c[0].apply(a,i)){let o=JSON.parse(JSON.stringify(a));for(let f of s){let d=o;for(let y of f.slice(0,-1))d.hasOwnProperty(y)||(d[y]={}),d=d[y];delete d[f[f.length-1]]}yield o}},{params:[{label:"paths"}]}),"ltrim/0":Object.assign(function*(a,i){if(k(a)!="string")throw"can only trim strings, not "+k(a);yield a.trimLeft()},{params:[]}),"rtrim/0":Object.assign(function*(a,i){if(k(a)!="string")throw"can only trim strings, not "+k(a);yield a.trimRight()},{params:[]}),"trim/0":Object.assign(function*(a,i){if(k(a)!="string")throw"can only trim strings, not "+k(a);yield a.trim()},{params:[]}),"trimstr/1":Object.assign(function*(a,i,c){if(k(a)!="string")throw"can only trim strings, not "+k(a);for(let s of c[0].apply(a,i)){let o=a;o.startsWith(s)&&(o=o.slice(s.length)),o.endsWith(s)&&(o=o.slice(0,-s.length)),yield o}},{params:[{label:"str"}]}),"ltrimstr/1":Object.assign(function*(a,i,c){if(k(a)!="string")throw"can only trim strings, not "+k(a);for(let s of c[0].apply(a,i)){let o=a;o.startsWith(s)&&(o=o.slice(s.length)),yield o}},{params:[{label:"str"}]}),"rtrimstr/1":Object.assign(function*(a,i,c){if(k(a)!="string")throw"can only trim strings, not "+k(a);for(let s of c[0].apply(a,i)){let o=a;o.endsWith(s)&&(o=o.slice(0,-s.length)),yield o}},{params:[{label:"str"}]}),"first/0":function*(a,i){if(k(a)!="array")throw"can only get first element of arrays, not "+k(a);if(a.length==0)return yield null;yield a[0]},"last/0":Object.assign(function*(a,i){if(k(a)!="array")throw"can only get last element of arrays, not "+k(a);if(a.length==0)return yield null;yield a[a.length-1]},{params:[]}),"nth/1":Object.assign(function*(a,i,c){if(k(a)!="array")throw"can only get nth element of arrays, not "+k(a);if(a.length==0)return yield null;for(let s of c[0].apply(a,i)){if(k(s)!="number")throw"nth index must be a number, not "+k(s);if(s<0)throw"negative indices not supported for nth";yield a[s]}},{params:[{label:"index"}]}),"first/1":Object.assign(function*(a,i,c){for(let s of c[0].apply(a,i))return yield s},{params:[{label:"generator"}]}),"last/1":Object.assign(function*(a,i,c){let s=null;for(let o of c[0].apply(a,i))s=o;yield s},{params:[{label:"generator"}]}),"limit/2":Object.assign(function*(a,i,c){for(let s of c[0].apply(a,i)){let o=0;for(let f of c[1].apply(a,i)){if(o>=s)break;yield f,o++}}},{params:[{label:"n"},{label:"expr"}]}),"skip/2":Object.assign(function*(a,i,c){for(let s of c[0].apply(a,i)){let o=0;for(let f of c[1].apply(a,i))o>=s&&(yield f),o++}},{params:[{label:"n"},{label:"expr"}]}),"walk/1":Object.assign(function*(a,i,c){yield*eo(a,i,c[0])},{params:[{label:"generator"}]}),"ascii_upcase/0":function*(a,i){if(k(a)!="string")throw"can only convert strings to uppercase, not "+k(a);yield a.replace(/./g,c=>c.charCodeAt(0)>=97&&c.charCodeAt(0)<=122?c.toUpperCase():c)},"ascii_downcase/0":function*(a,i){if(k(a)!="string")throw"can only convert strings to lowercase, not "+k(a);yield a.replace(/./g,c=>c.charCodeAt(0)>=65&&c.charCodeAt(0)<=90?c.toLowerCase():c)},"sub/2":Object.assign(function*(a,i,c){yield*As(a,i,c[0],c[1])},{params:[{label:"regex"},{label:"tostring"}]}),"sub/3":Object.assign(function*(a,i,c){let s=c[2].apply(a,i).next().value||"";yield*As(a,i,c[0],c[1],s)},{params:[{label:"regex"},{label:"tostring"},{label:"flags"}]}),"gsub/2":Object.assign(function*(a,i,c){return yield*As(a,i,c[0],c[1],"g")},{params:[{label:"regex"},{label:"tostring"}]}),"gsub/3":Object.assign(function*(a,i,c){let s=c[2].apply(a,i).next().value||"g";yield*As(a,i,c[0],c[1],s)},{params:[{label:"regex"},{label:"tostring"},{label:"flags"}]}),"test/1":Object.assign(function*(a,i,c){for(let s of c[0].apply(a,i))yield new RegExp(s,"u").test(a)},{params:[{label:"regex"}]}),"test/2":Object.assign(function*(a,i,c){let s=c[0].apply(a,i).next().value||"";for(let o of c[0].apply(a,i))yield new RegExp(o,ni(s)).test(a)},{params:[{label:"regex"},{label:"flags"}]}),"capture/1":Object.assign(function*(a,i,c){for(let s of c[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,c){let s=c[1].apply(a,i).next().value||"";s=ni(s);for(let o of c[0].apply(a,i)){let d=new RegExp(o,s).exec(a);d&&(yield d.groups)}},{params:[{label:"regex"},{label:"flags"}]}),"match/1":Object.assign(function*(a,i,c){let s="u";c[1]&&(s=ni(c[1].apply(a,i).next().value||"")),s+="d";let o=s.indexOf("g")>=0,f=0;for(let d of c[0].apply(a,i)){let y=new RegExp(d,s),g=y.exec(a);for(;g;){let b={offset:g.index,length:g[0].length,string:g[0],captures:[]};for(let E=1;E<g.length;E++){if(!g.indices[E])continue;let j=null;if(g.indices.groups){for(let[G,L]of Object.entries(g.indices.groups))if(g.indices[E][0]==L[0]&&g.indices[E][1]==L[1]){j=G;break}}b.captures.push({offset:g.indices[E][0],length:g[E].length,string:g[E],name:j})}if(yield b,g=y.exec(a),f++>1e3||!o)break}}},{params:[{label:"regex"}]})};pn["match/2"]=pn["match/1"];function*As(a,i,c,s,o=""){o=ni(o);for(let f of c.apply(a,i)){let d=new RegExp(f,o),y,g=0,b=[];for(;(y=d.exec(a))&&(b.push(a.slice(g,y.index)),b.push(y.groups),g=y.index+y[0].length,!(o.indexOf("g")<0)););if(b.length==0)return yield a;let E=a.slice(g),j=[];for(let L=0;L<b.length;L+=2){let I=b[L],Q=b[L+1],V=[];j.push(V);for(let ee of s.apply(Q,i))V.push(I+ee)}let G=0;for(;;){let L="",I=!1;for(let Q=0;Q<j.length;Q++)typeof j[Q][G]<"u"&&(I=!0),L+=j[Q][G]??"";if(!I||(L+=E,yield L,G++,G>1e3))break}}}function ni(a){let i=["u"];if(a===null)return"u";for(let c of a)if(c=="g"||c=="i"||c=="m"||c=="s")i.push(c);else if(c=="p")i.push("s","m");else throw c=="x"||c=="l"||c=="n"?`jqjs does not have support for regex flag '${c}'`:`Invalid flag '${c}' in regex substitution`;return i.join("")}function*eo(a,i,c){if(k(a)=="array"){let s=[];for(let o of a)s.push(...eo(o,i,c));return yield*c.apply(s,i)}else if(k(a)=="object"){let s={};for(let o of Object.keys(a))for(let f of eo(a[o],i,c)){s[o]=f;break}return yield*c.apply(s,i)}yield*c.apply(a,i)}function Ms(a,i){let c=k(a),s=k(i);if(c!=s)return!1;if(c=="string")return a.indexOf(i)!=-1;if(c=="array"){for(let o of i){let f=!1;for(let d of a)if(Ms(d,o)){f=!0;break}if(!f)return!1}return!0}else if(c=="object"){for(let o of Object.keys(i))if(!a.hasOwnProperty(o)||!Ms(a[o],i[o]))return!1;return!0}else return a===i}Al("map","f","[.[] | f]");Al("map_values","f",".[] |= f");Al("del","p","p |= empty");Al("with_entries","w","to_entries | map(w) | from_entries");Al("arrays","",'select(type == "array")');Al("objects","",'select(type == "object")');Al("booleans","",'select(type == "boolean")');Al("strings","",'select(type == "string")');Al("numbers","",'select(type == "number")');Al("nulls","",'select(type == "null")');Al("pick",["pathexps"],". as $in | reduce path(pathexps) as $a (null; setpath($a; $in|getpath($a)) )");function cb(a,i){let c=Lp(a);return typeof i<"u"?c(i):c}const rb=Object.assign(cb,{compile:Lp,prettyPrint:Hl});ks.registerLanguage("json",w0);ks.registerLanguage("xml",M0);ks.registerLanguage("plaintext",C0);const Sp=5*1024*1024;function ob(a){return a?a.includes("json")?"json":a.includes("xml")||a.includes("html")?"xml":"plaintext":"plaintext"}function fb({body:a,contentType:i,wrapEnabled:c,onToggleWrap:s}){const o=M.useRef(null),[f,d]=M.useState(!1),[y,g]=M.useState(""),b=M.useRef(null),E=M.useMemo(()=>ob(i),[i]),j=E==="json",G=M.useMemo(()=>{if(!j||!a)return null;try{return JSON.parse(a)}catch{return null}},[a,j]),{displayBody:L,truncated:I,filterError:Q}=M.useMemo(()=>{let ee=a||"",ye=!1,ne=null;if(ee.length>Sp&&(ee=ee.slice(0,Sp),ye=!0),j)try{const $=JSON.parse(ee);ee=JSON.stringify($,null,2)}catch{}if(y.trim()&&G!==null)try{const Y=[...rb.compile(y.trim())(G)];Y.length===1?ee=typeof Y[0]=="string"?Y[0]:JSON.stringify(Y[0],null,2):ee=Y.map(ce=>typeof ce=="string"?JSON.stringify(ce):JSON.stringify(ce,null,2)).join(`
|
|
74
|
+
`)}catch($){ne=$.message}return{displayBody:ee,truncated:ye,filterError:ne}},[a,j,y,G]);M.useEffect(()=>{if(o.current&&L)try{const ee=y.trim()&&!Q?"json":E,ye=ks.highlight(L,{language:ee});o.current.innerHTML=ye.value}catch{o.current.textContent=L}},[L,E,y,Q]);const V=M.useCallback(async()=>{const ee=L||a||"";try{await navigator.clipboard.writeText(ee),d(!0),setTimeout(()=>d(!1),1500)}catch{const ye=document.createElement("textarea");ye.value=ee,document.body.appendChild(ye),ye.select(),document.execCommand("copy"),document.body.removeChild(ye),d(!0),setTimeout(()=>d(!1),1500)}},[L,a]);return a?m.jsxs("div",{children:[m.jsxs("div",{className:"body-view__toolbar",children:[j&&m.jsxs("div",{className:"body-view__filter-group",children:[m.jsx("input",{ref:b,className:`body-view__filter${Q?" body-view__filter--error":y.trim()?" body-view__filter--active":""}`,type:"text",placeholder:"jq filter, e.g. .data[0].name",value:y,onChange:ee=>g(ee.target.value),spellCheck:!1}),y&&m.jsx("button",{className:"body-view__filter-clear",onClick:()=>{g(""),b.current?.focus()},title:"Clear filter",children:"x"})]}),m.jsx("button",{className:`body-view__btn${c?" body-view__btn--active":""}`,onClick:s,children:"Wrap"}),m.jsx("button",{className:"body-view__btn",onClick:V,children:f?"Copied!":"Copy"})]}),Q&&m.jsx("div",{className:"body-view__filter-error",children:Q}),m.jsx("pre",{className:`body-view__pre ${c?"body-view__pre--wrap":"body-view__pre--nowrap"}`,children:m.jsx("code",{ref:o,children:L})}),I&&m.jsx("div",{style:{color:"var(--method-put)",fontSize:"12px",marginTop:"8px"},children:"Response truncated at 5MB. Full response available in verbose view."})]}):m.jsx("div",{style:{color:"var(--fg-muted)"},children:"No response body"})}function _p({headers:a}){if(!a)return null;const i=Array.isArray(a)?a:Object.entries(a).map(([c,s])=>({name:c,value:s}));return i.length===0?null:m.jsxs("table",{className:"headers-view__table",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:"Header"}),m.jsx("th",{children:"Value"})]})}),m.jsx("tbody",{children:i.map((c,s)=>{const o=c.name||c[0]||"",f=c.value||c[1]||"";return m.jsxs("tr",{children:[m.jsx("td",{children:o}),m.jsx("td",{children:String(f)})]},`${o}-${s}`)})})]})}function hb({responseHeaders:a,requestHeaders:i}){const[c,s]=M.useState(!1);return m.jsxs("div",{children:[m.jsx(_p,{headers:a}),i&&m.jsxs("div",{children:[m.jsxs("div",{className:"headers-view__section-title",onClick:()=>s(o=>!o),children:[c?"▼":"▶"," Request Headers"]}),c&&m.jsx(_p,{headers:i})]}),!a&&!i&&m.jsx("div",{style:{color:"var(--fg-muted)"},children:"No headers available"})]})}function db(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 pb({verbose:a}){const i=M.useMemo(()=>a?a.split(`
|
|
75
|
+
`):[],[a]);return a?m.jsx("div",{className:"verbose-view",children:i.map((c,s)=>m.jsx("div",{className:db(c),children:c||" "},s))}):m.jsx("div",{style:{color:"var(--fg-muted)"},children:"No verbose output available"})}function gb({curlCommand:a}){const[i,c]=M.useState(!1),s=M.useCallback(async()=>{if(a)try{await navigator.clipboard.writeText(a),c(!0),setTimeout(()=>c(!1),1500)}catch{const o=document.createElement("textarea");o.value=a,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o),c(!0),setTimeout(()=>c(!1),1500)}},[a]);return a?m.jsxs("div",{className:"curl-view",children:[m.jsx("button",{className:"copy-btn curl-view__copy-btn",onClick:s,children:i?"Copied!":"Copy"}),m.jsx("pre",{className:"curl-view__pre",children:m.jsx("code",{children:a})})]}):m.jsx("div",{style:{color:"var(--fg-muted)"},children:"No curl command available"})}function yb({validation:a,expanded:i,onToggle:c}){if(!a)return m.jsx("span",{className:"validation-details",children:m.jsx("span",{className:"validation-details__indicator--none",children:"—"})});const{valid:s,errors:o}=a;return m.jsxs("div",{children:[m.jsx("span",{className:"validation-details",onClick:c,children:s?m.jsxs("span",{className:"validation-details__indicator--valid",children:["✓"," Valid"]}):m.jsxs("span",{className:"validation-details__indicator--invalid",children:["✗"," ",(o||[]).length," error(s)"]})}),i&&!s&&o&&o.length>0&&m.jsx("div",{className:"validation-details__errors",children:o.map((f,d)=>m.jsxs("div",{className:"validation-details__error",children:[f.path&&m.jsx("div",{className:"validation-details__error-path",children:f.path}),m.jsx("div",{className:"validation-details__error-msg",children:f.message||"Validation error"}),(f.expected||f.actual)&&m.jsxs("div",{className:"validation-details__error-detail",children:[f.expected&&m.jsxs(m.Fragment,{children:["Expected: ",String(f.expected)," "]}),f.actual&&m.jsxs(m.Fragment,{children:["Actual: ",String(f.actual)]})]})]},d))})]})}function Ep(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 mb(a){return a==null?"":a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(2)} MB`}function bb(a){if(!a)return"";const i=Date.now()-new Date(a).getTime(),c=Math.floor(i/1e3);if(c<60)return`${c}s ago`;const s=Math.floor(c/60);if(s<60)return`${s}m ago`;const o=Math.floor(s/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function vb({response:a,sending:i,history:c=[],onSelectHistoryEntry:s,onClearHistory:o}){const[f,d]=M.useState("body"),[y,g]=M.useState(!0),[b,E]=M.useState(null),[j,G]=M.useState(!1),L=M.useRef(null);if(M.useEffect(()=>{if(!j)return;function Q(V){L.current&&!L.current.contains(V.target)&&G(!1)}return document.addEventListener("mousedown",Q),()=>document.removeEventListener("mousedown",Q)},[j]),i)return m.jsxs("div",{className:"response-panel__loading",children:[m.jsx("span",{className:"request-panel__spinner"}),m.jsx("span",{children:"Sending request..."})]});if(!a)return m.jsx("div",{className:"response-panel__empty",children:"Send a request to see the response"});if(a.error&&!a.status)return m.jsxs("div",{className:"response-panel__empty",style:{color:"var(--method-delete)"},children:["Error: ",a.error]});const I=["Body","Headers","Verbose","Curl"];return m.jsxs("div",{children:[m.jsxs("div",{className:"response-panel__header",children:[m.jsxs("span",{className:`response-panel__status ${Ep(a.status)}`,children:[a.status," ",a.status_text||a.statusText||""]}),a.timing?.total_ms!=null&&m.jsxs("span",{className:"response-panel__meta",children:[a.timing.total_ms," ms"]}),a.size_bytes!=null&&m.jsx("span",{className:"response-panel__meta",children:mb(a.size_bytes)}),a.validation!==void 0&&m.jsx(yb,{validation:a.validation,expanded:b??!a.validation?.valid,onToggle:()=>E(Q=>Q===null?a.validation?.valid:!Q)}),c.length>0&&m.jsxs("div",{className:"response-panel__history",ref:L,children:[m.jsxs("button",{className:"response-panel__history-btn",onClick:()=>G(Q=>!Q),children:["History (",c.length,")"]}),j&&m.jsxs("div",{className:"response-panel__history-dropdown",children:[c.map(Q=>m.jsxs("button",{className:"response-panel__history-item",onClick:()=>{s?.(Q.index),G(!1)},children:[m.jsx("span",{className:`response-panel__status ${Ep(Q.status)}`,children:Q.status}),m.jsx("span",{className:"response-panel__history-time",children:Q.timing?.total_ms!=null?`${Q.timing.total_ms}ms`:""}),m.jsx("span",{className:"response-panel__history-ago",children:bb(Q.timestamp)})]},Q.index)),m.jsx("button",{className:"response-panel__history-clear",onClick:()=>{o?.(),G(!1)},children:"Clear history"})]})]})]}),m.jsx("div",{className:"response-panel__tabs",children:I.map(Q=>m.jsx("button",{className:`response-panel__tab${f===Q.toLowerCase()?" response-panel__tab--active":""}`,onClick:()=>d(Q.toLowerCase()),children:Q},Q))}),f==="body"&&m.jsx(fb,{body:a.body,contentType:a.contentType||a.content_type||a.headers?.["content-type"],wrapEnabled:y,onToggleWrap:()=>g(Q=>!Q)}),f==="headers"&&m.jsx(hb,{responseHeaders:a.headers,requestHeaders:a.requestHeaders||a.request_headers}),f==="verbose"&&m.jsx(pb,{verbose:a.verbose}),f==="curl"&&m.jsx(gb,{curlCommand:a.curl||a.curlCommand||a.curl_command})]})}function xb({pairs:a,onChange:i}){const c=(f,d,y)=>{const g=a.map((b,E)=>E===f?{...b,[d]:y}:b);i(g)},s=()=>{i([...a,{key:"",value:""}])},o=f=>{const d=a.filter((y,g)=>g!==f);i(d.length>0?d:[{key:"",value:""}])};return m.jsxs("div",{children:[m.jsxs("table",{className:"body-editor__kv-table",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:"Variable"}),m.jsx("th",{children:"Value"}),m.jsx("th",{})]})}),m.jsx("tbody",{children:a.map((f,d)=>m.jsxs("tr",{children:[m.jsx("td",{children:m.jsx("input",{className:"body-editor__kv-input",type:"text",value:f.key||"",onChange:y=>c(d,"key",y.target.value),placeholder:"variable name"})}),m.jsx("td",{children:m.jsx("input",{className:"body-editor__kv-input",type:"text",value:f.value||"",onChange:y=>c(d,"value",y.target.value),placeholder:"value"})}),m.jsx("td",{children:m.jsx("button",{className:"body-editor__kv-remove",onClick:()=>o(d),title:"Remove",children:"x"})})]},d))})]}),m.jsx("button",{className:"body-editor__kv-add",onClick:s,children:"+ Add Variable"})]})}function Tp(a){return!a||Object.keys(a).length===0?[{key:"",value:""}]:Object.entries(a).map(([i,c])=>({key:i,value:String(c)}))}function jp(a){const i={};for(const{key:c,value:s}of a)c&&(i[c]=s);return i}function Sb({environments:a,onSave:i,onClose:c}){const[s,o]=M.useState("base"),[f,d]=M.useState(""),[y,g]=M.useState({}),[b,E]=M.useState(!1);M.useEffect(()=>{if(!a)return;const V={};V.base=Tp(a.base),a.environments&&Object.entries(a.environments).forEach(([ee,ye])=>{V[ee]=Tp(ye)}),g(V)},[a]);const j=["base",...Object.keys(y).filter(V=>V!=="base").sort()],G=M.useCallback(()=>{const V=f.trim();!V||V==="base"||y[V]||(g(ee=>({...ee,[V]:[{key:"",value:""}]})),d(""),o(V))},[f,y]),L=M.useCallback(async V=>{if(V==="base")return;const ee=a?.environments&&V in a.environments;try{ee&&await bm(V),g(ye=>{const ne={...ye};return delete ne[V],ne}),o("base"),ee&&i&&i()}catch{}},[i,a]),I=M.useCallback(async()=>{E(!0);try{y.base&&await gm(jp(y.base));for(const[V,ee]of Object.entries(y))V!=="base"&&await ym(V,jp(ee));i&&i()}catch{}finally{E(!1)}},[y,i]),Q=M.useCallback(V=>{V.key==="Escape"&&c()},[c]);return M.useEffect(()=>(document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)),[Q]),m.jsxs("div",{className:"env-editor",children:[m.jsx("div",{className:"env-editor__backdrop",onClick:c}),m.jsxs("div",{className:"env-editor__dialog",children:[m.jsxs("div",{className:"env-editor__header",children:[m.jsx("span",{className:"env-editor__title",children:"Environments"}),m.jsx("button",{className:"env-editor__close",onClick:c,children:"x"})]}),m.jsx("div",{className:"env-editor__tabs",children:j.map(V=>m.jsx("button",{className:`env-editor__tab${s===V?" env-editor__tab--active":""}`,onClick:()=>o(V),children:V==="base"?"Base":V},V))}),m.jsxs("div",{className:"env-editor__body",children:[m.jsxs("div",{className:"env-editor__new-env",children:[m.jsx("input",{className:"env-editor__new-env-input",type:"text",placeholder:"New environment name...",value:f,onChange:V=>d(V.target.value),onKeyDown:V=>{V.key==="Enter"&&G()}}),m.jsx("button",{className:"topbar__btn",onClick:G,children:"Add"})]}),y[s]&&m.jsx(xb,{pairs:y[s],onChange:V=>g(ee=>({...ee,[s]:V}))})]}),m.jsxs("div",{className:"env-editor__footer",children:[s!=="base"&&m.jsxs("button",{className:"env-editor__delete-btn",onClick:()=>L(s),children:['Delete "',s,'"']}),m.jsx("button",{className:"env-editor__save-btn",onClick:I,disabled:b,children:b?"Saving...":"Save"})]})]})]})}function _b(a,i){const c=a.toLowerCase(),s=i.toLowerCase();let o=0;for(let f=0;f<s.length&&o<c.length;f++)s[f]===c[o]&&o++;return o===c.length}function Vr(a,i,c){return i?a.filter(s=>c(s).some(o=>o&&_b(i,o))):a}function Eb({visible:a,onClose:i,projects:c,endpoints:s,actions:o,onSelectProject:f,onSelectEndpoint:d,onAction:y}){const[g,b]=M.useState(""),[E,j]=M.useState(0),G=M.useRef(null),L=M.useMemo(()=>{const $=[];if(!g)o&&o.length>0&&o.forEach(Y=>$.push({type:"action",item:Y})),c&&c.length>0&&c.forEach(Y=>$.push({type:"project",item:Y})),s&&s.length>0&&s.slice(0,20).forEach(Y=>$.push({type:"endpoint",item:Y}));else{const Y=Vr(o||[],g,Z=>[Z.label]),ce=Vr(c||[],g,Z=>[Z.name,Z.path]),se=Vr(s||[],g,Z=>[Z.method,Z.path,Z.summary,...Z.tags||[]]);Y.slice(0,5).forEach(Z=>$.push({type:"action",item:Z})),ce.slice(0,5).forEach(Z=>$.push({type:"project",item:Z})),se.forEach(Z=>$.push({type:"endpoint",item:Z}))}return $},[g,c,s,o]);M.useEffect(()=>{j(0)},[g]),M.useEffect(()=>{a&&G.current&&G.current.focus()},[a]),M.useEffect(()=>{a&&b("")},[a]);const I=M.useCallback($=>{$.type==="action"&&y?y($.item):$.type==="project"&&f?f($.item):$.type==="endpoint"&&d&&d($.item)},[y,f,d]),Q=M.useCallback($=>{$.key==="Escape"?($.preventDefault(),i()):$.key==="ArrowDown"?($.preventDefault(),j(Y=>Math.min(Y+1,L.length-1))):$.key==="ArrowUp"?($.preventDefault(),j(Y=>Math.max(Y-1,0))):$.key==="Enter"&&($.preventDefault(),L[E]&&I(L[E]))},[i,L,E,I]);if(!a)return null;const V=L.filter($=>$.type==="action"),ee=L.filter($=>$.type==="project"),ye=L.filter($=>$.type==="endpoint");let ne=0;return m.jsxs("div",{className:"command-palette",children:[m.jsx("div",{className:"command-palette__backdrop",onClick:i}),m.jsxs("div",{className:"command-palette__dialog",children:[m.jsx("input",{ref:G,className:"command-palette__input",type:"text",placeholder:"Search actions, projects, and endpoints...",value:g,onChange:$=>b($.target.value),onKeyDown:Q}),m.jsxs("div",{className:"command-palette__results",children:[V.length>0&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"command-palette__section-title",children:"Actions"}),V.map($=>{const Y=ne++;return m.jsxs("div",{className:`command-palette__item${Y===E?" command-palette__item--active":""}`,onClick:()=>I($),onMouseEnter:()=>j(Y),children:[m.jsx("span",{className:"command-palette__item-label",children:$.item.label}),$.item.shortcut&&m.jsx("span",{className:"command-palette__item-shortcut",children:$.item.shortcut})]},`act-${$.item.id}`)})]}),ee.length>0&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"command-palette__section-title",children:"Projects"}),ee.map($=>{const Y=ne++;return m.jsxs("div",{className:`command-palette__item${Y===E?" command-palette__item--active":""}`,onClick:()=>I($),onMouseEnter:()=>j(Y),children:[m.jsx("span",{className:"command-palette__item-label",children:$.item.name||$.item.path}),$.item.name&&m.jsx("span",{className:"command-palette__item-detail",children:$.item.path})]},`proj-${$.item.path}`)})]}),ye.length>0&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"command-palette__section-title",children:"Endpoints"}),ye.map($=>{const Y=$.item,ce=ne++;return m.jsxs("div",{className:`command-palette__item${ce===E?" command-palette__item--active":""}`,onClick:()=>I($),onMouseEnter:()=>j(ce),children:[m.jsx("span",{className:`endpoint-item__method endpoint-item__method--${(Y.method||"").toLowerCase()}`,children:(Y.method||"").toUpperCase()}),m.jsx("span",{className:"command-palette__item-label",children:Y.path}),Y.summary&&m.jsx("span",{className:"command-palette__item-detail",children:Y.summary})]},`ep-${Y.method}-${Y.path}`)})]}),L.length===0&&g&&m.jsx("div",{style:{padding:"16px",color:"var(--fg-muted)",textAlign:"center"},children:"No results found"})]})]})]})}function Tb({visible:a,onClose:i,projects:c,currentProject:s,onSwitch:o,onAdd:f,onRemove:d}){const[y,g]=M.useState(""),[b,E]=M.useState(0),[j,G]=M.useState(null),[L,I]=M.useState(null),[Q,V]=M.useState(null),[ee,ye]=M.useState("bookmarks"),ne=M.useRef(null);M.useEffect(()=>{if(a){const Z=s?.path||"",ge=!!Z;g(ge?Z+"/":""),E(0),G(ge?Z:null),I(null),V(null),ye(ge?"browse":"bookmarks"),setTimeout(()=>ne.current?.focus(),0)}},[a]),M.useEffect(()=>{j!==null&&(V(null),jm(j).then(Z=>{I(Z),E(0)}).catch(Z=>{V(Z.message||"Cannot browse"),I(null)}))},[j]),M.useEffect(()=>{if(y.startsWith("/")||y.startsWith("~")){ye("browse");const Z=y.lastIndexOf("/"),ge=Z<=0?y.startsWith("~")?"~":"/":y.slice(0,Z)||"/";ge!==j&&G(ge)}else ee==="browse"&&!y&&(ye("bookmarks"),G(null),I(null))},[y]);const Y=M.useCallback(()=>{if(ee==="browse"&&L){const ct=y.slice((j||"").length).replace(/^\//,"").toLowerCase();let te=[];ct||(L.parent&&te.push({type:"parent",path:L.parent,label:"..",detail:L.parent}),L.has_spec&&te.push({type:"open",path:L.path,label:". (open this directory)",detail:`spec: ${L.spec_file}`,hasSpec:!0}));for(const Te of L.dirs)ct&&!Te.toLowerCase().includes(ct)||te.push({type:"dir",path:`${L.path}/${Te}`,label:Te,detail:null});return te}const Z=y.toLowerCase();let ge=[];if(c&&c.length>0){const ct=Z?c.filter(te=>te.name.toLowerCase().includes(Z)||te.path.toLowerCase().includes(Z)):c;for(const te of ct)ge.push({type:"project",path:te.path,label:te.name,detail:te.path,isCurrent:te.path===s?.path})}return ge.length===0&&!Z&&ge.push({type:"hint",label:"Type a path (e.g. /home/user/my-api) to browse",detail:""}),ge},[ee,L,j,y,c,s])(),ce=M.useCallback(async Z=>{if(!(!Z||Z.type==="hint")){if(Z.type==="parent"){const ge=Z.path;g(ge+"/"),G(ge),E(0);return}if(Z.type==="dir"){g(Z.path+"/"),G(Z.path),E(0);return}try{await o(Z.path),i()}catch(ge){V(ge.message||"Failed to open project")}}},[o,i]),se=M.useCallback(Z=>{if(Z.key==="Escape")Z.preventDefault(),i();else if(Z.key==="ArrowDown")Z.preventDefault(),E(ge=>Math.min(ge+1,Y.length-1));else if(Z.key==="ArrowUp")Z.preventDefault(),E(ge=>Math.max(ge-1,0));else if(Z.key==="Enter")if(Z.preventDefault(),ee==="browse"&&y&&!y.endsWith("/")){const ge=y.replace(/\/$/,"");o(ge).then(()=>i()).catch(ct=>{V(ct.message||"Failed to open")})}else Y[b]&&ce(Y[b]);else if(Z.key==="Tab"){Z.preventDefault();const ge=Y[b];ge&&(ge.type==="dir"||ge.type==="parent")&&ce(ge)}},[i,Y,b,ce,ee,y,o]);return a?m.jsxs("div",{className:"command-palette",children:[m.jsx("div",{className:"command-palette__backdrop",onClick:i}),m.jsxs("div",{className:"command-palette__dialog",children:[m.jsx("input",{ref:ne,className:"command-palette__input",type:"text",placeholder:"Search bookmarks or type /path/to/project...",value:y,onChange:Z=>g(Z.target.value),onKeyDown:se}),Q&&m.jsx("div",{style:{padding:"8px 16px",fontSize:"12px",color:"var(--method-delete)"},children:Q}),ee==="browse"&&L&&m.jsxs("div",{className:"command-palette__section-title",style:{display:"flex",justifyContent:"space-between"},children:[m.jsx("span",{children:L.path}),L.has_spec&&m.jsx("span",{style:{color:"var(--method-get)"},children:"spec found"})]}),m.jsxs("div",{className:"command-palette__results",children:[ee==="bookmarks"&&Y.some(Z=>Z.type==="project")&&m.jsx("div",{className:"command-palette__section-title",children:"Bookmarked Projects"}),Y.map((Z,ge)=>{if(Z.type==="hint")return m.jsx("div",{style:{padding:"16px",color:"var(--fg-muted)",textAlign:"center",fontSize:"13px"},children:Z.label},"hint");const ct=Z.type==="parent"?"← ":Z.type==="dir"?"📁 ":Z.type==="open"?"→ ":Z.isCurrent?"● ":"";return m.jsxs("div",{className:`command-palette__item${ge===b?" command-palette__item--active":""}`,onClick:()=>ce(Z),onMouseEnter:()=>E(ge),children:[m.jsxs("span",{className:"command-palette__item-label",children:[ct,Z.label]}),Z.detail&&m.jsx("span",{className:"command-palette__item-detail",children:Z.detail})]},`${Z.type}-${Z.path}`)}),Y.length===0&&ee==="browse"&&m.jsx("div",{style:{padding:"16px",color:"var(--fg-muted)",textAlign:"center"},children:L?"No subdirectories":"Loading..."})]}),m.jsxs("div",{style:{padding:"6px 16px",borderTop:"1px solid var(--border)",fontSize:"11px",color:"var(--fg-muted)",display:"flex",gap:"16px"},children:[m.jsx("span",{children:"Enter: open/navigate"}),m.jsx("span",{children:"Tab: enter directory"}),m.jsx("span",{children:"Esc: close"})]})]})]}):null}function Op({onResize:a,onResizeStart:i,direction:c="horizontal"}){const s=M.useRef(!1),o=M.useCallback(f=>{f.preventDefault(),s.current=!0;const d=f.clientX,y=f.clientY;i&&i();const g=E=>{if(!s.current)return;const j=c==="horizontal"?E.clientX-d:E.clientY-y;a(j)},b=()=>{s.current=!1,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",b),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor=c==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",g),document.addEventListener("mouseup",b)},[a,i,c]);return m.jsx("div",{className:`resize-handle resize-handle--${c}`,onMouseDown:o})}function jb(){const[a,i]=M.useState(null),[c,s]=M.useState([]),[o,f]=M.useState([]),[d,y]=M.useState(null),[g,b]=M.useState(null),[E,j]=M.useState({}),[G,L]=M.useState(null),[I,Q]=M.useState(!1),[V,ee]=M.useState(null),[ye,ne]=M.useState({global:{},project:{}}),[$,Y]=M.useState(null),[ce,se]=M.useState(null),[Z,ge]=M.useState(null),[ct,te]=M.useState({}),[Te,et]=M.useState(!1),[it,ot]=M.useState(!1),[C,F]=M.useState(!1),[oe,De]=M.useState("tag"),[qe,_]=M.useState({}),[B,P]=M.useState(""),[le,me]=M.useState(0),[ve,we]=M.useState({}),[Tt,Ke]=M.useState([]),[Gt,gn]=M.useState(()=>{try{return Number(localStorage.getItem("apigrip:sidebarWidth"))||280}catch{return 280}}),[Nl,va]=M.useState(()=>{try{return Number(localStorage.getItem("apigrip:requestPanelRatio"))||.5}catch{return .5}}),ul=M.useRef(280),yn=M.useRef(.5),Gl=M.useRef(null),Jn=M.useRef(null),Sl=M.useRef(null),mn=M.useRef(E),zl=M.useRef(d),Rl=M.useRef(null);mn.current=E,zl.current=d;const sl=M.useCallback((N,R,W)=>`apigrip:${N}:${R}:${W}`,[]),Yl=M.useCallback((N,R,W)=>{try{localStorage.setItem(sl("params",N,R),JSON.stringify(W))}catch{}},[sl]),ut=M.useCallback((N,R)=>{try{const W=localStorage.getItem(sl("params",N,R));return W?JSON.parse(W):null}catch{return null}},[sl]),bn=M.useCallback((N,R,W)=>{try{localStorage.setItem(sl("response",N,R),JSON.stringify(W))}catch{}},[sl]),cl=M.useCallback((N,R)=>{try{const W=localStorage.getItem(sl("response",N,R));return W?JSON.parse(W):null}catch{return null}},[sl]),wl=M.useCallback(()=>{if(Sl.current&&zl.current){clearTimeout(Sl.current),Sl.current=null;const N=zl.current;ip(N.method,N.path,mn.current).catch(()=>{})}},[]),jt=M.useCallback(N=>{Y(N),Jn.current&&clearTimeout(Jn.current),Jn.current=setTimeout(()=>Y(null),3e3)},[]),Ml=M.useCallback(async()=>{const[N,R]=await Promise.allSettled([Om(),js()]);ne(N.status==="fulfilled"?N.value||{global:{},project:{}}:{global:{},project:{}}),s(R.status==="fulfilled"?R.value||[]:[]);const W=N.status==="fulfilled"&&(N.value?.global?.theme||N.value?.project?.theme)||"dark";document.documentElement.setAttribute("data-theme",W);try{localStorage.setItem("apigrip:theme",W)}catch{}try{const Se=await rm();i(Se),ee(Se.git||null)}catch{i(null),ee(null)}try{const Se=await np();f(Array.isArray(Se)?Se:[])}catch{f([])}try{const Se=await ap();se(Se),ge(Se.active||null);const Le=await Xr();te(Le||{})}catch{}},[]);M.useEffect(()=>{Ml()},[Ml]),M.useEffect(()=>{const N=Nm({onSpecReloaded:()=>{np().then(R=>f(Array.isArray(R)?R:[])).catch(()=>{}),jt("Spec reloaded")},onSpecError:R=>{jt(`Spec error: ${R.message||"unknown"}`)},onGitChanged:R=>{ee(R)},onProjectSwitched:()=>{Ml()}});return()=>N.disconnect()},[Ml,jt]);const $n=M.useCallback(async N=>{wl(),y(N),me(0),we({});const R=ut(N.method,N.path);R&&j(R);const W=cl(N.method,N.path);L(W||null);try{const Se=await dm(N.method,N.path);b(Se);const Yt=await vm(N.method,N.path)||{};j(Yt),Yl(N.method,N.path,Yt)}catch(Se){console.error("Failed to load endpoint:",Se)}try{const Se=await up(N.method,N.path);Ke(Se||[])}catch{Ke([])}},[wl,ut,cl,Yl]),ii=M.useCallback(N=>{j(N),d&&(Yl(d.method,d.path,N),Sl.current&&clearTimeout(Sl.current),Sl.current=setTimeout(()=>{ip(d.method,d.path,N).catch(()=>{})},500))},[d,Yl]),Xl=M.useCallback(async()=>{if(!g||I)return;const N=`req-${Date.now()}`;Rl.current=N,Q(!0),L(null);try{const W=(g.servers||[])[le]||{},Se={method:g.method,path:g.path,params:E,server_index:le,server_variables:ve,request_id:N},Le=await xm(Se);L(Le),bn(g.method,g.path,Le);try{const Yt=await up(g.method,g.path);Ke(Yt||[])}catch{}}catch(R){const W={error:R.message};L(W),bn(g.method,g.path,W)}finally{Rl.current=null,Q(!1)}},[g,E,I,le,ve,bn]),Ql=M.useCallback(async()=>{const N=Rl.current;if(N){try{await Sm(N)}catch{}Rl.current=null,Q(!1),L({error:"Request cancelled"})}},[]),At=M.useCallback(async N=>{if(g)try{const R=await Em(g.method,g.path,N);R&&L(R)}catch(R){console.error("Failed to load history entry:",R)}},[g]),rl=M.useCallback(async()=>{if(g)try{await Tm(g.method,g.path),Ke([])}catch(N){console.error("Failed to clear history:",N)}},[g]),dt=M.useCallback(async N=>{try{await om(N),await Ml(),y(null),b(null),L(null),Ke([]),jt("Project switched")}catch(R){jt(`Failed to switch: ${R.message}`)}},[Ml,jt]),ui=M.useCallback(async N=>{await fm(N);const R=await js();s(R||[])},[]),Wn=M.useCallback(async N=>{await hm(N);const R=await js();s(R||[])},[]),xa=M.useCallback(async N=>{try{await mm(N),ge(N);const R=await Xr();te(R||{})}catch(R){jt(`Failed to set env: ${R.message}`)}},[jt]),Zl=M.useCallback(async()=>{try{const N=await ap();se(N);const R=await Xr();te(R||{}),jt("Environments saved")}catch(N){jt(`Env error: ${N.message}`)}},[jt]),vn=M.useCallback(()=>{ul.current=Gt},[Gt]),Vl=M.useCallback(N=>{const R=Math.max(160,Math.min(600,ul.current+N));gn(R);try{localStorage.setItem("apigrip:sidebarWidth",String(R))}catch{}},[]),Dt=M.useCallback(()=>{yn.current=Nl},[Nl]),x=M.useCallback(N=>{if(!Gl.current)return;const R=Gl.current.offsetWidth;if(R<=0)return;const W=Math.max(.2,Math.min(.8,yn.current+N/R));va(W);try{localStorage.setItem("apigrip:requestPanelRatio",String(W))}catch{}},[]),K=navigator.platform?.startsWith("Mac")||navigator.userAgent?.includes("Mac")?"⌘":"Ctrl",he=M.useCallback(async()=>{const R=(ye?.global?.theme||ye?.project?.theme||"dark")==="dark"?"light":"dark";try{await Am({global:{theme:R}}),document.documentElement.setAttribute("data-theme",R);try{localStorage.setItem("apigrip:theme",R)}catch{}ne(W=>({...W,global:{...W.global,theme:R}}))}catch{}},[ye]),Be=M.useCallback(async()=>{if(window.apigrip?.pickDirectory){const N=await window.apigrip.pickDirectory();N&&dt(N)}else F(!0)},[dt]),Ge=M.useMemo(()=>[{id:"env-editor",label:"Edit Environments",shortcut:`${K}+E`,handler:()=>et(!0)},{id:"open-project",label:"Open Project",shortcut:`${K}+O`,handler:Be},{id:"toggle-theme",label:"Toggle Theme",shortcut:`${K}+Shift+L`,handler:he},{id:"toggle-view",label:"Toggle View Mode (Tag/Tree)",shortcut:null,handler:()=>De(N=>N==="tag"?"tree":"tag")},{id:"send-request",label:"Send Request",shortcut:`${K}+Enter`,handler:Xl}],[he,Xl,Be,K]);return M.useEffect(()=>{it&&js().then(N=>s(N||[])).catch(()=>{})},[it]),M.useEffect(()=>{function N(R){const W=R.ctrlKey||R.metaKey;W&&R.key==="p"&&(R.preventDefault(),ot(Se=>!Se)),W&&R.key==="Enter"&&(R.preventDefault(),Xl()),W&&R.key==="o"&&(R.preventDefault(),Be()),W&&R.key==="e"&&(R.preventDefault(),et(Se=>!Se)),W&&R.shiftKey&&(R.key==="L"||R.key==="l")&&(R.preventDefault(),he())}return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[Xl,he,Be]),m.jsxs("div",{className:"app",children:[m.jsx(zm,{project:a,git:V,environments:ce,activeEnv:Z,onSwitchProject:dt,onSetActiveEnv:xa,onOpenEnvEditor:()=>et(!0),onOpenProjectDialog:Be,toast:$,projects:c,servers:g?.servers||[],serverIndex:le,onServerIndexChange:me,sending:I,onSend:Xl,onCancel:Ql,hasEndpoint:!!g}),m.jsxs("div",{className:"app__body",children:[m.jsx("div",{className:"app__sidebar",style:{width:Gt},children:m.jsx(Cm,{endpoints:o,selectedEndpoint:d,onSelect:$n,viewMode:oe,onToggleViewMode:()=>De(N=>N==="tag"?"tree":"tag"),treeCollapseState:qe,onToggleTreeNode:N=>_(R=>({...R,[N]:!R[N]})),searchTerm:B,onSearchChange:P})}),m.jsx(Op,{direction:"horizontal",onResize:Vl,onResizeStart:vn}),m.jsxs("div",{className:"app__main",ref:Gl,children:[m.jsx("div",{className:"app__request-panel",style:{flex:`${Nl} 0 0%`},children:m.jsx(N0,{spec:a,endpoint:g,params:E,onParamsChange:ii,serverIndex:le,onServerIndexChange:me,serverVariables:ve,onServerVariablesChange:we,preferences:ye,resolvedEnv:ct})}),m.jsx(Op,{direction:"horizontal",onResize:x,onResizeStart:Dt}),m.jsx("div",{className:"app__response-panel",style:{flex:`${1-Nl} 0 0%`},children:m.jsx(vb,{response:G,sending:I,history:Tt,onSelectHistoryEntry:At,onClearHistory:rl})})]})]}),Te&&m.jsx(Sb,{environments:ce,onSave:Zl,onClose:()=>et(!1)}),it&&m.jsx(Eb,{visible:it,onClose:()=>ot(!1),projects:c,endpoints:o,actions:Ge,onSelectProject:N=>{dt(N.path),ot(!1)},onSelectEndpoint:N=>{$n(N),ot(!1)},onAction:N=>{N.handler(),ot(!1)}}),m.jsx(Tb,{visible:C,onClose:()=>F(!1),projects:c,currentProject:a,onSwitch:dt,onAdd:ui,onRemove:Wn})]})}sm.createRoot(document.getElementById("root")).render(m.jsx(jb,{}));
|