@prauga/flexdoc-backend 2.9.0 → 2.9.5

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.
@@ -1,60 +1,76 @@
1
- var FlexDocStandaloneBundle=(function(Kl){"use strict";var gu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xu(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ss={exports:{}},Ha={};var bu;function Ry(){if(bu)return Ha;bu=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function c(u,f,p){var g=null;if(p!==void 0&&(g=""+p),f.key!==void 0&&(g=""+f.key),"key"in f){p={};for(var y in f)y!=="key"&&(p[y]=f[y])}else p=f;return f=p.ref,{$$typeof:a,type:u,key:g,ref:f!==void 0?f:null,props:p}}return Ha.Fragment=i,Ha.jsx=c,Ha.jsxs=c,Ha}var vu;function qy(){return vu||(vu=1,ss.exports=Ry()),ss.exports}var o=qy(),os={exports:{}},La={},cs={exports:{}},us={};var Su;function My(){return Su||(Su=1,(function(a){function i(T,ne){var W=T.length;T.push(ne);e:for(;0<W;){var K=W-1>>>1,P=T[K];if(0<f(P,ne))T[K]=ne,T[W]=P,W=K;else break e}}function c(T){return T.length===0?null:T[0]}function u(T){if(T.length===0)return null;var ne=T[0],W=T.pop();if(W!==ne){T[0]=W;e:for(var K=0,P=T.length,w=P>>>1;K<w;){var $=2*(K+1)-1,ce=T[$],pe=$+1,ve=T[pe];if(0>f(ce,W))pe<P&&0>f(ve,ce)?(T[K]=ve,T[pe]=W,K=pe):(T[K]=ce,T[$]=W,K=$);else if(pe<P&&0>f(ve,W))T[K]=ve,T[pe]=W,K=pe;else break e}}return ne}function f(T,ne){var W=T.sortIndex-ne.sortIndex;return W!==0?W:T.id-ne.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;a.unstable_now=function(){return p.now()}}else{var g=Date,y=g.now();a.unstable_now=function(){return g.now()-y}}var x=[],h=[],S=1,A=null,C=3,M=!1,k=!1,G=!1,U=!1,I=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function j(T){for(var ne=c(h);ne!==null;){if(ne.callback===null)u(h);else if(ne.startTime<=T)u(h),ne.sortIndex=ne.expirationTime,i(x,ne);else break;ne=c(h)}}function R(T){if(G=!1,j(T),!k)if(c(x)!==null)k=!0,Y||(Y=!0,Ee());else{var ne=c(h);ne!==null&&ke(R,ne.startTime-T)}}var Y=!1,D=-1,X=5,me=-1;function xe(){return U?!0:!(a.unstable_now()-me<X)}function ge(){if(U=!1,Y){var T=a.unstable_now();me=T;var ne=!0;try{e:{k=!1,G&&(G=!1,_(D),D=-1),M=!0;var W=C;try{t:{for(j(T),A=c(x);A!==null&&!(A.expirationTime>T&&xe());){var K=A.callback;if(typeof K=="function"){A.callback=null,C=A.priorityLevel;var P=K(A.expirationTime<=T);if(T=a.unstable_now(),typeof P=="function"){A.callback=P,j(T),ne=!0;break t}A===c(x)&&u(x),j(T)}else u(x);A=c(x)}if(A!==null)ne=!0;else{var w=c(h);w!==null&&ke(R,w.startTime-T),ne=!1}}break e}finally{A=null,C=W,M=!1}ne=void 0}}finally{ne?Ee():Y=!1}}}var Ee;if(typeof N=="function")Ee=function(){N(ge)};else if(typeof MessageChannel<"u"){var He=new MessageChannel,he=He.port2;He.port1.onmessage=ge,Ee=function(){he.postMessage(null)}}else Ee=function(){I(ge,0)};function ke(T,ne){D=I(function(){T(a.unstable_now())},ne)}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(T){T.callback=null},a.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<T?Math.floor(1e3/T):5},a.unstable_getCurrentPriorityLevel=function(){return C},a.unstable_next=function(T){switch(C){case 1:case 2:case 3:var ne=3;break;default:ne=C}var W=C;C=ne;try{return T()}finally{C=W}},a.unstable_requestPaint=function(){U=!0},a.unstable_runWithPriority=function(T,ne){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var W=C;C=T;try{return ne()}finally{C=W}},a.unstable_scheduleCallback=function(T,ne,W){var K=a.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?K+W:K):W=K,T){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=W+P,T={id:S++,callback:ne,priorityLevel:T,startTime:W,expirationTime:P,sortIndex:-1},W>K?(T.sortIndex=W,i(h,T),c(x)===null&&T===c(h)&&(G?(_(D),D=-1):G=!0,ke(R,W-K))):(T.sortIndex=P,i(x,T),k||M||(k=!0,Y||(Y=!0,Ee()))),T},a.unstable_shouldYield=xe,a.unstable_wrapCallback=function(T){var ne=C;return function(){var W=C;C=ne;try{return T.apply(this,arguments)}finally{C=W}}}})(us)),us}var Au;function zy(){return Au||(Au=1,cs.exports=My()),cs.exports}var ds={exports:{}},Ue={};var ju;function $y(){if(ju)return Ue;ju=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),g=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),C=Symbol.iterator;function M(w){return w===null||typeof w!="object"?null:(w=C&&w[C]||w["@@iterator"],typeof w=="function"?w:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,U={};function I(w,$,ce){this.props=w,this.context=$,this.refs=U,this.updater=ce||k}I.prototype.isReactComponent={},I.prototype.setState=function(w,$){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,$,"setState")},I.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function _(){}_.prototype=I.prototype;function N(w,$,ce){this.props=w,this.context=$,this.refs=U,this.updater=ce||k}var j=N.prototype=new _;j.constructor=N,G(j,I.prototype),j.isPureReactComponent=!0;var R=Array.isArray;function Y(){}var D={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function me(w,$,ce){var pe=ce.ref;return{$$typeof:a,type:w,key:$,ref:pe!==void 0?pe:null,props:ce}}function xe(w,$){return me(w.type,$,w.props)}function ge(w){return typeof w=="object"&&w!==null&&w.$$typeof===a}function Ee(w){var $={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(ce){return $[ce]})}var He=/\/+/g;function he(w,$){return typeof w=="object"&&w!==null&&w.key!=null?Ee(""+w.key):$.toString(36)}function ke(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(Y,Y):(w.status="pending",w.then(function($){w.status==="pending"&&(w.status="fulfilled",w.value=$)},function($){w.status==="pending"&&(w.status="rejected",w.reason=$)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function T(w,$,ce,pe,ve){var Te=typeof w;(Te==="undefined"||Te==="boolean")&&(w=null);var Re=!1;if(w===null)Re=!0;else switch(Te){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(w.$$typeof){case a:case i:Re=!0;break;case S:return Re=w._init,T(Re(w._payload),$,ce,pe,ve)}}if(Re)return ve=ve(w),Re=pe===""?"."+he(w,0):pe,R(ve)?(ce="",Re!=null&&(ce=Re.replace(He,"$&/")+"/"),T(ve,$,ce,"",function(Be){return Be})):ve!=null&&(ge(ve)&&(ve=xe(ve,ce+(ve.key==null||w&&w.key===ve.key?"":(""+ve.key).replace(He,"$&/")+"/")+Re)),$.push(ve)),1;Re=0;var Ve=pe===""?".":pe+":";if(R(w))for(var Ie=0;Ie<w.length;Ie++)pe=w[Ie],Te=Ve+he(pe,Ie),Re+=T(pe,$,ce,Te,ve);else if(Ie=M(w),typeof Ie=="function")for(w=Ie.call(w),Ie=0;!(pe=w.next()).done;)pe=pe.value,Te=Ve+he(pe,Ie++),Re+=T(pe,$,ce,Te,ve);else if(Te==="object"){if(typeof w.then=="function")return T(ke(w),$,ce,pe,ve);throw $=String(w),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return Re}function ne(w,$,ce){if(w==null)return w;var pe=[],ve=0;return T(w,pe,"","",function(Te){return $.call(ce,Te,ve++)}),pe}function W(w){if(w._status===-1){var $=w._result;$=$(),$.then(function(ce){(w._status===0||w._status===-1)&&(w._status=1,w._result=ce)},function(ce){(w._status===0||w._status===-1)&&(w._status=2,w._result=ce)}),w._status===-1&&(w._status=0,w._result=$)}if(w._status===1)return w._result.default;throw w._result}var K=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},P={map:ne,forEach:function(w,$,ce){ne(w,function(){$.apply(this,arguments)},ce)},count:function(w){var $=0;return ne(w,function(){$++}),$},toArray:function(w){return ne(w,function($){return $})||[]},only:function(w){if(!ge(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return Ue.Activity=A,Ue.Children=P,Ue.Component=I,Ue.Fragment=c,Ue.Profiler=f,Ue.PureComponent=N,Ue.StrictMode=u,Ue.Suspense=x,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(w){return D.H.useMemoCache(w)}},Ue.cache=function(w){return function(){return w.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(w,$,ce){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var pe=G({},w.props),ve=w.key;if($!=null)for(Te in $.key!==void 0&&(ve=""+$.key),$)!X.call($,Te)||Te==="key"||Te==="__self"||Te==="__source"||Te==="ref"&&$.ref===void 0||(pe[Te]=$[Te]);var Te=arguments.length-2;if(Te===1)pe.children=ce;else if(1<Te){for(var Re=Array(Te),Ve=0;Ve<Te;Ve++)Re[Ve]=arguments[Ve+2];pe.children=Re}return me(w.type,ve,pe)},Ue.createContext=function(w){return w={$$typeof:g,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:p,_context:w},w},Ue.createElement=function(w,$,ce){var pe,ve={},Te=null;if($!=null)for(pe in $.key!==void 0&&(Te=""+$.key),$)X.call($,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(ve[pe]=$[pe]);var Re=arguments.length-2;if(Re===1)ve.children=ce;else if(1<Re){for(var Ve=Array(Re),Ie=0;Ie<Re;Ie++)Ve[Ie]=arguments[Ie+2];ve.children=Ve}if(w&&w.defaultProps)for(pe in Re=w.defaultProps,Re)ve[pe]===void 0&&(ve[pe]=Re[pe]);return me(w,Te,ve)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(w){return{$$typeof:y,render:w}},Ue.isValidElement=ge,Ue.lazy=function(w){return{$$typeof:S,_payload:{_status:-1,_result:w},_init:W}},Ue.memo=function(w,$){return{$$typeof:h,type:w,compare:$===void 0?null:$}},Ue.startTransition=function(w){var $=D.T,ce={};D.T=ce;try{var pe=w(),ve=D.S;ve!==null&&ve(ce,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(Y,K)}catch(Te){K(Te)}finally{$!==null&&ce.types!==null&&($.types=ce.types),D.T=$}},Ue.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Ue.use=function(w){return D.H.use(w)},Ue.useActionState=function(w,$,ce){return D.H.useActionState(w,$,ce)},Ue.useCallback=function(w,$){return D.H.useCallback(w,$)},Ue.useContext=function(w){return D.H.useContext(w)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(w,$){return D.H.useDeferredValue(w,$)},Ue.useEffect=function(w,$){return D.H.useEffect(w,$)},Ue.useEffectEvent=function(w){return D.H.useEffectEvent(w)},Ue.useId=function(){return D.H.useId()},Ue.useImperativeHandle=function(w,$,ce){return D.H.useImperativeHandle(w,$,ce)},Ue.useInsertionEffect=function(w,$){return D.H.useInsertionEffect(w,$)},Ue.useLayoutEffect=function(w,$){return D.H.useLayoutEffect(w,$)},Ue.useMemo=function(w,$){return D.H.useMemo(w,$)},Ue.useOptimistic=function(w,$){return D.H.useOptimistic(w,$)},Ue.useReducer=function(w,$,ce){return D.H.useReducer(w,$,ce)},Ue.useRef=function(w){return D.H.useRef(w)},Ue.useState=function(w){return D.H.useState(w)},Ue.useSyncExternalStore=function(w,$,ce){return D.H.useSyncExternalStore(w,$,ce)},Ue.useTransition=function(){return D.H.useTransition()},Ue.version="19.2.8",Ue}var Nu;function fs(){return Nu||(Nu=1,ds.exports=$y()),ds.exports}var ps={exports:{}},Dt={};var wu;function Dy(){if(wu)return Dt;wu=1;var a=fs();function i(x){var h="https://react.dev/errors/"+x;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)h+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+x+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var u={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},f=Symbol.for("react.portal");function p(x,h,S){var A=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:A==null?null:""+A,children:x,containerInfo:h,implementation:S}}var g=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(x,h){if(x==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Dt.createPortal=function(x,h){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(i(299));return p(x,h,null,S)},Dt.flushSync=function(x){var h=g.T,S=u.p;try{if(g.T=null,u.p=2,x)return x()}finally{g.T=h,u.p=S,u.d.f()}},Dt.preconnect=function(x,h){typeof x=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,u.d.C(x,h))},Dt.prefetchDNS=function(x){typeof x=="string"&&u.d.D(x)},Dt.preinit=function(x,h){if(typeof x=="string"&&h&&typeof h.as=="string"){var S=h.as,A=y(S,h.crossOrigin),C=typeof h.integrity=="string"?h.integrity:void 0,M=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;S==="style"?u.d.S(x,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:A,integrity:C,fetchPriority:M}):S==="script"&&u.d.X(x,{crossOrigin:A,integrity:C,fetchPriority:M,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Dt.preinitModule=function(x,h){if(typeof x=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var S=y(h.as,h.crossOrigin);u.d.M(x,{crossOrigin:S,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&u.d.M(x)},Dt.preload=function(x,h){if(typeof x=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var S=h.as,A=y(S,h.crossOrigin);u.d.L(x,S,{crossOrigin:A,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Dt.preloadModule=function(x,h){if(typeof x=="string")if(h){var S=y(h.as,h.crossOrigin);u.d.m(x,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:S,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else u.d.m(x)},Dt.requestFormReset=function(x){u.d.r(x)},Dt.unstable_batchedUpdates=function(x,h){return x(h)},Dt.useFormState=function(x,h,S){return g.H.useFormState(x,h,S)},Dt.useFormStatus=function(){return g.H.useHostTransitionStatus()},Dt.version="19.2.8",Dt}var Tu;function Uy(){if(Tu)return ps.exports;Tu=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(),ps.exports=Dy(),ps.exports}var Eu;function Hy(){if(Eu)return La;Eu=1;var a=zy(),i=fs(),c=Uy();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function p(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function g(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 x(e){if(p(e)!==e)throw Error(u(188))}function h(e){var t=e.alternate;if(!t){if(t=p(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,l=t;;){var r=n.return;if(r===null)break;var s=r.alternate;if(s===null){if(l=r.return,l!==null){n=l;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===n)return x(r),e;if(s===l)return x(r),t;s=s.sibling}throw Error(u(188))}if(n.return!==l.return)n=r,l=s;else{for(var m=!1,v=r.child;v;){if(v===n){m=!0,n=r,l=s;break}if(v===l){m=!0,l=r,n=s;break}v=v.sibling}if(!m){for(v=s.child;v;){if(v===n){m=!0,n=s,l=r;break}if(v===l){m=!0,l=s,n=r;break}v=v.sibling}if(!m)throw Error(u(189))}}if(n.alternate!==l)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var A=Object.assign,C=Symbol.for("react.element"),M=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),N=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),me=Symbol.for("react.activity"),xe=Symbol.for("react.memo_cache_sentinel"),ge=Symbol.iterator;function Ee(e){return e===null||typeof e!="object"?null:(e=ge&&e[ge]||e["@@iterator"],typeof e=="function"?e:null)}var He=Symbol.for("react.client.reference");function he(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===He?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case I:return"Profiler";case U:return"StrictMode";case R:return"Suspense";case Y:return"SuspenseList";case me:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case N:return e.displayName||"Context";case _:return(e._context.displayName||"Context")+".Consumer";case j:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case D:return t=e.displayName||null,t!==null?t:he(e.type)||"Memo";case X:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}var ke=Array.isArray,T=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},K=[],P=-1;function w(e){return{current:e}}function $(e){0>P||(e.current=K[P],K[P]=null,P--)}function ce(e,t){P++,K[P]=e.current,e.current=t}var pe=w(null),ve=w(null),Te=w(null),Re=w(null);function Ve(e,t){switch(ce(Te,t),ce(ve,e),ce(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ey(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ey(t),e=ty(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}$(pe),ce(pe,e)}function Ie(){$(pe),$(ve),$(Te)}function Be(e){e.memoizedState!==null&&ce(Re,e);var t=pe.current,n=ty(t,e.type);t!==n&&(ce(ve,e),ce(pe,n))}function Z(e){ve.current===e&&($(pe),$(ve)),Re.current===e&&($(Re),Rr._currentValue=W)}var be,Se;function Ne(e){if(be===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);be=t&&t[1]||"",Se=-1<n.stack.indexOf(`
1
+ var FlexDocStandaloneBundle=(function(Ja){"use strict";var Eu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cu(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var us={exports:{}},Ll={};var ku;function Gy(){if(ku)return Ll;ku=1;var a=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(u,f,p){var g=null;if(p!==void 0&&(g=""+p),f.key!==void 0&&(g=""+f.key),"key"in f){p={};for(var x in f)x!=="key"&&(p[x]=f[x])}else p=f;return f=p.ref,{$$typeof:a,type:u,key:g,ref:f!==void 0?f:null,props:p}}return Ll.Fragment=r,Ll.jsx=o,Ll.jsxs=o,Ll}var _u;function Fy(){return _u||(_u=1,us.exports=Gy()),us.exports}var s=Fy(),ds={exports:{}},Bl={},fs={exports:{}},ps={};var Ou;function Vy(){return Ou||(Ou=1,(function(a){function r(O,ee){var oe=O.length;O.push(ee);e:for(;0<oe;){var K=oe-1>>>1,ge=O[K];if(0<f(ge,ee))O[K]=ee,O[oe]=ge,oe=K;else break e}}function o(O){return O.length===0?null:O[0]}function u(O){if(O.length===0)return null;var ee=O[0],oe=O.pop();if(oe!==ee){O[0]=oe;e:for(var K=0,ge=O.length,C=ge>>>1;K<C;){var G=2*(K+1)-1,pe=O[G],de=G+1,be=O[de];if(0>f(pe,oe))de<ge&&0>f(be,pe)?(O[K]=be,O[de]=oe,K=de):(O[K]=pe,O[G]=oe,K=G);else if(de<ge&&0>f(be,oe))O[K]=be,O[de]=oe,K=de;else break e}}return ee}function f(O,ee){var oe=O.sortIndex-ee.sortIndex;return oe!==0?oe:O.id-ee.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;a.unstable_now=function(){return p.now()}}else{var g=Date,x=g.now();a.unstable_now=function(){return g.now()-x}}var b=[],m=[],v=1,S=null,N=3,_=!1,R=!1,z=!1,M=!1,B=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function w(O){for(var ee=o(m);ee!==null;){if(ee.callback===null)u(m);else if(ee.startTime<=O)u(m),ee.sortIndex=ee.expirationTime,r(b,ee);else break;ee=o(m)}}function U(O){if(z=!1,w(O),!R)if(o(b)!==null)R=!0,Y||(Y=!0,se());else{var ee=o(m);ee!==null&&Ne(U,ee.startTime-O)}}var Y=!1,$=-1,q=5,J=-1;function Se(){return M?!0:!(a.unstable_now()-J<q)}function Ae(){if(M=!1,Y){var O=a.unstable_now();J=O;var ee=!0;try{e:{R=!1,z&&(z=!1,T($),$=-1),_=!0;var oe=N;try{t:{for(w(O),S=o(b);S!==null&&!(S.expirationTime>O&&Se());){var K=S.callback;if(typeof K=="function"){S.callback=null,N=S.priorityLevel;var ge=K(S.expirationTime<=O);if(O=a.unstable_now(),typeof ge=="function"){S.callback=ge,w(O),ee=!0;break t}S===o(b)&&u(b),w(O)}else u(b);S=o(b)}if(S!==null)ee=!0;else{var C=o(m);C!==null&&Ne(U,C.startTime-O),ee=!1}}break e}finally{S=null,N=oe,_=!1}ee=void 0}}finally{ee?se():Y=!1}}}var se;if(typeof E=="function")se=function(){E(Ae)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,xe=he.port2;he.port1.onmessage=Ae,se=function(){xe.postMessage(null)}}else se=function(){B(Ae,0)};function Ne(O,ee){$=B(function(){O(a.unstable_now())},ee)}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(O){O.callback=null},a.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<O?Math.floor(1e3/O):5},a.unstable_getCurrentPriorityLevel=function(){return N},a.unstable_next=function(O){switch(N){case 1:case 2:case 3:var ee=3;break;default:ee=N}var oe=N;N=ee;try{return O()}finally{N=oe}},a.unstable_requestPaint=function(){M=!0},a.unstable_runWithPriority=function(O,ee){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var oe=N;N=O;try{return ee()}finally{N=oe}},a.unstable_scheduleCallback=function(O,ee,oe){var K=a.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?K+oe:K):oe=K,O){case 1:var ge=-1;break;case 2:ge=250;break;case 5:ge=1073741823;break;case 4:ge=1e4;break;default:ge=5e3}return ge=oe+ge,O={id:v++,callback:ee,priorityLevel:O,startTime:oe,expirationTime:ge,sortIndex:-1},oe>K?(O.sortIndex=oe,r(m,O),o(b)===null&&O===o(m)&&(z?(T($),$=-1):z=!0,Ne(U,oe-K))):(O.sortIndex=ge,r(b,O),R||_||(R=!0,Y||(Y=!0,se()))),O},a.unstable_shouldYield=Se,a.unstable_wrapCallback=function(O){var ee=N;return function(){var oe=N;N=ee;try{return O.apply(this,arguments)}finally{N=oe}}}})(ps)),ps}var Ru;function Ky(){return Ru||(Ru=1,fs.exports=Vy()),fs.exports}var ms={exports:{}},Ie={};var $u;function Xy(){if($u)return Ie;$u=1;var a=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),g=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),N=Symbol.iterator;function _(C){return C===null||typeof C!="object"?null:(C=N&&C[N]||C["@@iterator"],typeof C=="function"?C:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,M={};function B(C,G,pe){this.props=C,this.context=G,this.refs=M,this.updater=pe||R}B.prototype.isReactComponent={},B.prototype.setState=function(C,G){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,G,"setState")},B.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function T(){}T.prototype=B.prototype;function E(C,G,pe){this.props=C,this.context=G,this.refs=M,this.updater=pe||R}var w=E.prototype=new T;w.constructor=E,z(w,B.prototype),w.isPureReactComponent=!0;var U=Array.isArray;function Y(){}var $={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function J(C,G,pe){var de=pe.ref;return{$$typeof:a,type:C,key:G,ref:de!==void 0?de:null,props:pe}}function Se(C,G){return J(C.type,G,C.props)}function Ae(C){return typeof C=="object"&&C!==null&&C.$$typeof===a}function se(C){var G={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(pe){return G[pe]})}var he=/\/+/g;function xe(C,G){return typeof C=="object"&&C!==null&&C.key!=null?se(""+C.key):G.toString(36)}function Ne(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(Y,Y):(C.status="pending",C.then(function(G){C.status==="pending"&&(C.status="fulfilled",C.value=G)},function(G){C.status==="pending"&&(C.status="rejected",C.reason=G)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function O(C,G,pe,de,be){var Ee=typeof C;(Ee==="undefined"||Ee==="boolean")&&(C=null);var ce=!1;if(C===null)ce=!0;else switch(Ee){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(C.$$typeof){case a:case r:ce=!0;break;case v:return ce=C._init,O(ce(C._payload),G,pe,de,be)}}if(ce)return be=be(C),ce=de===""?"."+xe(C,0):de,U(be)?(pe="",ce!=null&&(pe=ce.replace(he,"$&/")+"/"),O(be,G,pe,"",function(Be){return Be})):be!=null&&(Ae(be)&&(be=Se(be,pe+(be.key==null||C&&C.key===be.key?"":(""+be.key).replace(he,"$&/")+"/")+ce)),G.push(be)),1;ce=0;var Ce=de===""?".":de+":";if(U(C))for(var Le=0;Le<C.length;Le++)de=C[Le],Ee=Ce+xe(de,Le),ce+=O(de,G,pe,Ee,be);else if(Le=_(C),typeof Le=="function")for(C=Le.call(C),Le=0;!(de=C.next()).done;)de=de.value,Ee=Ce+xe(de,Le++),ce+=O(de,G,pe,Ee,be);else if(Ee==="object"){if(typeof C.then=="function")return O(Ne(C),G,pe,de,be);throw G=String(C),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return ce}function ee(C,G,pe){if(C==null)return C;var de=[],be=0;return O(C,de,"","",function(Ee){return G.call(pe,Ee,be++)}),de}function oe(C){if(C._status===-1){var G=C._result;G=G(),G.then(function(pe){(C._status===0||C._status===-1)&&(C._status=1,C._result=pe)},function(pe){(C._status===0||C._status===-1)&&(C._status=2,C._result=pe)}),C._status===-1&&(C._status=0,C._result=G)}if(C._status===1)return C._result.default;throw C._result}var K=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},ge={map:ee,forEach:function(C,G,pe){ee(C,function(){G.apply(this,arguments)},pe)},count:function(C){var G=0;return ee(C,function(){G++}),G},toArray:function(C){return ee(C,function(G){return G})||[]},only:function(C){if(!Ae(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return Ie.Activity=S,Ie.Children=ge,Ie.Component=B,Ie.Fragment=o,Ie.Profiler=f,Ie.PureComponent=E,Ie.StrictMode=u,Ie.Suspense=b,Ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Ie.__COMPILER_RUNTIME={__proto__:null,c:function(C){return $.H.useMemoCache(C)}},Ie.cache=function(C){return function(){return C.apply(null,arguments)}},Ie.cacheSignal=function(){return null},Ie.cloneElement=function(C,G,pe){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var de=z({},C.props),be=C.key;if(G!=null)for(Ee in G.key!==void 0&&(be=""+G.key),G)!q.call(G,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&G.ref===void 0||(de[Ee]=G[Ee]);var Ee=arguments.length-2;if(Ee===1)de.children=pe;else if(1<Ee){for(var ce=Array(Ee),Ce=0;Ce<Ee;Ce++)ce[Ce]=arguments[Ce+2];de.children=ce}return J(C.type,be,de)},Ie.createContext=function(C){return C={$$typeof:g,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:p,_context:C},C},Ie.createElement=function(C,G,pe){var de,be={},Ee=null;if(G!=null)for(de in G.key!==void 0&&(Ee=""+G.key),G)q.call(G,de)&&de!=="key"&&de!=="__self"&&de!=="__source"&&(be[de]=G[de]);var ce=arguments.length-2;if(ce===1)be.children=pe;else if(1<ce){for(var Ce=Array(ce),Le=0;Le<ce;Le++)Ce[Le]=arguments[Le+2];be.children=Ce}if(C&&C.defaultProps)for(de in ce=C.defaultProps,ce)be[de]===void 0&&(be[de]=ce[de]);return J(C,Ee,be)},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(C){return{$$typeof:x,render:C}},Ie.isValidElement=Ae,Ie.lazy=function(C){return{$$typeof:v,_payload:{_status:-1,_result:C},_init:oe}},Ie.memo=function(C,G){return{$$typeof:m,type:C,compare:G===void 0?null:G}},Ie.startTransition=function(C){var G=$.T,pe={};$.T=pe;try{var de=C(),be=$.S;be!==null&&be(pe,de),typeof de=="object"&&de!==null&&typeof de.then=="function"&&de.then(Y,K)}catch(Ee){K(Ee)}finally{G!==null&&pe.types!==null&&(G.types=pe.types),$.T=G}},Ie.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Ie.use=function(C){return $.H.use(C)},Ie.useActionState=function(C,G,pe){return $.H.useActionState(C,G,pe)},Ie.useCallback=function(C,G){return $.H.useCallback(C,G)},Ie.useContext=function(C){return $.H.useContext(C)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(C,G){return $.H.useDeferredValue(C,G)},Ie.useEffect=function(C,G){return $.H.useEffect(C,G)},Ie.useEffectEvent=function(C){return $.H.useEffectEvent(C)},Ie.useId=function(){return $.H.useId()},Ie.useImperativeHandle=function(C,G,pe){return $.H.useImperativeHandle(C,G,pe)},Ie.useInsertionEffect=function(C,G){return $.H.useInsertionEffect(C,G)},Ie.useLayoutEffect=function(C,G){return $.H.useLayoutEffect(C,G)},Ie.useMemo=function(C,G){return $.H.useMemo(C,G)},Ie.useOptimistic=function(C,G){return $.H.useOptimistic(C,G)},Ie.useReducer=function(C,G,pe){return $.H.useReducer(C,G,pe)},Ie.useRef=function(C){return $.H.useRef(C)},Ie.useState=function(C){return $.H.useState(C)},Ie.useSyncExternalStore=function(C,G,pe){return $.H.useSyncExternalStore(C,G,pe)},Ie.useTransition=function(){return $.H.useTransition()},Ie.version="19.2.8",Ie}var Mu;function hs(){return Mu||(Mu=1,ms.exports=Xy()),ms.exports}var ys={exports:{}},Ut={};var qu;function Zy(){if(qu)return Ut;qu=1;var a=hs();function r(b){var m="https://react.dev/errors/"+b;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+b+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var u={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},f=Symbol.for("react.portal");function p(b,m,v){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:S==null?null:""+S,children:b,containerInfo:m,implementation:v}}var g=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(b,m){if(b==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Ut.createPortal=function(b,m){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(r(299));return p(b,m,null,v)},Ut.flushSync=function(b){var m=g.T,v=u.p;try{if(g.T=null,u.p=2,b)return b()}finally{g.T=m,u.p=v,u.d.f()}},Ut.preconnect=function(b,m){typeof b=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,u.d.C(b,m))},Ut.prefetchDNS=function(b){typeof b=="string"&&u.d.D(b)},Ut.preinit=function(b,m){if(typeof b=="string"&&m&&typeof m.as=="string"){var v=m.as,S=x(v,m.crossOrigin),N=typeof m.integrity=="string"?m.integrity:void 0,_=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;v==="style"?u.d.S(b,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:S,integrity:N,fetchPriority:_}):v==="script"&&u.d.X(b,{crossOrigin:S,integrity:N,fetchPriority:_,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ut.preinitModule=function(b,m){if(typeof b=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var v=x(m.as,m.crossOrigin);u.d.M(b,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&u.d.M(b)},Ut.preload=function(b,m){if(typeof b=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var v=m.as,S=x(v,m.crossOrigin);u.d.L(b,v,{crossOrigin:S,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Ut.preloadModule=function(b,m){if(typeof b=="string")if(m){var v=x(m.as,m.crossOrigin);u.d.m(b,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else u.d.m(b)},Ut.requestFormReset=function(b){u.d.r(b)},Ut.unstable_batchedUpdates=function(b,m){return b(m)},Ut.useFormState=function(b,m,v){return g.H.useFormState(b,m,v)},Ut.useFormStatus=function(){return g.H.useHostTransitionStatus()},Ut.version="19.2.8",Ut}var Du;function Qy(){if(Du)return ys.exports;Du=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(r){console.error(r)}}return a(),ys.exports=Zy(),ys.exports}var zu;function Jy(){if(zu)return Bl;zu=1;var a=Ky(),r=hs(),o=Qy();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function p(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function g(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 x(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 b(e){if(p(e)!==e)throw Error(u(188))}function m(e){var t=e.alternate;if(!t){if(t=p(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,l=t;;){var i=n.return;if(i===null)break;var c=i.alternate;if(c===null){if(l=i.return,l!==null){n=l;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===n)return b(i),e;if(c===l)return b(i),t;c=c.sibling}throw Error(u(188))}if(n.return!==l.return)n=i,l=c;else{for(var y=!1,j=i.child;j;){if(j===n){y=!0,n=i,l=c;break}if(j===l){y=!0,l=i,n=c;break}j=j.sibling}if(!y){for(j=c.child;j;){if(j===n){y=!0,n=c,l=i;break}if(j===l){y=!0,l=c,n=i;break}j=j.sibling}if(!y)throw Error(u(189))}}if(n.alternate!==l)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,N=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),E=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),Se=Symbol.for("react.memo_cache_sentinel"),Ae=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=Ae&&e[Ae]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function xe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case z:return"Fragment";case B:return"Profiler";case M:return"StrictMode";case U:return"Suspense";case Y:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case E:return e.displayName||"Context";case T:return(e._context.displayName||"Context")+".Consumer";case w:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return t=e.displayName||null,t!==null?t:xe(e.type)||"Memo";case q:t=e._payload,e=e._init;try{return xe(e(t))}catch{}}return null}var Ne=Array.isArray,O=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},K=[],ge=-1;function C(e){return{current:e}}function G(e){0>ge||(e.current=K[ge],K[ge]=null,ge--)}function pe(e,t){ge++,K[ge]=e.current,e.current=t}var de=C(null),be=C(null),Ee=C(null),ce=C(null);function Ce(e,t){switch(pe(Ee,t),pe(be,e),pe(de,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fy(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fy(t),e=py(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(de),pe(de,e)}function Le(){G(de),G(be),G(Ee)}function Be(e){e.memoizedState!==null&&pe(ce,e);var t=de.current,n=py(t,e.type);t!==n&&(pe(be,e),pe(de,n))}function rt(e){be.current===e&&(G(de),G(be)),ce.current===e&&(G(ce),Mr._currentValue=oe)}var P,ve;function je(e){if(P===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);P=t&&t[1]||"",ve=-1<n.stack.indexOf(`
2
2
  at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+be+e+Se}var Je=!1;function at(e,t){if(!e||Je)return"";Je=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(J){var V=J}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(J){V=J}e.call(oe.prototype)}}else{try{throw Error()}catch(J){V=J}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(J){if(J&&V&&typeof J.stack=="string")return[J.stack,V.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=l.DetermineComponentFrameRoot(),m=s[0],v=s[1];if(m&&v){var E=m.split(`
4
- `),B=v.split(`
5
- `);for(r=l=0;l<E.length&&!E[l].includes("DetermineComponentFrameRoot");)l++;for(;r<B.length&&!B[r].includes("DetermineComponentFrameRoot");)r++;if(l===E.length||r===B.length)for(l=E.length-1,r=B.length-1;1<=l&&0<=r&&E[l]!==B[r];)r--;for(;1<=l&&0<=r;l--,r--)if(E[l]!==B[r]){if(l!==1||r!==1)do if(l--,r--,0>r||E[l]!==B[r]){var te=`
6
- `+E[l].replace(" at new "," at ");return e.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",e.displayName)),te}while(1<=l&&0<=r);break}}}finally{Je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ne(n):""}function ft(e,t){switch(e.tag){case 26:case 27:case 5:return Ne(e.type);case 16:return Ne("Lazy");case 13:return e.child!==t&&t!==null?Ne("Suspense Fallback"):Ne("Suspense");case 19:return Ne("SuspenseList");case 0:case 15:return at(e.type,!1);case 11:return at(e.type.render,!1);case 1:return at(e.type,!0);case 31:return Ne("Activity");default:return""}}function dt(e){try{var t="",n=null;do t+=ft(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
3
+ `+P+e+ve}var ke=!1;function Pe(e,t){if(!e||ke)return"";ke=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(Q){var X=Q}Reflect.construct(e,[],ie)}else{try{ie.call()}catch(Q){X=Q}e.call(ie.prototype)}}else{try{throw Error()}catch(Q){X=Q}(ie=e())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(Q){if(Q&&X&&typeof Q.stack=="string")return[Q.stack,X.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=l.DetermineComponentFrameRoot(),y=c[0],j=c[1];if(y&&j){var k=y.split(`
4
+ `),V=j.split(`
5
+ `);for(i=l=0;l<k.length&&!k[l].includes("DetermineComponentFrameRoot");)l++;for(;i<V.length&&!V[i].includes("DetermineComponentFrameRoot");)i++;if(l===k.length||i===V.length)for(l=k.length-1,i=V.length-1;1<=l&&0<=i&&k[l]!==V[i];)i--;for(;1<=l&&0<=i;l--,i--)if(k[l]!==V[i]){if(l!==1||i!==1)do if(l--,i--,0>i||k[l]!==V[i]){var ae=`
6
+ `+k[l].replace(" at new "," at ");return e.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",e.displayName)),ae}while(1<=l&&0<=i);break}}}finally{ke=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?je(n):""}function at(e,t){switch(e.tag){case 26:case 27:case 5:return je(e.type);case 16:return je("Lazy");case 13:return e.child!==t&&t!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return Pe(e.type,!1);case 11:return Pe(e.type.render,!1);case 1:return Pe(e.type,!0);case 31:return je("Activity");default:return""}}function yt(e){try{var t="",n=null;do t+=at(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
7
7
  Error generating stack: `+l.message+`
8
- `+l.stack}}var un=Object.prototype.hasOwnProperty,Yt=a.unstable_scheduleCallback,It=a.unstable_cancelCallback,kn=a.unstable_shouldYield,Rn=a.unstable_requestPaint,_e=a.unstable_now,se=a.unstable_getCurrentPriorityLevel,Ae=a.unstable_ImmediatePriority,De=a.unstable_UserBlockingPriority,dn=a.unstable_NormalPriority,d=a.unstable_LowPriority,q=a.unstable_IdlePriority,ae=a.log,ie=a.unstable_setDisableYieldValue,Q=null,b=null;function H(e){if(typeof ae=="function"&&ie(e),b&&typeof b.setStrictMode=="function")try{b.setStrictMode(Q,e)}catch{}}var F=Math.clz32?Math.clz32:fe,ue=Math.log,de=Math.LN2;function fe(e){return e>>>=0,e===0?32:31-(ue(e)/de|0)|0}var ee=256,ye=262144,je=4194304;function Oe(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 qe(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var r=0,s=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var v=l&134217727;return v!==0?(l=v&~s,l!==0?r=Oe(l):(m&=v,m!==0?r=Oe(m):n||(n=v&~e,n!==0&&(r=Oe(n))))):(v=l&~s,v!==0?r=Oe(v):m!==0?r=Oe(m):n||(n=l&~e,n!==0&&(r=Oe(n)))),r===0?0:t!==0&&t!==r&&(t&s)===0&&(s=r&-r,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:r}function $e(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ye(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 jn(){var e=je;return je<<=1,(je&62914560)===0&&(je=4194304),e}function Un(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Nn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rb(e,t,n,l,r,s){var m=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var v=e.entanglements,E=e.expirationTimes,B=e.hiddenUpdates;for(n=m&~n;0<n;){var te=31-F(n),oe=1<<te;v[te]=0,E[te]=-1;var V=B[te];if(V!==null)for(B[te]=null,te=0;te<V.length;te++){var J=V[te];J!==null&&(J.lane&=-536870913)}n&=~oe}l!==0&&$f(e,l,0),s!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=s&~(m&~t))}function $f(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-F(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Df(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-F(n),r=1<<l;r&t|e[l]&t&&(e[l]|=t),n&=~r}}function Uf(e,t){var n=t&-t;return n=(n&42)!==0?1:ro(n),(n&(e.suspendedLanes|t))!==0?0:n}function ro(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 io(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hf(){var e=ne.p;return e!==0?e:(e=window.event,e===void 0?32:Ny(e.type))}function Lf(e,t){var n=ne.p;try{return ne.p=e,t()}finally{ne.p=n}}var ol=Math.random().toString(36).slice(2),Rt="__reactFiber$"+ol,Ft="__reactProps$"+ol,ta="__reactContainer$"+ol,so="__reactEvents$"+ol,ib="__reactListeners$"+ol,sb="__reactHandles$"+ol,Bf="__reactResources$"+ol,Xa="__reactMarker$"+ol;function oo(e){delete e[Rt],delete e[Ft],delete e[so],delete e[ib],delete e[sb]}function na(e){var t=e[Rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ta]||n[Rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=oy(e);e!==null;){if(n=e[Rt])return n;e=oy(e)}return t}e=n,n=e.parentNode}return null}function la(e){if(e=e[Rt]||e[ta]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Za(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function aa(e){var t=e[Bf];return t||(t=e[Bf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ct(e){e[Xa]=!0}var Yf=new Set,Gf={};function ql(e,t){ra(e,t),ra(e+"Capture",t)}function ra(e,t){for(Gf[e]=t,e=0;e<t.length;e++)Yf.add(t[e])}var ob=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]*$"),If={},Ff={};function cb(e){return un.call(Ff,e)?!0:un.call(If,e)?!1:ob.test(e)?Ff[e]=!0:(If[e]=!0,!1)}function Qr(e,t,n){if(cb(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Kr(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Hn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function fn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ub(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var r=l.get,s=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(m){n=""+m,s.call(this,m)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(m){n=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function co(e){if(!e._valueTracker){var t=Vf(e)?"checked":"value";e._valueTracker=ub(e,t,""+e[t])}}function Xf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Vf(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function Jr(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 db=/[\n"\\]/g;function pn(e){return e.replace(db,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function uo(e,t,n,l,r,s,m,v){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.type=m:e.removeAttribute("type"),t!=null?m==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+fn(t)):e.value!==""+fn(t)&&(e.value=""+fn(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?fo(e,m,fn(t)):n!=null?fo(e,m,fn(n)):l!=null&&e.removeAttribute("value"),r==null&&s!=null&&(e.defaultChecked=!!s),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+fn(v):e.removeAttribute("name")}function Zf(e,t,n,l,r,s,m,v){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){co(e);return}n=n!=null?""+fn(n):"",t=t!=null?""+fn(t):n,v||t===e.value||(e.value=t),e.defaultValue=t}l=l??r,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=v?e.checked:!!l,e.defaultChecked=!!l,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m),co(e)}function fo(e,t,n){t==="number"&&Jr(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ia(e,t,n,l){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&l&&(e[n].defaultSelected=!0)}else{for(n=""+fn(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,l&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Qf(e,t,n){if(t!=null&&(t=""+fn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+fn(n):""}function Kf(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(u(92));if(ke(l)){if(1<l.length)throw Error(u(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=fn(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),co(e)}function sa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fb=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 Jf(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||fb.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Wf(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var r in t)l=t[r],t.hasOwnProperty(r)&&n[r]!==l&&Jf(e,r,l)}else for(var s in t)t.hasOwnProperty(s)&&Jf(e,s,t[s])}function po(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 pb=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"]]),mb=/^[\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 Wr(e){return mb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ln(){}var mo=null;function ho(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var oa=null,ca=null;function Pf(e){var t=la(e);if(t&&(e=t.stateNode)){var n=e[Ft]||null;e:switch(e=t.stateNode,t.type){case"input":if(uo(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+pn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var r=l[Ft]||null;if(!r)throw Error(u(90));uo(l,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&Xf(l)}break e;case"textarea":Qf(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&ia(e,!!n.multiple,t,!1)}}}var yo=!1;function ep(e,t,n){if(yo)return e(t,n);yo=!0;try{var l=e(t);return l}finally{if(yo=!1,(oa!==null||ca!==null)&&(Hi(),oa&&(t=oa,e=ca,ca=oa=null,Pf(t),e)))for(t=0;t<e.length;t++)Pf(e[t])}}function Qa(e,t){var n=e.stateNode;if(n===null)return null;var l=n[Ft]||null;if(l===null)return null;n=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var Bn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),go=!1;if(Bn)try{var Ka={};Object.defineProperty(Ka,"passive",{get:function(){go=!0}}),window.addEventListener("test",Ka,Ka),window.removeEventListener("test",Ka,Ka)}catch{go=!1}var cl=null,xo=null,Pr=null;function tp(){if(Pr)return Pr;var e,t=xo,n=t.length,l,r="value"in cl?cl.value:cl.textContent,s=r.length;for(e=0;e<n&&t[e]===r[e];e++);var m=n-e;for(l=1;l<=m&&t[n-l]===r[s-l];l++);return Pr=r.slice(e,1<l?1-l:void 0)}function ei(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 ti(){return!0}function np(){return!1}function Vt(e){function t(n,l,r,s,m){this._reactName=n,this._targetInst=r,this.type=l,this.nativeEvent=s,this.target=m,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(n=e[v],this[v]=n?n(s):s[v]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?ti:np,this.isPropagationStopped=np,this}return A(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ti)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ti)},persist:function(){},isPersistent:ti}),t}var Ml={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ni=Vt(Ml),Ja=A({},Ml,{view:0,detail:0}),hb=Vt(Ja),bo,vo,Wa,li=A({},Ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ao,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!==Wa&&(Wa&&e.type==="mousemove"?(bo=e.screenX-Wa.screenX,vo=e.screenY-Wa.screenY):vo=bo=0,Wa=e),bo)},movementY:function(e){return"movementY"in e?e.movementY:vo}}),lp=Vt(li),yb=A({},li,{dataTransfer:0}),gb=Vt(yb),xb=A({},Ja,{relatedTarget:0}),So=Vt(xb),bb=A({},Ml,{animationName:0,elapsedTime:0,pseudoElement:0}),vb=Vt(bb),Sb=A({},Ml,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ab=Vt(Sb),jb=A({},Ml,{data:0}),ap=Vt(jb),Nb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wb={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"},Tb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Eb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Tb[e])?!!t[e]:!1}function Ao(){return Eb}var Cb=A({},Ja,{key:function(e){if(e.key){var t=Nb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ei(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ao,charCode:function(e){return e.type==="keypress"?ei(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ei(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_b=Vt(Cb),Ob=A({},li,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rp=Vt(Ob),kb=A({},Ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ao}),Rb=Vt(kb),qb=A({},Ml,{propertyName:0,elapsedTime:0,pseudoElement:0}),Mb=Vt(qb),zb=A({},li,{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}),$b=Vt(zb),Db=A({},Ml,{newState:0,oldState:0}),Ub=Vt(Db),Hb=[9,13,27,32],jo=Bn&&"CompositionEvent"in window,Pa=null;Bn&&"documentMode"in document&&(Pa=document.documentMode);var Lb=Bn&&"TextEvent"in window&&!Pa,ip=Bn&&(!jo||Pa&&8<Pa&&11>=Pa),sp=" ",op=!1;function cp(e,t){switch(e){case"keyup":return Hb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function up(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ua=!1;function Bb(e,t){switch(e){case"compositionend":return up(t);case"keypress":return t.which!==32?null:(op=!0,sp);case"textInput":return e=t.data,e===sp&&op?null:e;default:return null}}function Yb(e,t){if(ua)return e==="compositionend"||!jo&&cp(e,t)?(e=tp(),Pr=xo=cl=null,ua=!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 ip&&t.locale!=="ko"?null:t.data;default:return null}}var Gb={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 dp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Gb[e.type]:t==="textarea"}function fp(e,t,n,l){oa?ca?ca.push(l):ca=[l]:oa=l,t=Vi(t,"onChange"),0<t.length&&(n=new ni("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var er=null,tr=null;function Ib(e){Zh(e,0)}function ai(e){var t=Za(e);if(Xf(t))return e}function pp(e,t){if(e==="change")return t}var mp=!1;if(Bn){var No;if(Bn){var wo="oninput"in document;if(!wo){var hp=document.createElement("div");hp.setAttribute("oninput","return;"),wo=typeof hp.oninput=="function"}No=wo}else No=!1;mp=No&&(!document.documentMode||9<document.documentMode)}function yp(){er&&(er.detachEvent("onpropertychange",gp),tr=er=null)}function gp(e){if(e.propertyName==="value"&&ai(tr)){var t=[];fp(t,tr,e,ho(e)),ep(Ib,t)}}function Fb(e,t,n){e==="focusin"?(yp(),er=t,tr=n,er.attachEvent("onpropertychange",gp)):e==="focusout"&&yp()}function Vb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ai(tr)}function Xb(e,t){if(e==="click")return ai(t)}function Zb(e,t){if(e==="input"||e==="change")return ai(t)}function Qb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pt=typeof Object.is=="function"?Object.is:Qb;function nr(e,t){if(Pt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var r=n[l];if(!un.call(t,r)||!Pt(e[r],t[r]))return!1}return!0}function xp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function bp(e,t){var n=xp(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=xp(n)}}function vp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Jr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Jr(e.document)}return t}function To(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 Kb=Bn&&"documentMode"in document&&11>=document.documentMode,da=null,Eo=null,lr=null,Co=!1;function Ap(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Co||da==null||da!==Jr(l)||(l=da,"selectionStart"in l&&To(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),lr&&nr(lr,l)||(lr=l,l=Vi(Eo,"onSelect"),0<l.length&&(t=new ni("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=da)))}function zl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fa={animationend:zl("Animation","AnimationEnd"),animationiteration:zl("Animation","AnimationIteration"),animationstart:zl("Animation","AnimationStart"),transitionrun:zl("Transition","TransitionRun"),transitionstart:zl("Transition","TransitionStart"),transitioncancel:zl("Transition","TransitionCancel"),transitionend:zl("Transition","TransitionEnd")},_o={},jp={};Bn&&(jp=document.createElement("div").style,"AnimationEvent"in window||(delete fa.animationend.animation,delete fa.animationiteration.animation,delete fa.animationstart.animation),"TransitionEvent"in window||delete fa.transitionend.transition);function $l(e){if(_o[e])return _o[e];if(!fa[e])return e;var t=fa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jp)return _o[e]=t[n];return e}var Np=$l("animationend"),wp=$l("animationiteration"),Tp=$l("animationstart"),Jb=$l("transitionrun"),Wb=$l("transitionstart"),Pb=$l("transitioncancel"),Ep=$l("transitionend"),Cp=new Map,Oo="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(" ");Oo.push("scrollEnd");function wn(e,t){Cp.set(e,t),ql(t,[e])}var ri=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)},mn=[],pa=0,ko=0;function ii(){for(var e=pa,t=ko=pa=0;t<e;){var n=mn[t];mn[t++]=null;var l=mn[t];mn[t++]=null;var r=mn[t];mn[t++]=null;var s=mn[t];if(mn[t++]=null,l!==null&&r!==null){var m=l.pending;m===null?r.next=r:(r.next=m.next,m.next=r),l.pending=r}s!==0&&_p(n,r,s)}}function si(e,t,n,l){mn[pa++]=e,mn[pa++]=t,mn[pa++]=n,mn[pa++]=l,ko|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ro(e,t,n,l){return si(e,t,n,l),oi(e)}function Dl(e,t){return si(e,null,null,t),oi(e)}function _p(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var r=!1,s=e.return;s!==null;)s.childLanes|=n,l=s.alternate,l!==null&&(l.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(r=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,r&&t!==null&&(r=31-F(n),e=s.hiddenUpdates,l=e[r],l===null?e[r]=[t]:l.push(t),t.lane=n|536870912),s):null}function oi(e){if(50<wr)throw wr=0,Bc=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ma={};function ev(e,t,n,l){this.tag=e,this.key=n,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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,t,n,l){return new ev(e,t,n,l)}function qo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yn(e,t){var n=e.alternate;return n===null?(n=en(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Op(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ci(e,t,n,l,r,s){var m=0;if(l=e,typeof e=="function")qo(e)&&(m=1);else if(typeof e=="string")m=r1(e,n,pe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case me:return e=en(31,n,t,r),e.elementType=me,e.lanes=s,e;case G:return Ul(n.children,r,s,t);case U:m=8,r|=24;break;case I:return e=en(12,n,t,r|2),e.elementType=I,e.lanes=s,e;case R:return e=en(13,n,t,r),e.elementType=R,e.lanes=s,e;case Y:return e=en(19,n,t,r),e.elementType=Y,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case N:m=10;break e;case _:m=9;break e;case j:m=11;break e;case D:m=14;break e;case X:m=16,l=null;break e}m=29,n=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=en(m,n,t,r),t.elementType=e,t.type=l,t.lanes=s,t}function Ul(e,t,n,l){return e=en(7,e,l,t),e.lanes=n,e}function Mo(e,t,n){return e=en(6,e,null,t),e.lanes=n,e}function kp(e){var t=en(18,null,null,0);return t.stateNode=e,t}function zo(e,t,n){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Rp=new WeakMap;function hn(e,t){if(typeof e=="object"&&e!==null){var n=Rp.get(e);return n!==void 0?n:(t={value:e,source:t,stack:dt(t)},Rp.set(e,t),t)}return{value:e,source:t,stack:dt(t)}}var ha=[],ya=0,ui=null,ar=0,yn=[],gn=0,ul=null,qn=1,Mn="";function Gn(e,t){ha[ya++]=ar,ha[ya++]=ui,ui=e,ar=t}function qp(e,t,n){yn[gn++]=qn,yn[gn++]=Mn,yn[gn++]=ul,ul=e;var l=qn;e=Mn;var r=32-F(l)-1;l&=~(1<<r),n+=1;var s=32-F(t)+r;if(30<s){var m=r-r%5;s=(l&(1<<m)-1).toString(32),l>>=m,r-=m,qn=1<<32-F(t)+r|n<<r|l,Mn=s+e}else qn=1<<s|n<<r|l,Mn=e}function $o(e){e.return!==null&&(Gn(e,1),qp(e,1,0))}function Do(e){for(;e===ui;)ui=ha[--ya],ha[ya]=null,ar=ha[--ya],ha[ya]=null;for(;e===ul;)ul=yn[--gn],yn[gn]=null,Mn=yn[--gn],yn[gn]=null,qn=yn[--gn],yn[gn]=null}function Mp(e,t){yn[gn++]=qn,yn[gn++]=Mn,yn[gn++]=ul,qn=t.id,Mn=t.overflow,ul=e}var qt=null,pt=null,We=!1,dl=null,xn=!1,Uo=Error(u(519));function fl(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw rr(hn(t,e)),Uo}function zp(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[Rt]=e,t[Ft]=l,n){case"dialog":Ze("cancel",t),Ze("close",t);break;case"iframe":case"object":case"embed":Ze("load",t);break;case"video":case"audio":for(n=0;n<Er.length;n++)Ze(Er[n],t);break;case"source":Ze("error",t);break;case"img":case"image":case"link":Ze("error",t),Ze("load",t);break;case"details":Ze("toggle",t);break;case"input":Ze("invalid",t),Zf(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ze("invalid",t);break;case"textarea":Ze("invalid",t),Kf(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||Wh(t.textContent,n)?(l.popover!=null&&(Ze("beforetoggle",t),Ze("toggle",t)),l.onScroll!=null&&Ze("scroll",t),l.onScrollEnd!=null&&Ze("scrollend",t),l.onClick!=null&&(t.onclick=Ln),t=!0):t=!1,t||fl(e,!0)}function $p(e){for(qt=e.return;qt;)switch(qt.tag){case 5:case 31:case 13:xn=!1;return;case 27:case 3:xn=!0;return;default:qt=qt.return}}function ga(e){if(e!==qt)return!1;if(!We)return $p(e),We=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||nu(e.type,e.memoizedProps)),n=!n),n&&pt&&fl(e),$p(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));pt=sy(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));pt=sy(e)}else t===27?(t=pt,Tl(e.type)?(e=su,su=null,pt=e):pt=t):pt=qt?vn(e.stateNode.nextSibling):null;return!0}function Hl(){pt=qt=null,We=!1}function Ho(){var e=dl;return e!==null&&(Kt===null?Kt=e:Kt.push.apply(Kt,e),dl=null),e}function rr(e){dl===null?dl=[e]:dl.push(e)}var Lo=w(null),Ll=null,In=null;function pl(e,t,n){ce(Lo,t._currentValue),t._currentValue=n}function Fn(e){e._currentValue=Lo.current,$(Lo)}function Bo(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Yo(e,t,n,l){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var s=r.dependencies;if(s!==null){var m=r.child;s=s.firstContext;e:for(;s!==null;){var v=s;s=r;for(var E=0;E<t.length;E++)if(v.context===t[E]){s.lanes|=n,v=s.alternate,v!==null&&(v.lanes|=n),Bo(s.return,n,e),l||(m=null);break e}s=v.next}}else if(r.tag===18){if(m=r.return,m===null)throw Error(u(341));m.lanes|=n,s=m.alternate,s!==null&&(s.lanes|=n),Bo(m,n,e),m=null}else m=r.child;if(m!==null)m.return=r;else for(m=r;m!==null;){if(m===e){m=null;break}if(r=m.sibling,r!==null){r.return=m.return,m=r;break}m=m.return}r=m}}function xa(e,t,n,l){e=null;for(var r=t,s=!1;r!==null;){if(!s){if((r.flags&524288)!==0)s=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var m=r.alternate;if(m===null)throw Error(u(387));if(m=m.memoizedProps,m!==null){var v=r.type;Pt(r.pendingProps.value,m.value)||(e!==null?e.push(v):e=[v])}}else if(r===Re.current){if(m=r.alternate,m===null)throw Error(u(387));m.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Rr):e=[Rr])}r=r.return}e!==null&&Yo(t,e,n,l),t.flags|=262144}function di(e){for(e=e.firstContext;e!==null;){if(!Pt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Bl(e){Ll=e,In=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Mt(e){return Dp(Ll,e)}function fi(e,t){return Ll===null&&Bl(e),Dp(e,t)}function Dp(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},In===null){if(e===null)throw Error(u(308));In=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else In=In.next=t;return n}var tv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},nv=a.unstable_scheduleCallback,lv=a.unstable_NormalPriority,St={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Go(){return{controller:new tv,data:new Map,refCount:0}}function ir(e){e.refCount--,e.refCount===0&&nv(lv,function(){e.controller.abort()})}var sr=null,Io=0,ba=0,va=null;function av(e,t){if(sr===null){var n=sr=[];Io=0,ba=Xc(),va={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Io++,t.then(Up,Up),t}function Up(){if(--Io===0&&sr!==null){va!==null&&(va.status="fulfilled");var e=sr;sr=null,ba=0,va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function rv(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var r=0;r<n.length;r++)(0,n[r])(t)},function(r){for(l.status="rejected",l.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),l}var Hp=T.S;T.S=function(e,t){Ah=_e(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&av(e,t),Hp!==null&&Hp(e,t)};var Yl=w(null);function Fo(){var e=Yl.current;return e!==null?e:ut.pooledCache}function pi(e,t){t===null?ce(Yl,Yl.current):ce(Yl,t.pool)}function Lp(){var e=Fo();return e===null?null:{parent:St._currentValue,pool:e}}var Sa=Error(u(460)),Vo=Error(u(474)),mi=Error(u(542)),hi={then:function(){}};function Bp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yp(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ln,Ln),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ip(e),e;default:if(typeof t.status=="string")t.then(Ln,Ln);else{if(e=ut,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=l}},function(l){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ip(e),e}throw Il=t,Sa}}function Gl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Il=n,Sa):n}}var Il=null;function Gp(){if(Il===null)throw Error(u(459));var e=Il;return Il=null,e}function Ip(e){if(e===Sa||e===mi)throw Error(u(483))}var Aa=null,or=0;function yi(e){var t=or;return or+=1,Aa===null&&(Aa=[]),Yp(Aa,e,t)}function cr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function gi(e,t){throw t.$$typeof===C?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Fp(e){function t(z,O){if(e){var L=z.deletions;L===null?(z.deletions=[O],z.flags|=16):L.push(O)}}function n(z,O){if(!e)return null;for(;O!==null;)t(z,O),O=O.sibling;return null}function l(z){for(var O=new Map;z!==null;)z.key!==null?O.set(z.key,z):O.set(z.index,z),z=z.sibling;return O}function r(z,O){return z=Yn(z,O),z.index=0,z.sibling=null,z}function s(z,O,L){return z.index=L,e?(L=z.alternate,L!==null?(L=L.index,L<O?(z.flags|=67108866,O):L):(z.flags|=67108866,O)):(z.flags|=1048576,O)}function m(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function v(z,O,L,re){return O===null||O.tag!==6?(O=Mo(L,z.mode,re),O.return=z,O):(O=r(O,L),O.return=z,O)}function E(z,O,L,re){var Me=L.type;return Me===G?te(z,O,L.props.children,re,L.key):O!==null&&(O.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===X&&Gl(Me)===O.type)?(O=r(O,L.props),cr(O,L),O.return=z,O):(O=ci(L.type,L.key,L.props,null,z.mode,re),cr(O,L),O.return=z,O)}function B(z,O,L,re){return O===null||O.tag!==4||O.stateNode.containerInfo!==L.containerInfo||O.stateNode.implementation!==L.implementation?(O=zo(L,z.mode,re),O.return=z,O):(O=r(O,L.children||[]),O.return=z,O)}function te(z,O,L,re,Me){return O===null||O.tag!==7?(O=Ul(L,z.mode,re,Me),O.return=z,O):(O=r(O,L),O.return=z,O)}function oe(z,O,L){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Mo(""+O,z.mode,L),O.return=z,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case M:return L=ci(O.type,O.key,O.props,null,z.mode,L),cr(L,O),L.return=z,L;case k:return O=zo(O,z.mode,L),O.return=z,O;case X:return O=Gl(O),oe(z,O,L)}if(ke(O)||Ee(O))return O=Ul(O,z.mode,L,null),O.return=z,O;if(typeof O.then=="function")return oe(z,yi(O),L);if(O.$$typeof===N)return oe(z,fi(z,O),L);gi(z,O)}return null}function V(z,O,L,re){var Me=O!==null?O.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return Me!==null?null:v(z,O,""+L,re);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case M:return L.key===Me?E(z,O,L,re):null;case k:return L.key===Me?B(z,O,L,re):null;case X:return L=Gl(L),V(z,O,L,re)}if(ke(L)||Ee(L))return Me!==null?null:te(z,O,L,re,null);if(typeof L.then=="function")return V(z,O,yi(L),re);if(L.$$typeof===N)return V(z,O,fi(z,L),re);gi(z,L)}return null}function J(z,O,L,re,Me){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return z=z.get(L)||null,v(O,z,""+re,Me);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case M:return z=z.get(re.key===null?L:re.key)||null,E(O,z,re,Me);case k:return z=z.get(re.key===null?L:re.key)||null,B(O,z,re,Me);case X:return re=Gl(re),J(z,O,L,re,Me)}if(ke(re)||Ee(re))return z=z.get(L)||null,te(O,z,re,Me,null);if(typeof re.then=="function")return J(z,O,L,yi(re),Me);if(re.$$typeof===N)return J(z,O,L,fi(O,re),Me);gi(O,re)}return null}function we(z,O,L,re){for(var Me=null,tt=null,Ce=O,Ge=O=0,Ke=null;Ce!==null&&Ge<L.length;Ge++){Ce.index>Ge?(Ke=Ce,Ce=null):Ke=Ce.sibling;var nt=V(z,Ce,L[Ge],re);if(nt===null){Ce===null&&(Ce=Ke);break}e&&Ce&&nt.alternate===null&&t(z,Ce),O=s(nt,O,Ge),tt===null?Me=nt:tt.sibling=nt,tt=nt,Ce=Ke}if(Ge===L.length)return n(z,Ce),We&&Gn(z,Ge),Me;if(Ce===null){for(;Ge<L.length;Ge++)Ce=oe(z,L[Ge],re),Ce!==null&&(O=s(Ce,O,Ge),tt===null?Me=Ce:tt.sibling=Ce,tt=Ce);return We&&Gn(z,Ge),Me}for(Ce=l(Ce);Ge<L.length;Ge++)Ke=J(Ce,z,Ge,L[Ge],re),Ke!==null&&(e&&Ke.alternate!==null&&Ce.delete(Ke.key===null?Ge:Ke.key),O=s(Ke,O,Ge),tt===null?Me=Ke:tt.sibling=Ke,tt=Ke);return e&&Ce.forEach(function(kl){return t(z,kl)}),We&&Gn(z,Ge),Me}function ze(z,O,L,re){if(L==null)throw Error(u(151));for(var Me=null,tt=null,Ce=O,Ge=O=0,Ke=null,nt=L.next();Ce!==null&&!nt.done;Ge++,nt=L.next()){Ce.index>Ge?(Ke=Ce,Ce=null):Ke=Ce.sibling;var kl=V(z,Ce,nt.value,re);if(kl===null){Ce===null&&(Ce=Ke);break}e&&Ce&&kl.alternate===null&&t(z,Ce),O=s(kl,O,Ge),tt===null?Me=kl:tt.sibling=kl,tt=kl,Ce=Ke}if(nt.done)return n(z,Ce),We&&Gn(z,Ge),Me;if(Ce===null){for(;!nt.done;Ge++,nt=L.next())nt=oe(z,nt.value,re),nt!==null&&(O=s(nt,O,Ge),tt===null?Me=nt:tt.sibling=nt,tt=nt);return We&&Gn(z,Ge),Me}for(Ce=l(Ce);!nt.done;Ge++,nt=L.next())nt=J(Ce,z,Ge,nt.value,re),nt!==null&&(e&&nt.alternate!==null&&Ce.delete(nt.key===null?Ge:nt.key),O=s(nt,O,Ge),tt===null?Me=nt:tt.sibling=nt,tt=nt);return e&&Ce.forEach(function(y1){return t(z,y1)}),We&&Gn(z,Ge),Me}function ct(z,O,L,re){if(typeof L=="object"&&L!==null&&L.type===G&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case M:e:{for(var Me=L.key;O!==null;){if(O.key===Me){if(Me=L.type,Me===G){if(O.tag===7){n(z,O.sibling),re=r(O,L.props.children),re.return=z,z=re;break e}}else if(O.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===X&&Gl(Me)===O.type){n(z,O.sibling),re=r(O,L.props),cr(re,L),re.return=z,z=re;break e}n(z,O);break}else t(z,O);O=O.sibling}L.type===G?(re=Ul(L.props.children,z.mode,re,L.key),re.return=z,z=re):(re=ci(L.type,L.key,L.props,null,z.mode,re),cr(re,L),re.return=z,z=re)}return m(z);case k:e:{for(Me=L.key;O!==null;){if(O.key===Me)if(O.tag===4&&O.stateNode.containerInfo===L.containerInfo&&O.stateNode.implementation===L.implementation){n(z,O.sibling),re=r(O,L.children||[]),re.return=z,z=re;break e}else{n(z,O);break}else t(z,O);O=O.sibling}re=zo(L,z.mode,re),re.return=z,z=re}return m(z);case X:return L=Gl(L),ct(z,O,L,re)}if(ke(L))return we(z,O,L,re);if(Ee(L)){if(Me=Ee(L),typeof Me!="function")throw Error(u(150));return L=Me.call(L),ze(z,O,L,re)}if(typeof L.then=="function")return ct(z,O,yi(L),re);if(L.$$typeof===N)return ct(z,O,fi(z,L),re);gi(z,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,O!==null&&O.tag===6?(n(z,O.sibling),re=r(O,L),re.return=z,z=re):(n(z,O),re=Mo(L,z.mode,re),re.return=z,z=re),m(z)):n(z,O)}return function(z,O,L,re){try{or=0;var Me=ct(z,O,L,re);return Aa=null,Me}catch(Ce){if(Ce===Sa||Ce===mi)throw Ce;var tt=en(29,Ce,null,z.mode);return tt.lanes=re,tt.return=z,tt}}}var Fl=Fp(!0),Vp=Fp(!1),ml=!1;function Xo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zo(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 hl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yl(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(lt&2)!==0){var r=l.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),l.pending=t,t=oi(e),_p(e,null,n),t}return si(e,l,t,n),oi(e)}function ur(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Df(e,n)}}function Qo(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var m={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?r=s=m:s=s.next=m,n=n.next}while(n!==null);s===null?r=s=t:s=s.next=t}else r=s=t;n={baseState:l.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ko=!1;function dr(){if(Ko){var e=va;if(e!==null)throw e}}function fr(e,t,n,l){Ko=!1;var r=e.updateQueue;ml=!1;var s=r.firstBaseUpdate,m=r.lastBaseUpdate,v=r.shared.pending;if(v!==null){r.shared.pending=null;var E=v,B=E.next;E.next=null,m===null?s=B:m.next=B,m=E;var te=e.alternate;te!==null&&(te=te.updateQueue,v=te.lastBaseUpdate,v!==m&&(v===null?te.firstBaseUpdate=B:v.next=B,te.lastBaseUpdate=E))}if(s!==null){var oe=r.baseState;m=0,te=B=E=null,v=s;do{var V=v.lane&-536870913,J=V!==v.lane;if(J?(Qe&V)===V:(l&V)===V){V!==0&&V===ba&&(Ko=!0),te!==null&&(te=te.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var we=e,ze=v;V=t;var ct=n;switch(ze.tag){case 1:if(we=ze.payload,typeof we=="function"){oe=we.call(ct,oe,V);break e}oe=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=ze.payload,V=typeof we=="function"?we.call(ct,oe,V):we,V==null)break e;oe=A({},oe,V);break e;case 2:ml=!0}}V=v.callback,V!==null&&(e.flags|=64,J&&(e.flags|=8192),J=r.callbacks,J===null?r.callbacks=[V]:J.push(V))}else J={lane:V,tag:v.tag,payload:v.payload,callback:v.callback,next:null},te===null?(B=te=J,E=oe):te=te.next=J,m|=V;if(v=v.next,v===null){if(v=r.shared.pending,v===null)break;J=v,v=J.next,J.next=null,r.lastBaseUpdate=J,r.shared.pending=null}}while(!0);te===null&&(E=oe),r.baseState=E,r.firstBaseUpdate=B,r.lastBaseUpdate=te,s===null&&(r.shared.lanes=0),Sl|=m,e.lanes=m,e.memoizedState=oe}}function Xp(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Zp(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Xp(n[e],t)}var ja=w(null),xi=w(0);function Qp(e,t){e=el,ce(xi,e),ce(ja,t),el=e|t.baseLanes}function Jo(){ce(xi,el),ce(ja,ja.current)}function Wo(){el=xi.current,$(ja),$(xi)}var tn=w(null),bn=null;function gl(e){var t=e.alternate;ce(bt,bt.current&1),ce(tn,e),bn===null&&(t===null||ja.current!==null||t.memoizedState!==null)&&(bn=e)}function Po(e){ce(bt,bt.current),ce(tn,e),bn===null&&(bn=e)}function Kp(e){e.tag===22?(ce(bt,bt.current),ce(tn,e),bn===null&&(bn=e)):xl()}function xl(){ce(bt,bt.current),ce(tn,tn.current)}function nn(e){$(tn),bn===e&&(bn=null),$(bt)}var bt=w(0);function bi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||ru(n)||iu(n)))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 Vn=0,Le=null,st=null,At=null,vi=!1,Na=!1,Vl=!1,Si=0,pr=0,wa=null,iv=0;function gt(){throw Error(u(321))}function ec(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pt(e[n],t[n]))return!1;return!0}function tc(e,t,n,l,r,s){return Vn=s,Le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?qm:yc,Vl=!1,s=n(l,r),Vl=!1,Na&&(s=Wp(t,n,l,r)),Jp(e),s}function Jp(e){T.H=yr;var t=st!==null&&st.next!==null;if(Vn=0,At=st=Le=null,vi=!1,pr=0,wa=null,t)throw Error(u(300));e===null||jt||(e=e.dependencies,e!==null&&di(e)&&(jt=!0))}function Wp(e,t,n,l){Le=e;var r=0;do{if(Na&&(wa=null),pr=0,Na=!1,25<=r)throw Error(u(301));if(r+=1,At=st=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}T.H=Mm,s=t(n,l)}while(Na);return s}function sv(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?mr(t):t,e=e.useState()[0],(st!==null?st.memoizedState:null)!==e&&(Le.flags|=1024),t}function nc(){var e=Si!==0;return Si=0,e}function lc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ac(e){if(vi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vi=!1}Vn=0,At=st=Le=null,Na=!1,pr=Si=0,wa=null}function Gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?Le.memoizedState=At=e:At=At.next=e,At}function vt(){if(st===null){var e=Le.alternate;e=e!==null?e.memoizedState:null}else e=st.next;var t=At===null?Le.memoizedState:At.next;if(t!==null)At=t,st=e;else{if(e===null)throw Le.alternate===null?Error(u(467)):Error(u(310));st=e,e={memoizedState:st.memoizedState,baseState:st.baseState,baseQueue:st.baseQueue,queue:st.queue,next:null},At===null?Le.memoizedState=At=e:At=At.next=e}return At}function Ai(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function mr(e){var t=pr;return pr+=1,wa===null&&(wa=[]),e=Yp(wa,e,t),t=Le,(At===null?t.memoizedState:At.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?qm:yc),e}function ji(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return mr(e);if(e.$$typeof===N)return Mt(e)}throw Error(u(438,String(e)))}function rc(e){var t=null,n=Le.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=Le.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ai(),Le.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=xe;return t.index++,n}function Xn(e,t){return typeof t=="function"?t(e):t}function Ni(e){var t=vt();return ic(t,st,e)}function ic(e,t,n){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=n;var r=e.baseQueue,s=l.pending;if(s!==null){if(r!==null){var m=r.next;r.next=s.next,s.next=m}t.baseQueue=r=s,l.pending=null}if(s=e.baseState,r===null)e.memoizedState=s;else{t=r.next;var v=m=null,E=null,B=t,te=!1;do{var oe=B.lane&-536870913;if(oe!==B.lane?(Qe&oe)===oe:(Vn&oe)===oe){var V=B.revertLane;if(V===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),oe===ba&&(te=!0);else if((Vn&V)===V){B=B.next,V===ba&&(te=!0);continue}else oe={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},E===null?(v=E=oe,m=s):E=E.next=oe,Le.lanes|=V,Sl|=V;oe=B.action,Vl&&n(s,oe),s=B.hasEagerState?B.eagerState:n(s,oe)}else V={lane:oe,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},E===null?(v=E=V,m=s):E=E.next=V,Le.lanes|=oe,Sl|=oe;B=B.next}while(B!==null&&B!==t);if(E===null?m=s:E.next=v,!Pt(s,e.memoizedState)&&(jt=!0,te&&(n=va,n!==null)))throw n;e.memoizedState=s,e.baseState=m,e.baseQueue=E,l.lastRenderedState=s}return r===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function sc(e){var t=vt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var l=n.dispatch,r=n.pending,s=t.memoizedState;if(r!==null){n.pending=null;var m=r=r.next;do s=e(s,m.action),m=m.next;while(m!==r);Pt(s,t.memoizedState)||(jt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,l]}function Pp(e,t,n){var l=Le,r=vt(),s=We;if(s){if(n===void 0)throw Error(u(407));n=n()}else n=t();var m=!Pt((st||r).memoizedState,n);if(m&&(r.memoizedState=n,jt=!0),r=r.queue,uc(nm.bind(null,l,r,e),[e]),r.getSnapshot!==t||m||At!==null&&At.memoizedState.tag&1){if(l.flags|=2048,Ta(9,{destroy:void 0},tm.bind(null,l,r,n,t),null),ut===null)throw Error(u(349));s||(Vn&127)!==0||em(l,t,n)}return n}function em(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Le.updateQueue,t===null?(t=Ai(),Le.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function tm(e,t,n,l){t.value=n,t.getSnapshot=l,lm(t)&&am(e)}function nm(e,t,n){return n(function(){lm(t)&&am(e)})}function lm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pt(e,n)}catch{return!0}}function am(e){var t=Dl(e,2);t!==null&&Jt(t,e,2)}function oc(e){var t=Gt();if(typeof e=="function"){var n=e;if(e=n(),Vl){H(!0);try{n()}finally{H(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:e},t}function rm(e,t,n,l){return e.baseState=n,ic(e,st,typeof l=="function"?l:Xn)}function ov(e,t,n,l,r){if(Ei(e))throw Error(u(485));if(e=t.action,e!==null){var s={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){s.listeners.push(m)}};T.T!==null?n(!0):s.isTransition=!1,l(s),n=t.pending,n===null?(s.next=t.pending=s,im(t,s)):(s.next=n.next,t.pending=n.next=s)}}function im(e,t){var n=t.action,l=t.payload,r=e.state;if(t.isTransition){var s=T.T,m={};T.T=m;try{var v=n(r,l),E=T.S;E!==null&&E(m,v),sm(e,t,v)}catch(B){cc(e,t,B)}finally{s!==null&&m.types!==null&&(s.types=m.types),T.T=s}}else try{s=n(r,l),sm(e,t,s)}catch(B){cc(e,t,B)}}function sm(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){om(e,t,l)},function(l){return cc(e,t,l)}):om(e,t,n)}function om(e,t,n){t.status="fulfilled",t.value=n,cm(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,im(e,n)))}function cc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,cm(t),t=t.next;while(t!==l)}e.action=null}function cm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function um(e,t){return t}function dm(e,t){if(We){var n=ut.formState;if(n!==null){e:{var l=Le;if(We){if(pt){t:{for(var r=pt,s=xn;r.nodeType!==8;){if(!s){r=null;break t}if(r=vn(r.nextSibling),r===null){r=null;break t}}s=r.data,r=s==="F!"||s==="F"?r:null}if(r){pt=vn(r.nextSibling),l=r.data==="F!";break e}}fl(l)}l=!1}l&&(t=n[0])}}return n=Gt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:um,lastRenderedState:t},n.queue=l,n=Om.bind(null,Le,l),l.dispatch=n,l=oc(!1),s=hc.bind(null,Le,!1,l.queue),l=Gt(),r={state:t,dispatch:null,action:e,pending:null},l.queue=r,n=ov.bind(null,Le,r,s,n),r.dispatch=n,l.memoizedState=e,[t,n,!1]}function fm(e){var t=vt();return pm(t,st,e)}function pm(e,t,n){if(t=ic(e,t,um)[0],e=Ni(Xn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=mr(t)}catch(m){throw m===Sa?mi:m}else l=t;t=vt();var r=t.queue,s=r.dispatch;return n!==t.memoizedState&&(Le.flags|=2048,Ta(9,{destroy:void 0},cv.bind(null,r,n),null)),[l,s,e]}function cv(e,t){e.action=t}function mm(e){var t=vt(),n=st;if(n!==null)return pm(t,n,e);vt(),t=t.memoizedState,n=vt();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Ta(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=Le.updateQueue,t===null&&(t=Ai(),Le.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function hm(){return vt().memoizedState}function wi(e,t,n,l){var r=Gt();Le.flags|=e,r.memoizedState=Ta(1|t,{destroy:void 0},n,l===void 0?null:l)}function Ti(e,t,n,l){var r=vt();l=l===void 0?null:l;var s=r.memoizedState.inst;st!==null&&l!==null&&ec(l,st.memoizedState.deps)?r.memoizedState=Ta(t,s,n,l):(Le.flags|=e,r.memoizedState=Ta(1|t,s,n,l))}function ym(e,t){wi(8390656,8,e,t)}function uc(e,t){Ti(2048,8,e,t)}function uv(e){Le.flags|=4;var t=Le.updateQueue;if(t===null)t=Ai(),Le.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gm(e){var t=vt().memoizedState;return uv({ref:t,nextImpl:e}),function(){if((lt&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function xm(e,t){return Ti(4,2,e,t)}function bm(e,t){return Ti(4,4,e,t)}function vm(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Sm(e,t,n){n=n!=null?n.concat([e]):null,Ti(4,4,vm.bind(null,t,e),n)}function dc(){}function Am(e,t){var n=vt();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&ec(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function jm(e,t){var n=vt();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&ec(t,l[1]))return l[0];if(l=e(),Vl){H(!0);try{e()}finally{H(!1)}}return n.memoizedState=[l,t],l}function fc(e,t,n){return n===void 0||(Vn&1073741824)!==0&&(Qe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Nh(),Le.lanes|=e,Sl|=e,n)}function Nm(e,t,n,l){return Pt(n,t)?n:ja.current!==null?(e=fc(e,n,l),Pt(e,t)||(jt=!0),e):(Vn&42)===0||(Vn&1073741824)!==0&&(Qe&261930)===0?(jt=!0,e.memoizedState=n):(e=Nh(),Le.lanes|=e,Sl|=e,t)}function wm(e,t,n,l,r){var s=ne.p;ne.p=s!==0&&8>s?s:8;var m=T.T,v={};T.T=v,hc(e,!1,t,n);try{var E=r(),B=T.S;if(B!==null&&B(v,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var te=rv(E,l);hr(e,t,te,rn(e))}else hr(e,t,l,rn(e))}catch(oe){hr(e,t,{then:function(){},status:"rejected",reason:oe},rn())}finally{ne.p=s,m!==null&&v.types!==null&&(m.types=v.types),T.T=m}}function dv(){}function pc(e,t,n,l){if(e.tag!==5)throw Error(u(476));var r=Tm(e).queue;wm(e,r,t,W,n===null?dv:function(){return Em(e),n(l)})}function Tm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:W},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Em(e){var t=Tm(e);t.next===null&&(t=e.alternate.memoizedState),hr(e,t.next.queue,{},rn())}function mc(){return Mt(Rr)}function Cm(){return vt().memoizedState}function _m(){return vt().memoizedState}function fv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=rn();e=hl(n);var l=yl(t,e,n);l!==null&&(Jt(l,t,n),ur(l,t,n)),t={cache:Go()},e.payload=t;return}t=t.return}}function pv(e,t,n){var l=rn();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ei(e)?km(t,n):(n=Ro(e,t,n,l),n!==null&&(Jt(n,e,l),Rm(n,t,l)))}function Om(e,t,n){var l=rn();hr(e,t,n,l)}function hr(e,t,n,l){var r={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ei(e))km(t,r);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var m=t.lastRenderedState,v=s(m,n);if(r.hasEagerState=!0,r.eagerState=v,Pt(v,m))return si(e,t,r,0),ut===null&&ii(),!1}catch{}if(n=Ro(e,t,r,l),n!==null)return Jt(n,e,l),Rm(n,t,l),!0}return!1}function hc(e,t,n,l){if(l={lane:2,revertLane:Xc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ei(e)){if(t)throw Error(u(479))}else t=Ro(e,n,l,2),t!==null&&Jt(t,e,2)}function Ei(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function km(e,t){Na=vi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rm(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Df(e,n)}}var yr={readContext:Mt,use:ji,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};yr.useEffectEvent=gt;var qm={readContext:Mt,use:ji,useCallback:function(e,t){return Gt().memoizedState=[e,t===void 0?null:t],e},useContext:Mt,useEffect:ym,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,wi(4194308,4,vm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wi(4194308,4,e,t)},useInsertionEffect:function(e,t){wi(4,2,e,t)},useMemo:function(e,t){var n=Gt();t=t===void 0?null:t;var l=e();if(Vl){H(!0);try{e()}finally{H(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Gt();if(n!==void 0){var r=n(t);if(Vl){H(!0);try{n(t)}finally{H(!1)}}}else r=t;return l.memoizedState=l.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=pv.bind(null,Le,e),[l.memoizedState,e]},useRef:function(e){var t=Gt();return e={current:e},t.memoizedState=e},useState:function(e){e=oc(e);var t=e.queue,n=Om.bind(null,Le,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:dc,useDeferredValue:function(e,t){var n=Gt();return fc(n,e,t)},useTransition:function(){var e=oc(!1);return e=wm.bind(null,Le,e.queue,!0,!1),Gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Le,r=Gt();if(We){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),ut===null)throw Error(u(349));(Qe&127)!==0||em(l,t,n)}r.memoizedState=n;var s={value:n,getSnapshot:t};return r.queue=s,ym(nm.bind(null,l,s,e),[e]),l.flags|=2048,Ta(9,{destroy:void 0},tm.bind(null,l,s,n,t),null),n},useId:function(){var e=Gt(),t=ut.identifierPrefix;if(We){var n=Mn,l=qn;n=(l&~(1<<32-F(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Si++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=iv++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:mc,useFormState:dm,useActionState:dm,useOptimistic:function(e){var t=Gt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=hc.bind(null,Le,!0,n),n.dispatch=t,[e,t]},useMemoCache:rc,useCacheRefresh:function(){return Gt().memoizedState=fv.bind(null,Le)},useEffectEvent:function(e){var t=Gt(),n={impl:e};return t.memoizedState=n,function(){if((lt&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},yc={readContext:Mt,use:ji,useCallback:Am,useContext:Mt,useEffect:uc,useImperativeHandle:Sm,useInsertionEffect:xm,useLayoutEffect:bm,useMemo:jm,useReducer:Ni,useRef:hm,useState:function(){return Ni(Xn)},useDebugValue:dc,useDeferredValue:function(e,t){var n=vt();return Nm(n,st.memoizedState,e,t)},useTransition:function(){var e=Ni(Xn)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:mr(e),t]},useSyncExternalStore:Pp,useId:Cm,useHostTransitionStatus:mc,useFormState:fm,useActionState:fm,useOptimistic:function(e,t){var n=vt();return rm(n,st,e,t)},useMemoCache:rc,useCacheRefresh:_m};yc.useEffectEvent=gm;var Mm={readContext:Mt,use:ji,useCallback:Am,useContext:Mt,useEffect:uc,useImperativeHandle:Sm,useInsertionEffect:xm,useLayoutEffect:bm,useMemo:jm,useReducer:sc,useRef:hm,useState:function(){return sc(Xn)},useDebugValue:dc,useDeferredValue:function(e,t){var n=vt();return st===null?fc(n,e,t):Nm(n,st.memoizedState,e,t)},useTransition:function(){var e=sc(Xn)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:mr(e),t]},useSyncExternalStore:Pp,useId:Cm,useHostTransitionStatus:mc,useFormState:mm,useActionState:mm,useOptimistic:function(e,t){var n=vt();return st!==null?rm(n,st,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:rc,useCacheRefresh:_m};Mm.useEffectEvent=gm;function gc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:A({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var xc={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=rn(),r=hl(l);r.payload=t,n!=null&&(r.callback=n),t=yl(e,r,l),t!==null&&(Jt(t,e,l),ur(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=rn(),r=hl(l);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=yl(e,r,l),t!==null&&(Jt(t,e,l),ur(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=rn(),l=hl(n);l.tag=2,t!=null&&(l.callback=t),t=yl(e,l,n),t!==null&&(Jt(t,e,n),ur(t,e,n))}};function zm(e,t,n,l,r,s,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,s,m):t.prototype&&t.prototype.isPureReactComponent?!nr(n,l)||!nr(r,s):!0}function $m(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&xc.enqueueReplaceState(t,t.state,null)}function Xl(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=A({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}function Dm(e){ri(e)}function Um(e){console.error(e)}function Hm(e){ri(e)}function Ci(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Lm(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function bc(e,t,n){return n=hl(n),n.tag=3,n.payload={element:null},n.callback=function(){Ci(e,t)},n}function Bm(e){return e=hl(e),e.tag=3,e}function Ym(e,t,n,l){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var s=l.value;e.payload=function(){return r(s)},e.callback=function(){Lm(t,n,l)}}var m=n.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(e.callback=function(){Lm(t,n,l),typeof r!="function"&&(Al===null?Al=new Set([this]):Al.add(this));var v=l.stack;this.componentDidCatch(l.value,{componentStack:v!==null?v:""})})}function mv(e,t,n,l,r){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&xa(t,n,r,!0),n=tn.current,n!==null){switch(n.tag){case 31:case 13:return bn===null?Li():n.alternate===null&&xt===0&&(xt=3),n.flags&=-257,n.flags|=65536,n.lanes=r,l===hi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Ic(e,l,r)),!1;case 22:return n.flags|=65536,l===hi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Ic(e,l,r)),!1}throw Error(u(435,n.tag))}return Ic(e,l,r),Li(),!1}if(We)return t=tn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,l!==Uo&&(e=Error(u(422),{cause:l}),rr(hn(e,n)))):(l!==Uo&&(t=Error(u(423),{cause:l}),rr(hn(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,l=hn(l,n),r=bc(e.stateNode,l,r),Qo(e,r),xt!==4&&(xt=2)),!1;var s=Error(u(520),{cause:l});if(s=hn(s,n),Nr===null?Nr=[s]:Nr.push(s),xt!==4&&(xt=2),t===null)return!0;l=hn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=bc(n.stateNode,l,e),Qo(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(Al===null||!Al.has(s))))return n.flags|=65536,r&=-r,n.lanes|=r,r=Bm(r),Ym(r,e,n,l),Qo(n,r),!1}n=n.return}while(n!==null);return!1}var vc=Error(u(461)),jt=!1;function zt(e,t,n,l){t.child=e===null?Vp(t,null,n,l):Fl(t,e.child,n,l)}function Gm(e,t,n,l,r){n=n.render;var s=t.ref;if("ref"in l){var m={};for(var v in l)v!=="ref"&&(m[v]=l[v])}else m=l;return Bl(t),l=tc(e,t,n,m,s,r),v=nc(),e!==null&&!jt?(lc(e,t,r),Zn(e,t,r)):(We&&v&&$o(t),t.flags|=1,zt(e,t,l,r),t.child)}function Im(e,t,n,l,r){if(e===null){var s=n.type;return typeof s=="function"&&!qo(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,Fm(e,t,s,l,r)):(e=ci(n.type,null,l,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!Cc(e,r)){var m=s.memoizedProps;if(n=n.compare,n=n!==null?n:nr,n(m,l)&&e.ref===t.ref)return Zn(e,t,r)}return t.flags|=1,e=Yn(s,l),e.ref=t.ref,e.return=t,t.child=e}function Fm(e,t,n,l,r){if(e!==null){var s=e.memoizedProps;if(nr(s,l)&&e.ref===t.ref)if(jt=!1,t.pendingProps=l=s,Cc(e,r))(e.flags&131072)!==0&&(jt=!0);else return t.lanes=e.lanes,Zn(e,t,r)}return Sc(e,t,n,l,r)}function Vm(e,t,n,l){var r=l.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|n:n,e!==null){for(l=t.child=e.child,r=0;l!==null;)r=r|l.lanes|l.childLanes,l=l.sibling;l=r&~s}else l=0,t.child=null;return Xm(e,t,s,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&pi(t,s!==null?s.cachePool:null),s!==null?Qp(t,s):Jo(),Kp(t);else return l=t.lanes=536870912,Xm(e,t,s!==null?s.baseLanes|n:n,n,l)}else s!==null?(pi(t,s.cachePool),Qp(t,s),xl(),t.memoizedState=null):(e!==null&&pi(t,null),Jo(),xl());return zt(e,t,r,n),t.child}function gr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Xm(e,t,n,l,r){var s=Fo();return s=s===null?null:{parent:St._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&pi(t,null),Jo(),Kp(t),e!==null&&xa(e,t,l,!0),t.childLanes=r,null}function _i(e,t){return t=ki({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Zm(e,t,n){return Fl(t,e.child,null,n),e=_i(t,t.pendingProps),e.flags|=2,nn(t),t.memoizedState=null,e}function hv(e,t,n){var l=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(We){if(l.mode==="hidden")return e=_i(t,l),t.lanes=536870912,gr(null,e);if(Po(t),(e=pt)?(e=iy(e,xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ul!==null?{id:qn,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},n=kp(e),n.return=t,t.child=n,qt=t,pt=null)):e=null,e===null)throw fl(t);return t.lanes=536870912,null}return _i(t,l)}var s=e.memoizedState;if(s!==null){var m=s.dehydrated;if(Po(t),r)if(t.flags&256)t.flags&=-257,t=Zm(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(jt||xa(e,t,n,!1),r=(n&e.childLanes)!==0,jt||r){if(l=ut,l!==null&&(m=Uf(l,n),m!==0&&m!==s.retryLane))throw s.retryLane=m,Dl(e,m),Jt(l,e,m),vc;Li(),t=Zm(e,t,n)}else e=s.treeContext,pt=vn(m.nextSibling),qt=t,We=!0,dl=null,xn=!1,e!==null&&Mp(t,e),t=_i(t,l),t.flags|=4096;return t}return e=Yn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Oi(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Sc(e,t,n,l,r){return Bl(t),n=tc(e,t,n,l,void 0,r),l=nc(),e!==null&&!jt?(lc(e,t,r),Zn(e,t,r)):(We&&l&&$o(t),t.flags|=1,zt(e,t,n,r),t.child)}function Qm(e,t,n,l,r,s){return Bl(t),t.updateQueue=null,n=Wp(t,l,n,r),Jp(e),l=nc(),e!==null&&!jt?(lc(e,t,s),Zn(e,t,s)):(We&&l&&$o(t),t.flags|=1,zt(e,t,n,s),t.child)}function Km(e,t,n,l,r){if(Bl(t),t.stateNode===null){var s=ma,m=n.contextType;typeof m=="object"&&m!==null&&(s=Mt(m)),s=new n(l,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=xc,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=l,s.state=t.memoizedState,s.refs={},Xo(t),m=n.contextType,s.context=typeof m=="object"&&m!==null?Mt(m):ma,s.state=t.memoizedState,m=n.getDerivedStateFromProps,typeof m=="function"&&(gc(t,n,m,l),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(m=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),m!==s.state&&xc.enqueueReplaceState(s,s.state,null),fr(t,l,s,r),dr(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){s=t.stateNode;var v=t.memoizedProps,E=Xl(n,v);s.props=E;var B=s.context,te=n.contextType;m=ma,typeof te=="object"&&te!==null&&(m=Mt(te));var oe=n.getDerivedStateFromProps;te=typeof oe=="function"||typeof s.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,te||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(v||B!==m)&&$m(t,s,l,m),ml=!1;var V=t.memoizedState;s.state=V,fr(t,l,s,r),dr(),B=t.memoizedState,v||V!==B||ml?(typeof oe=="function"&&(gc(t,n,oe,l),B=t.memoizedState),(E=ml||zm(t,n,E,l,V,B,m))?(te||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=B),s.props=l,s.state=B,s.context=m,l=E):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{s=t.stateNode,Zo(e,t),m=t.memoizedProps,te=Xl(n,m),s.props=te,oe=t.pendingProps,V=s.context,B=n.contextType,E=ma,typeof B=="object"&&B!==null&&(E=Mt(B)),v=n.getDerivedStateFromProps,(B=typeof v=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(m!==oe||V!==E)&&$m(t,s,l,E),ml=!1,V=t.memoizedState,s.state=V,fr(t,l,s,r),dr();var J=t.memoizedState;m!==oe||V!==J||ml||e!==null&&e.dependencies!==null&&di(e.dependencies)?(typeof v=="function"&&(gc(t,n,v,l),J=t.memoizedState),(te=ml||zm(t,n,te,l,V,J,E)||e!==null&&e.dependencies!==null&&di(e.dependencies))?(B||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(l,J,E),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(l,J,E)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||m===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=J),s.props=l,s.state=J,s.context=E,l=te):(typeof s.componentDidUpdate!="function"||m===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),l=!1)}return s=l,Oi(e,t),l=(t.flags&128)!==0,s||l?(s=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&l?(t.child=Fl(t,e.child,null,r),t.child=Fl(t,null,n,r)):zt(e,t,n,r),t.memoizedState=s.state,e=t.child):e=Zn(e,t,r),e}function Jm(e,t,n,l){return Hl(),t.flags|=256,zt(e,t,n,l),t.child}var Ac={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jc(e){return{baseLanes:e,cachePool:Lp()}}function Nc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=an),e}function Wm(e,t,n){var l=t.pendingProps,r=!1,s=(t.flags&128)!==0,m;if((m=s)||(m=e!==null&&e.memoizedState===null?!1:(bt.current&2)!==0),m&&(r=!0,t.flags&=-129),m=(t.flags&32)!==0,t.flags&=-33,e===null){if(We){if(r?gl(t):xl(),(e=pt)?(e=iy(e,xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ul!==null?{id:qn,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},n=kp(e),n.return=t,t.child=n,qt=t,pt=null)):e=null,e===null)throw fl(t);return iu(e)?t.lanes=32:t.lanes=536870912,null}var v=l.children;return l=l.fallback,r?(xl(),r=t.mode,v=ki({mode:"hidden",children:v},r),l=Ul(l,r,n,null),v.return=t,l.return=t,v.sibling=l,t.child=v,l=t.child,l.memoizedState=jc(n),l.childLanes=Nc(e,m,n),t.memoizedState=Ac,gr(null,l)):(gl(t),wc(t,v))}var E=e.memoizedState;if(E!==null&&(v=E.dehydrated,v!==null)){if(s)t.flags&256?(gl(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState!==null?(xl(),t.child=e.child,t.flags|=128,t=null):(xl(),v=l.fallback,r=t.mode,l=ki({mode:"visible",children:l.children},r),v=Ul(v,r,n,null),v.flags|=2,l.return=t,v.return=t,l.sibling=v,t.child=l,Fl(t,e.child,null,n),l=t.child,l.memoizedState=jc(n),l.childLanes=Nc(e,m,n),t.memoizedState=Ac,t=gr(null,l));else if(gl(t),iu(v)){if(m=v.nextSibling&&v.nextSibling.dataset,m)var B=m.dgst;m=B,l=Error(u(419)),l.stack="",l.digest=m,rr({value:l,source:null,stack:null}),t=Tc(e,t,n)}else if(jt||xa(e,t,n,!1),m=(n&e.childLanes)!==0,jt||m){if(m=ut,m!==null&&(l=Uf(m,n),l!==0&&l!==E.retryLane))throw E.retryLane=l,Dl(e,l),Jt(m,e,l),vc;ru(v)||Li(),t=Tc(e,t,n)}else ru(v)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,pt=vn(v.nextSibling),qt=t,We=!0,dl=null,xn=!1,e!==null&&Mp(t,e),t=wc(t,l.children),t.flags|=4096);return t}return r?(xl(),v=l.fallback,r=t.mode,E=e.child,B=E.sibling,l=Yn(E,{mode:"hidden",children:l.children}),l.subtreeFlags=E.subtreeFlags&65011712,B!==null?v=Yn(B,v):(v=Ul(v,r,n,null),v.flags|=2),v.return=t,l.return=t,l.sibling=v,t.child=l,gr(null,l),l=t.child,v=e.child.memoizedState,v===null?v=jc(n):(r=v.cachePool,r!==null?(E=St._currentValue,r=r.parent!==E?{parent:E,pool:E}:r):r=Lp(),v={baseLanes:v.baseLanes|n,cachePool:r}),l.memoizedState=v,l.childLanes=Nc(e,m,n),t.memoizedState=Ac,gr(e.child,l)):(gl(t),n=e.child,e=n.sibling,n=Yn(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(m=t.deletions,m===null?(t.deletions=[e],t.flags|=16):m.push(e)),t.child=n,t.memoizedState=null,n)}function wc(e,t){return t=ki({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ki(e,t){return e=en(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Fl(t,e.child,null,n),e=wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Pm(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Bo(e.return,t,n)}function Ec(e,t,n,l,r,s){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:r,treeForkCount:s}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=n,m.tailMode=r,m.treeForkCount=s)}function eh(e,t,n){var l=t.pendingProps,r=l.revealOrder,s=l.tail;l=l.children;var m=bt.current,v=(m&2)!==0;if(v?(m=m&1|2,t.flags|=128):m&=1,ce(bt,m),zt(e,t,l,n),l=We?ar:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pm(e,n,t);else if(e.tag===19)Pm(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&bi(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Ec(t,!1,r,n,s,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&bi(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Ec(t,!0,n,null,s,l);break;case"together":Ec(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Zn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Sl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(xa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=Yn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Cc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&di(e)))}function yv(e,t,n){switch(t.tag){case 3:Ve(t,t.stateNode.containerInfo),pl(t,St,e.memoizedState.cache),Hl();break;case 27:case 5:Be(t);break;case 4:Ve(t,t.stateNode.containerInfo);break;case 10:pl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Po(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(gl(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Wm(e,t,n):(gl(t),e=Zn(e,t,n),e!==null?e.sibling:null);gl(t);break;case 19:var r=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(xa(e,t,n,!1),l=(n&t.childLanes)!==0),r){if(l)return eh(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),ce(bt,bt.current),l)break;return null;case 22:return t.lanes=0,Vm(e,t,n,t.pendingProps);case 24:pl(t,St,e.memoizedState.cache)}return Zn(e,t,n)}function th(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!Cc(e,n)&&(t.flags&128)===0)return jt=!1,yv(e,t,n);jt=(e.flags&131072)!==0}else jt=!1,We&&(t.flags&1048576)!==0&&qp(t,ar,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Gl(t.elementType),t.type=e,typeof e=="function")qo(e)?(l=Xl(e,l),t.tag=1,t=Km(null,t,e,l,n)):(t.tag=0,t=Sc(null,t,e,l,n));else{if(e!=null){var r=e.$$typeof;if(r===j){t.tag=11,t=Gm(null,t,e,l,n);break e}else if(r===D){t.tag=14,t=Im(null,t,e,l,n);break e}}throw t=he(e)||e,Error(u(306,t,""))}}return t;case 0:return Sc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,r=Xl(l,t.pendingProps),Km(e,t,l,r,n);case 3:e:{if(Ve(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var s=t.memoizedState;r=s.element,Zo(e,t),fr(t,l,null,n);var m=t.memoizedState;if(l=m.cache,pl(t,St,l),l!==s.cache&&Yo(t,[St],n,!0),dr(),l=m.element,s.isDehydrated)if(s={element:l,isDehydrated:!1,cache:m.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=Jm(e,t,l,n);break e}else if(l!==r){r=hn(Error(u(424)),t),rr(r),t=Jm(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,pt=vn(e.firstChild),qt=t,We=!0,dl=null,xn=!0,n=Vp(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Hl(),l===r){t=Zn(e,t,n);break e}zt(e,t,l,n)}t=t.child}return t;case 26:return Oi(e,t),e===null?(n=fy(t.type,null,t.pendingProps,null))?t.memoizedState=n:We||(n=t.type,e=t.pendingProps,l=Xi(Te.current).createElement(n),l[Rt]=t,l[Ft]=e,$t(l,n,e),Ct(l),t.stateNode=l):t.memoizedState=fy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Be(t),e===null&&We&&(l=t.stateNode=cy(t.type,t.pendingProps,Te.current),qt=t,xn=!0,r=pt,Tl(t.type)?(su=r,pt=vn(l.firstChild)):pt=r),zt(e,t,t.pendingProps.children,n),Oi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&We&&((r=l=pt)&&(l=Vv(l,t.type,t.pendingProps,xn),l!==null?(t.stateNode=l,qt=t,pt=vn(l.firstChild),xn=!1,r=!0):r=!1),r||fl(t)),Be(t),r=t.type,s=t.pendingProps,m=e!==null?e.memoizedProps:null,l=s.children,nu(r,s)?l=null:m!==null&&nu(r,m)&&(t.flags|=32),t.memoizedState!==null&&(r=tc(e,t,sv,null,null,n),Rr._currentValue=r),Oi(e,t),zt(e,t,l,n),t.child;case 6:return e===null&&We&&((e=n=pt)&&(n=Xv(n,t.pendingProps,xn),n!==null?(t.stateNode=n,qt=t,pt=null,e=!0):e=!1),e||fl(t)),null;case 13:return Wm(e,t,n);case 4:return Ve(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Fl(t,null,l,n):zt(e,t,l,n),t.child;case 11:return Gm(e,t,t.type,t.pendingProps,n);case 7:return zt(e,t,t.pendingProps,n),t.child;case 8:return zt(e,t,t.pendingProps.children,n),t.child;case 12:return zt(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,pl(t,t.type,l.value),zt(e,t,l.children,n),t.child;case 9:return r=t.type._context,l=t.pendingProps.children,Bl(t),r=Mt(r),l=l(r),t.flags|=1,zt(e,t,l,n),t.child;case 14:return Im(e,t,t.type,t.pendingProps,n);case 15:return Fm(e,t,t.type,t.pendingProps,n);case 19:return eh(e,t,n);case 31:return hv(e,t,n);case 22:return Vm(e,t,n,t.pendingProps);case 24:return Bl(t),l=Mt(St),e===null?(r=Fo(),r===null&&(r=ut,s=Go(),r.pooledCache=s,s.refCount++,s!==null&&(r.pooledCacheLanes|=n),r=s),t.memoizedState={parent:l,cache:r},Xo(t),pl(t,St,r)):((e.lanes&n)!==0&&(Zo(e,t),fr(t,null,null,n),dr()),r=e.memoizedState,s=t.memoizedState,r.parent!==l?(r={parent:l,cache:l},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),pl(t,St,l)):(l=s.cache,pl(t,St,l),l!==r.cache&&Yo(t,[St],n,!0))),zt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Qn(e){e.flags|=4}function _c(e,t,n,l,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Ch())e.flags|=8192;else throw Il=hi,Vo}else e.flags&=-16777217}function nh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!gy(t))if(Ch())e.flags|=8192;else throw Il=hi,Vo}function Ri(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?jn():536870912,e.lanes|=t,Oa|=t)}function xr(e,t){if(!We)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,l|=r.subtreeFlags&65011712,l|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,l|=r.subtreeFlags,l|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function gv(e,t,n){var l=t.pendingProps;switch(Do(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(t),null;case 1:return mt(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Fn(St),Ie(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ga(t)?Qn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ho())),mt(t),null;case 26:var r=t.type,s=t.memoizedState;return e===null?(Qn(t),s!==null?(mt(t),nh(t,s)):(mt(t),_c(t,r,null,l,n))):s?s!==e.memoizedState?(Qn(t),mt(t),nh(t,s)):(mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Qn(t),mt(t),_c(t,r,e,l,n)),null;case 27:if(Z(t),n=Te.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return mt(t),null}e=pe.current,ga(t)?zp(t):(e=cy(r,l,n),t.stateNode=e,Qn(t))}return mt(t),null;case 5:if(Z(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return mt(t),null}if(s=pe.current,ga(t))zp(t);else{var m=Xi(Te.current);switch(s){case 1:s=m.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:s=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":s=m.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":s=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":s=m.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof l.is=="string"?m.createElement("select",{is:l.is}):m.createElement("select"),l.multiple?s.multiple=!0:l.size&&(s.size=l.size);break;default:s=typeof l.is=="string"?m.createElement(r,{is:l.is}):m.createElement(r)}}s[Rt]=t,s[Ft]=l;e:for(m=t.child;m!==null;){if(m.tag===5||m.tag===6)s.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}t.stateNode=s;e:switch($t(s,r,l),r){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Qn(t)}}return mt(t),_c(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=Te.current,ga(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,r=qt,r!==null)switch(r.tag){case 27:case 5:l=r.memoizedProps}e[Rt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Wh(e.nodeValue,n)),e||fl(t,!0)}else e=Xi(e).createTextNode(l),e[Rt]=t,t.stateNode=e}return mt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=ga(t),n!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Rt]=t}else Hl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),e=!1}else n=Ho(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(nn(t),t):(nn(t),null);if((t.flags&128)!==0)throw Error(u(558))}return mt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=ga(t),l!==null&&l.dehydrated!==null){if(e===null){if(!r)throw Error(u(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(u(317));r[Rt]=t}else Hl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),r=!1}else r=Ho(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(nn(t),t):(nn(t),null)}return nn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,r=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(r=l.alternate.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==r&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ri(t,t.updateQueue),mt(t),null);case 4:return Ie(),e===null&&Jc(t.stateNode.containerInfo),mt(t),null;case 10:return Fn(t.type),mt(t),null;case 19:if($(bt),l=t.memoizedState,l===null)return mt(t),null;if(r=(t.flags&128)!==0,s=l.rendering,s===null)if(r)xr(l,!1);else{if(xt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=bi(e),s!==null){for(t.flags|=128,xr(l,!1),e=s.updateQueue,t.updateQueue=e,Ri(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Op(n,e),n=n.sibling;return ce(bt,bt.current&1|2),We&&Gn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&_e()>Di&&(t.flags|=128,r=!0,xr(l,!1),t.lanes=4194304)}else{if(!r)if(e=bi(s),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Ri(t,e),xr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!We)return mt(t),null}else 2*_e()-l.renderingStartTime>Di&&n!==536870912&&(t.flags|=128,r=!0,xr(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(e=l.last,e!==null?e.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=_e(),e.sibling=null,n=bt.current,ce(bt,r?n&1|2:n&1),We&&Gn(t,l.treeForkCount),e):(mt(t),null);case 22:case 23:return nn(t),Wo(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),n=t.updateQueue,n!==null&&Ri(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&$(Yl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Fn(St),mt(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function xv(e,t){switch(Do(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fn(St),Ie(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Z(t),null;case 31:if(t.memoizedState!==null){if(nn(t),t.alternate===null)throw Error(u(340));Hl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(nn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Hl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $(bt),null;case 4:return Ie(),null;case 10:return Fn(t.type),null;case 22:case 23:return nn(t),Wo(),e!==null&&$(Yl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Fn(St),null;case 25:return null;default:return null}}function lh(e,t){switch(Do(t),t.tag){case 3:Fn(St),Ie();break;case 26:case 27:case 5:Z(t);break;case 4:Ie();break;case 31:t.memoizedState!==null&&nn(t);break;case 13:nn(t);break;case 19:$(bt);break;case 10:Fn(t.type);break;case 22:case 23:nn(t),Wo(),e!==null&&$(Yl);break;case 24:Fn(St)}}function br(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var r=l.next;n=r;do{if((n.tag&e)===e){l=void 0;var s=n.create,m=n.inst;l=s(),m.destroy=l}n=n.next}while(n!==r)}}catch(v){it(t,t.return,v)}}function bl(e,t,n){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var s=r.next;l=s;do{if((l.tag&e)===e){var m=l.inst,v=m.destroy;if(v!==void 0){m.destroy=void 0,r=t;var E=n,B=v;try{B()}catch(te){it(r,E,te)}}}l=l.next}while(l!==s)}}catch(te){it(t,t.return,te)}}function ah(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Zp(t,n)}catch(l){it(e,e.return,l)}}}function rh(e,t,n){n.props=Xl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){it(e,t,l)}}function vr(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(r){it(e,t,r)}}function zn(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(r){it(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){it(e,t,r)}else n.current=null}function ih(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(r){it(e,e.return,r)}}function Oc(e,t,n){try{var l=e.stateNode;Lv(l,e.type,n,t),l[Ft]=t}catch(r){it(e,e.return,r)}}function sh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Tl(e.type)||e.tag===4}function kc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sh(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&&Tl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Rc(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ln));else if(l!==4&&(l===27&&Tl(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Rc(e,t,n),e=e.sibling;e!==null;)Rc(e,t,n),e=e.sibling}function qi(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Tl(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(qi(e,t,n),e=e.sibling;e!==null;)qi(e,t,n),e=e.sibling}function oh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);$t(t,l,n),t[Rt]=e,t[Ft]=n}catch(s){it(e,e.return,s)}}var Kn=!1,Nt=!1,qc=!1,ch=typeof WeakSet=="function"?WeakSet:Set,_t=null;function bv(e,t){if(e=e.containerInfo,eu=es,e=Sp(e),To(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var r=l.anchorOffset,s=l.focusNode;l=l.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var m=0,v=-1,E=-1,B=0,te=0,oe=e,V=null;t:for(;;){for(var J;oe!==n||r!==0&&oe.nodeType!==3||(v=m+r),oe!==s||l!==0&&oe.nodeType!==3||(E=m+l),oe.nodeType===3&&(m+=oe.nodeValue.length),(J=oe.firstChild)!==null;)V=oe,oe=J;for(;;){if(oe===e)break t;if(V===n&&++B===r&&(v=m),V===s&&++te===l&&(E=m),(J=oe.nextSibling)!==null)break;oe=V,V=oe.parentNode}oe=J}n=v===-1||E===-1?null:{start:v,end:E}}else n=null}n=n||{start:0,end:0}}else n=null;for(tu={focusedElem:e,selectionRange:n},es=!1,_t=t;_t!==null;)if(t=_t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_t=e;else for(;_t!==null;){switch(t=_t,s=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(n=0;n<e.length;n++)r=e[n],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,n=t,r=s.memoizedProps,s=s.memoizedState,l=n.stateNode;try{var we=Xl(n.type,r);e=l.getSnapshotBeforeUpdate(we,s),l.__reactInternalSnapshotBeforeUpdate=e}catch(ze){it(n,n.return,ze)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)au(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":au(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(u(163))}if(e=t.sibling,e!==null){e.return=t.return,_t=e;break}_t=t.return}}function uh(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:Wn(e,n),l&4&&br(5,n);break;case 1:if(Wn(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(m){it(n,n.return,m)}else{var r=Xl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(m){it(n,n.return,m)}}l&64&&ah(n),l&512&&vr(n,n.return);break;case 3:if(Wn(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Zp(e,t)}catch(m){it(n,n.return,m)}}break;case 27:t===null&&l&4&&oh(n);case 26:case 5:Wn(e,n),t===null&&l&4&&ih(n),l&512&&vr(n,n.return);break;case 12:Wn(e,n);break;case 31:Wn(e,n),l&4&&ph(e,n);break;case 13:Wn(e,n),l&4&&mh(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Cv.bind(null,n),Zv(e,n))));break;case 22:if(l=n.memoizedState!==null||Kn,!l){t=t!==null&&t.memoizedState!==null||Nt,r=Kn;var s=Nt;Kn=l,(Nt=t)&&!s?Pn(e,n,(n.subtreeFlags&8772)!==0):Wn(e,n),Kn=r,Nt=s}break;case 30:break;default:Wn(e,n)}}function dh(e){var t=e.alternate;t!==null&&(e.alternate=null,dh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&oo(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 ht=null,Xt=!1;function Jn(e,t,n){for(n=n.child;n!==null;)fh(e,t,n),n=n.sibling}function fh(e,t,n){if(b&&typeof b.onCommitFiberUnmount=="function")try{b.onCommitFiberUnmount(Q,n)}catch{}switch(n.tag){case 26:Nt||zn(n,t),Jn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Nt||zn(n,t);var l=ht,r=Xt;Tl(n.type)&&(ht=n.stateNode,Xt=!1),Jn(e,t,n),_r(n.stateNode),ht=l,Xt=r;break;case 5:Nt||zn(n,t);case 6:if(l=ht,r=Xt,ht=null,Jn(e,t,n),ht=l,Xt=r,ht!==null)if(Xt)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(n.stateNode)}catch(s){it(n,t,s)}else try{ht.removeChild(n.stateNode)}catch(s){it(n,t,s)}break;case 18:ht!==null&&(Xt?(e=ht,ay(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ua(e)):ay(ht,n.stateNode));break;case 4:l=ht,r=Xt,ht=n.stateNode.containerInfo,Xt=!0,Jn(e,t,n),ht=l,Xt=r;break;case 0:case 11:case 14:case 15:bl(2,n,t),Nt||bl(4,n,t),Jn(e,t,n);break;case 1:Nt||(zn(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&rh(n,t,l)),Jn(e,t,n);break;case 21:Jn(e,t,n);break;case 22:Nt=(l=Nt)||n.memoizedState!==null,Jn(e,t,n),Nt=l;break;default:Jn(e,t,n)}}function ph(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ua(e)}catch(n){it(t,t.return,n)}}}function mh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ua(e)}catch(n){it(t,t.return,n)}}function vv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ch),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ch),t;default:throw Error(u(435,e.tag))}}function Mi(e,t){var n=vv(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var r=_v.bind(null,e,l);l.then(r,r)}})}function Zt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var r=n[l],s=e,m=t,v=m;e:for(;v!==null;){switch(v.tag){case 27:if(Tl(v.type)){ht=v.stateNode,Xt=!1;break e}break;case 5:ht=v.stateNode,Xt=!1;break e;case 3:case 4:ht=v.stateNode.containerInfo,Xt=!0;break e}v=v.return}if(ht===null)throw Error(u(160));fh(s,m,r),ht=null,Xt=!1,s=r.alternate,s!==null&&(s.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)hh(t,e),t=t.sibling}var Tn=null;function hh(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Zt(t,e),Qt(e),l&4&&(bl(3,e,e.return),br(3,e),bl(5,e,e.return));break;case 1:Zt(t,e),Qt(e),l&512&&(Nt||n===null||zn(n,n.return)),l&64&&Kn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var r=Tn;if(Zt(t,e),Qt(e),l&512&&(Nt||n===null||zn(n,n.return)),l&4){var s=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,r=r.ownerDocument||r;t:switch(l){case"title":s=r.getElementsByTagName("title")[0],(!s||s[Xa]||s[Rt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=r.createElement(l),r.head.insertBefore(s,r.querySelector("head > title"))),$t(s,l,n),s[Rt]=e,Ct(s),l=s;break e;case"link":var m=hy("link","href",r).get(l+(n.href||""));if(m){for(var v=0;v<m.length;v++)if(s=m[v],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){m.splice(v,1);break t}}s=r.createElement(l),$t(s,l,n),r.head.appendChild(s);break;case"meta":if(m=hy("meta","content",r).get(l+(n.content||""))){for(v=0;v<m.length;v++)if(s=m[v],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){m.splice(v,1);break t}}s=r.createElement(l),$t(s,l,n),r.head.appendChild(s);break;default:throw Error(u(468,l))}s[Rt]=e,Ct(s),l=s}e.stateNode=l}else yy(r,e.type,e.stateNode);else e.stateNode=my(r,l,e.memoizedProps);else s!==l?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,l===null?yy(r,e.type,e.stateNode):my(r,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Oc(e,e.memoizedProps,n.memoizedProps)}break;case 27:Zt(t,e),Qt(e),l&512&&(Nt||n===null||zn(n,n.return)),n!==null&&l&4&&Oc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Zt(t,e),Qt(e),l&512&&(Nt||n===null||zn(n,n.return)),e.flags&32){r=e.stateNode;try{sa(r,"")}catch(we){it(e,e.return,we)}}l&4&&e.stateNode!=null&&(r=e.memoizedProps,Oc(e,r,n!==null?n.memoizedProps:r)),l&1024&&(qc=!0);break;case 6:if(Zt(t,e),Qt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(we){it(e,e.return,we)}}break;case 3:if(Ki=null,r=Tn,Tn=Zi(t.containerInfo),Zt(t,e),Tn=r,Qt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Ua(t.containerInfo)}catch(we){it(e,e.return,we)}qc&&(qc=!1,yh(e));break;case 4:l=Tn,Tn=Zi(e.stateNode.containerInfo),Zt(t,e),Qt(e),Tn=l;break;case 12:Zt(t,e),Qt(e);break;case 31:Zt(t,e),Qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Mi(e,l)));break;case 13:Zt(t,e),Qt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($i=_e()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Mi(e,l)));break;case 22:r=e.memoizedState!==null;var E=n!==null&&n.memoizedState!==null,B=Kn,te=Nt;if(Kn=B||r,Nt=te||E,Zt(t,e),Nt=te,Kn=B,Qt(e),l&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(n===null||E||Kn||Nt||Zl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){E=n=t;try{if(s=E.stateNode,r)m=s.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{v=E.stateNode;var oe=E.memoizedProps.style,V=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;v.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(we){it(E,E.return,we)}}}else if(t.tag===6){if(n===null){E=t;try{E.stateNode.nodeValue=r?"":E.memoizedProps}catch(we){it(E,E.return,we)}}}else if(t.tag===18){if(n===null){E=t;try{var J=E.stateNode;r?ry(J,!0):ry(E.stateNode,!1)}catch(we){it(E,E.return,we)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Mi(e,n))));break;case 19:Zt(t,e),Qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Mi(e,l)));break;case 30:break;case 21:break;default:Zt(t,e),Qt(e)}}function Qt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(sh(l)){n=l;break}l=l.return}if(n==null)throw Error(u(160));switch(n.tag){case 27:var r=n.stateNode,s=kc(e);qi(e,s,r);break;case 5:var m=n.stateNode;n.flags&32&&(sa(m,""),n.flags&=-33);var v=kc(e);qi(e,v,m);break;case 3:case 4:var E=n.stateNode.containerInfo,B=kc(e);Rc(e,B,E);break;default:throw Error(u(161))}}catch(te){it(e,e.return,te)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)uh(e,t.alternate,t),t=t.sibling}function Zl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:bl(4,t,t.return),Zl(t);break;case 1:zn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&rh(t,t.return,n),Zl(t);break;case 27:_r(t.stateNode);case 26:case 5:zn(t,t.return),Zl(t);break;case 22:t.memoizedState===null&&Zl(t);break;case 30:Zl(t);break;default:Zl(t)}e=e.sibling}}function Pn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,r=e,s=t,m=s.flags;switch(s.tag){case 0:case 11:case 15:Pn(r,s,n),br(4,s);break;case 1:if(Pn(r,s,n),l=s,r=l.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(B){it(l,l.return,B)}if(l=s,r=l.updateQueue,r!==null){var v=l.stateNode;try{var E=r.shared.hiddenCallbacks;if(E!==null)for(r.shared.hiddenCallbacks=null,r=0;r<E.length;r++)Xp(E[r],v)}catch(B){it(l,l.return,B)}}n&&m&64&&ah(s),vr(s,s.return);break;case 27:oh(s);case 26:case 5:Pn(r,s,n),n&&l===null&&m&4&&ih(s),vr(s,s.return);break;case 12:Pn(r,s,n);break;case 31:Pn(r,s,n),n&&m&4&&ph(r,s);break;case 13:Pn(r,s,n),n&&m&4&&mh(r,s);break;case 22:s.memoizedState===null&&Pn(r,s,n),vr(s,s.return);break;case 30:break;default:Pn(r,s,n)}t=t.sibling}}function Mc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ir(n))}function zc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ir(e))}function En(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)gh(e,t,n,l),t=t.sibling}function gh(e,t,n,l){var r=t.flags;switch(t.tag){case 0:case 11:case 15:En(e,t,n,l),r&2048&&br(9,t);break;case 1:En(e,t,n,l);break;case 3:En(e,t,n,l),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ir(e)));break;case 12:if(r&2048){En(e,t,n,l),e=t.stateNode;try{var s=t.memoizedProps,m=s.id,v=s.onPostCommit;typeof v=="function"&&v(m,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){it(t,t.return,E)}}else En(e,t,n,l);break;case 31:En(e,t,n,l);break;case 13:En(e,t,n,l);break;case 23:break;case 22:s=t.stateNode,m=t.alternate,t.memoizedState!==null?s._visibility&2?En(e,t,n,l):Sr(e,t):s._visibility&2?En(e,t,n,l):(s._visibility|=2,Ea(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Mc(m,t);break;case 24:En(e,t,n,l),r&2048&&zc(t.alternate,t);break;default:En(e,t,n,l)}}function Ea(e,t,n,l,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,m=t,v=n,E=l,B=m.flags;switch(m.tag){case 0:case 11:case 15:Ea(s,m,v,E,r),br(8,m);break;case 23:break;case 22:var te=m.stateNode;m.memoizedState!==null?te._visibility&2?Ea(s,m,v,E,r):Sr(s,m):(te._visibility|=2,Ea(s,m,v,E,r)),r&&B&2048&&Mc(m.alternate,m);break;case 24:Ea(s,m,v,E,r),r&&B&2048&&zc(m.alternate,m);break;default:Ea(s,m,v,E,r)}t=t.sibling}}function Sr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,r=l.flags;switch(l.tag){case 22:Sr(n,l),r&2048&&Mc(l.alternate,l);break;case 24:Sr(n,l),r&2048&&zc(l.alternate,l);break;default:Sr(n,l)}t=t.sibling}}var Ar=8192;function Ca(e,t,n){if(e.subtreeFlags&Ar)for(e=e.child;e!==null;)xh(e,t,n),e=e.sibling}function xh(e,t,n){switch(e.tag){case 26:Ca(e,t,n),e.flags&Ar&&e.memoizedState!==null&&i1(n,Tn,e.memoizedState,e.memoizedProps);break;case 5:Ca(e,t,n);break;case 3:case 4:var l=Tn;Tn=Zi(e.stateNode.containerInfo),Ca(e,t,n),Tn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ar,Ar=16777216,Ca(e,t,n),Ar=l):Ca(e,t,n));break;default:Ca(e,t,n)}}function bh(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 jr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];_t=l,Sh(l,e)}bh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)vh(e),e=e.sibling}function vh(e){switch(e.tag){case 0:case 11:case 15:jr(e),e.flags&2048&&bl(9,e,e.return);break;case 3:jr(e);break;case 12:jr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zi(e)):jr(e);break;default:jr(e)}}function zi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];_t=l,Sh(l,e)}bh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:bl(8,t,t.return),zi(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zi(t));break;default:zi(t)}e=e.sibling}}function Sh(e,t){for(;_t!==null;){var n=_t;switch(n.tag){case 0:case 11:case 15:bl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ir(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,_t=l;else e:for(n=e;_t!==null;){l=_t;var r=l.sibling,s=l.return;if(dh(l),l===n){_t=null;break e}if(r!==null){r.return=s,_t=r;break e}_t=s}}}var Sv={getCacheForType:function(e){var t=Mt(St),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Mt(St).controller.signal}},Av=typeof WeakMap=="function"?WeakMap:Map,lt=0,ut=null,Xe=null,Qe=0,rt=0,ln=null,vl=!1,_a=!1,$c=!1,el=0,xt=0,Sl=0,Ql=0,Dc=0,an=0,Oa=0,Nr=null,Kt=null,Uc=!1,$i=0,Ah=0,Di=1/0,Ui=null,Al=null,Tt=0,jl=null,ka=null,tl=0,Hc=0,Lc=null,jh=null,wr=0,Bc=null;function rn(){return(lt&2)!==0&&Qe!==0?Qe&-Qe:T.T!==null?Xc():Hf()}function Nh(){if(an===0)if((Qe&536870912)===0||We){var e=ye;ye<<=1,(ye&3932160)===0&&(ye=262144),an=e}else an=536870912;return e=tn.current,e!==null&&(e.flags|=32),an}function Jt(e,t,n){(e===ut&&(rt===2||rt===9)||e.cancelPendingCommit!==null)&&(Ra(e,0),Nl(e,Qe,an,!1)),Nn(e,n),((lt&2)===0||e!==ut)&&(e===ut&&((lt&2)===0&&(Ql|=n),xt===4&&Nl(e,Qe,an,!1)),$n(e))}function wh(e,t,n){if((lt&6)!==0)throw Error(u(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||$e(e,t),r=l?wv(e,t):Gc(e,t,!0),s=l;do{if(r===0){_a&&!l&&Nl(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!jv(n)){r=Gc(e,t,!1),s=!1;continue}if(r===2){if(s=t,e.errorRecoveryDisabledLanes&s)var m=0;else m=e.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){t=m;e:{var v=e;r=Nr;var E=v.current.memoizedState.isDehydrated;if(E&&(Ra(v,m).flags|=256),m=Gc(v,m,!1),m!==2){if($c&&!E){v.errorRecoveryDisabledLanes|=s,Ql|=s,r=4;break e}s=Kt,Kt=r,s!==null&&(Kt===null?Kt=s:Kt.push.apply(Kt,s))}r=m}if(s=!1,r!==2)continue}}if(r===1){Ra(e,0),Nl(e,t,0,!0);break}e:{switch(l=e,s=r,s){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Nl(l,t,an,!vl);break e;case 2:Kt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(r=$i+300-_e(),10<r)){if(Nl(l,t,an,!vl),qe(l,0,!0)!==0)break e;tl=t,l.timeoutHandle=ny(Th.bind(null,l,n,Kt,Ui,Uc,t,an,Ql,Oa,vl,s,"Throttled",-0,0),r);break e}Th(l,n,Kt,Ui,Uc,t,an,Ql,Oa,vl,s,null,-0,0)}}break}while(!0);$n(e)}function Th(e,t,n,l,r,s,m,v,E,B,te,oe,V,J){if(e.timeoutHandle=-1,oe=t.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ln},xh(t,s,oe);var we=(s&62914560)===s?$i-_e():(s&4194048)===s?Ah-_e():0;if(we=s1(oe,we),we!==null){tl=s,e.cancelPendingCommit=we(Mh.bind(null,e,t,s,n,l,r,m,v,E,te,oe,null,V,J)),Nl(e,s,m,!B);return}}Mh(e,t,s,n,l,r,m,v,E)}function jv(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var r=n[l],s=r.getSnapshot;r=r.value;try{if(!Pt(s(),r))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Nl(e,t,n,l){t&=~Dc,t&=~Ql,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var r=t;0<r;){var s=31-F(r),m=1<<s;l[s]=-1,r&=~m}n!==0&&$f(e,n,t)}function Hi(){return(lt&6)===0?(Tr(0),!1):!0}function Yc(){if(Xe!==null){if(rt===0)var e=Xe.return;else e=Xe,In=Ll=null,ac(e),Aa=null,or=0,e=Xe;for(;e!==null;)lh(e.alternate,e),e=e.return;Xe=null}}function Ra(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Gv(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),tl=0,Yc(),ut=e,Xe=n=Yn(e.current,null),Qe=t,rt=0,ln=null,vl=!1,_a=$e(e,t),$c=!1,Oa=an=Dc=Ql=Sl=xt=0,Kt=Nr=null,Uc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var r=31-F(l),s=1<<r;t|=e[r],l&=~s}return el=t,ii(),n}function Eh(e,t){Le=null,T.H=yr,t===Sa||t===mi?(t=Gp(),rt=3):t===Vo?(t=Gp(),rt=4):rt=t===vc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ln=t,Xe===null&&(xt=1,Ci(e,hn(t,e.current)))}function Ch(){var e=tn.current;return e===null?!0:(Qe&4194048)===Qe?bn===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?e===bn:!1}function _h(){var e=T.H;return T.H=yr,e===null?yr:e}function Oh(){var e=T.A;return T.A=Sv,e}function Li(){xt=4,vl||(Qe&4194048)!==Qe&&tn.current!==null||(_a=!0),(Sl&134217727)===0&&(Ql&134217727)===0||ut===null||Nl(ut,Qe,an,!1)}function Gc(e,t,n){var l=lt;lt|=2;var r=_h(),s=Oh();(ut!==e||Qe!==t)&&(Ui=null,Ra(e,t)),t=!1;var m=xt;e:do try{if(rt!==0&&Xe!==null){var v=Xe,E=ln;switch(rt){case 8:Yc(),m=6;break e;case 3:case 2:case 9:case 6:tn.current===null&&(t=!0);var B=rt;if(rt=0,ln=null,qa(e,v,E,B),n&&_a){m=0;break e}break;default:B=rt,rt=0,ln=null,qa(e,v,E,B)}}Nv(),m=xt;break}catch(te){Eh(e,te)}while(!0);return t&&e.shellSuspendCounter++,In=Ll=null,lt=l,T.H=r,T.A=s,Xe===null&&(ut=null,Qe=0,ii()),m}function Nv(){for(;Xe!==null;)kh(Xe)}function wv(e,t){var n=lt;lt|=2;var l=_h(),r=Oh();ut!==e||Qe!==t?(Ui=null,Di=_e()+500,Ra(e,t)):_a=$e(e,t);e:do try{if(rt!==0&&Xe!==null){t=Xe;var s=ln;t:switch(rt){case 1:rt=0,ln=null,qa(e,t,s,1);break;case 2:case 9:if(Bp(s)){rt=0,ln=null,Rh(t);break}t=function(){rt!==2&&rt!==9||ut!==e||(rt=7),$n(e)},s.then(t,t);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:Bp(s)?(rt=0,ln=null,Rh(t)):(rt=0,ln=null,qa(e,t,s,7));break;case 5:var m=null;switch(Xe.tag){case 26:m=Xe.memoizedState;case 5:case 27:var v=Xe;if(m?gy(m):v.stateNode.complete){rt=0,ln=null;var E=v.sibling;if(E!==null)Xe=E;else{var B=v.return;B!==null?(Xe=B,Bi(B)):Xe=null}break t}}rt=0,ln=null,qa(e,t,s,5);break;case 6:rt=0,ln=null,qa(e,t,s,6);break;case 8:Yc(),xt=6;break e;default:throw Error(u(462))}}Tv();break}catch(te){Eh(e,te)}while(!0);return In=Ll=null,T.H=l,T.A=r,lt=n,Xe!==null?0:(ut=null,Qe=0,ii(),xt)}function Tv(){for(;Xe!==null&&!kn();)kh(Xe)}function kh(e){var t=th(e.alternate,e,el);e.memoizedProps=e.pendingProps,t===null?Bi(e):Xe=t}function Rh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Qm(n,t,t.pendingProps,t.type,void 0,Qe);break;case 11:t=Qm(n,t,t.pendingProps,t.type.render,t.ref,Qe);break;case 5:ac(t);default:lh(n,t),t=Xe=Op(t,el),t=th(n,t,el)}e.memoizedProps=e.pendingProps,t===null?Bi(e):Xe=t}function qa(e,t,n,l){In=Ll=null,ac(t),Aa=null,or=0;var r=t.return;try{if(mv(e,r,t,n,Qe)){xt=1,Ci(e,hn(n,e.current)),Xe=null;return}}catch(s){if(r!==null)throw Xe=r,s;xt=1,Ci(e,hn(n,e.current)),Xe=null;return}t.flags&32768?(We||l===1?e=!0:_a||(Qe&536870912)!==0?e=!1:(vl=e=!0,(l===2||l===9||l===3||l===6)&&(l=tn.current,l!==null&&l.tag===13&&(l.flags|=16384))),qh(t,e)):Bi(t)}function Bi(e){var t=e;do{if((t.flags&32768)!==0){qh(t,vl);return}e=t.return;var n=gv(t.alternate,t,el);if(n!==null){Xe=n;return}if(t=t.sibling,t!==null){Xe=t;return}Xe=t=e}while(t!==null);xt===0&&(xt=5)}function qh(e,t){do{var n=xv(e.alternate,e);if(n!==null){n.flags&=32767,Xe=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Xe=e;return}Xe=e=n}while(e!==null);xt=6,Xe=null}function Mh(e,t,n,l,r,s,m,v,E){e.cancelPendingCommit=null;do Yi();while(Tt!==0);if((lt&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(s=t.lanes|t.childLanes,s|=ko,rb(e,n,s,m,v,E),e===ut&&(Xe=ut=null,Qe=0),ka=t,jl=e,tl=n,Hc=s,Lc=r,jh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ov(dn,function(){return Hh(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=T.T,T.T=null,r=ne.p,ne.p=2,m=lt,lt|=4;try{bv(e,t,n)}finally{lt=m,ne.p=r,T.T=l}}Tt=1,zh(),$h(),Dh()}}function zh(){if(Tt===1){Tt=0;var e=jl,t=ka,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=T.T,T.T=null;var l=ne.p;ne.p=2;var r=lt;lt|=4;try{hh(t,e);var s=tu,m=Sp(e.containerInfo),v=s.focusedElem,E=s.selectionRange;if(m!==v&&v&&v.ownerDocument&&vp(v.ownerDocument.documentElement,v)){if(E!==null&&To(v)){var B=E.start,te=E.end;if(te===void 0&&(te=B),"selectionStart"in v)v.selectionStart=B,v.selectionEnd=Math.min(te,v.value.length);else{var oe=v.ownerDocument||document,V=oe&&oe.defaultView||window;if(V.getSelection){var J=V.getSelection(),we=v.textContent.length,ze=Math.min(E.start,we),ct=E.end===void 0?ze:Math.min(E.end,we);!J.extend&&ze>ct&&(m=ct,ct=ze,ze=m);var z=bp(v,ze),O=bp(v,ct);if(z&&O&&(J.rangeCount!==1||J.anchorNode!==z.node||J.anchorOffset!==z.offset||J.focusNode!==O.node||J.focusOffset!==O.offset)){var L=oe.createRange();L.setStart(z.node,z.offset),J.removeAllRanges(),ze>ct?(J.addRange(L),J.extend(O.node,O.offset)):(L.setEnd(O.node,O.offset),J.addRange(L))}}}}for(oe=[],J=v;J=J.parentNode;)J.nodeType===1&&oe.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<oe.length;v++){var re=oe[v];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}es=!!eu,tu=eu=null}finally{lt=r,ne.p=l,T.T=n}}e.current=t,Tt=2}}function $h(){if(Tt===2){Tt=0;var e=jl,t=ka,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=T.T,T.T=null;var l=ne.p;ne.p=2;var r=lt;lt|=4;try{uh(e,t.alternate,t)}finally{lt=r,ne.p=l,T.T=n}}Tt=3}}function Dh(){if(Tt===4||Tt===3){Tt=0,Rn();var e=jl,t=ka,n=tl,l=jh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Tt=5:(Tt=0,ka=jl=null,Uh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Al=null),io(n),t=t.stateNode,b&&typeof b.onCommitFiberRoot=="function")try{b.onCommitFiberRoot(Q,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=T.T,r=ne.p,ne.p=2,T.T=null;try{for(var s=e.onRecoverableError,m=0;m<l.length;m++){var v=l[m];s(v.value,{componentStack:v.stack})}}finally{T.T=t,ne.p=r}}(tl&3)!==0&&Yi(),$n(e),r=e.pendingLanes,(n&261930)!==0&&(r&42)!==0?e===Bc?wr++:(wr=0,Bc=e):wr=0,Tr(0)}}function Uh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ir(t)))}function Yi(){return zh(),$h(),Dh(),Hh()}function Hh(){if(Tt!==5)return!1;var e=jl,t=Hc;Hc=0;var n=io(tl),l=T.T,r=ne.p;try{ne.p=32>n?32:n,T.T=null,n=Lc,Lc=null;var s=jl,m=tl;if(Tt=0,ka=jl=null,tl=0,(lt&6)!==0)throw Error(u(331));var v=lt;if(lt|=4,vh(s.current),gh(s,s.current,m,n),lt=v,Tr(0,!1),b&&typeof b.onPostCommitFiberRoot=="function")try{b.onPostCommitFiberRoot(Q,s)}catch{}return!0}finally{ne.p=r,T.T=l,Uh(e,t)}}function Lh(e,t,n){t=hn(n,t),t=bc(e.stateNode,t,2),e=yl(e,t,2),e!==null&&(Nn(e,2),$n(e))}function it(e,t,n){if(e.tag===3)Lh(e,e,n);else for(;t!==null;){if(t.tag===3){Lh(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Al===null||!Al.has(l))){e=hn(n,e),n=Bm(2),l=yl(t,n,2),l!==null&&(Ym(n,l,t,e),Nn(l,2),$n(l));break}}t=t.return}}function Ic(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Av;var r=new Set;l.set(t,r)}else r=l.get(t),r===void 0&&(r=new Set,l.set(t,r));r.has(n)||($c=!0,r.add(n),e=Ev.bind(null,e,t,n),t.then(e,e))}function Ev(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ut===e&&(Qe&n)===n&&(xt===4||xt===3&&(Qe&62914560)===Qe&&300>_e()-$i?(lt&2)===0&&Ra(e,0):Dc|=n,Oa===Qe&&(Oa=0)),$n(e)}function Bh(e,t){t===0&&(t=jn()),e=Dl(e,t),e!==null&&(Nn(e,t),$n(e))}function Cv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bh(e,n)}function _v(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),Bh(e,n)}function Ov(e,t){return Yt(e,t)}var Gi=null,Ma=null,Fc=!1,Ii=!1,Vc=!1,wl=0;function $n(e){e!==Ma&&e.next===null&&(Ma===null?Gi=Ma=e:Ma=Ma.next=e),Ii=!0,Fc||(Fc=!0,Rv())}function Tr(e,t){if(!Vc&&Ii){Vc=!0;do for(var n=!1,l=Gi;l!==null;){if(e!==0){var r=l.pendingLanes;if(r===0)var s=0;else{var m=l.suspendedLanes,v=l.pingedLanes;s=(1<<31-F(42|e)+1)-1,s&=r&~(m&~v),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,Fh(l,s))}else s=Qe,s=qe(l,l===ut?s:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(s&3)===0||$e(l,s)||(n=!0,Fh(l,s));l=l.next}while(n);Vc=!1}}function kv(){Yh()}function Yh(){Ii=Fc=!1;var e=0;wl!==0&&Yv()&&(e=wl);for(var t=_e(),n=null,l=Gi;l!==null;){var r=l.next,s=Gh(l,t);s===0?(l.next=null,n===null?Gi=r:n.next=r,r===null&&(Ma=n)):(n=l,(e!==0||(s&3)!==0)&&(Ii=!0)),l=r}Tt!==0&&Tt!==5||Tr(e),wl!==0&&(wl=0)}function Gh(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,r=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var m=31-F(s),v=1<<m,E=r[m];E===-1?((v&n)===0||(v&l)!==0)&&(r[m]=Ye(v,t)):E<=t&&(e.expiredLanes|=v),s&=~v}if(t=ut,n=Qe,n=qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(rt===2||rt===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&It(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||$e(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&It(l),io(n)){case 2:case 8:n=De;break;case 32:n=dn;break;case 268435456:n=q;break;default:n=dn}return l=Ih.bind(null,e),n=Yt(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&It(l),e.callbackPriority=2,e.callbackNode=null,2}function Ih(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Yi()&&e.callbackNode!==n)return null;var l=Qe;return l=qe(e,e===ut?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(wh(e,l,t),Gh(e,_e()),e.callbackNode!=null&&e.callbackNode===n?Ih.bind(null,e):null)}function Fh(e,t){if(Yi())return null;wh(e,t,!0)}function Rv(){Iv(function(){(lt&6)!==0?Yt(Ae,kv):Yh()})}function Xc(){if(wl===0){var e=ba;e===0&&(e=ee,ee<<=1,(ee&261888)===0&&(ee=256)),wl=e}return wl}function Vh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Wr(""+e)}function Xh(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function qv(e,t,n,l,r){if(t==="submit"&&n&&n.stateNode===r){var s=Vh((r[Ft]||null).action),m=l.submitter;m&&(t=(t=m[Ft]||null)?Vh(t.formAction):m.getAttribute("formAction"),t!==null&&(s=t,m=null));var v=new ni("action","action",null,l,r);e.push({event:v,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(wl!==0){var E=m?Xh(r,m):new FormData(r);pc(n,{pending:!0,data:E,method:r.method,action:s},null,E)}}else typeof s=="function"&&(v.preventDefault(),E=m?Xh(r,m):new FormData(r),pc(n,{pending:!0,data:E,method:r.method,action:s},s,E))},currentTarget:r}]})}}for(var Zc=0;Zc<Oo.length;Zc++){var Qc=Oo[Zc],Mv=Qc.toLowerCase(),zv=Qc[0].toUpperCase()+Qc.slice(1);wn(Mv,"on"+zv)}wn(Np,"onAnimationEnd"),wn(wp,"onAnimationIteration"),wn(Tp,"onAnimationStart"),wn("dblclick","onDoubleClick"),wn("focusin","onFocus"),wn("focusout","onBlur"),wn(Jb,"onTransitionRun"),wn(Wb,"onTransitionStart"),wn(Pb,"onTransitionCancel"),wn(Ep,"onTransitionEnd"),ra("onMouseEnter",["mouseout","mouseover"]),ra("onMouseLeave",["mouseout","mouseover"]),ra("onPointerEnter",["pointerout","pointerover"]),ra("onPointerLeave",["pointerout","pointerover"]),ql("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ql("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ql("onBeforeInput",["compositionend","keypress","textInput","paste"]),ql("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ql("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ql("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Er="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(" "),$v=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Er));function Zh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],r=l.event;l=l.listeners;e:{var s=void 0;if(t)for(var m=l.length-1;0<=m;m--){var v=l[m],E=v.instance,B=v.currentTarget;if(v=v.listener,E!==s&&r.isPropagationStopped())break e;s=v,r.currentTarget=B;try{s(r)}catch(te){ri(te)}r.currentTarget=null,s=E}else for(m=0;m<l.length;m++){if(v=l[m],E=v.instance,B=v.currentTarget,v=v.listener,E!==s&&r.isPropagationStopped())break e;s=v,r.currentTarget=B;try{s(r)}catch(te){ri(te)}r.currentTarget=null,s=E}}}}function Ze(e,t){var n=t[so];n===void 0&&(n=t[so]=new Set);var l=e+"__bubble";n.has(l)||(Qh(t,e,2,!1),n.add(l))}function Kc(e,t,n){var l=0;t&&(l|=4),Qh(n,e,l,t)}var Fi="_reactListening"+Math.random().toString(36).slice(2);function Jc(e){if(!e[Fi]){e[Fi]=!0,Yf.forEach(function(n){n!=="selectionchange"&&($v.has(n)||Kc(n,!1,e),Kc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fi]||(t[Fi]=!0,Kc("selectionchange",!1,t))}}function Qh(e,t,n,l){switch(Ny(t)){case 2:var r=u1;break;case 8:r=d1;break;default:r=fu}n=r.bind(null,t,n,e),r=void 0,!go||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),l?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function Wc(e,t,n,l,r){var s=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var m=l.tag;if(m===3||m===4){var v=l.stateNode.containerInfo;if(v===r)break;if(m===4)for(m=l.return;m!==null;){var E=m.tag;if((E===3||E===4)&&m.stateNode.containerInfo===r)return;m=m.return}for(;v!==null;){if(m=na(v),m===null)return;if(E=m.tag,E===5||E===6||E===26||E===27){l=s=m;continue e}v=v.parentNode}}l=l.return}ep(function(){var B=s,te=ho(n),oe=[];e:{var V=Cp.get(e);if(V!==void 0){var J=ni,we=e;switch(e){case"keypress":if(ei(n)===0)break e;case"keydown":case"keyup":J=_b;break;case"focusin":we="focus",J=So;break;case"focusout":we="blur",J=So;break;case"beforeblur":case"afterblur":J=So;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=lp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=gb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=Rb;break;case Np:case wp:case Tp:J=vb;break;case Ep:J=Mb;break;case"scroll":case"scrollend":J=hb;break;case"wheel":J=$b;break;case"copy":case"cut":case"paste":J=Ab;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=rp;break;case"toggle":case"beforetoggle":J=Ub}var ze=(t&4)!==0,ct=!ze&&(e==="scroll"||e==="scrollend"),z=ze?V!==null?V+"Capture":null:V;ze=[];for(var O=B,L;O!==null;){var re=O;if(L=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||L===null||z===null||(re=Qa(O,z),re!=null&&ze.push(Cr(O,re,L))),ct)break;O=O.return}0<ze.length&&(V=new J(V,we,null,n,te),oe.push({event:V,listeners:ze}))}}if((t&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",V&&n!==mo&&(we=n.relatedTarget||n.fromElement)&&(na(we)||we[ta]))break e;if((J||V)&&(V=te.window===te?te:(V=te.ownerDocument)?V.defaultView||V.parentWindow:window,J?(we=n.relatedTarget||n.toElement,J=B,we=we?na(we):null,we!==null&&(ct=p(we),ze=we.tag,we!==ct||ze!==5&&ze!==27&&ze!==6)&&(we=null)):(J=null,we=B),J!==we)){if(ze=lp,re="onMouseLeave",z="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(ze=rp,re="onPointerLeave",z="onPointerEnter",O="pointer"),ct=J==null?V:Za(J),L=we==null?V:Za(we),V=new ze(re,O+"leave",J,n,te),V.target=ct,V.relatedTarget=L,re=null,na(te)===B&&(ze=new ze(z,O+"enter",we,n,te),ze.target=L,ze.relatedTarget=ct,re=ze),ct=re,J&&we)t:{for(ze=Dv,z=J,O=we,L=0,re=z;re;re=ze(re))L++;re=0;for(var Me=O;Me;Me=ze(Me))re++;for(;0<L-re;)z=ze(z),L--;for(;0<re-L;)O=ze(O),re--;for(;L--;){if(z===O||O!==null&&z===O.alternate){ze=z;break t}z=ze(z),O=ze(O)}ze=null}else ze=null;J!==null&&Kh(oe,V,J,ze,!1),we!==null&&ct!==null&&Kh(oe,ct,we,ze,!0)}}e:{if(V=B?Za(B):window,J=V.nodeName&&V.nodeName.toLowerCase(),J==="select"||J==="input"&&V.type==="file")var tt=pp;else if(dp(V))if(mp)tt=Zb;else{tt=Vb;var Ce=Fb}else J=V.nodeName,!J||J.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?B&&po(B.elementType)&&(tt=pp):tt=Xb;if(tt&&(tt=tt(e,B))){fp(oe,tt,n,te);break e}Ce&&Ce(e,V,B),e==="focusout"&&B&&V.type==="number"&&B.memoizedProps.value!=null&&fo(V,"number",V.value)}switch(Ce=B?Za(B):window,e){case"focusin":(dp(Ce)||Ce.contentEditable==="true")&&(da=Ce,Eo=B,lr=null);break;case"focusout":lr=Eo=da=null;break;case"mousedown":Co=!0;break;case"contextmenu":case"mouseup":case"dragend":Co=!1,Ap(oe,n,te);break;case"selectionchange":if(Kb)break;case"keydown":case"keyup":Ap(oe,n,te)}var Ge;if(jo)e:{switch(e){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else ua?cp(e,n)&&(Ke="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ke="onCompositionStart");Ke&&(ip&&n.locale!=="ko"&&(ua||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&ua&&(Ge=tp()):(cl=te,xo="value"in cl?cl.value:cl.textContent,ua=!0)),Ce=Vi(B,Ke),0<Ce.length&&(Ke=new ap(Ke,e,null,n,te),oe.push({event:Ke,listeners:Ce}),Ge?Ke.data=Ge:(Ge=up(n),Ge!==null&&(Ke.data=Ge)))),(Ge=Lb?Bb(e,n):Yb(e,n))&&(Ke=Vi(B,"onBeforeInput"),0<Ke.length&&(Ce=new ap("onBeforeInput","beforeinput",null,n,te),oe.push({event:Ce,listeners:Ke}),Ce.data=Ge)),qv(oe,e,B,n,te)}Zh(oe,t)})}function Cr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vi(e,t){for(var n=t+"Capture",l=[];e!==null;){var r=e,s=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||s===null||(r=Qa(e,n),r!=null&&l.unshift(Cr(e,r,s)),r=Qa(e,t),r!=null&&l.push(Cr(e,r,s))),e.tag===3)return l;e=e.return}return[]}function Dv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Kh(e,t,n,l,r){for(var s=t._reactName,m=[];n!==null&&n!==l;){var v=n,E=v.alternate,B=v.stateNode;if(v=v.tag,E!==null&&E===l)break;v!==5&&v!==26&&v!==27||B===null||(E=B,r?(B=Qa(n,s),B!=null&&m.unshift(Cr(n,B,E))):r||(B=Qa(n,s),B!=null&&m.push(Cr(n,B,E)))),n=n.return}m.length!==0&&e.push({event:t,listeners:m})}var Uv=/\r\n?/g,Hv=/\u0000|\uFFFD/g;function Jh(e){return(typeof e=="string"?e:""+e).replace(Uv,`
9
- `).replace(Hv,"")}function Wh(e,t){return t=Jh(t),Jh(e)===t}function ot(e,t,n,l,r,s){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||sa(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&sa(e,""+l);break;case"className":Kr(e,"class",l);break;case"tabIndex":Kr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Kr(e,n,l);break;case"style":Wf(e,l,s);break;case"data":if(t!=="object"){Kr(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Wr(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"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 s=="function"&&(n==="formAction"?(t!=="input"&&ot(e,t,"name",r.name,r,null),ot(e,t,"formEncType",r.formEncType,r,null),ot(e,t,"formMethod",r.formMethod,r,null),ot(e,t,"formTarget",r.formTarget,r,null)):(ot(e,t,"encType",r.encType,r,null),ot(e,t,"method",r.method,r,null),ot(e,t,"target",r.target,r,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Wr(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Ln);break;case"onScroll":l!=null&&Ze("scroll",e);break;case"onScrollEnd":l!=null&&Ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=Wr(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":Ze("beforetoggle",e),Ze("toggle",e),Qr(e,"popover",l);break;case"xlinkActuate":Hn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Hn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Hn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Hn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Hn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Hn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Hn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Hn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Hn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Qr(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=pb.get(n)||n,Qr(e,n,l))}}function Pc(e,t,n,l,r,s){switch(n){case"style":Wf(e,l,s);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"children":typeof l=="string"?sa(e,l):(typeof l=="number"||typeof l=="bigint")&&sa(e,""+l);break;case"onScroll":l!=null&&Ze("scroll",e);break;case"onScrollEnd":l!=null&&Ze("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Ln);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gf.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),t=n.slice(2,r?n.length-7:void 0),s=e[Ft]||null,s=s!=null?s[n]:null,typeof s=="function"&&e.removeEventListener(t,s,r),typeof l=="function")){typeof s!="function"&&s!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,r);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):Qr(e,n,l)}}}function $t(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",e),Ze("load",e);var l=!1,r=!1,s;for(s in n)if(n.hasOwnProperty(s)){var m=n[s];if(m!=null)switch(s){case"src":l=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:ot(e,t,s,m,n,null)}}r&&ot(e,t,"srcSet",n.srcSet,n,null),l&&ot(e,t,"src",n.src,n,null);return;case"input":Ze("invalid",e);var v=s=m=r=null,E=null,B=null;for(l in n)if(n.hasOwnProperty(l)){var te=n[l];if(te!=null)switch(l){case"name":r=te;break;case"type":m=te;break;case"checked":E=te;break;case"defaultChecked":B=te;break;case"value":s=te;break;case"defaultValue":v=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(u(137,t));break;default:ot(e,t,l,te,n,null)}}Zf(e,s,v,E,B,m,r,!1);return;case"select":Ze("invalid",e),l=m=s=null;for(r in n)if(n.hasOwnProperty(r)&&(v=n[r],v!=null))switch(r){case"value":s=v;break;case"defaultValue":m=v;break;case"multiple":l=v;default:ot(e,t,r,v,n,null)}t=s,n=m,e.multiple=!!l,t!=null?ia(e,!!l,t,!1):n!=null&&ia(e,!!l,n,!0);return;case"textarea":Ze("invalid",e),s=r=l=null;for(m in n)if(n.hasOwnProperty(m)&&(v=n[m],v!=null))switch(m){case"value":l=v;break;case"defaultValue":r=v;break;case"children":s=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(u(91));break;default:ot(e,t,m,v,n,null)}Kf(e,l,r,s);return;case"option":for(E in n)n.hasOwnProperty(E)&&(l=n[E],l!=null)&&(E==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":ot(e,t,E,l,n,null));return;case"dialog":Ze("beforetoggle",e),Ze("toggle",e),Ze("cancel",e),Ze("close",e);break;case"iframe":case"object":Ze("load",e);break;case"video":case"audio":for(l=0;l<Er.length;l++)Ze(Er[l],e);break;case"image":Ze("error",e),Ze("load",e);break;case"details":Ze("toggle",e);break;case"embed":case"source":case"link":Ze("error",e),Ze("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(B in n)if(n.hasOwnProperty(B)&&(l=n[B],l!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:ot(e,t,B,l,n,null)}return;default:if(po(t)){for(te in n)n.hasOwnProperty(te)&&(l=n[te],l!==void 0&&Pc(e,t,te,l,n,void 0));return}}for(v in n)n.hasOwnProperty(v)&&(l=n[v],l!=null&&ot(e,t,v,l,n,null))}function Lv(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,s=null,m=null,v=null,E=null,B=null,te=null;for(J in n){var oe=n[J];if(n.hasOwnProperty(J)&&oe!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":E=oe;default:l.hasOwnProperty(J)||ot(e,t,J,null,l,oe)}}for(var V in l){var J=l[V];if(oe=n[V],l.hasOwnProperty(V)&&(J!=null||oe!=null))switch(V){case"type":s=J;break;case"name":r=J;break;case"checked":B=J;break;case"defaultChecked":te=J;break;case"value":m=J;break;case"defaultValue":v=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(u(137,t));break;default:J!==oe&&ot(e,t,V,J,l,oe)}}uo(e,m,v,E,B,te,s,r);return;case"select":J=m=v=V=null;for(s in n)if(E=n[s],n.hasOwnProperty(s)&&E!=null)switch(s){case"value":break;case"multiple":J=E;default:l.hasOwnProperty(s)||ot(e,t,s,null,l,E)}for(r in l)if(s=l[r],E=n[r],l.hasOwnProperty(r)&&(s!=null||E!=null))switch(r){case"value":V=s;break;case"defaultValue":v=s;break;case"multiple":m=s;default:s!==E&&ot(e,t,r,s,l,E)}t=v,n=m,l=J,V!=null?ia(e,!!n,V,!1):!!l!=!!n&&(t!=null?ia(e,!!n,t,!0):ia(e,!!n,n?[]:"",!1));return;case"textarea":J=V=null;for(v in n)if(r=n[v],n.hasOwnProperty(v)&&r!=null&&!l.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:ot(e,t,v,null,l,r)}for(m in l)if(r=l[m],s=n[m],l.hasOwnProperty(m)&&(r!=null||s!=null))switch(m){case"value":V=r;break;case"defaultValue":J=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(u(91));break;default:r!==s&&ot(e,t,m,r,l,s)}Qf(e,V,J);return;case"option":for(var we in n)V=n[we],n.hasOwnProperty(we)&&V!=null&&!l.hasOwnProperty(we)&&(we==="selected"?e.selected=!1:ot(e,t,we,null,l,V));for(E in l)V=l[E],J=n[E],l.hasOwnProperty(E)&&V!==J&&(V!=null||J!=null)&&(E==="selected"?e.selected=V&&typeof V!="function"&&typeof V!="symbol":ot(e,t,E,V,l,J));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 ze in n)V=n[ze],n.hasOwnProperty(ze)&&V!=null&&!l.hasOwnProperty(ze)&&ot(e,t,ze,null,l,V);for(B in l)if(V=l[B],J=n[B],l.hasOwnProperty(B)&&V!==J&&(V!=null||J!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(u(137,t));break;default:ot(e,t,B,V,l,J)}return;default:if(po(t)){for(var ct in n)V=n[ct],n.hasOwnProperty(ct)&&V!==void 0&&!l.hasOwnProperty(ct)&&Pc(e,t,ct,void 0,l,V);for(te in l)V=l[te],J=n[te],!l.hasOwnProperty(te)||V===J||V===void 0&&J===void 0||Pc(e,t,te,V,l,J);return}}for(var z in n)V=n[z],n.hasOwnProperty(z)&&V!=null&&!l.hasOwnProperty(z)&&ot(e,t,z,null,l,V);for(oe in l)V=l[oe],J=n[oe],!l.hasOwnProperty(oe)||V===J||V==null&&J==null||ot(e,t,oe,V,l,J)}function Ph(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Bv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var r=n[l],s=r.transferSize,m=r.initiatorType,v=r.duration;if(s&&v&&Ph(m)){for(m=0,v=r.responseEnd,l+=1;l<n.length;l++){var E=n[l],B=E.startTime;if(B>v)break;var te=E.transferSize,oe=E.initiatorType;te&&Ph(oe)&&(E=E.responseEnd,m+=te*(E<v?1:(v-B)/(E-B)))}if(--l,t+=8*(s+m)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var eu=null,tu=null;function Xi(e){return e.nodeType===9?e:e.ownerDocument}function ey(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 ty(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 nu(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 lu=null;function Yv(){var e=window.event;return e&&e.type==="popstate"?e===lu?!1:(lu=e,!0):(lu=null,!1)}var ny=typeof setTimeout=="function"?setTimeout:void 0,Gv=typeof clearTimeout=="function"?clearTimeout:void 0,ly=typeof Promise=="function"?Promise:void 0,Iv=typeof queueMicrotask=="function"?queueMicrotask:typeof ly<"u"?function(e){return ly.resolve(null).then(e).catch(Fv)}:ny;function Fv(e){setTimeout(function(){throw e})}function Tl(e){return e==="head"}function ay(e,t){var n=t,l=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(r),Ua(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")_r(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,_r(n);for(var s=n.firstChild;s;){var m=s.nextSibling,v=s.nodeName;s[Xa]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=m}}else n==="body"&&_r(e.ownerDocument.body);n=r}while(n);Ua(t)}function ry(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function au(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":au(n),oo(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Vv(e,t,n,l){for(;e.nodeType===1;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Xa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=vn(e.nextSibling),e===null)break}return null}function Xv(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=vn(e.nextSibling),e===null))return null;return e}function iy(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=vn(e.nextSibling),e===null))return null;return e}function ru(e){return e.data==="$?"||e.data==="$~"}function iu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Zv(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function vn(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 su=null;function sy(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return vn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function oy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function cy(e,t,n){switch(t=Xi(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function _r(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);oo(e)}var Sn=new Map,uy=new Set;function Zi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var nl=ne.d;ne.d={f:Qv,r:Kv,D:Jv,C:Wv,L:Pv,m:e1,X:n1,S:t1,M:l1};function Qv(){var e=nl.f(),t=Hi();return e||t}function Kv(e){var t=la(e);t!==null&&t.tag===5&&t.type==="form"?Em(t):nl.r(e)}var za=typeof document>"u"?null:document;function dy(e,t,n){var l=za;if(l&&typeof t=="string"&&t){var r=pn(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),uy.has(r)||(uy.add(r),e={rel:e,crossOrigin:n,href:t},l.querySelector(r)===null&&(t=l.createElement("link"),$t(t,"link",e),Ct(t),l.head.appendChild(t)))}}function Jv(e){nl.D(e),dy("dns-prefetch",e,null)}function Wv(e,t){nl.C(e,t),dy("preconnect",e,t)}function Pv(e,t,n){nl.L(e,t,n);var l=za;if(l&&e&&t){var r='link[rel="preload"][as="'+pn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+pn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+pn(n.imageSizes)+'"]')):r+='[href="'+pn(e)+'"]';var s=r;switch(t){case"style":s=$a(e);break;case"script":s=Da(e)}Sn.has(s)||(e=A({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Sn.set(s,e),l.querySelector(r)!==null||t==="style"&&l.querySelector(Or(s))||t==="script"&&l.querySelector(kr(s))||(t=l.createElement("link"),$t(t,"link",e),Ct(t),l.head.appendChild(t)))}}function e1(e,t){nl.m(e,t);var n=za;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+pn(l)+'"][href="'+pn(e)+'"]',s=r;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Da(e)}if(!Sn.has(s)&&(e=A({rel:"modulepreload",href:e},t),Sn.set(s,e),n.querySelector(r)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(kr(s)))return}l=n.createElement("link"),$t(l,"link",e),Ct(l),n.head.appendChild(l)}}}function t1(e,t,n){nl.S(e,t,n);var l=za;if(l&&e){var r=aa(l).hoistableStyles,s=$a(e);t=t||"default";var m=r.get(s);if(!m){var v={loading:0,preload:null};if(m=l.querySelector(Or(s)))v.loading=5;else{e=A({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Sn.get(s))&&ou(e,n);var E=m=l.createElement("link");Ct(E),$t(E,"link",e),E._p=new Promise(function(B,te){E.onload=B,E.onerror=te}),E.addEventListener("load",function(){v.loading|=1}),E.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Qi(m,t,l)}m={type:"stylesheet",instance:m,count:1,state:v},r.set(s,m)}}}function n1(e,t){nl.X(e,t);var n=za;if(n&&e){var l=aa(n).hoistableScripts,r=Da(e),s=l.get(r);s||(s=n.querySelector(kr(r)),s||(e=A({src:e,async:!0},t),(t=Sn.get(r))&&cu(e,t),s=n.createElement("script"),Ct(s),$t(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(r,s))}}function l1(e,t){nl.M(e,t);var n=za;if(n&&e){var l=aa(n).hoistableScripts,r=Da(e),s=l.get(r);s||(s=n.querySelector(kr(r)),s||(e=A({src:e,async:!0,type:"module"},t),(t=Sn.get(r))&&cu(e,t),s=n.createElement("script"),Ct(s),$t(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(r,s))}}function fy(e,t,n,l){var r=(r=Te.current)?Zi(r):null;if(!r)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=$a(n.href),n=aa(r).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=$a(n.href);var s=aa(r).hoistableStyles,m=s.get(e);if(m||(r=r.ownerDocument||r,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,m),(s=r.querySelector(Or(e)))&&!s._p&&(m.instance=s,m.state.loading=5),Sn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Sn.set(e,n),s||a1(r,e,n,m.state))),t&&l===null)throw Error(u(528,""));return m}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Da(n),n=aa(r).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function $a(e){return'href="'+pn(e)+'"'}function Or(e){return'link[rel="stylesheet"]['+e+"]"}function py(e){return A({},e,{"data-precedence":e.precedence,precedence:null})}function a1(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),$t(t,"link",n),Ct(t),e.head.appendChild(t))}function Da(e){return'[src="'+pn(e)+'"]'}function kr(e){return"script[async]"+e}function my(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+pn(n.href)+'"]');if(l)return t.instance=l,Ct(l),l;var r=A({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ct(l),$t(l,"style",r),Qi(l,n.precedence,e),t.instance=l;case"stylesheet":r=$a(n.href);var s=e.querySelector(Or(r));if(s)return t.state.loading|=4,t.instance=s,Ct(s),s;l=py(n),(r=Sn.get(r))&&ou(l,r),s=(e.ownerDocument||e).createElement("link"),Ct(s);var m=s;return m._p=new Promise(function(v,E){m.onload=v,m.onerror=E}),$t(s,"link",l),t.state.loading|=4,Qi(s,n.precedence,e),t.instance=s;case"script":return s=Da(n.src),(r=e.querySelector(kr(s)))?(t.instance=r,Ct(r),r):(l=n,(r=Sn.get(s))&&(l=A({},n),cu(l,r)),e=e.ownerDocument||e,r=e.createElement("script"),Ct(r),$t(r,"link",l),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Qi(l,n.precedence,e));return t.instance}function Qi(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=l.length?l[l.length-1]:null,s=r,m=0;m<l.length;m++){var v=l[m];if(v.dataset.precedence===t)s=v;else if(s!==r)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ou(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function cu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ki=null;function hy(e,t,n){if(Ki===null){var l=new Map,r=Ki=new Map;r.set(n,l)}else r=Ki,l=r.get(n),l||(l=new Map,r.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var s=n[r];if(!(s[Xa]||s[Rt]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var m=s.getAttribute(t)||"";m=e+m;var v=l.get(m);v?v.push(s):l.set(m,[s])}}return l}function yy(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function r1(e,t,n){if(n===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 gy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function i1(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var r=$a(l.href),s=t.querySelector(Or(r));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ji.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,Ct(s);return}s=t.ownerDocument||t,l=py(l),(r=Sn.get(r))&&ou(l,r),s=s.createElement("link"),Ct(s);var m=s;m._p=new Promise(function(v,E){m.onload=v,m.onerror=E}),$t(s,"link",l),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Ji.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var uu=0;function s1(e,t){return e.stylesheets&&e.count===0&&Pi(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&Pi(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&uu===0&&(uu=62500*Bv());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Pi(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>uu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(r)}}:null}function Ji(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Pi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Wi=null;function Pi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Wi=new Map,t.forEach(o1,e),Wi=null,Ji.call(e))}function o1(e,t){if(!(t.state.loading&4)){var n=Wi.get(e);if(n)var l=n.get(null);else{n=new Map,Wi.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<r.length;s++){var m=r[s];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(n.set(m.dataset.precedence,m),l=m)}l&&n.set(null,l)}r=t.instance,m=r.getAttribute("data-precedence"),s=n.get(m)||l,s===l&&n.set(null,r),n.set(m,r),this.count++,l=Ji.bind(this),r.addEventListener("load",l),r.addEventListener("error",l),s?s.parentNode.insertBefore(r,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Rr={$$typeof:N,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function c1(e,t,n,l,r,s,m,v,E){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=Un(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Un(0),this.hiddenUpdates=Un(null),this.identifierPrefix=l,this.onUncaughtError=r,this.onCaughtError=s,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function xy(e,t,n,l,r,s,m,v,E,B,te,oe){return e=new c1(e,t,n,m,E,B,te,oe,v),t=1,s===!0&&(t|=24),s=en(3,null,null,t),e.current=s,s.stateNode=e,t=Go(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:l,isDehydrated:n,cache:t},Xo(s),e}function by(e){return e?(e=ma,e):ma}function vy(e,t,n,l,r,s){r=by(r),l.context===null?l.context=r:l.pendingContext=r,l=hl(t),l.payload={element:n},s=s===void 0?null:s,s!==null&&(l.callback=s),n=yl(e,l,t),n!==null&&(Jt(n,e,t),ur(n,e,t))}function Sy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function du(e,t){Sy(e,t),(e=e.alternate)&&Sy(e,t)}function Ay(e){if(e.tag===13||e.tag===31){var t=Dl(e,67108864);t!==null&&Jt(t,e,67108864),du(e,67108864)}}function jy(e){if(e.tag===13||e.tag===31){var t=rn();t=ro(t);var n=Dl(e,t);n!==null&&Jt(n,e,t),du(e,t)}}var es=!0;function u1(e,t,n,l){var r=T.T;T.T=null;var s=ne.p;try{ne.p=2,fu(e,t,n,l)}finally{ne.p=s,T.T=r}}function d1(e,t,n,l){var r=T.T;T.T=null;var s=ne.p;try{ne.p=8,fu(e,t,n,l)}finally{ne.p=s,T.T=r}}function fu(e,t,n,l){if(es){var r=pu(l);if(r===null)Wc(e,t,l,ts,n),wy(e,l);else if(p1(r,e,t,n,l))l.stopPropagation();else if(wy(e,l),t&4&&-1<f1.indexOf(e)){for(;r!==null;){var s=la(r);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var m=Oe(s.pendingLanes);if(m!==0){var v=s;for(v.pendingLanes|=2,v.entangledLanes|=2;m;){var E=1<<31-F(m);v.entanglements[1]|=E,m&=~E}$n(s),(lt&6)===0&&(Di=_e()+500,Tr(0))}}break;case 31:case 13:v=Dl(s,2),v!==null&&Jt(v,s,2),Hi(),du(s,2)}if(s=pu(l),s===null&&Wc(e,t,l,ts,n),s===r)break;r=s}r!==null&&l.stopPropagation()}else Wc(e,t,l,null,n)}}function pu(e){return e=ho(e),mu(e)}var ts=null;function mu(e){if(ts=null,e=na(e),e!==null){var t=p(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=g(t),e!==null)return e;e=null}else if(n===31){if(e=y(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ts=e,null}function Ny(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(se()){case Ae:return 2;case De:return 8;case dn:case d:return 32;case q:return 268435456;default:return 32}default:return 32}}var hu=!1,El=null,Cl=null,_l=null,qr=new Map,Mr=new Map,Ol=[],f1="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 wy(e,t){switch(e){case"focusin":case"focusout":El=null;break;case"dragenter":case"dragleave":Cl=null;break;case"mouseover":case"mouseout":_l=null;break;case"pointerover":case"pointerout":qr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mr.delete(t.pointerId)}}function zr(e,t,n,l,r,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:s,targetContainers:[r]},t!==null&&(t=la(t),t!==null&&Ay(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function p1(e,t,n,l,r){switch(t){case"focusin":return El=zr(El,e,t,n,l,r),!0;case"dragenter":return Cl=zr(Cl,e,t,n,l,r),!0;case"mouseover":return _l=zr(_l,e,t,n,l,r),!0;case"pointerover":var s=r.pointerId;return qr.set(s,zr(qr.get(s)||null,e,t,n,l,r)),!0;case"gotpointercapture":return s=r.pointerId,Mr.set(s,zr(Mr.get(s)||null,e,t,n,l,r)),!0}return!1}function Ty(e){var t=na(e.target);if(t!==null){var n=p(t);if(n!==null){if(t=n.tag,t===13){if(t=g(n),t!==null){e.blockedOn=t,Lf(e.priority,function(){jy(n)});return}}else if(t===31){if(t=y(n),t!==null){e.blockedOn=t,Lf(e.priority,function(){jy(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ns(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pu(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);mo=l,n.target.dispatchEvent(l),mo=null}else return t=la(n),t!==null&&Ay(t),e.blockedOn=n,!1;t.shift()}return!0}function Ey(e,t,n){ns(e)&&n.delete(t)}function m1(){hu=!1,El!==null&&ns(El)&&(El=null),Cl!==null&&ns(Cl)&&(Cl=null),_l!==null&&ns(_l)&&(_l=null),qr.forEach(Ey),Mr.forEach(Ey)}function ls(e,t){e.blockedOn===t&&(e.blockedOn=null,hu||(hu=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,m1)))}var as=null;function Cy(e){as!==e&&(as=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){as===e&&(as=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],r=e[t+2];if(typeof l!="function"){if(mu(l||n)===null)continue;break}var s=la(n);s!==null&&(e.splice(t,3),t-=3,pc(s,{pending:!0,data:r,method:n.method,action:l},l,r))}}))}function Ua(e){function t(E){return ls(E,e)}El!==null&&ls(El,e),Cl!==null&&ls(Cl,e),_l!==null&&ls(_l,e),qr.forEach(t),Mr.forEach(t);for(var n=0;n<Ol.length;n++){var l=Ol[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ol.length&&(n=Ol[0],n.blockedOn===null);)Ty(n),n.blockedOn===null&&Ol.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var r=n[l],s=n[l+1],m=r[Ft]||null;if(typeof s=="function")m||Cy(n);else if(m){var v=null;if(s&&s.hasAttribute("formAction")){if(r=s,m=s[Ft]||null)v=m.formAction;else if(mu(r)!==null)continue}else v=m.action;typeof v=="function"?n[l+1]=v:(n.splice(l,3),l-=3),Cy(n)}}}function _y(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(m){return r=m})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function yu(e){this._internalRoot=e}rs.prototype.render=yu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,l=rn();vy(n,l,e,t,null,null)},rs.prototype.unmount=yu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vy(e.current,2,null,e,null,null),Hi(),t[ta]=null}};function rs(e){this._internalRoot=e}rs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ol.length&&t!==0&&t<Ol[n].priority;n++);Ol.splice(n,0,e),n===0&&Ty(e)}};var Oy=i.version;if(Oy!=="19.2.8")throw Error(u(527,Oy,"19.2.8"));ne.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=h(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var h1={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var is=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!is.isDisabled&&is.supportsFiber)try{Q=is.inject(h1),b=is}catch{}}return La.createRoot=function(e,t){if(!f(e))throw Error(u(299));var n=!1,l="",r=Dm,s=Um,m=Hm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(m=t.onRecoverableError)),t=xy(e,1,!1,null,null,n,l,null,r,s,m,_y),e[ta]=t.current,Jc(e),new yu(t)},La.hydrateRoot=function(e,t,n){if(!f(e))throw Error(u(299));var l=!1,r="",s=Dm,m=Um,v=Hm,E=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.formState!==void 0&&(E=n.formState)),t=xy(e,1,!0,t,n??null,l,r,E,s,m,v,_y),t.context=by(null),n=t.current,l=rn(),l=ro(l),r=hl(l),r.callback=null,yl(n,r,l),n=l,t.current.lanes=n,Nn(t,n),$n(t),e[ta]=t.current,Jc(e),new rs(t)},La.version="19.2.8",La}var Cu;function Ly(){if(Cu)return os.exports;Cu=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(),os.exports=Hy(),os.exports}var By=Ly(),le=fs();const ms=xu(le);const Yy=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gy=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,c,u)=>u?u.toUpperCase():c.toLowerCase()),_u=a=>{const i=Gy(a);return i.charAt(0).toUpperCase()+i.slice(1)},Ou=(...a)=>a.filter((i,c,u)=>!!i&&i.trim()!==""&&u.indexOf(i)===c).join(" ").trim(),Iy=a=>{for(const i in a)if(i.startsWith("aria-")||i==="role"||i==="title")return!0};var Fy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Vy=le.forwardRef(({color:a="currentColor",size:i=24,strokeWidth:c=2,absoluteStrokeWidth:u,className:f="",children:p,iconNode:g,...y},x)=>le.createElement("svg",{ref:x,...Fy,width:i,height:i,stroke:a,strokeWidth:u?Number(c)*24/Number(i):c,className:Ou("lucide",f),...!p&&!Iy(y)&&{"aria-hidden":"true"},...y},[...g.map(([h,S])=>le.createElement(h,S)),...Array.isArray(p)?p:[p]]));const et=(a,i)=>{const c=le.forwardRef(({className:u,...f},p)=>le.createElement(Vy,{ref:p,iconNode:i,className:Ou(`lucide-${Yy(_u(a))}`,`lucide-${a}`,u),...f}));return c.displayName=_u(a),c};const ku=et("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const Xy=et("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Ru=et("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const qu=et("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const $r=et("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Mu=et("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const Zy=et("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const hs=et("clock-3",[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const Qy=et("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ys=et("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const gs=et("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Ky=et("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const Jy=et("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);const Wy=et("library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);const xs=et("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const Py=et("lock-open",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);const eg=et("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const tg=et("menu",[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]]);const Jl=et("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);const Ba=et("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const ng=et("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const lg=et("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const zu=et("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const $u=et("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);const ag=et("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const rg=et("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);const ig=et("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const Du=et("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);const Cn=et("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const sg=et("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Uu=et("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);const Hu=et("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function og(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Ut={},Dr={},ll={},Lu;function Ya(){if(Lu)return ll;Lu=1;function a(g){return typeof g>"u"||g===null}function i(g){return typeof g=="object"&&g!==null}function c(g){return Array.isArray(g)?g:a(g)?[]:[g]}function u(g,y){if(y){const x=Object.keys(y);for(let h=0,S=x.length;h<S;h+=1){const A=x[h];g[A]=y[A]}}return g}function f(g,y){let x="";for(let h=0;h<y;h+=1)x+=g;return x}function p(g){return g===0&&Number.NEGATIVE_INFINITY===1/g}return ll.isNothing=a,ll.isObject=i,ll.toArray=c,ll.repeat=f,ll.isNegativeZero=p,ll.extend=u,ll}var bs,Bu;function Ga(){if(Bu)return bs;Bu=1;function a(c,u){let f="";const p=c.reason||"(unknown reason)";return c.mark?(c.mark.name&&(f+='in "'+c.mark.name+'" '),f+="("+(c.mark.line+1)+":"+(c.mark.column+1)+")",!u&&c.mark.snippet&&(f+=`
8
+ `+l.stack}}var He=Object.prototype.hasOwnProperty,Ft=a.unstable_scheduleCallback,Vt=a.unstable_cancelCallback,wn=a.unstable_shouldYield,Rn=a.unstable_requestPaint,Oe=a.unstable_now,it=a.unstable_getCurrentPriorityLevel,Rt=a.unstable_ImmediatePriority,Kt=a.unstable_UserBlockingPriority,Yt=a.unstable_NormalPriority,d=a.unstable_LowPriority,H=a.unstable_IdlePriority,te=a.log,le=a.unstable_setDisableYieldValue,Z=null,h=null;function A(e){if(typeof te=="function"&&le(e),h&&typeof h.setStrictMode=="function")try{h.setStrictMode(Z,e)}catch{}}var I=Math.clz32?Math.clz32:me,ue=Math.log,fe=Math.LN2;function me(e){return e>>>=0,e===0?32:31-(ue(e)/fe|0)|0}var ne=256,ye=262144,we=4194304;function Re(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 $e(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var i=0,c=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var j=l&134217727;return j!==0?(l=j&~c,l!==0?i=Re(l):(y&=j,y!==0?i=Re(y):n||(n=j&~e,n!==0&&(i=Re(n))))):(j=l&~c,j!==0?i=Re(j):y!==0?i=Re(y):n||(n=l&~e,n!==0&&(i=Re(n)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:i}function Ue(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fe(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 Tn(){var e=we;return we<<=1,(we&62914560)===0&&(we=4194304),e}function Un(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function En(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _b(e,t,n,l,i,c){var y=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var j=e.entanglements,k=e.expirationTimes,V=e.hiddenUpdates;for(n=y&~n;0<n;){var ae=31-I(n),ie=1<<ae;j[ae]=0,k[ae]=-1;var X=V[ae];if(X!==null)for(V[ae]=null,ae=0;ae<X.length;ae++){var Q=X[ae];Q!==null&&(Q.lane&=-536870913)}n&=~ie}l!==0&&Xf(e,l,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(y&~t))}function Xf(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-I(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Zf(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-I(n),i=1<<l;i&t|e[l]&t&&(e[l]|=t),n&=~i}}function Qf(e,t){var n=t&-t;return n=(n&42)!==0?1:yo(n),(n&(e.suspendedLanes|t))!==0?0:n}function yo(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 go(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Jf(){var e=ee.p;return e!==0?e:(e=window.event,e===void 0?32:Dy(e.type))}function Pf(e,t){var n=ee.p;try{return ee.p=e,t()}finally{ee.p=n}}var oa=Math.random().toString(36).slice(2),$t="__reactFiber$"+oa,Xt="__reactProps$"+oa,nl="__reactContainer$"+oa,xo="__reactEvents$"+oa,Ob="__reactListeners$"+oa,Rb="__reactHandles$"+oa,Wf="__reactResources$"+oa,Zl="__reactMarker$"+oa;function bo(e){delete e[$t],delete e[Xt],delete e[xo],delete e[Ob],delete e[Rb]}function al(e){var t=e[$t];if(t)return t;for(var n=e.parentNode;n;){if(t=n[nl]||n[$t]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vy(e);e!==null;){if(n=e[$t])return n;e=vy(e)}return t}e=n,n=e.parentNode}return null}function ll(e){if(e=e[$t]||e[nl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ql(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function rl(e){var t=e[Wf];return t||(t=e[Wf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Et(e){e[Zl]=!0}var ep=new Set,tp={};function Ma(e,t){il(e,t),il(e+"Capture",t)}function il(e,t){for(tp[e]=t,e=0;e<t.length;e++)ep.add(t[e])}var $b=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]*$"),np={},ap={};function Mb(e){return He.call(ap,e)?!0:He.call(np,e)?!1:$b.test(e)?ap[e]=!0:(np[e]=!0,!1)}function Pr(e,t,n){if(Mb(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Wr(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Hn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qb(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var i=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(y){n=""+y,c.call(this,y)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(y){n=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vo(e){if(!e._valueTracker){var t=lp(e)?"checked":"value";e._valueTracker=qb(e,t,""+e[t])}}function rp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=lp(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function ei(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 Db=/[\n"\\]/g;function hn(e){return e.replace(Db,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function So(e,t,n,l,i,c,y,j){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+mn(t)):e.value!==""+mn(t)&&(e.value=""+mn(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?jo(e,y,mn(t)):n!=null?jo(e,y,mn(n)):l!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?e.name=""+mn(j):e.removeAttribute("name")}function ip(e,t,n,l,i,c,y,j){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){vo(e);return}n=n!=null?""+mn(n):"",t=t!=null?""+mn(t):n,j||t===e.value||(e.value=t),e.defaultValue=t}l=l??i,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=j?e.checked:!!l,e.defaultChecked=!!l,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),vo(e)}function jo(e,t,n){t==="number"&&ei(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function sl(e,t,n,l){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&l&&(e[n].defaultSelected=!0)}else{for(n=""+mn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,l&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function sp(e,t,n){if(t!=null&&(t=""+mn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+mn(n):""}function op(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(u(92));if(Ne(l)){if(1<l.length)throw Error(u(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=mn(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),vo(e)}function ol(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zb=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 cp(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||zb.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function up(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var i in t)l=t[i],t.hasOwnProperty(i)&&n[i]!==l&&cp(e,i,l)}else for(var c in t)t.hasOwnProperty(c)&&cp(e,c,t[c])}function Ao(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 Ub=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"]]),Hb=/^[\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 ti(e){return Hb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ln(){}var No=null;function wo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cl=null,ul=null;function dp(e){var t=ll(e);if(t&&(e=t.stateNode)){var n=e[Xt]||null;e:switch(e=t.stateNode,t.type){case"input":if(So(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+hn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var i=l[Xt]||null;if(!i)throw Error(u(90));So(l,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&rp(l)}break e;case"textarea":sp(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&sl(e,!!n.multiple,t,!1)}}}var To=!1;function fp(e,t,n){if(To)return e(t,n);To=!0;try{var l=e(t);return l}finally{if(To=!1,(cl!==null||ul!==null)&&(Ii(),cl&&(t=cl,e=ul,ul=cl=null,dp(t),e)))for(t=0;t<e.length;t++)dp(e[t])}}function Jl(e,t){var n=e.stateNode;if(n===null)return null;var l=n[Xt]||null;if(l===null)return null;n=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var Bn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eo=!1;if(Bn)try{var Pl={};Object.defineProperty(Pl,"passive",{get:function(){Eo=!0}}),window.addEventListener("test",Pl,Pl),window.removeEventListener("test",Pl,Pl)}catch{Eo=!1}var ca=null,Co=null,ni=null;function pp(){if(ni)return ni;var e,t=Co,n=t.length,l,i="value"in ca?ca.value:ca.textContent,c=i.length;for(e=0;e<n&&t[e]===i[e];e++);var y=n-e;for(l=1;l<=y&&t[n-l]===i[c-l];l++);return ni=i.slice(e,1<l?1-l:void 0)}function ai(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 li(){return!0}function mp(){return!1}function Zt(e){function t(n,l,i,c,y){this._reactName=n,this._targetInst=i,this.type=l,this.nativeEvent=c,this.target=y,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(n=e[j],this[j]=n?n(c):c[j]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?li:mp,this.isPropagationStopped=mp,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=li)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=li)},persist:function(){},isPersistent:li}),t}var qa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ri=Zt(qa),Wl=S({},qa,{view:0,detail:0}),Lb=Zt(Wl),ko,_o,er,ii=S({},Wl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ro,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!==er&&(er&&e.type==="mousemove"?(ko=e.screenX-er.screenX,_o=e.screenY-er.screenY):_o=ko=0,er=e),ko)},movementY:function(e){return"movementY"in e?e.movementY:_o}}),hp=Zt(ii),Bb=S({},ii,{dataTransfer:0}),Ib=Zt(Bb),Yb=S({},Wl,{relatedTarget:0}),Oo=Zt(Yb),Gb=S({},qa,{animationName:0,elapsedTime:0,pseudoElement:0}),Fb=Zt(Gb),Vb=S({},qa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kb=Zt(Vb),Xb=S({},qa,{data:0}),yp=Zt(Xb),Zb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qb={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"},Jb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jb[e])?!!t[e]:!1}function Ro(){return Pb}var Wb=S({},Wl,{key:function(e){if(e.key){var t=Zb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ai(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Qb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ro,charCode:function(e){return e.type==="keypress"?ai(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ai(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ev=Zt(Wb),tv=S({},ii,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gp=Zt(tv),nv=S({},Wl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ro}),av=Zt(nv),lv=S({},qa,{propertyName:0,elapsedTime:0,pseudoElement:0}),rv=Zt(lv),iv=S({},ii,{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}),sv=Zt(iv),ov=S({},qa,{newState:0,oldState:0}),cv=Zt(ov),uv=[9,13,27,32],$o=Bn&&"CompositionEvent"in window,tr=null;Bn&&"documentMode"in document&&(tr=document.documentMode);var dv=Bn&&"TextEvent"in window&&!tr,xp=Bn&&(!$o||tr&&8<tr&&11>=tr),bp=" ",vp=!1;function Sp(e,t){switch(e){case"keyup":return uv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dl=!1;function fv(e,t){switch(e){case"compositionend":return jp(t);case"keypress":return t.which!==32?null:(vp=!0,bp);case"textInput":return e=t.data,e===bp&&vp?null:e;default:return null}}function pv(e,t){if(dl)return e==="compositionend"||!$o&&Sp(e,t)?(e=pp(),ni=Co=ca=null,dl=!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 xp&&t.locale!=="ko"?null:t.data;default:return null}}var mv={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 Ap(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mv[e.type]:t==="textarea"}function Np(e,t,n,l){cl?ul?ul.push(l):ul=[l]:cl=l,t=Zi(t,"onChange"),0<t.length&&(n=new ri("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var nr=null,ar=null;function hv(e){iy(e,0)}function si(e){var t=Ql(e);if(rp(t))return e}function wp(e,t){if(e==="change")return t}var Tp=!1;if(Bn){var Mo;if(Bn){var qo="oninput"in document;if(!qo){var Ep=document.createElement("div");Ep.setAttribute("oninput","return;"),qo=typeof Ep.oninput=="function"}Mo=qo}else Mo=!1;Tp=Mo&&(!document.documentMode||9<document.documentMode)}function Cp(){nr&&(nr.detachEvent("onpropertychange",kp),ar=nr=null)}function kp(e){if(e.propertyName==="value"&&si(ar)){var t=[];Np(t,ar,e,wo(e)),fp(hv,t)}}function yv(e,t,n){e==="focusin"?(Cp(),nr=t,ar=n,nr.attachEvent("onpropertychange",kp)):e==="focusout"&&Cp()}function gv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return si(ar)}function xv(e,t){if(e==="click")return si(t)}function bv(e,t){if(e==="input"||e==="change")return si(t)}function vv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var an=typeof Object.is=="function"?Object.is:vv;function lr(e,t){if(an(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var i=n[l];if(!He.call(t,i)||!an(e[i],t[i]))return!1}return!0}function _p(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Op(e,t){var n=_p(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_p(n)}}function Rp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $p(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ei(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ei(e.document)}return t}function Do(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 Sv=Bn&&"documentMode"in document&&11>=document.documentMode,fl=null,zo=null,rr=null,Uo=!1;function Mp(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Uo||fl==null||fl!==ei(l)||(l=fl,"selectionStart"in l&&Do(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),rr&&lr(rr,l)||(rr=l,l=Zi(zo,"onSelect"),0<l.length&&(t=new ri("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=fl)))}function Da(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var pl={animationend:Da("Animation","AnimationEnd"),animationiteration:Da("Animation","AnimationIteration"),animationstart:Da("Animation","AnimationStart"),transitionrun:Da("Transition","TransitionRun"),transitionstart:Da("Transition","TransitionStart"),transitioncancel:Da("Transition","TransitionCancel"),transitionend:Da("Transition","TransitionEnd")},Ho={},qp={};Bn&&(qp=document.createElement("div").style,"AnimationEvent"in window||(delete pl.animationend.animation,delete pl.animationiteration.animation,delete pl.animationstart.animation),"TransitionEvent"in window||delete pl.transitionend.transition);function za(e){if(Ho[e])return Ho[e];if(!pl[e])return e;var t=pl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qp)return Ho[e]=t[n];return e}var Dp=za("animationend"),zp=za("animationiteration"),Up=za("animationstart"),jv=za("transitionrun"),Av=za("transitionstart"),Nv=za("transitioncancel"),Hp=za("transitionend"),Lp=new Map,Lo="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(" ");Lo.push("scrollEnd");function Cn(e,t){Lp.set(e,t),Ma(t,[e])}var oi=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)},yn=[],ml=0,Bo=0;function ci(){for(var e=ml,t=Bo=ml=0;t<e;){var n=yn[t];yn[t++]=null;var l=yn[t];yn[t++]=null;var i=yn[t];yn[t++]=null;var c=yn[t];if(yn[t++]=null,l!==null&&i!==null){var y=l.pending;y===null?i.next=i:(i.next=y.next,y.next=i),l.pending=i}c!==0&&Bp(n,i,c)}}function ui(e,t,n,l){yn[ml++]=e,yn[ml++]=t,yn[ml++]=n,yn[ml++]=l,Bo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Io(e,t,n,l){return ui(e,t,n,l),di(e)}function Ua(e,t){return ui(e,null,null,t),di(e)}function Bp(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var i=!1,c=e.return;c!==null;)c.childLanes|=n,l=c.alternate,l!==null&&(l.childLanes|=n),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(i=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,i&&t!==null&&(i=31-I(n),e=c.hiddenUpdates,l=e[i],l===null?e[i]=[t]:l.push(t),t.lane=n|536870912),c):null}function di(e){if(50<Er)throw Er=0,Jc=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hl={};function wv(e,t,n,l){this.tag=e,this.key=n,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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,t,n,l){return new wv(e,t,n,l)}function Yo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function In(e,t){var n=e.alternate;return n===null?(n=ln(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ip(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function fi(e,t,n,l,i,c){var y=0;if(l=e,typeof e=="function")Yo(e)&&(y=1);else if(typeof e=="string")y=_1(e,n,de.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=ln(31,n,t,i),e.elementType=J,e.lanes=c,e;case z:return Ha(n.children,i,c,t);case M:y=8,i|=24;break;case B:return e=ln(12,n,t,i|2),e.elementType=B,e.lanes=c,e;case U:return e=ln(13,n,t,i),e.elementType=U,e.lanes=c,e;case Y:return e=ln(19,n,t,i),e.elementType=Y,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case E:y=10;break e;case T:y=9;break e;case w:y=11;break e;case $:y=14;break e;case q:y=16,l=null;break e}y=29,n=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=ln(y,n,t,i),t.elementType=e,t.type=l,t.lanes=c,t}function Ha(e,t,n,l){return e=ln(7,e,l,t),e.lanes=n,e}function Go(e,t,n){return e=ln(6,e,null,t),e.lanes=n,e}function Yp(e){var t=ln(18,null,null,0);return t.stateNode=e,t}function Fo(e,t,n){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Gp=new WeakMap;function gn(e,t){if(typeof e=="object"&&e!==null){var n=Gp.get(e);return n!==void 0?n:(t={value:e,source:t,stack:yt(t)},Gp.set(e,t),t)}return{value:e,source:t,stack:yt(t)}}var yl=[],gl=0,pi=null,ir=0,xn=[],bn=0,ua=null,$n=1,Mn="";function Yn(e,t){yl[gl++]=ir,yl[gl++]=pi,pi=e,ir=t}function Fp(e,t,n){xn[bn++]=$n,xn[bn++]=Mn,xn[bn++]=ua,ua=e;var l=$n;e=Mn;var i=32-I(l)-1;l&=~(1<<i),n+=1;var c=32-I(t)+i;if(30<c){var y=i-i%5;c=(l&(1<<y)-1).toString(32),l>>=y,i-=y,$n=1<<32-I(t)+i|n<<i|l,Mn=c+e}else $n=1<<c|n<<i|l,Mn=e}function Vo(e){e.return!==null&&(Yn(e,1),Fp(e,1,0))}function Ko(e){for(;e===pi;)pi=yl[--gl],yl[gl]=null,ir=yl[--gl],yl[gl]=null;for(;e===ua;)ua=xn[--bn],xn[bn]=null,Mn=xn[--bn],xn[bn]=null,$n=xn[--bn],xn[bn]=null}function Vp(e,t){xn[bn++]=$n,xn[bn++]=Mn,xn[bn++]=ua,$n=t.id,Mn=t.overflow,ua=e}var Mt=null,pt=null,We=!1,da=null,vn=!1,Xo=Error(u(519));function fa(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw sr(gn(t,e)),Xo}function Kp(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[$t]=e,t[Xt]=l,n){case"dialog":Ze("cancel",t),Ze("close",t);break;case"iframe":case"object":case"embed":Ze("load",t);break;case"video":case"audio":for(n=0;n<kr.length;n++)Ze(kr[n],t);break;case"source":Ze("error",t);break;case"img":case"image":case"link":Ze("error",t),Ze("load",t);break;case"details":Ze("toggle",t);break;case"input":Ze("invalid",t),ip(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ze("invalid",t);break;case"textarea":Ze("invalid",t),op(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||uy(t.textContent,n)?(l.popover!=null&&(Ze("beforetoggle",t),Ze("toggle",t)),l.onScroll!=null&&Ze("scroll",t),l.onScrollEnd!=null&&Ze("scrollend",t),l.onClick!=null&&(t.onclick=Ln),t=!0):t=!1,t||fa(e,!0)}function Xp(e){for(Mt=e.return;Mt;)switch(Mt.tag){case 5:case 31:case 13:vn=!1;return;case 27:case 3:vn=!0;return;default:Mt=Mt.return}}function xl(e){if(e!==Mt)return!1;if(!We)return Xp(e),We=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||fu(e.type,e.memoizedProps)),n=!n),n&&pt&&fa(e),Xp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));pt=by(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));pt=by(e)}else t===27?(t=pt,Ta(e.type)?(e=gu,gu=null,pt=e):pt=t):pt=Mt?jn(e.stateNode.nextSibling):null;return!0}function La(){pt=Mt=null,We=!1}function Zo(){var e=da;return e!==null&&(Wt===null?Wt=e:Wt.push.apply(Wt,e),da=null),e}function sr(e){da===null?da=[e]:da.push(e)}var Qo=C(null),Ba=null,Gn=null;function pa(e,t,n){pe(Qo,t._currentValue),t._currentValue=n}function Fn(e){e._currentValue=Qo.current,G(Qo)}function Jo(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Po(e,t,n,l){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var y=i.child;c=c.firstContext;e:for(;c!==null;){var j=c;c=i;for(var k=0;k<t.length;k++)if(j.context===t[k]){c.lanes|=n,j=c.alternate,j!==null&&(j.lanes|=n),Jo(c.return,n,e),l||(y=null);break e}c=j.next}}else if(i.tag===18){if(y=i.return,y===null)throw Error(u(341));y.lanes|=n,c=y.alternate,c!==null&&(c.lanes|=n),Jo(y,n,e),y=null}else y=i.child;if(y!==null)y.return=i;else for(y=i;y!==null;){if(y===e){y=null;break}if(i=y.sibling,i!==null){i.return=y.return,y=i;break}y=y.return}i=y}}function bl(e,t,n,l){e=null;for(var i=t,c=!1;i!==null;){if(!c){if((i.flags&524288)!==0)c=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var y=i.alternate;if(y===null)throw Error(u(387));if(y=y.memoizedProps,y!==null){var j=i.type;an(i.pendingProps.value,y.value)||(e!==null?e.push(j):e=[j])}}else if(i===ce.current){if(y=i.alternate,y===null)throw Error(u(387));y.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Mr):e=[Mr])}i=i.return}e!==null&&Po(t,e,n,l),t.flags|=262144}function mi(e){for(e=e.firstContext;e!==null;){if(!an(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ia(e){Ba=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return Zp(Ba,e)}function hi(e,t){return Ba===null&&Ia(e),Zp(e,t)}function Zp(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Gn===null){if(e===null)throw Error(u(308));Gn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gn=Gn.next=t;return n}var Tv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Ev=a.unstable_scheduleCallback,Cv=a.unstable_NormalPriority,St={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wo(){return{controller:new Tv,data:new Map,refCount:0}}function or(e){e.refCount--,e.refCount===0&&Ev(Cv,function(){e.controller.abort()})}var cr=null,ec=0,vl=0,Sl=null;function kv(e,t){if(cr===null){var n=cr=[];ec=0,vl=au(),Sl={status:"pending",value:void 0,then:function(l){n.push(l)}}}return ec++,t.then(Qp,Qp),t}function Qp(){if(--ec===0&&cr!==null){Sl!==null&&(Sl.status="fulfilled");var e=cr;cr=null,vl=0,Sl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function _v(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(l.status="rejected",l.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),l}var Jp=O.S;O.S=function(e,t){Mh=Oe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&kv(e,t),Jp!==null&&Jp(e,t)};var Ya=C(null);function tc(){var e=Ya.current;return e!==null?e:ft.pooledCache}function yi(e,t){t===null?pe(Ya,Ya.current):pe(Ya,t.pool)}function Pp(){var e=tc();return e===null?null:{parent:St._currentValue,pool:e}}var jl=Error(u(460)),nc=Error(u(474)),gi=Error(u(542)),xi={then:function(){}};function Wp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function em(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ln,Ln),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,nm(e),e;default:if(typeof t.status=="string")t.then(Ln,Ln);else{if(e=ft,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=l}},function(l){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,nm(e),e}throw Fa=t,jl}}function Ga(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Fa=n,jl):n}}var Fa=null;function tm(){if(Fa===null)throw Error(u(459));var e=Fa;return Fa=null,e}function nm(e){if(e===jl||e===gi)throw Error(u(483))}var Al=null,ur=0;function bi(e){var t=ur;return ur+=1,Al===null&&(Al=[]),em(Al,e,t)}function dr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function vi(e,t){throw t.$$typeof===N?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function am(e){function t(L,D){if(e){var F=L.deletions;F===null?(L.deletions=[D],L.flags|=16):F.push(D)}}function n(L,D){if(!e)return null;for(;D!==null;)t(L,D),D=D.sibling;return null}function l(L){for(var D=new Map;L!==null;)L.key!==null?D.set(L.key,L):D.set(L.index,L),L=L.sibling;return D}function i(L,D){return L=In(L,D),L.index=0,L.sibling=null,L}function c(L,D,F){return L.index=F,e?(F=L.alternate,F!==null?(F=F.index,F<D?(L.flags|=67108866,D):F):(L.flags|=67108866,D)):(L.flags|=1048576,D)}function y(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function j(L,D,F,re){return D===null||D.tag!==6?(D=Go(F,L.mode,re),D.return=L,D):(D=i(D,F),D.return=L,D)}function k(L,D,F,re){var Me=F.type;return Me===z?ae(L,D,F.props.children,re,F.key):D!==null&&(D.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===q&&Ga(Me)===D.type)?(D=i(D,F.props),dr(D,F),D.return=L,D):(D=fi(F.type,F.key,F.props,null,L.mode,re),dr(D,F),D.return=L,D)}function V(L,D,F,re){return D===null||D.tag!==4||D.stateNode.containerInfo!==F.containerInfo||D.stateNode.implementation!==F.implementation?(D=Fo(F,L.mode,re),D.return=L,D):(D=i(D,F.children||[]),D.return=L,D)}function ae(L,D,F,re,Me){return D===null||D.tag!==7?(D=Ha(F,L.mode,re,Me),D.return=L,D):(D=i(D,F),D.return=L,D)}function ie(L,D,F){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=Go(""+D,L.mode,F),D.return=L,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case _:return F=fi(D.type,D.key,D.props,null,L.mode,F),dr(F,D),F.return=L,F;case R:return D=Fo(D,L.mode,F),D.return=L,D;case q:return D=Ga(D),ie(L,D,F)}if(Ne(D)||se(D))return D=Ha(D,L.mode,F,null),D.return=L,D;if(typeof D.then=="function")return ie(L,bi(D),F);if(D.$$typeof===E)return ie(L,hi(L,D),F);vi(L,D)}return null}function X(L,D,F,re){var Me=D!==null?D.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return Me!==null?null:j(L,D,""+F,re);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case _:return F.key===Me?k(L,D,F,re):null;case R:return F.key===Me?V(L,D,F,re):null;case q:return F=Ga(F),X(L,D,F,re)}if(Ne(F)||se(F))return Me!==null?null:ae(L,D,F,re,null);if(typeof F.then=="function")return X(L,D,bi(F),re);if(F.$$typeof===E)return X(L,D,hi(L,F),re);vi(L,F)}return null}function Q(L,D,F,re,Me){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return L=L.get(F)||null,j(D,L,""+re,Me);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case _:return L=L.get(re.key===null?F:re.key)||null,k(D,L,re,Me);case R:return L=L.get(re.key===null?F:re.key)||null,V(D,L,re,Me);case q:return re=Ga(re),Q(L,D,F,re,Me)}if(Ne(re)||se(re))return L=L.get(F)||null,ae(D,L,re,Me,null);if(typeof re.then=="function")return Q(L,D,F,bi(re),Me);if(re.$$typeof===E)return Q(L,D,F,hi(D,re),Me);vi(D,re)}return null}function Te(L,D,F,re){for(var Me=null,tt=null,_e=D,Ve=D=0,Je=null;_e!==null&&Ve<F.length;Ve++){_e.index>Ve?(Je=_e,_e=null):Je=_e.sibling;var nt=X(L,_e,F[Ve],re);if(nt===null){_e===null&&(_e=Je);break}e&&_e&&nt.alternate===null&&t(L,_e),D=c(nt,D,Ve),tt===null?Me=nt:tt.sibling=nt,tt=nt,_e=Je}if(Ve===F.length)return n(L,_e),We&&Yn(L,Ve),Me;if(_e===null){for(;Ve<F.length;Ve++)_e=ie(L,F[Ve],re),_e!==null&&(D=c(_e,D,Ve),tt===null?Me=_e:tt.sibling=_e,tt=_e);return We&&Yn(L,Ve),Me}for(_e=l(_e);Ve<F.length;Ve++)Je=Q(_e,L,Ve,F[Ve],re),Je!==null&&(e&&Je.alternate!==null&&_e.delete(Je.key===null?Ve:Je.key),D=c(Je,D,Ve),tt===null?Me=Je:tt.sibling=Je,tt=Je);return e&&_e.forEach(function(Oa){return t(L,Oa)}),We&&Yn(L,Ve),Me}function De(L,D,F,re){if(F==null)throw Error(u(151));for(var Me=null,tt=null,_e=D,Ve=D=0,Je=null,nt=F.next();_e!==null&&!nt.done;Ve++,nt=F.next()){_e.index>Ve?(Je=_e,_e=null):Je=_e.sibling;var Oa=X(L,_e,nt.value,re);if(Oa===null){_e===null&&(_e=Je);break}e&&_e&&Oa.alternate===null&&t(L,_e),D=c(Oa,D,Ve),tt===null?Me=Oa:tt.sibling=Oa,tt=Oa,_e=Je}if(nt.done)return n(L,_e),We&&Yn(L,Ve),Me;if(_e===null){for(;!nt.done;Ve++,nt=F.next())nt=ie(L,nt.value,re),nt!==null&&(D=c(nt,D,Ve),tt===null?Me=nt:tt.sibling=nt,tt=nt);return We&&Yn(L,Ve),Me}for(_e=l(_e);!nt.done;Ve++,nt=F.next())nt=Q(_e,L,Ve,nt.value,re),nt!==null&&(e&&nt.alternate!==null&&_e.delete(nt.key===null?Ve:nt.key),D=c(nt,D,Ve),tt===null?Me=nt:tt.sibling=nt,tt=nt);return e&&_e.forEach(function(B1){return t(L,B1)}),We&&Yn(L,Ve),Me}function dt(L,D,F,re){if(typeof F=="object"&&F!==null&&F.type===z&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case _:e:{for(var Me=F.key;D!==null;){if(D.key===Me){if(Me=F.type,Me===z){if(D.tag===7){n(L,D.sibling),re=i(D,F.props.children),re.return=L,L=re;break e}}else if(D.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===q&&Ga(Me)===D.type){n(L,D.sibling),re=i(D,F.props),dr(re,F),re.return=L,L=re;break e}n(L,D);break}else t(L,D);D=D.sibling}F.type===z?(re=Ha(F.props.children,L.mode,re,F.key),re.return=L,L=re):(re=fi(F.type,F.key,F.props,null,L.mode,re),dr(re,F),re.return=L,L=re)}return y(L);case R:e:{for(Me=F.key;D!==null;){if(D.key===Me)if(D.tag===4&&D.stateNode.containerInfo===F.containerInfo&&D.stateNode.implementation===F.implementation){n(L,D.sibling),re=i(D,F.children||[]),re.return=L,L=re;break e}else{n(L,D);break}else t(L,D);D=D.sibling}re=Fo(F,L.mode,re),re.return=L,L=re}return y(L);case q:return F=Ga(F),dt(L,D,F,re)}if(Ne(F))return Te(L,D,F,re);if(se(F)){if(Me=se(F),typeof Me!="function")throw Error(u(150));return F=Me.call(F),De(L,D,F,re)}if(typeof F.then=="function")return dt(L,D,bi(F),re);if(F.$$typeof===E)return dt(L,D,hi(L,F),re);vi(L,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,D!==null&&D.tag===6?(n(L,D.sibling),re=i(D,F),re.return=L,L=re):(n(L,D),re=Go(F,L.mode,re),re.return=L,L=re),y(L)):n(L,D)}return function(L,D,F,re){try{ur=0;var Me=dt(L,D,F,re);return Al=null,Me}catch(_e){if(_e===jl||_e===gi)throw _e;var tt=ln(29,_e,null,L.mode);return tt.lanes=re,tt.return=L,tt}}}var Va=am(!0),lm=am(!1),ma=!1;function ac(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lc(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 ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ya(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(lt&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,t=di(e),Bp(e,null,n),t}return ui(e,l,t,n),di(e)}function fr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Zf(e,n)}}function rc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var i=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var y={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?i=c=y:c=c.next=y,n=n.next}while(n!==null);c===null?i=c=t:c=c.next=t}else i=c=t;n={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ic=!1;function pr(){if(ic){var e=Sl;if(e!==null)throw e}}function mr(e,t,n,l){ic=!1;var i=e.updateQueue;ma=!1;var c=i.firstBaseUpdate,y=i.lastBaseUpdate,j=i.shared.pending;if(j!==null){i.shared.pending=null;var k=j,V=k.next;k.next=null,y===null?c=V:y.next=V,y=k;var ae=e.alternate;ae!==null&&(ae=ae.updateQueue,j=ae.lastBaseUpdate,j!==y&&(j===null?ae.firstBaseUpdate=V:j.next=V,ae.lastBaseUpdate=k))}if(c!==null){var ie=i.baseState;y=0,ae=V=k=null,j=c;do{var X=j.lane&-536870913,Q=X!==j.lane;if(Q?(Qe&X)===X:(l&X)===X){X!==0&&X===vl&&(ic=!0),ae!==null&&(ae=ae.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var Te=e,De=j;X=t;var dt=n;switch(De.tag){case 1:if(Te=De.payload,typeof Te=="function"){ie=Te.call(dt,ie,X);break e}ie=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=De.payload,X=typeof Te=="function"?Te.call(dt,ie,X):Te,X==null)break e;ie=S({},ie,X);break e;case 2:ma=!0}}X=j.callback,X!==null&&(e.flags|=64,Q&&(e.flags|=8192),Q=i.callbacks,Q===null?i.callbacks=[X]:Q.push(X))}else Q={lane:X,tag:j.tag,payload:j.payload,callback:j.callback,next:null},ae===null?(V=ae=Q,k=ie):ae=ae.next=Q,y|=X;if(j=j.next,j===null){if(j=i.shared.pending,j===null)break;Q=j,j=Q.next,Q.next=null,i.lastBaseUpdate=Q,i.shared.pending=null}}while(!0);ae===null&&(k=ie),i.baseState=k,i.firstBaseUpdate=V,i.lastBaseUpdate=ae,c===null&&(i.shared.lanes=0),Sa|=y,e.lanes=y,e.memoizedState=ie}}function rm(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function im(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)rm(n[e],t)}var Nl=C(null),Si=C(0);function sm(e,t){e=ea,pe(Si,e),pe(Nl,t),ea=e|t.baseLanes}function sc(){pe(Si,ea),pe(Nl,Nl.current)}function oc(){ea=Si.current,G(Nl),G(Si)}var rn=C(null),Sn=null;function ga(e){var t=e.alternate;pe(bt,bt.current&1),pe(rn,e),Sn===null&&(t===null||Nl.current!==null||t.memoizedState!==null)&&(Sn=e)}function cc(e){pe(bt,bt.current),pe(rn,e),Sn===null&&(Sn=e)}function om(e){e.tag===22?(pe(bt,bt.current),pe(rn,e),Sn===null&&(Sn=e)):xa()}function xa(){pe(bt,bt.current),pe(rn,rn.current)}function sn(e){G(rn),Sn===e&&(Sn=null),G(bt)}var bt=C(0);function ji(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||hu(n)||yu(n)))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 Vn=0,Ge=null,ct=null,jt=null,Ai=!1,wl=!1,Ka=!1,Ni=0,hr=0,Tl=null,Ov=0;function gt(){throw Error(u(321))}function uc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!an(e[n],t[n]))return!1;return!0}function dc(e,t,n,l,i,c){return Vn=c,Ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?Fm:Tc,Ka=!1,c=n(l,i),Ka=!1,wl&&(c=um(t,n,l,i)),cm(e),c}function cm(e){O.H=xr;var t=ct!==null&&ct.next!==null;if(Vn=0,jt=ct=Ge=null,Ai=!1,hr=0,Tl=null,t)throw Error(u(300));e===null||At||(e=e.dependencies,e!==null&&mi(e)&&(At=!0))}function um(e,t,n,l){Ge=e;var i=0;do{if(wl&&(Tl=null),hr=0,wl=!1,25<=i)throw Error(u(301));if(i+=1,jt=ct=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}O.H=Vm,c=t(n,l)}while(wl);return c}function Rv(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?yr(t):t,e=e.useState()[0],(ct!==null?ct.memoizedState:null)!==e&&(Ge.flags|=1024),t}function fc(){var e=Ni!==0;return Ni=0,e}function pc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function mc(e){if(Ai){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ai=!1}Vn=0,jt=ct=Ge=null,wl=!1,hr=Ni=0,Tl=null}function Gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Ge.memoizedState=jt=e:jt=jt.next=e,jt}function vt(){if(ct===null){var e=Ge.alternate;e=e!==null?e.memoizedState:null}else e=ct.next;var t=jt===null?Ge.memoizedState:jt.next;if(t!==null)jt=t,ct=e;else{if(e===null)throw Ge.alternate===null?Error(u(467)):Error(u(310));ct=e,e={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},jt===null?Ge.memoizedState=jt=e:jt=jt.next=e}return jt}function wi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yr(e){var t=hr;return hr+=1,Tl===null&&(Tl=[]),e=em(Tl,e,t),t=Ge,(jt===null?t.memoizedState:jt.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?Fm:Tc),e}function Ti(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yr(e);if(e.$$typeof===E)return qt(e)}throw Error(u(438,String(e)))}function hc(e){var t=null,n=Ge.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=Ge.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=wi(),Ge.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=Se;return t.index++,n}function Kn(e,t){return typeof t=="function"?t(e):t}function Ei(e){var t=vt();return yc(t,ct,e)}function yc(e,t,n){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=n;var i=e.baseQueue,c=l.pending;if(c!==null){if(i!==null){var y=i.next;i.next=c.next,c.next=y}t.baseQueue=i=c,l.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var j=y=null,k=null,V=t,ae=!1;do{var ie=V.lane&-536870913;if(ie!==V.lane?(Qe&ie)===ie:(Vn&ie)===ie){var X=V.revertLane;if(X===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),ie===vl&&(ae=!0);else if((Vn&X)===X){V=V.next,X===vl&&(ae=!0);continue}else ie={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},k===null?(j=k=ie,y=c):k=k.next=ie,Ge.lanes|=X,Sa|=X;ie=V.action,Ka&&n(c,ie),c=V.hasEagerState?V.eagerState:n(c,ie)}else X={lane:ie,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},k===null?(j=k=X,y=c):k=k.next=X,Ge.lanes|=ie,Sa|=ie;V=V.next}while(V!==null&&V!==t);if(k===null?y=c:k.next=j,!an(c,e.memoizedState)&&(At=!0,ae&&(n=Sl,n!==null)))throw n;e.memoizedState=c,e.baseState=y,e.baseQueue=k,l.lastRenderedState=c}return i===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function gc(e){var t=vt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var l=n.dispatch,i=n.pending,c=t.memoizedState;if(i!==null){n.pending=null;var y=i=i.next;do c=e(c,y.action),y=y.next;while(y!==i);an(c,t.memoizedState)||(At=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,l]}function dm(e,t,n){var l=Ge,i=vt(),c=We;if(c){if(n===void 0)throw Error(u(407));n=n()}else n=t();var y=!an((ct||i).memoizedState,n);if(y&&(i.memoizedState=n,At=!0),i=i.queue,vc(mm.bind(null,l,i,e),[e]),i.getSnapshot!==t||y||jt!==null&&jt.memoizedState.tag&1){if(l.flags|=2048,El(9,{destroy:void 0},pm.bind(null,l,i,n,t),null),ft===null)throw Error(u(349));c||(Vn&127)!==0||fm(l,t,n)}return n}function fm(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ge.updateQueue,t===null?(t=wi(),Ge.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function pm(e,t,n,l){t.value=n,t.getSnapshot=l,hm(t)&&ym(e)}function mm(e,t,n){return n(function(){hm(t)&&ym(e)})}function hm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!an(e,n)}catch{return!0}}function ym(e){var t=Ua(e,2);t!==null&&en(t,e,2)}function xc(e){var t=Gt();if(typeof e=="function"){var n=e;if(e=n(),Ka){A(!0);try{n()}finally{A(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:e},t}function gm(e,t,n,l){return e.baseState=n,yc(e,ct,typeof l=="function"?l:Kn)}function $v(e,t,n,l,i){if(_i(e))throw Error(u(485));if(e=t.action,e!==null){var c={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){c.listeners.push(y)}};O.T!==null?n(!0):c.isTransition=!1,l(c),n=t.pending,n===null?(c.next=t.pending=c,xm(t,c)):(c.next=n.next,t.pending=n.next=c)}}function xm(e,t){var n=t.action,l=t.payload,i=e.state;if(t.isTransition){var c=O.T,y={};O.T=y;try{var j=n(i,l),k=O.S;k!==null&&k(y,j),bm(e,t,j)}catch(V){bc(e,t,V)}finally{c!==null&&y.types!==null&&(c.types=y.types),O.T=c}}else try{c=n(i,l),bm(e,t,c)}catch(V){bc(e,t,V)}}function bm(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){vm(e,t,l)},function(l){return bc(e,t,l)}):vm(e,t,n)}function vm(e,t,n){t.status="fulfilled",t.value=n,Sm(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,xm(e,n)))}function bc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,Sm(t),t=t.next;while(t!==l)}e.action=null}function Sm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function jm(e,t){return t}function Am(e,t){if(We){var n=ft.formState;if(n!==null){e:{var l=Ge;if(We){if(pt){t:{for(var i=pt,c=vn;i.nodeType!==8;){if(!c){i=null;break t}if(i=jn(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){pt=jn(i.nextSibling),l=i.data==="F!";break e}}fa(l)}l=!1}l&&(t=n[0])}}return n=Gt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jm,lastRenderedState:t},n.queue=l,n=Im.bind(null,Ge,l),l.dispatch=n,l=xc(!1),c=wc.bind(null,Ge,!1,l.queue),l=Gt(),i={state:t,dispatch:null,action:e,pending:null},l.queue=i,n=$v.bind(null,Ge,i,c,n),i.dispatch=n,l.memoizedState=e,[t,n,!1]}function Nm(e){var t=vt();return wm(t,ct,e)}function wm(e,t,n){if(t=yc(e,t,jm)[0],e=Ei(Kn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=yr(t)}catch(y){throw y===jl?gi:y}else l=t;t=vt();var i=t.queue,c=i.dispatch;return n!==t.memoizedState&&(Ge.flags|=2048,El(9,{destroy:void 0},Mv.bind(null,i,n),null)),[l,c,e]}function Mv(e,t){e.action=t}function Tm(e){var t=vt(),n=ct;if(n!==null)return wm(t,n,e);vt(),t=t.memoizedState,n=vt();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function El(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=Ge.updateQueue,t===null&&(t=wi(),Ge.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Em(){return vt().memoizedState}function Ci(e,t,n,l){var i=Gt();Ge.flags|=e,i.memoizedState=El(1|t,{destroy:void 0},n,l===void 0?null:l)}function ki(e,t,n,l){var i=vt();l=l===void 0?null:l;var c=i.memoizedState.inst;ct!==null&&l!==null&&uc(l,ct.memoizedState.deps)?i.memoizedState=El(t,c,n,l):(Ge.flags|=e,i.memoizedState=El(1|t,c,n,l))}function Cm(e,t){Ci(8390656,8,e,t)}function vc(e,t){ki(2048,8,e,t)}function qv(e){Ge.flags|=4;var t=Ge.updateQueue;if(t===null)t=wi(),Ge.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function km(e){var t=vt().memoizedState;return qv({ref:t,nextImpl:e}),function(){if((lt&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function _m(e,t){return ki(4,2,e,t)}function Om(e,t){return ki(4,4,e,t)}function Rm(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function $m(e,t,n){n=n!=null?n.concat([e]):null,ki(4,4,Rm.bind(null,t,e),n)}function Sc(){}function Mm(e,t){var n=vt();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&uc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function qm(e,t){var n=vt();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&uc(t,l[1]))return l[0];if(l=e(),Ka){A(!0);try{e()}finally{A(!1)}}return n.memoizedState=[l,t],l}function jc(e,t,n){return n===void 0||(Vn&1073741824)!==0&&(Qe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Dh(),Ge.lanes|=e,Sa|=e,n)}function Dm(e,t,n,l){return an(n,t)?n:Nl.current!==null?(e=jc(e,n,l),an(e,t)||(At=!0),e):(Vn&42)===0||(Vn&1073741824)!==0&&(Qe&261930)===0?(At=!0,e.memoizedState=n):(e=Dh(),Ge.lanes|=e,Sa|=e,t)}function zm(e,t,n,l,i){var c=ee.p;ee.p=c!==0&&8>c?c:8;var y=O.T,j={};O.T=j,wc(e,!1,t,n);try{var k=i(),V=O.S;if(V!==null&&V(j,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var ae=_v(k,l);gr(e,t,ae,un(e))}else gr(e,t,l,un(e))}catch(ie){gr(e,t,{then:function(){},status:"rejected",reason:ie},un())}finally{ee.p=c,y!==null&&j.types!==null&&(y.types=j.types),O.T=y}}function Dv(){}function Ac(e,t,n,l){if(e.tag!==5)throw Error(u(476));var i=Um(e).queue;zm(e,i,t,oe,n===null?Dv:function(){return Hm(e),n(l)})}function Um(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:Kn,lastRenderedState:oe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hm(e){var t=Um(e);t.next===null&&(t=e.alternate.memoizedState),gr(e,t.next.queue,{},un())}function Nc(){return qt(Mr)}function Lm(){return vt().memoizedState}function Bm(){return vt().memoizedState}function zv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=un();e=ha(n);var l=ya(t,e,n);l!==null&&(en(l,t,n),fr(l,t,n)),t={cache:Wo()},e.payload=t;return}t=t.return}}function Uv(e,t,n){var l=un();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},_i(e)?Ym(t,n):(n=Io(e,t,n,l),n!==null&&(en(n,e,l),Gm(n,t,l)))}function Im(e,t,n){var l=un();gr(e,t,n,l)}function gr(e,t,n,l){var i={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(_i(e))Ym(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var y=t.lastRenderedState,j=c(y,n);if(i.hasEagerState=!0,i.eagerState=j,an(j,y))return ui(e,t,i,0),ft===null&&ci(),!1}catch{}if(n=Io(e,t,i,l),n!==null)return en(n,e,l),Gm(n,t,l),!0}return!1}function wc(e,t,n,l){if(l={lane:2,revertLane:au(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},_i(e)){if(t)throw Error(u(479))}else t=Io(e,n,l,2),t!==null&&en(t,e,2)}function _i(e){var t=e.alternate;return e===Ge||t!==null&&t===Ge}function Ym(e,t){wl=Ai=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Gm(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Zf(e,n)}}var xr={readContext:qt,use:Ti,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};xr.useEffectEvent=gt;var Fm={readContext:qt,use:Ti,useCallback:function(e,t){return Gt().memoizedState=[e,t===void 0?null:t],e},useContext:qt,useEffect:Cm,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Ci(4194308,4,Rm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ci(4194308,4,e,t)},useInsertionEffect:function(e,t){Ci(4,2,e,t)},useMemo:function(e,t){var n=Gt();t=t===void 0?null:t;var l=e();if(Ka){A(!0);try{e()}finally{A(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Gt();if(n!==void 0){var i=n(t);if(Ka){A(!0);try{n(t)}finally{A(!1)}}}else i=t;return l.memoizedState=l.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},l.queue=e,e=e.dispatch=Uv.bind(null,Ge,e),[l.memoizedState,e]},useRef:function(e){var t=Gt();return e={current:e},t.memoizedState=e},useState:function(e){e=xc(e);var t=e.queue,n=Im.bind(null,Ge,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Sc,useDeferredValue:function(e,t){var n=Gt();return jc(n,e,t)},useTransition:function(){var e=xc(!1);return e=zm.bind(null,Ge,e.queue,!0,!1),Gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Ge,i=Gt();if(We){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),ft===null)throw Error(u(349));(Qe&127)!==0||fm(l,t,n)}i.memoizedState=n;var c={value:n,getSnapshot:t};return i.queue=c,Cm(mm.bind(null,l,c,e),[e]),l.flags|=2048,El(9,{destroy:void 0},pm.bind(null,l,c,n,t),null),n},useId:function(){var e=Gt(),t=ft.identifierPrefix;if(We){var n=Mn,l=$n;n=(l&~(1<<32-I(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Ni++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Ov++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Nc,useFormState:Am,useActionState:Am,useOptimistic:function(e){var t=Gt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=wc.bind(null,Ge,!0,n),n.dispatch=t,[e,t]},useMemoCache:hc,useCacheRefresh:function(){return Gt().memoizedState=zv.bind(null,Ge)},useEffectEvent:function(e){var t=Gt(),n={impl:e};return t.memoizedState=n,function(){if((lt&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},Tc={readContext:qt,use:Ti,useCallback:Mm,useContext:qt,useEffect:vc,useImperativeHandle:$m,useInsertionEffect:_m,useLayoutEffect:Om,useMemo:qm,useReducer:Ei,useRef:Em,useState:function(){return Ei(Kn)},useDebugValue:Sc,useDeferredValue:function(e,t){var n=vt();return Dm(n,ct.memoizedState,e,t)},useTransition:function(){var e=Ei(Kn)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:yr(e),t]},useSyncExternalStore:dm,useId:Lm,useHostTransitionStatus:Nc,useFormState:Nm,useActionState:Nm,useOptimistic:function(e,t){var n=vt();return gm(n,ct,e,t)},useMemoCache:hc,useCacheRefresh:Bm};Tc.useEffectEvent=km;var Vm={readContext:qt,use:Ti,useCallback:Mm,useContext:qt,useEffect:vc,useImperativeHandle:$m,useInsertionEffect:_m,useLayoutEffect:Om,useMemo:qm,useReducer:gc,useRef:Em,useState:function(){return gc(Kn)},useDebugValue:Sc,useDeferredValue:function(e,t){var n=vt();return ct===null?jc(n,e,t):Dm(n,ct.memoizedState,e,t)},useTransition:function(){var e=gc(Kn)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:yr(e),t]},useSyncExternalStore:dm,useId:Lm,useHostTransitionStatus:Nc,useFormState:Tm,useActionState:Tm,useOptimistic:function(e,t){var n=vt();return ct!==null?gm(n,ct,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:hc,useCacheRefresh:Bm};Vm.useEffectEvent=km;function Ec(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:S({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Cc={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=un(),i=ha(l);i.payload=t,n!=null&&(i.callback=n),t=ya(e,i,l),t!==null&&(en(t,e,l),fr(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=un(),i=ha(l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ya(e,i,l),t!==null&&(en(t,e,l),fr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=un(),l=ha(n);l.tag=2,t!=null&&(l.callback=t),t=ya(e,l,n),t!==null&&(en(t,e,n),fr(t,e,n))}};function Km(e,t,n,l,i,c,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,y):t.prototype&&t.prototype.isPureReactComponent?!lr(n,l)||!lr(i,c):!0}function Xm(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Cc.enqueueReplaceState(t,t.state,null)}function Xa(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=S({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function Zm(e){oi(e)}function Qm(e){console.error(e)}function Jm(e){oi(e)}function Oi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Pm(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function kc(e,t,n){return n=ha(n),n.tag=3,n.payload={element:null},n.callback=function(){Oi(e,t)},n}function Wm(e){return e=ha(e),e.tag=3,e}function eh(e,t,n,l){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var c=l.value;e.payload=function(){return i(c)},e.callback=function(){Pm(t,n,l)}}var y=n.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Pm(t,n,l),typeof i!="function"&&(ja===null?ja=new Set([this]):ja.add(this));var j=l.stack;this.componentDidCatch(l.value,{componentStack:j!==null?j:""})})}function Hv(e,t,n,l,i){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&bl(t,n,i,!0),n=rn.current,n!==null){switch(n.tag){case 31:case 13:return Sn===null?Yi():n.alternate===null&&xt===0&&(xt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,l===xi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),eu(e,l,i)),!1;case 22:return n.flags|=65536,l===xi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),eu(e,l,i)),!1}throw Error(u(435,n.tag))}return eu(e,l,i),Yi(),!1}if(We)return t=rn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,l!==Xo&&(e=Error(u(422),{cause:l}),sr(gn(e,n)))):(l!==Xo&&(t=Error(u(423),{cause:l}),sr(gn(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,l=gn(l,n),i=kc(e.stateNode,l,i),rc(e,i),xt!==4&&(xt=2)),!1;var c=Error(u(520),{cause:l});if(c=gn(c,n),Tr===null?Tr=[c]:Tr.push(c),xt!==4&&(xt=2),t===null)return!0;l=gn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=kc(n.stateNode,l,e),rc(n,e),!1;case 1:if(t=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(ja===null||!ja.has(c))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Wm(i),eh(i,e,n,l),rc(n,i),!1}n=n.return}while(n!==null);return!1}var _c=Error(u(461)),At=!1;function Dt(e,t,n,l){t.child=e===null?lm(t,null,n,l):Va(t,e.child,n,l)}function th(e,t,n,l,i){n=n.render;var c=t.ref;if("ref"in l){var y={};for(var j in l)j!=="ref"&&(y[j]=l[j])}else y=l;return Ia(t),l=dc(e,t,n,y,c,i),j=fc(),e!==null&&!At?(pc(e,t,i),Xn(e,t,i)):(We&&j&&Vo(t),t.flags|=1,Dt(e,t,l,i),t.child)}function nh(e,t,n,l,i){if(e===null){var c=n.type;return typeof c=="function"&&!Yo(c)&&c.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=c,ah(e,t,c,l,i)):(e=fi(n.type,null,l,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Uc(e,i)){var y=c.memoizedProps;if(n=n.compare,n=n!==null?n:lr,n(y,l)&&e.ref===t.ref)return Xn(e,t,i)}return t.flags|=1,e=In(c,l),e.ref=t.ref,e.return=t,t.child=e}function ah(e,t,n,l,i){if(e!==null){var c=e.memoizedProps;if(lr(c,l)&&e.ref===t.ref)if(At=!1,t.pendingProps=l=c,Uc(e,i))(e.flags&131072)!==0&&(At=!0);else return t.lanes=e.lanes,Xn(e,t,i)}return Oc(e,t,n,l,i)}function lh(e,t,n,l){var i=l.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,e!==null){for(l=t.child=e.child,i=0;l!==null;)i=i|l.lanes|l.childLanes,l=l.sibling;l=i&~c}else l=0,t.child=null;return rh(e,t,c,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&yi(t,c!==null?c.cachePool:null),c!==null?sm(t,c):sc(),om(t);else return l=t.lanes=536870912,rh(e,t,c!==null?c.baseLanes|n:n,n,l)}else c!==null?(yi(t,c.cachePool),sm(t,c),xa(),t.memoizedState=null):(e!==null&&yi(t,null),sc(),xa());return Dt(e,t,i,n),t.child}function br(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,n,l,i){var c=tc();return c=c===null?null:{parent:St._currentValue,pool:c},t.memoizedState={baseLanes:n,cachePool:c},e!==null&&yi(t,null),sc(),om(t),e!==null&&bl(e,t,l,!0),t.childLanes=i,null}function Ri(e,t){return t=Mi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ih(e,t,n){return Va(t,e.child,null,n),e=Ri(t,t.pendingProps),e.flags|=2,sn(t),t.memoizedState=null,e}function Lv(e,t,n){var l=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(We){if(l.mode==="hidden")return e=Ri(t,l),t.lanes=536870912,br(null,e);if(cc(t),(e=pt)?(e=xy(e,vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ua!==null?{id:$n,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},n=Yp(e),n.return=t,t.child=n,Mt=t,pt=null)):e=null,e===null)throw fa(t);return t.lanes=536870912,null}return Ri(t,l)}var c=e.memoizedState;if(c!==null){var y=c.dehydrated;if(cc(t),i)if(t.flags&256)t.flags&=-257,t=ih(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(At||bl(e,t,n,!1),i=(n&e.childLanes)!==0,At||i){if(l=ft,l!==null&&(y=Qf(l,n),y!==0&&y!==c.retryLane))throw c.retryLane=y,Ua(e,y),en(l,e,y),_c;Yi(),t=ih(e,t,n)}else e=c.treeContext,pt=jn(y.nextSibling),Mt=t,We=!0,da=null,vn=!1,e!==null&&Vp(t,e),t=Ri(t,l),t.flags|=4096;return t}return e=In(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function $i(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Oc(e,t,n,l,i){return Ia(t),n=dc(e,t,n,l,void 0,i),l=fc(),e!==null&&!At?(pc(e,t,i),Xn(e,t,i)):(We&&l&&Vo(t),t.flags|=1,Dt(e,t,n,i),t.child)}function sh(e,t,n,l,i,c){return Ia(t),t.updateQueue=null,n=um(t,l,n,i),cm(e),l=fc(),e!==null&&!At?(pc(e,t,c),Xn(e,t,c)):(We&&l&&Vo(t),t.flags|=1,Dt(e,t,n,c),t.child)}function oh(e,t,n,l,i){if(Ia(t),t.stateNode===null){var c=hl,y=n.contextType;typeof y=="object"&&y!==null&&(c=qt(y)),c=new n(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Cc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},ac(t),y=n.contextType,c.context=typeof y=="object"&&y!==null?qt(y):hl,c.state=t.memoizedState,y=n.getDerivedStateFromProps,typeof y=="function"&&(Ec(t,n,y,l),c.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(y=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),y!==c.state&&Cc.enqueueReplaceState(c,c.state,null),mr(t,l,c,i),pr(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var j=t.memoizedProps,k=Xa(n,j);c.props=k;var V=c.context,ae=n.contextType;y=hl,typeof ae=="object"&&ae!==null&&(y=qt(ae));var ie=n.getDerivedStateFromProps;ae=typeof ie=="function"||typeof c.getSnapshotBeforeUpdate=="function",j=t.pendingProps!==j,ae||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(j||V!==y)&&Xm(t,c,l,y),ma=!1;var X=t.memoizedState;c.state=X,mr(t,l,c,i),pr(),V=t.memoizedState,j||X!==V||ma?(typeof ie=="function"&&(Ec(t,n,ie,l),V=t.memoizedState),(k=ma||Km(t,n,k,l,X,V,y))?(ae||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=V),c.props=l,c.state=V,c.context=y,l=k):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,lc(e,t),y=t.memoizedProps,ae=Xa(n,y),c.props=ae,ie=t.pendingProps,X=c.context,V=n.contextType,k=hl,typeof V=="object"&&V!==null&&(k=qt(V)),j=n.getDerivedStateFromProps,(V=typeof j=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y!==ie||X!==k)&&Xm(t,c,l,k),ma=!1,X=t.memoizedState,c.state=X,mr(t,l,c,i),pr();var Q=t.memoizedState;y!==ie||X!==Q||ma||e!==null&&e.dependencies!==null&&mi(e.dependencies)?(typeof j=="function"&&(Ec(t,n,j,l),Q=t.memoizedState),(ae=ma||Km(t,n,ae,l,X,Q,k)||e!==null&&e.dependencies!==null&&mi(e.dependencies))?(V||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,Q,k),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,Q,k)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=Q),c.props=l,c.state=Q,c.context=k,l=ae):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,$i(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=Va(t,e.child,null,i),t.child=Va(t,null,n,i)):Dt(e,t,n,i),t.memoizedState=c.state,e=t.child):e=Xn(e,t,i),e}function ch(e,t,n,l){return La(),t.flags|=256,Dt(e,t,n,l),t.child}var Rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $c(e){return{baseLanes:e,cachePool:Pp()}}function Mc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=cn),e}function uh(e,t,n){var l=t.pendingProps,i=!1,c=(t.flags&128)!==0,y;if((y=c)||(y=e!==null&&e.memoizedState===null?!1:(bt.current&2)!==0),y&&(i=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(We){if(i?ga(t):xa(),(e=pt)?(e=xy(e,vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ua!==null?{id:$n,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},n=Yp(e),n.return=t,t.child=n,Mt=t,pt=null)):e=null,e===null)throw fa(t);return yu(e)?t.lanes=32:t.lanes=536870912,null}var j=l.children;return l=l.fallback,i?(xa(),i=t.mode,j=Mi({mode:"hidden",children:j},i),l=Ha(l,i,n,null),j.return=t,l.return=t,j.sibling=l,t.child=j,l=t.child,l.memoizedState=$c(n),l.childLanes=Mc(e,y,n),t.memoizedState=Rc,br(null,l)):(ga(t),qc(t,j))}var k=e.memoizedState;if(k!==null&&(j=k.dehydrated,j!==null)){if(c)t.flags&256?(ga(t),t.flags&=-257,t=Dc(e,t,n)):t.memoizedState!==null?(xa(),t.child=e.child,t.flags|=128,t=null):(xa(),j=l.fallback,i=t.mode,l=Mi({mode:"visible",children:l.children},i),j=Ha(j,i,n,null),j.flags|=2,l.return=t,j.return=t,l.sibling=j,t.child=l,Va(t,e.child,null,n),l=t.child,l.memoizedState=$c(n),l.childLanes=Mc(e,y,n),t.memoizedState=Rc,t=br(null,l));else if(ga(t),yu(j)){if(y=j.nextSibling&&j.nextSibling.dataset,y)var V=y.dgst;y=V,l=Error(u(419)),l.stack="",l.digest=y,sr({value:l,source:null,stack:null}),t=Dc(e,t,n)}else if(At||bl(e,t,n,!1),y=(n&e.childLanes)!==0,At||y){if(y=ft,y!==null&&(l=Qf(y,n),l!==0&&l!==k.retryLane))throw k.retryLane=l,Ua(e,l),en(y,e,l),_c;hu(j)||Yi(),t=Dc(e,t,n)}else hu(j)?(t.flags|=192,t.child=e.child,t=null):(e=k.treeContext,pt=jn(j.nextSibling),Mt=t,We=!0,da=null,vn=!1,e!==null&&Vp(t,e),t=qc(t,l.children),t.flags|=4096);return t}return i?(xa(),j=l.fallback,i=t.mode,k=e.child,V=k.sibling,l=In(k,{mode:"hidden",children:l.children}),l.subtreeFlags=k.subtreeFlags&65011712,V!==null?j=In(V,j):(j=Ha(j,i,n,null),j.flags|=2),j.return=t,l.return=t,l.sibling=j,t.child=l,br(null,l),l=t.child,j=e.child.memoizedState,j===null?j=$c(n):(i=j.cachePool,i!==null?(k=St._currentValue,i=i.parent!==k?{parent:k,pool:k}:i):i=Pp(),j={baseLanes:j.baseLanes|n,cachePool:i}),l.memoizedState=j,l.childLanes=Mc(e,y,n),t.memoizedState=Rc,br(e.child,l)):(ga(t),n=e.child,e=n.sibling,n=In(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=n,t.memoizedState=null,n)}function qc(e,t){return t=Mi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Mi(e,t){return e=ln(22,e,null,t),e.lanes=0,e}function Dc(e,t,n){return Va(t,e.child,null,n),e=qc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dh(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Jo(e.return,t,n)}function zc(e,t,n,l,i,c){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:i,treeForkCount:c}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=l,y.tail=n,y.tailMode=i,y.treeForkCount=c)}function fh(e,t,n){var l=t.pendingProps,i=l.revealOrder,c=l.tail;l=l.children;var y=bt.current,j=(y&2)!==0;if(j?(y=y&1|2,t.flags|=128):y&=1,pe(bt,y),Dt(e,t,l,n),l=We?ir:0,!j&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dh(e,n,t);else if(e.tag===19)dh(e,n,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(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ji(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zc(t,!1,i,n,c,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ji(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zc(t,!0,n,null,c,l);break;case"together":zc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Xn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Sa|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(bl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=In(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=In(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Uc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&mi(e)))}function Bv(e,t,n){switch(t.tag){case 3:Ce(t,t.stateNode.containerInfo),pa(t,St,e.memoizedState.cache),La();break;case 27:case 5:Be(t);break;case 4:Ce(t,t.stateNode.containerInfo);break;case 10:pa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,cc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ga(t),t.flags|=128,null):(n&t.child.childLanes)!==0?uh(e,t,n):(ga(t),e=Xn(e,t,n),e!==null?e.sibling:null);ga(t);break;case 19:var i=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(bl(e,t,n,!1),l=(n&t.childLanes)!==0),i){if(l)return fh(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),pe(bt,bt.current),l)break;return null;case 22:return t.lanes=0,lh(e,t,n,t.pendingProps);case 24:pa(t,St,e.memoizedState.cache)}return Xn(e,t,n)}function ph(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)At=!0;else{if(!Uc(e,n)&&(t.flags&128)===0)return At=!1,Bv(e,t,n);At=(e.flags&131072)!==0}else At=!1,We&&(t.flags&1048576)!==0&&Fp(t,ir,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Ga(t.elementType),t.type=e,typeof e=="function")Yo(e)?(l=Xa(e,l),t.tag=1,t=oh(null,t,e,l,n)):(t.tag=0,t=Oc(null,t,e,l,n));else{if(e!=null){var i=e.$$typeof;if(i===w){t.tag=11,t=th(null,t,e,l,n);break e}else if(i===$){t.tag=14,t=nh(null,t,e,l,n);break e}}throw t=xe(e)||e,Error(u(306,t,""))}}return t;case 0:return Oc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,i=Xa(l,t.pendingProps),oh(e,t,l,i,n);case 3:e:{if(Ce(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var c=t.memoizedState;i=c.element,lc(e,t),mr(t,l,null,n);var y=t.memoizedState;if(l=y.cache,pa(t,St,l),l!==c.cache&&Po(t,[St],n,!0),pr(),l=y.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=ch(e,t,l,n);break e}else if(l!==i){i=gn(Error(u(424)),t),sr(i),t=ch(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,pt=jn(e.firstChild),Mt=t,We=!0,da=null,vn=!0,n=lm(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(La(),l===i){t=Xn(e,t,n);break e}Dt(e,t,l,n)}t=t.child}return t;case 26:return $i(e,t),e===null?(n=Ny(t.type,null,t.pendingProps,null))?t.memoizedState=n:We||(n=t.type,e=t.pendingProps,l=Qi(Ee.current).createElement(n),l[$t]=t,l[Xt]=e,zt(l,n,e),Et(l),t.stateNode=l):t.memoizedState=Ny(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Be(t),e===null&&We&&(l=t.stateNode=Sy(t.type,t.pendingProps,Ee.current),Mt=t,vn=!0,i=pt,Ta(t.type)?(gu=i,pt=jn(l.firstChild)):pt=i),Dt(e,t,t.pendingProps.children,n),$i(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&We&&((i=l=pt)&&(l=g1(l,t.type,t.pendingProps,vn),l!==null?(t.stateNode=l,Mt=t,pt=jn(l.firstChild),vn=!1,i=!0):i=!1),i||fa(t)),Be(t),i=t.type,c=t.pendingProps,y=e!==null?e.memoizedProps:null,l=c.children,fu(i,c)?l=null:y!==null&&fu(i,y)&&(t.flags|=32),t.memoizedState!==null&&(i=dc(e,t,Rv,null,null,n),Mr._currentValue=i),$i(e,t),Dt(e,t,l,n),t.child;case 6:return e===null&&We&&((e=n=pt)&&(n=x1(n,t.pendingProps,vn),n!==null?(t.stateNode=n,Mt=t,pt=null,e=!0):e=!1),e||fa(t)),null;case 13:return uh(e,t,n);case 4:return Ce(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Va(t,null,l,n):Dt(e,t,l,n),t.child;case 11:return th(e,t,t.type,t.pendingProps,n);case 7:return Dt(e,t,t.pendingProps,n),t.child;case 8:return Dt(e,t,t.pendingProps.children,n),t.child;case 12:return Dt(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,pa(t,t.type,l.value),Dt(e,t,l.children,n),t.child;case 9:return i=t.type._context,l=t.pendingProps.children,Ia(t),i=qt(i),l=l(i),t.flags|=1,Dt(e,t,l,n),t.child;case 14:return nh(e,t,t.type,t.pendingProps,n);case 15:return ah(e,t,t.type,t.pendingProps,n);case 19:return fh(e,t,n);case 31:return Lv(e,t,n);case 22:return lh(e,t,n,t.pendingProps);case 24:return Ia(t),l=qt(St),e===null?(i=tc(),i===null&&(i=ft,c=Wo(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=n),i=c),t.memoizedState={parent:l,cache:i},ac(t),pa(t,St,i)):((e.lanes&n)!==0&&(lc(e,t),mr(t,null,null,n),pr()),i=e.memoizedState,c=t.memoizedState,i.parent!==l?(i={parent:l,cache:l},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),pa(t,St,l)):(l=c.cache,pa(t,St,l),l!==i.cache&&Po(t,[St],n,!0))),Dt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Zn(e){e.flags|=4}function Hc(e,t,n,l,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Lh())e.flags|=8192;else throw Fa=xi,nc}else e.flags&=-16777217}function mh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ky(t))if(Lh())e.flags|=8192;else throw Fa=xi,nc}function qi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Tn():536870912,e.lanes|=t,Ol|=t)}function vr(e,t){if(!We)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags&65011712,l|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags,l|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Iv(e,t,n){var l=t.pendingProps;switch(Ko(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(t),null;case 1:return mt(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Fn(St),Le(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(xl(t)?Zn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Zo())),mt(t),null;case 26:var i=t.type,c=t.memoizedState;return e===null?(Zn(t),c!==null?(mt(t),mh(t,c)):(mt(t),Hc(t,i,null,l,n))):c?c!==e.memoizedState?(Zn(t),mt(t),mh(t,c)):(mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Zn(t),mt(t),Hc(t,i,e,l,n)),null;case 27:if(rt(t),n=Ee.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Zn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return mt(t),null}e=de.current,xl(t)?Kp(t):(e=Sy(i,l,n),t.stateNode=e,Zn(t))}return mt(t),null;case 5:if(rt(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Zn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return mt(t),null}if(c=de.current,xl(t))Kp(t);else{var y=Qi(Ee.current);switch(c){case 1:c=y.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:c=y.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":c=y.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":c=y.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":c=y.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?y.createElement("select",{is:l.is}):y.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?y.createElement(i,{is:l.is}):y.createElement(i)}}c[$t]=t,c[Xt]=l;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)c.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=c;e:switch(zt(c,i,l),i){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Zn(t)}}return mt(t),Hc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Zn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=Ee.current,xl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,i=Mt,i!==null)switch(i.tag){case 27:case 5:l=i.memoizedProps}e[$t]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||uy(e.nodeValue,n)),e||fa(t,!0)}else e=Qi(e).createTextNode(l),e[$t]=t,t.stateNode=e}return mt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=xl(t),n!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[$t]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),e=!1}else n=Zo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(sn(t),t):(sn(t),null);if((t.flags&128)!==0)throw Error(u(558))}return mt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=xl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!i)throw Error(u(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));i[$t]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),i=!1}else i=Zo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(sn(t),t):(sn(t),null)}return sn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,i=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(i=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==i&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),qi(t,t.updateQueue),mt(t),null);case 4:return Le(),e===null&&su(t.stateNode.containerInfo),mt(t),null;case 10:return Fn(t.type),mt(t),null;case 19:if(G(bt),l=t.memoizedState,l===null)return mt(t),null;if(i=(t.flags&128)!==0,c=l.rendering,c===null)if(i)vr(l,!1);else{if(xt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=ji(e),c!==null){for(t.flags|=128,vr(l,!1),e=c.updateQueue,t.updateQueue=e,qi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ip(n,e),n=n.sibling;return pe(bt,bt.current&1|2),We&&Yn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Oe()>Li&&(t.flags|=128,i=!0,vr(l,!1),t.lanes=4194304)}else{if(!i)if(e=ji(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,qi(t,e),vr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!We)return mt(t),null}else 2*Oe()-l.renderingStartTime>Li&&n!==536870912&&(t.flags|=128,i=!0,vr(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(e=l.last,e!==null?e.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Oe(),e.sibling=null,n=bt.current,pe(bt,i?n&1|2:n&1),We&&Yn(t,l.treeForkCount),e):(mt(t),null);case 22:case 23:return sn(t),oc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),n=t.updateQueue,n!==null&&qi(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&G(Ya),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Fn(St),mt(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Yv(e,t){switch(Ko(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fn(St),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return rt(t),null;case 31:if(t.memoizedState!==null){if(sn(t),t.alternate===null)throw Error(u(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(sn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(bt),null;case 4:return Le(),null;case 10:return Fn(t.type),null;case 22:case 23:return sn(t),oc(),e!==null&&G(Ya),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Fn(St),null;case 25:return null;default:return null}}function hh(e,t){switch(Ko(t),t.tag){case 3:Fn(St),Le();break;case 26:case 27:case 5:rt(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&sn(t);break;case 13:sn(t);break;case 19:G(bt);break;case 10:Fn(t.type);break;case 22:case 23:sn(t),oc(),e!==null&&G(Ya);break;case 24:Fn(St)}}function Sr(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var i=l.next;n=i;do{if((n.tag&e)===e){l=void 0;var c=n.create,y=n.inst;l=c(),y.destroy=l}n=n.next}while(n!==i)}}catch(j){ot(t,t.return,j)}}function ba(e,t,n){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var c=i.next;l=c;do{if((l.tag&e)===e){var y=l.inst,j=y.destroy;if(j!==void 0){y.destroy=void 0,i=t;var k=n,V=j;try{V()}catch(ae){ot(i,k,ae)}}}l=l.next}while(l!==c)}}catch(ae){ot(t,t.return,ae)}}function yh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{im(t,n)}catch(l){ot(e,e.return,l)}}}function gh(e,t,n){n.props=Xa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){ot(e,t,l)}}function jr(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(i){ot(e,t,i)}}function qn(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(i){ot(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){ot(e,t,i)}else n.current=null}function xh(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(i){ot(e,e.return,i)}}function Lc(e,t,n){try{var l=e.stateNode;d1(l,e.type,n,t),l[Xt]=t}catch(i){ot(e,e.return,i)}}function bh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ta(e.type)||e.tag===4}function Bc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bh(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&&Ta(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,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ln));else if(l!==4&&(l===27&&Ta(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Ic(e,t,n),e=e.sibling;e!==null;)Ic(e,t,n),e=e.sibling}function Di(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Ta(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Di(e,t,n),e=e.sibling;e!==null;)Di(e,t,n),e=e.sibling}function vh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zt(t,l,n),t[$t]=e,t[Xt]=n}catch(c){ot(e,e.return,c)}}var Qn=!1,Nt=!1,Yc=!1,Sh=typeof WeakSet=="function"?WeakSet:Set,Ct=null;function Gv(e,t){if(e=e.containerInfo,uu=as,e=$p(e),Do(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var i=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var y=0,j=-1,k=-1,V=0,ae=0,ie=e,X=null;t:for(;;){for(var Q;ie!==n||i!==0&&ie.nodeType!==3||(j=y+i),ie!==c||l!==0&&ie.nodeType!==3||(k=y+l),ie.nodeType===3&&(y+=ie.nodeValue.length),(Q=ie.firstChild)!==null;)X=ie,ie=Q;for(;;){if(ie===e)break t;if(X===n&&++V===i&&(j=y),X===c&&++ae===l&&(k=y),(Q=ie.nextSibling)!==null)break;ie=X,X=ie.parentNode}ie=Q}n=j===-1||k===-1?null:{start:j,end:k}}else n=null}n=n||{start:0,end:0}}else n=null;for(du={focusedElem:e,selectionRange:n},as=!1,Ct=t;Ct!==null;)if(t=Ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ct=e;else for(;Ct!==null;){switch(t=Ct,c=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(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,n=t,i=c.memoizedProps,c=c.memoizedState,l=n.stateNode;try{var Te=Xa(n.type,i);e=l.getSnapshotBeforeUpdate(Te,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(De){ot(n,n.return,De)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)mu(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":mu(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(u(163))}if(e=t.sibling,e!==null){e.return=t.return,Ct=e;break}Ct=t.return}}function jh(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:Pn(e,n),l&4&&Sr(5,n);break;case 1:if(Pn(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(y){ot(n,n.return,y)}else{var i=Xa(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){ot(n,n.return,y)}}l&64&&yh(n),l&512&&jr(n,n.return);break;case 3:if(Pn(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{im(e,t)}catch(y){ot(n,n.return,y)}}break;case 27:t===null&&l&4&&vh(n);case 26:case 5:Pn(e,n),t===null&&l&4&&xh(n),l&512&&jr(n,n.return);break;case 12:Pn(e,n);break;case 31:Pn(e,n),l&4&&wh(e,n);break;case 13:Pn(e,n),l&4&&Th(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Wv.bind(null,n),b1(e,n))));break;case 22:if(l=n.memoizedState!==null||Qn,!l){t=t!==null&&t.memoizedState!==null||Nt,i=Qn;var c=Nt;Qn=l,(Nt=t)&&!c?Wn(e,n,(n.subtreeFlags&8772)!==0):Pn(e,n),Qn=i,Nt=c}break;case 30:break;default:Pn(e,n)}}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&&bo(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 ht=null,Qt=!1;function Jn(e,t,n){for(n=n.child;n!==null;)Nh(e,t,n),n=n.sibling}function Nh(e,t,n){if(h&&typeof h.onCommitFiberUnmount=="function")try{h.onCommitFiberUnmount(Z,n)}catch{}switch(n.tag){case 26:Nt||qn(n,t),Jn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Nt||qn(n,t);var l=ht,i=Qt;Ta(n.type)&&(ht=n.stateNode,Qt=!1),Jn(e,t,n),Or(n.stateNode),ht=l,Qt=i;break;case 5:Nt||qn(n,t);case 6:if(l=ht,i=Qt,ht=null,Jn(e,t,n),ht=l,Qt=i,ht!==null)if(Qt)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(n.stateNode)}catch(c){ot(n,t,c)}else try{ht.removeChild(n.stateNode)}catch(c){ot(n,t,c)}break;case 18:ht!==null&&(Qt?(e=ht,yy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Hl(e)):yy(ht,n.stateNode));break;case 4:l=ht,i=Qt,ht=n.stateNode.containerInfo,Qt=!0,Jn(e,t,n),ht=l,Qt=i;break;case 0:case 11:case 14:case 15:ba(2,n,t),Nt||ba(4,n,t),Jn(e,t,n);break;case 1:Nt||(qn(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&gh(n,t,l)),Jn(e,t,n);break;case 21:Jn(e,t,n);break;case 22:Nt=(l=Nt)||n.memoizedState!==null,Jn(e,t,n),Nt=l;break;default:Jn(e,t,n)}}function wh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hl(e)}catch(n){ot(t,t.return,n)}}}function Th(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hl(e)}catch(n){ot(t,t.return,n)}}function Fv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Sh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Sh),t;default:throw Error(u(435,e.tag))}}function zi(e,t){var n=Fv(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var i=e1.bind(null,e,l);l.then(i,i)}})}function Jt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var i=n[l],c=e,y=t,j=y;e:for(;j!==null;){switch(j.tag){case 27:if(Ta(j.type)){ht=j.stateNode,Qt=!1;break e}break;case 5:ht=j.stateNode,Qt=!1;break e;case 3:case 4:ht=j.stateNode.containerInfo,Qt=!0;break e}j=j.return}if(ht===null)throw Error(u(160));Nh(c,y,i),ht=null,Qt=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Eh(t,e),t=t.sibling}var kn=null;function Eh(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Jt(t,e),Pt(e),l&4&&(ba(3,e,e.return),Sr(3,e),ba(5,e,e.return));break;case 1:Jt(t,e),Pt(e),l&512&&(Nt||n===null||qn(n,n.return)),l&64&&Qn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var i=kn;if(Jt(t,e),Pt(e),l&512&&(Nt||n===null||qn(n,n.return)),l&4){var c=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(l){case"title":c=i.getElementsByTagName("title")[0],(!c||c[Zl]||c[$t]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(l),i.head.insertBefore(c,i.querySelector("head > title"))),zt(c,l,n),c[$t]=e,Et(c),l=c;break e;case"link":var y=Ey("link","href",i).get(l+(n.href||""));if(y){for(var j=0;j<y.length;j++)if(c=y[j],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){y.splice(j,1);break t}}c=i.createElement(l),zt(c,l,n),i.head.appendChild(c);break;case"meta":if(y=Ey("meta","content",i).get(l+(n.content||""))){for(j=0;j<y.length;j++)if(c=y[j],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){y.splice(j,1);break t}}c=i.createElement(l),zt(c,l,n),i.head.appendChild(c);break;default:throw Error(u(468,l))}c[$t]=e,Et(c),l=c}e.stateNode=l}else Cy(i,e.type,e.stateNode);else e.stateNode=Ty(i,l,e.memoizedProps);else c!==l?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,l===null?Cy(i,e.type,e.stateNode):Ty(i,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Lc(e,e.memoizedProps,n.memoizedProps)}break;case 27:Jt(t,e),Pt(e),l&512&&(Nt||n===null||qn(n,n.return)),n!==null&&l&4&&Lc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Jt(t,e),Pt(e),l&512&&(Nt||n===null||qn(n,n.return)),e.flags&32){i=e.stateNode;try{ol(i,"")}catch(Te){ot(e,e.return,Te)}}l&4&&e.stateNode!=null&&(i=e.memoizedProps,Lc(e,i,n!==null?n.memoizedProps:i)),l&1024&&(Yc=!0);break;case 6:if(Jt(t,e),Pt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(Te){ot(e,e.return,Te)}}break;case 3:if(Wi=null,i=kn,kn=Ji(t.containerInfo),Jt(t,e),kn=i,Pt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Hl(t.containerInfo)}catch(Te){ot(e,e.return,Te)}Yc&&(Yc=!1,Ch(e));break;case 4:l=kn,kn=Ji(e.stateNode.containerInfo),Jt(t,e),Pt(e),kn=l;break;case 12:Jt(t,e),Pt(e);break;case 31:Jt(t,e),Pt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,zi(e,l)));break;case 13:Jt(t,e),Pt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Hi=Oe()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,zi(e,l)));break;case 22:i=e.memoizedState!==null;var k=n!==null&&n.memoizedState!==null,V=Qn,ae=Nt;if(Qn=V||i,Nt=ae||k,Jt(t,e),Nt=ae,Qn=V,Pt(e),l&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||k||Qn||Nt||Za(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){k=n=t;try{if(c=k.stateNode,i)y=c.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{j=k.stateNode;var ie=k.memoizedProps.style,X=ie!=null&&ie.hasOwnProperty("display")?ie.display:null;j.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(Te){ot(k,k.return,Te)}}}else if(t.tag===6){if(n===null){k=t;try{k.stateNode.nodeValue=i?"":k.memoizedProps}catch(Te){ot(k,k.return,Te)}}}else if(t.tag===18){if(n===null){k=t;try{var Q=k.stateNode;i?gy(Q,!0):gy(k.stateNode,!1)}catch(Te){ot(k,k.return,Te)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,zi(e,n))));break;case 19:Jt(t,e),Pt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,zi(e,l)));break;case 30:break;case 21:break;default:Jt(t,e),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(bh(l)){n=l;break}l=l.return}if(n==null)throw Error(u(160));switch(n.tag){case 27:var i=n.stateNode,c=Bc(e);Di(e,c,i);break;case 5:var y=n.stateNode;n.flags&32&&(ol(y,""),n.flags&=-33);var j=Bc(e);Di(e,j,y);break;case 3:case 4:var k=n.stateNode.containerInfo,V=Bc(e);Ic(e,V,k);break;default:throw Error(u(161))}}catch(ae){ot(e,e.return,ae)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ch(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ch(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Pn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)jh(e,t.alternate,t),t=t.sibling}function Za(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ba(4,t,t.return),Za(t);break;case 1:qn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&gh(t,t.return,n),Za(t);break;case 27:Or(t.stateNode);case 26:case 5:qn(t,t.return),Za(t);break;case 22:t.memoizedState===null&&Za(t);break;case 30:Za(t);break;default:Za(t)}e=e.sibling}}function Wn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,i=e,c=t,y=c.flags;switch(c.tag){case 0:case 11:case 15:Wn(i,c,n),Sr(4,c);break;case 1:if(Wn(i,c,n),l=c,i=l.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(V){ot(l,l.return,V)}if(l=c,i=l.updateQueue,i!==null){var j=l.stateNode;try{var k=i.shared.hiddenCallbacks;if(k!==null)for(i.shared.hiddenCallbacks=null,i=0;i<k.length;i++)rm(k[i],j)}catch(V){ot(l,l.return,V)}}n&&y&64&&yh(c),jr(c,c.return);break;case 27:vh(c);case 26:case 5:Wn(i,c,n),n&&l===null&&y&4&&xh(c),jr(c,c.return);break;case 12:Wn(i,c,n);break;case 31:Wn(i,c,n),n&&y&4&&wh(i,c);break;case 13:Wn(i,c,n),n&&y&4&&Th(i,c);break;case 22:c.memoizedState===null&&Wn(i,c,n),jr(c,c.return);break;case 30:break;default:Wn(i,c,n)}t=t.sibling}}function Gc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&or(n))}function Fc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&or(e))}function _n(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)kh(e,t,n,l),t=t.sibling}function kh(e,t,n,l){var i=t.flags;switch(t.tag){case 0:case 11:case 15:_n(e,t,n,l),i&2048&&Sr(9,t);break;case 1:_n(e,t,n,l);break;case 3:_n(e,t,n,l),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&or(e)));break;case 12:if(i&2048){_n(e,t,n,l),e=t.stateNode;try{var c=t.memoizedProps,y=c.id,j=c.onPostCommit;typeof j=="function"&&j(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(k){ot(t,t.return,k)}}else _n(e,t,n,l);break;case 31:_n(e,t,n,l);break;case 13:_n(e,t,n,l);break;case 23:break;case 22:c=t.stateNode,y=t.alternate,t.memoizedState!==null?c._visibility&2?_n(e,t,n,l):Ar(e,t):c._visibility&2?_n(e,t,n,l):(c._visibility|=2,Cl(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Gc(y,t);break;case 24:_n(e,t,n,l),i&2048&&Fc(t.alternate,t);break;default:_n(e,t,n,l)}}function Cl(e,t,n,l,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,y=t,j=n,k=l,V=y.flags;switch(y.tag){case 0:case 11:case 15:Cl(c,y,j,k,i),Sr(8,y);break;case 23:break;case 22:var ae=y.stateNode;y.memoizedState!==null?ae._visibility&2?Cl(c,y,j,k,i):Ar(c,y):(ae._visibility|=2,Cl(c,y,j,k,i)),i&&V&2048&&Gc(y.alternate,y);break;case 24:Cl(c,y,j,k,i),i&&V&2048&&Fc(y.alternate,y);break;default:Cl(c,y,j,k,i)}t=t.sibling}}function Ar(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,i=l.flags;switch(l.tag){case 22:Ar(n,l),i&2048&&Gc(l.alternate,l);break;case 24:Ar(n,l),i&2048&&Fc(l.alternate,l);break;default:Ar(n,l)}t=t.sibling}}var Nr=8192;function kl(e,t,n){if(e.subtreeFlags&Nr)for(e=e.child;e!==null;)_h(e,t,n),e=e.sibling}function _h(e,t,n){switch(e.tag){case 26:kl(e,t,n),e.flags&Nr&&e.memoizedState!==null&&O1(n,kn,e.memoizedState,e.memoizedProps);break;case 5:kl(e,t,n);break;case 3:case 4:var l=kn;kn=Ji(e.stateNode.containerInfo),kl(e,t,n),kn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Nr,Nr=16777216,kl(e,t,n),Nr=l):kl(e,t,n));break;default:kl(e,t,n)}}function Oh(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 wr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ct=l,$h(l,e)}Oh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rh(e),e=e.sibling}function Rh(e){switch(e.tag){case 0:case 11:case 15:wr(e),e.flags&2048&&ba(9,e,e.return);break;case 3:wr(e);break;case 12:wr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ui(e)):wr(e);break;default:wr(e)}}function Ui(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ct=l,$h(l,e)}Oh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ba(8,t,t.return),Ui(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ui(t));break;default:Ui(t)}e=e.sibling}}function $h(e,t){for(;Ct!==null;){var n=Ct;switch(n.tag){case 0:case 11:case 15:ba(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:or(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Ct=l;else e:for(n=e;Ct!==null;){l=Ct;var i=l.sibling,c=l.return;if(Ah(l),l===n){Ct=null;break e}if(i!==null){i.return=c,Ct=i;break e}Ct=c}}}var Vv={getCacheForType:function(e){var t=qt(St),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return qt(St).controller.signal}},Kv=typeof WeakMap=="function"?WeakMap:Map,lt=0,ft=null,Xe=null,Qe=0,st=0,on=null,va=!1,_l=!1,Vc=!1,ea=0,xt=0,Sa=0,Qa=0,Kc=0,cn=0,Ol=0,Tr=null,Wt=null,Xc=!1,Hi=0,Mh=0,Li=1/0,Bi=null,ja=null,Tt=0,Aa=null,Rl=null,ta=0,Zc=0,Qc=null,qh=null,Er=0,Jc=null;function un(){return(lt&2)!==0&&Qe!==0?Qe&-Qe:O.T!==null?au():Jf()}function Dh(){if(cn===0)if((Qe&536870912)===0||We){var e=ye;ye<<=1,(ye&3932160)===0&&(ye=262144),cn=e}else cn=536870912;return e=rn.current,e!==null&&(e.flags|=32),cn}function en(e,t,n){(e===ft&&(st===2||st===9)||e.cancelPendingCommit!==null)&&($l(e,0),Na(e,Qe,cn,!1)),En(e,n),((lt&2)===0||e!==ft)&&(e===ft&&((lt&2)===0&&(Qa|=n),xt===4&&Na(e,Qe,cn,!1)),Dn(e))}function zh(e,t,n){if((lt&6)!==0)throw Error(u(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Ue(e,t),i=l?Qv(e,t):Wc(e,t,!0),c=l;do{if(i===0){_l&&!l&&Na(e,t,0,!1);break}else{if(n=e.current.alternate,c&&!Xv(n)){i=Wc(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var j=e;i=Tr;var k=j.current.memoizedState.isDehydrated;if(k&&($l(j,y).flags|=256),y=Wc(j,y,!1),y!==2){if(Vc&&!k){j.errorRecoveryDisabledLanes|=c,Qa|=c,i=4;break e}c=Wt,Wt=i,c!==null&&(Wt===null?Wt=c:Wt.push.apply(Wt,c))}i=y}if(c=!1,i!==2)continue}}if(i===1){$l(e,0),Na(e,t,0,!0);break}e:{switch(l=e,c=i,c){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Na(l,t,cn,!va);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(i=Hi+300-Oe(),10<i)){if(Na(l,t,cn,!va),$e(l,0,!0)!==0)break e;ta=t,l.timeoutHandle=my(Uh.bind(null,l,n,Wt,Bi,Xc,t,cn,Qa,Ol,va,c,"Throttled",-0,0),i);break e}Uh(l,n,Wt,Bi,Xc,t,cn,Qa,Ol,va,c,null,-0,0)}}break}while(!0);Dn(e)}function Uh(e,t,n,l,i,c,y,j,k,V,ae,ie,X,Q){if(e.timeoutHandle=-1,ie=t.subtreeFlags,ie&8192||(ie&16785408)===16785408){ie={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ln},_h(t,c,ie);var Te=(c&62914560)===c?Hi-Oe():(c&4194048)===c?Mh-Oe():0;if(Te=R1(ie,Te),Te!==null){ta=c,e.cancelPendingCommit=Te(Vh.bind(null,e,t,c,n,l,i,y,j,k,ae,ie,null,X,Q)),Na(e,c,y,!V);return}}Vh(e,t,c,n,l,i,y,j,k)}function Xv(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var i=n[l],c=i.getSnapshot;i=i.value;try{if(!an(c(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Na(e,t,n,l){t&=~Kc,t&=~Qa,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var i=t;0<i;){var c=31-I(i),y=1<<c;l[c]=-1,i&=~y}n!==0&&Xf(e,n,t)}function Ii(){return(lt&6)===0?(Cr(0),!1):!0}function Pc(){if(Xe!==null){if(st===0)var e=Xe.return;else e=Xe,Gn=Ba=null,mc(e),Al=null,ur=0,e=Xe;for(;e!==null;)hh(e.alternate,e),e=e.return;Xe=null}}function $l(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,m1(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ta=0,Pc(),ft=e,Xe=n=In(e.current,null),Qe=t,st=0,on=null,va=!1,_l=Ue(e,t),Vc=!1,Ol=cn=Kc=Qa=Sa=xt=0,Wt=Tr=null,Xc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var i=31-I(l),c=1<<i;t|=e[i],l&=~c}return ea=t,ci(),n}function Hh(e,t){Ge=null,O.H=xr,t===jl||t===gi?(t=tm(),st=3):t===nc?(t=tm(),st=4):st=t===_c?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,on=t,Xe===null&&(xt=1,Oi(e,gn(t,e.current)))}function Lh(){var e=rn.current;return e===null?!0:(Qe&4194048)===Qe?Sn===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?e===Sn:!1}function Bh(){var e=O.H;return O.H=xr,e===null?xr:e}function Ih(){var e=O.A;return O.A=Vv,e}function Yi(){xt=4,va||(Qe&4194048)!==Qe&&rn.current!==null||(_l=!0),(Sa&134217727)===0&&(Qa&134217727)===0||ft===null||Na(ft,Qe,cn,!1)}function Wc(e,t,n){var l=lt;lt|=2;var i=Bh(),c=Ih();(ft!==e||Qe!==t)&&(Bi=null,$l(e,t)),t=!1;var y=xt;e:do try{if(st!==0&&Xe!==null){var j=Xe,k=on;switch(st){case 8:Pc(),y=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(t=!0);var V=st;if(st=0,on=null,Ml(e,j,k,V),n&&_l){y=0;break e}break;default:V=st,st=0,on=null,Ml(e,j,k,V)}}Zv(),y=xt;break}catch(ae){Hh(e,ae)}while(!0);return t&&e.shellSuspendCounter++,Gn=Ba=null,lt=l,O.H=i,O.A=c,Xe===null&&(ft=null,Qe=0,ci()),y}function Zv(){for(;Xe!==null;)Yh(Xe)}function Qv(e,t){var n=lt;lt|=2;var l=Bh(),i=Ih();ft!==e||Qe!==t?(Bi=null,Li=Oe()+500,$l(e,t)):_l=Ue(e,t);e:do try{if(st!==0&&Xe!==null){t=Xe;var c=on;t:switch(st){case 1:st=0,on=null,Ml(e,t,c,1);break;case 2:case 9:if(Wp(c)){st=0,on=null,Gh(t);break}t=function(){st!==2&&st!==9||ft!==e||(st=7),Dn(e)},c.then(t,t);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:Wp(c)?(st=0,on=null,Gh(t)):(st=0,on=null,Ml(e,t,c,7));break;case 5:var y=null;switch(Xe.tag){case 26:y=Xe.memoizedState;case 5:case 27:var j=Xe;if(y?ky(y):j.stateNode.complete){st=0,on=null;var k=j.sibling;if(k!==null)Xe=k;else{var V=j.return;V!==null?(Xe=V,Gi(V)):Xe=null}break t}}st=0,on=null,Ml(e,t,c,5);break;case 6:st=0,on=null,Ml(e,t,c,6);break;case 8:Pc(),xt=6;break e;default:throw Error(u(462))}}Jv();break}catch(ae){Hh(e,ae)}while(!0);return Gn=Ba=null,O.H=l,O.A=i,lt=n,Xe!==null?0:(ft=null,Qe=0,ci(),xt)}function Jv(){for(;Xe!==null&&!wn();)Yh(Xe)}function Yh(e){var t=ph(e.alternate,e,ea);e.memoizedProps=e.pendingProps,t===null?Gi(e):Xe=t}function Gh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=sh(n,t,t.pendingProps,t.type,void 0,Qe);break;case 11:t=sh(n,t,t.pendingProps,t.type.render,t.ref,Qe);break;case 5:mc(t);default:hh(n,t),t=Xe=Ip(t,ea),t=ph(n,t,ea)}e.memoizedProps=e.pendingProps,t===null?Gi(e):Xe=t}function Ml(e,t,n,l){Gn=Ba=null,mc(t),Al=null,ur=0;var i=t.return;try{if(Hv(e,i,t,n,Qe)){xt=1,Oi(e,gn(n,e.current)),Xe=null;return}}catch(c){if(i!==null)throw Xe=i,c;xt=1,Oi(e,gn(n,e.current)),Xe=null;return}t.flags&32768?(We||l===1?e=!0:_l||(Qe&536870912)!==0?e=!1:(va=e=!0,(l===2||l===9||l===3||l===6)&&(l=rn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Fh(t,e)):Gi(t)}function Gi(e){var t=e;do{if((t.flags&32768)!==0){Fh(t,va);return}e=t.return;var n=Iv(t.alternate,t,ea);if(n!==null){Xe=n;return}if(t=t.sibling,t!==null){Xe=t;return}Xe=t=e}while(t!==null);xt===0&&(xt=5)}function Fh(e,t){do{var n=Yv(e.alternate,e);if(n!==null){n.flags&=32767,Xe=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Xe=e;return}Xe=e=n}while(e!==null);xt=6,Xe=null}function Vh(e,t,n,l,i,c,y,j,k){e.cancelPendingCommit=null;do Fi();while(Tt!==0);if((lt&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(c=t.lanes|t.childLanes,c|=Bo,_b(e,n,c,y,j,k),e===ft&&(Xe=ft=null,Qe=0),Rl=t,Aa=e,ta=n,Zc=c,Qc=i,qh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,t1(Yt,function(){return Jh(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=O.T,O.T=null,i=ee.p,ee.p=2,y=lt,lt|=4;try{Gv(e,t,n)}finally{lt=y,ee.p=i,O.T=l}}Tt=1,Kh(),Xh(),Zh()}}function Kh(){if(Tt===1){Tt=0;var e=Aa,t=Rl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=O.T,O.T=null;var l=ee.p;ee.p=2;var i=lt;lt|=4;try{Eh(t,e);var c=du,y=$p(e.containerInfo),j=c.focusedElem,k=c.selectionRange;if(y!==j&&j&&j.ownerDocument&&Rp(j.ownerDocument.documentElement,j)){if(k!==null&&Do(j)){var V=k.start,ae=k.end;if(ae===void 0&&(ae=V),"selectionStart"in j)j.selectionStart=V,j.selectionEnd=Math.min(ae,j.value.length);else{var ie=j.ownerDocument||document,X=ie&&ie.defaultView||window;if(X.getSelection){var Q=X.getSelection(),Te=j.textContent.length,De=Math.min(k.start,Te),dt=k.end===void 0?De:Math.min(k.end,Te);!Q.extend&&De>dt&&(y=dt,dt=De,De=y);var L=Op(j,De),D=Op(j,dt);if(L&&D&&(Q.rangeCount!==1||Q.anchorNode!==L.node||Q.anchorOffset!==L.offset||Q.focusNode!==D.node||Q.focusOffset!==D.offset)){var F=ie.createRange();F.setStart(L.node,L.offset),Q.removeAllRanges(),De>dt?(Q.addRange(F),Q.extend(D.node,D.offset)):(F.setEnd(D.node,D.offset),Q.addRange(F))}}}}for(ie=[],Q=j;Q=Q.parentNode;)Q.nodeType===1&&ie.push({element:Q,left:Q.scrollLeft,top:Q.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<ie.length;j++){var re=ie[j];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}as=!!uu,du=uu=null}finally{lt=i,ee.p=l,O.T=n}}e.current=t,Tt=2}}function Xh(){if(Tt===2){Tt=0;var e=Aa,t=Rl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=O.T,O.T=null;var l=ee.p;ee.p=2;var i=lt;lt|=4;try{jh(e,t.alternate,t)}finally{lt=i,ee.p=l,O.T=n}}Tt=3}}function Zh(){if(Tt===4||Tt===3){Tt=0,Rn();var e=Aa,t=Rl,n=ta,l=qh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Tt=5:(Tt=0,Rl=Aa=null,Qh(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ja=null),go(n),t=t.stateNode,h&&typeof h.onCommitFiberRoot=="function")try{h.onCommitFiberRoot(Z,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=O.T,i=ee.p,ee.p=2,O.T=null;try{for(var c=e.onRecoverableError,y=0;y<l.length;y++){var j=l[y];c(j.value,{componentStack:j.stack})}}finally{O.T=t,ee.p=i}}(ta&3)!==0&&Fi(),Dn(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===Jc?Er++:(Er=0,Jc=e):Er=0,Cr(0)}}function Qh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,or(t)))}function Fi(){return Kh(),Xh(),Zh(),Jh()}function Jh(){if(Tt!==5)return!1;var e=Aa,t=Zc;Zc=0;var n=go(ta),l=O.T,i=ee.p;try{ee.p=32>n?32:n,O.T=null,n=Qc,Qc=null;var c=Aa,y=ta;if(Tt=0,Rl=Aa=null,ta=0,(lt&6)!==0)throw Error(u(331));var j=lt;if(lt|=4,Rh(c.current),kh(c,c.current,y,n),lt=j,Cr(0,!1),h&&typeof h.onPostCommitFiberRoot=="function")try{h.onPostCommitFiberRoot(Z,c)}catch{}return!0}finally{ee.p=i,O.T=l,Qh(e,t)}}function Ph(e,t,n){t=gn(n,t),t=kc(e.stateNode,t,2),e=ya(e,t,2),e!==null&&(En(e,2),Dn(e))}function ot(e,t,n){if(e.tag===3)Ph(e,e,n);else for(;t!==null;){if(t.tag===3){Ph(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ja===null||!ja.has(l))){e=gn(n,e),n=Wm(2),l=ya(t,n,2),l!==null&&(eh(n,l,t,e),En(l,2),Dn(l));break}}t=t.return}}function eu(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Kv;var i=new Set;l.set(t,i)}else i=l.get(t),i===void 0&&(i=new Set,l.set(t,i));i.has(n)||(Vc=!0,i.add(n),e=Pv.bind(null,e,t,n),t.then(e,e))}function Pv(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ft===e&&(Qe&n)===n&&(xt===4||xt===3&&(Qe&62914560)===Qe&&300>Oe()-Hi?(lt&2)===0&&$l(e,0):Kc|=n,Ol===Qe&&(Ol=0)),Dn(e)}function Wh(e,t){t===0&&(t=Tn()),e=Ua(e,t),e!==null&&(En(e,t),Dn(e))}function Wv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wh(e,n)}function e1(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),Wh(e,n)}function t1(e,t){return Ft(e,t)}var Vi=null,ql=null,tu=!1,Ki=!1,nu=!1,wa=0;function Dn(e){e!==ql&&e.next===null&&(ql===null?Vi=ql=e:ql=ql.next=e),Ki=!0,tu||(tu=!0,a1())}function Cr(e,t){if(!nu&&Ki){nu=!0;do for(var n=!1,l=Vi;l!==null;){if(e!==0){var i=l.pendingLanes;if(i===0)var c=0;else{var y=l.suspendedLanes,j=l.pingedLanes;c=(1<<31-I(42|e)+1)-1,c&=i&~(y&~j),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,ay(l,c))}else c=Qe,c=$e(l,l===ft?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||Ue(l,c)||(n=!0,ay(l,c));l=l.next}while(n);nu=!1}}function n1(){ey()}function ey(){Ki=tu=!1;var e=0;wa!==0&&p1()&&(e=wa);for(var t=Oe(),n=null,l=Vi;l!==null;){var i=l.next,c=ty(l,t);c===0?(l.next=null,n===null?Vi=i:n.next=i,i===null&&(ql=n)):(n=l,(e!==0||(c&3)!==0)&&(Ki=!0)),l=i}Tt!==0&&Tt!==5||Cr(e),wa!==0&&(wa=0)}function ty(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var y=31-I(c),j=1<<y,k=i[y];k===-1?((j&n)===0||(j&l)!==0)&&(i[y]=Fe(j,t)):k<=t&&(e.expiredLanes|=j),c&=~j}if(t=ft,n=Qe,n=$e(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(st===2||st===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Vt(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Ue(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Vt(l),go(n)){case 2:case 8:n=Kt;break;case 32:n=Yt;break;case 268435456:n=H;break;default:n=Yt}return l=ny.bind(null,e),n=Ft(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Vt(l),e.callbackPriority=2,e.callbackNode=null,2}function ny(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Fi()&&e.callbackNode!==n)return null;var l=Qe;return l=$e(e,e===ft?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(zh(e,l,t),ty(e,Oe()),e.callbackNode!=null&&e.callbackNode===n?ny.bind(null,e):null)}function ay(e,t){if(Fi())return null;zh(e,t,!0)}function a1(){h1(function(){(lt&6)!==0?Ft(Rt,n1):ey()})}function au(){if(wa===0){var e=vl;e===0&&(e=ne,ne<<=1,(ne&261888)===0&&(ne=256)),wa=e}return wa}function ly(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ti(""+e)}function ry(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function l1(e,t,n,l,i){if(t==="submit"&&n&&n.stateNode===i){var c=ly((i[Xt]||null).action),y=l.submitter;y&&(t=(t=y[Xt]||null)?ly(t.formAction):y.getAttribute("formAction"),t!==null&&(c=t,y=null));var j=new ri("action","action",null,l,i);e.push({event:j,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(wa!==0){var k=y?ry(i,y):new FormData(i);Ac(n,{pending:!0,data:k,method:i.method,action:c},null,k)}}else typeof c=="function"&&(j.preventDefault(),k=y?ry(i,y):new FormData(i),Ac(n,{pending:!0,data:k,method:i.method,action:c},c,k))},currentTarget:i}]})}}for(var lu=0;lu<Lo.length;lu++){var ru=Lo[lu],r1=ru.toLowerCase(),i1=ru[0].toUpperCase()+ru.slice(1);Cn(r1,"on"+i1)}Cn(Dp,"onAnimationEnd"),Cn(zp,"onAnimationIteration"),Cn(Up,"onAnimationStart"),Cn("dblclick","onDoubleClick"),Cn("focusin","onFocus"),Cn("focusout","onBlur"),Cn(jv,"onTransitionRun"),Cn(Av,"onTransitionStart"),Cn(Nv,"onTransitionCancel"),Cn(Hp,"onTransitionEnd"),il("onMouseEnter",["mouseout","mouseover"]),il("onMouseLeave",["mouseout","mouseover"]),il("onPointerEnter",["pointerout","pointerover"]),il("onPointerLeave",["pointerout","pointerover"]),Ma("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ma("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ma("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ma("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ma("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ma("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kr="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(" "),s1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(kr));function iy(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],i=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var y=l.length-1;0<=y;y--){var j=l[y],k=j.instance,V=j.currentTarget;if(j=j.listener,k!==c&&i.isPropagationStopped())break e;c=j,i.currentTarget=V;try{c(i)}catch(ae){oi(ae)}i.currentTarget=null,c=k}else for(y=0;y<l.length;y++){if(j=l[y],k=j.instance,V=j.currentTarget,j=j.listener,k!==c&&i.isPropagationStopped())break e;c=j,i.currentTarget=V;try{c(i)}catch(ae){oi(ae)}i.currentTarget=null,c=k}}}}function Ze(e,t){var n=t[xo];n===void 0&&(n=t[xo]=new Set);var l=e+"__bubble";n.has(l)||(sy(t,e,2,!1),n.add(l))}function iu(e,t,n){var l=0;t&&(l|=4),sy(n,e,l,t)}var Xi="_reactListening"+Math.random().toString(36).slice(2);function su(e){if(!e[Xi]){e[Xi]=!0,ep.forEach(function(n){n!=="selectionchange"&&(s1.has(n)||iu(n,!1,e),iu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xi]||(t[Xi]=!0,iu("selectionchange",!1,t))}}function sy(e,t,n,l){switch(Dy(t)){case 2:var i=q1;break;case 8:i=D1;break;default:i=ju}n=i.bind(null,t,n,e),i=void 0,!Eo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),l?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function ou(e,t,n,l,i){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var y=l.tag;if(y===3||y===4){var j=l.stateNode.containerInfo;if(j===i)break;if(y===4)for(y=l.return;y!==null;){var k=y.tag;if((k===3||k===4)&&y.stateNode.containerInfo===i)return;y=y.return}for(;j!==null;){if(y=al(j),y===null)return;if(k=y.tag,k===5||k===6||k===26||k===27){l=c=y;continue e}j=j.parentNode}}l=l.return}fp(function(){var V=c,ae=wo(n),ie=[];e:{var X=Lp.get(e);if(X!==void 0){var Q=ri,Te=e;switch(e){case"keypress":if(ai(n)===0)break e;case"keydown":case"keyup":Q=ev;break;case"focusin":Te="focus",Q=Oo;break;case"focusout":Te="blur",Q=Oo;break;case"beforeblur":case"afterblur":Q=Oo;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=hp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=Ib;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=av;break;case Dp:case zp:case Up:Q=Fb;break;case Hp:Q=rv;break;case"scroll":case"scrollend":Q=Lb;break;case"wheel":Q=sv;break;case"copy":case"cut":case"paste":Q=Kb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=gp;break;case"toggle":case"beforetoggle":Q=cv}var De=(t&4)!==0,dt=!De&&(e==="scroll"||e==="scrollend"),L=De?X!==null?X+"Capture":null:X;De=[];for(var D=V,F;D!==null;){var re=D;if(F=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||F===null||L===null||(re=Jl(D,L),re!=null&&De.push(_r(D,re,F))),dt)break;D=D.return}0<De.length&&(X=new Q(X,Te,null,n,ae),ie.push({event:X,listeners:De}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",Q=e==="mouseout"||e==="pointerout",X&&n!==No&&(Te=n.relatedTarget||n.fromElement)&&(al(Te)||Te[nl]))break e;if((Q||X)&&(X=ae.window===ae?ae:(X=ae.ownerDocument)?X.defaultView||X.parentWindow:window,Q?(Te=n.relatedTarget||n.toElement,Q=V,Te=Te?al(Te):null,Te!==null&&(dt=p(Te),De=Te.tag,Te!==dt||De!==5&&De!==27&&De!==6)&&(Te=null)):(Q=null,Te=V),Q!==Te)){if(De=hp,re="onMouseLeave",L="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(De=gp,re="onPointerLeave",L="onPointerEnter",D="pointer"),dt=Q==null?X:Ql(Q),F=Te==null?X:Ql(Te),X=new De(re,D+"leave",Q,n,ae),X.target=dt,X.relatedTarget=F,re=null,al(ae)===V&&(De=new De(L,D+"enter",Te,n,ae),De.target=F,De.relatedTarget=dt,re=De),dt=re,Q&&Te)t:{for(De=o1,L=Q,D=Te,F=0,re=L;re;re=De(re))F++;re=0;for(var Me=D;Me;Me=De(Me))re++;for(;0<F-re;)L=De(L),F--;for(;0<re-F;)D=De(D),re--;for(;F--;){if(L===D||D!==null&&L===D.alternate){De=L;break t}L=De(L),D=De(D)}De=null}else De=null;Q!==null&&oy(ie,X,Q,De,!1),Te!==null&&dt!==null&&oy(ie,dt,Te,De,!0)}}e:{if(X=V?Ql(V):window,Q=X.nodeName&&X.nodeName.toLowerCase(),Q==="select"||Q==="input"&&X.type==="file")var tt=wp;else if(Ap(X))if(Tp)tt=bv;else{tt=gv;var _e=yv}else Q=X.nodeName,!Q||Q.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?V&&Ao(V.elementType)&&(tt=wp):tt=xv;if(tt&&(tt=tt(e,V))){Np(ie,tt,n,ae);break e}_e&&_e(e,X,V),e==="focusout"&&V&&X.type==="number"&&V.memoizedProps.value!=null&&jo(X,"number",X.value)}switch(_e=V?Ql(V):window,e){case"focusin":(Ap(_e)||_e.contentEditable==="true")&&(fl=_e,zo=V,rr=null);break;case"focusout":rr=zo=fl=null;break;case"mousedown":Uo=!0;break;case"contextmenu":case"mouseup":case"dragend":Uo=!1,Mp(ie,n,ae);break;case"selectionchange":if(Sv)break;case"keydown":case"keyup":Mp(ie,n,ae)}var Ve;if($o)e:{switch(e){case"compositionstart":var Je="onCompositionStart";break e;case"compositionend":Je="onCompositionEnd";break e;case"compositionupdate":Je="onCompositionUpdate";break e}Je=void 0}else dl?Sp(e,n)&&(Je="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Je="onCompositionStart");Je&&(xp&&n.locale!=="ko"&&(dl||Je!=="onCompositionStart"?Je==="onCompositionEnd"&&dl&&(Ve=pp()):(ca=ae,Co="value"in ca?ca.value:ca.textContent,dl=!0)),_e=Zi(V,Je),0<_e.length&&(Je=new yp(Je,e,null,n,ae),ie.push({event:Je,listeners:_e}),Ve?Je.data=Ve:(Ve=jp(n),Ve!==null&&(Je.data=Ve)))),(Ve=dv?fv(e,n):pv(e,n))&&(Je=Zi(V,"onBeforeInput"),0<Je.length&&(_e=new yp("onBeforeInput","beforeinput",null,n,ae),ie.push({event:_e,listeners:Je}),_e.data=Ve)),l1(ie,e,V,n,ae)}iy(ie,t)})}function _r(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zi(e,t){for(var n=t+"Capture",l=[];e!==null;){var i=e,c=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||c===null||(i=Jl(e,n),i!=null&&l.unshift(_r(e,i,c)),i=Jl(e,t),i!=null&&l.push(_r(e,i,c))),e.tag===3)return l;e=e.return}return[]}function o1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function oy(e,t,n,l,i){for(var c=t._reactName,y=[];n!==null&&n!==l;){var j=n,k=j.alternate,V=j.stateNode;if(j=j.tag,k!==null&&k===l)break;j!==5&&j!==26&&j!==27||V===null||(k=V,i?(V=Jl(n,c),V!=null&&y.unshift(_r(n,V,k))):i||(V=Jl(n,c),V!=null&&y.push(_r(n,V,k)))),n=n.return}y.length!==0&&e.push({event:t,listeners:y})}var c1=/\r\n?/g,u1=/\u0000|\uFFFD/g;function cy(e){return(typeof e=="string"?e:""+e).replace(c1,`
9
+ `).replace(u1,"")}function uy(e,t){return t=cy(t),cy(e)===t}function ut(e,t,n,l,i,c){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||ol(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&ol(e,""+l);break;case"className":Wr(e,"class",l);break;case"tabIndex":Wr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Wr(e,n,l);break;case"style":up(e,l,c);break;case"data":if(t!=="object"){Wr(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ti(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"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 c=="function"&&(n==="formAction"?(t!=="input"&&ut(e,t,"name",i.name,i,null),ut(e,t,"formEncType",i.formEncType,i,null),ut(e,t,"formMethod",i.formMethod,i,null),ut(e,t,"formTarget",i.formTarget,i,null)):(ut(e,t,"encType",i.encType,i,null),ut(e,t,"method",i.method,i,null),ut(e,t,"target",i.target,i,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ti(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Ln);break;case"onScroll":l!=null&&Ze("scroll",e);break;case"onScrollEnd":l!=null&&Ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=ti(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":Ze("beforetoggle",e),Ze("toggle",e),Pr(e,"popover",l);break;case"xlinkActuate":Hn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Hn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Hn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Hn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Hn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Hn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Hn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Hn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Hn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Pr(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Ub.get(n)||n,Pr(e,n,l))}}function cu(e,t,n,l,i,c){switch(n){case"style":up(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"children":typeof l=="string"?ol(e,l):(typeof l=="number"||typeof l=="bigint")&&ol(e,""+l);break;case"onScroll":l!=null&&Ze("scroll",e);break;case"onScrollEnd":l!=null&&Ze("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Ln);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!tp.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),c=e[Xt]||null,c=c!=null?c[n]:null,typeof c=="function"&&e.removeEventListener(t,c,i),typeof l=="function")){typeof c!="function"&&c!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,i);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):Pr(e,n,l)}}}function zt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",e),Ze("load",e);var l=!1,i=!1,c;for(c in n)if(n.hasOwnProperty(c)){var y=n[c];if(y!=null)switch(c){case"src":l=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:ut(e,t,c,y,n,null)}}i&&ut(e,t,"srcSet",n.srcSet,n,null),l&&ut(e,t,"src",n.src,n,null);return;case"input":Ze("invalid",e);var j=c=y=i=null,k=null,V=null;for(l in n)if(n.hasOwnProperty(l)){var ae=n[l];if(ae!=null)switch(l){case"name":i=ae;break;case"type":y=ae;break;case"checked":k=ae;break;case"defaultChecked":V=ae;break;case"value":c=ae;break;case"defaultValue":j=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(u(137,t));break;default:ut(e,t,l,ae,n,null)}}ip(e,c,j,k,V,y,i,!1);return;case"select":Ze("invalid",e),l=y=c=null;for(i in n)if(n.hasOwnProperty(i)&&(j=n[i],j!=null))switch(i){case"value":c=j;break;case"defaultValue":y=j;break;case"multiple":l=j;default:ut(e,t,i,j,n,null)}t=c,n=y,e.multiple=!!l,t!=null?sl(e,!!l,t,!1):n!=null&&sl(e,!!l,n,!0);return;case"textarea":Ze("invalid",e),c=i=l=null;for(y in n)if(n.hasOwnProperty(y)&&(j=n[y],j!=null))switch(y){case"value":l=j;break;case"defaultValue":i=j;break;case"children":c=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(u(91));break;default:ut(e,t,y,j,n,null)}op(e,l,i,c);return;case"option":for(k in n)n.hasOwnProperty(k)&&(l=n[k],l!=null)&&(k==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":ut(e,t,k,l,n,null));return;case"dialog":Ze("beforetoggle",e),Ze("toggle",e),Ze("cancel",e),Ze("close",e);break;case"iframe":case"object":Ze("load",e);break;case"video":case"audio":for(l=0;l<kr.length;l++)Ze(kr[l],e);break;case"image":Ze("error",e),Ze("load",e);break;case"details":Ze("toggle",e);break;case"embed":case"source":case"link":Ze("error",e),Ze("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(V in n)if(n.hasOwnProperty(V)&&(l=n[V],l!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:ut(e,t,V,l,n,null)}return;default:if(Ao(t)){for(ae in n)n.hasOwnProperty(ae)&&(l=n[ae],l!==void 0&&cu(e,t,ae,l,n,void 0));return}}for(j in n)n.hasOwnProperty(j)&&(l=n[j],l!=null&&ut(e,t,j,l,n,null))}function d1(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,c=null,y=null,j=null,k=null,V=null,ae=null;for(Q in n){var ie=n[Q];if(n.hasOwnProperty(Q)&&ie!=null)switch(Q){case"checked":break;case"value":break;case"defaultValue":k=ie;default:l.hasOwnProperty(Q)||ut(e,t,Q,null,l,ie)}}for(var X in l){var Q=l[X];if(ie=n[X],l.hasOwnProperty(X)&&(Q!=null||ie!=null))switch(X){case"type":c=Q;break;case"name":i=Q;break;case"checked":V=Q;break;case"defaultChecked":ae=Q;break;case"value":y=Q;break;case"defaultValue":j=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(u(137,t));break;default:Q!==ie&&ut(e,t,X,Q,l,ie)}}So(e,y,j,k,V,ae,c,i);return;case"select":Q=y=j=X=null;for(c in n)if(k=n[c],n.hasOwnProperty(c)&&k!=null)switch(c){case"value":break;case"multiple":Q=k;default:l.hasOwnProperty(c)||ut(e,t,c,null,l,k)}for(i in l)if(c=l[i],k=n[i],l.hasOwnProperty(i)&&(c!=null||k!=null))switch(i){case"value":X=c;break;case"defaultValue":j=c;break;case"multiple":y=c;default:c!==k&&ut(e,t,i,c,l,k)}t=j,n=y,l=Q,X!=null?sl(e,!!n,X,!1):!!l!=!!n&&(t!=null?sl(e,!!n,t,!0):sl(e,!!n,n?[]:"",!1));return;case"textarea":Q=X=null;for(j in n)if(i=n[j],n.hasOwnProperty(j)&&i!=null&&!l.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:ut(e,t,j,null,l,i)}for(y in l)if(i=l[y],c=n[y],l.hasOwnProperty(y)&&(i!=null||c!=null))switch(y){case"value":X=i;break;case"defaultValue":Q=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(u(91));break;default:i!==c&&ut(e,t,y,i,l,c)}sp(e,X,Q);return;case"option":for(var Te in n)X=n[Te],n.hasOwnProperty(Te)&&X!=null&&!l.hasOwnProperty(Te)&&(Te==="selected"?e.selected=!1:ut(e,t,Te,null,l,X));for(k in l)X=l[k],Q=n[k],l.hasOwnProperty(k)&&X!==Q&&(X!=null||Q!=null)&&(k==="selected"?e.selected=X&&typeof X!="function"&&typeof X!="symbol":ut(e,t,k,X,l,Q));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 n)X=n[De],n.hasOwnProperty(De)&&X!=null&&!l.hasOwnProperty(De)&&ut(e,t,De,null,l,X);for(V in l)if(X=l[V],Q=n[V],l.hasOwnProperty(V)&&X!==Q&&(X!=null||Q!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(u(137,t));break;default:ut(e,t,V,X,l,Q)}return;default:if(Ao(t)){for(var dt in n)X=n[dt],n.hasOwnProperty(dt)&&X!==void 0&&!l.hasOwnProperty(dt)&&cu(e,t,dt,void 0,l,X);for(ae in l)X=l[ae],Q=n[ae],!l.hasOwnProperty(ae)||X===Q||X===void 0&&Q===void 0||cu(e,t,ae,X,l,Q);return}}for(var L in n)X=n[L],n.hasOwnProperty(L)&&X!=null&&!l.hasOwnProperty(L)&&ut(e,t,L,null,l,X);for(ie in l)X=l[ie],Q=n[ie],!l.hasOwnProperty(ie)||X===Q||X==null&&Q==null||ut(e,t,ie,X,l,Q)}function dy(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function f1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var i=n[l],c=i.transferSize,y=i.initiatorType,j=i.duration;if(c&&j&&dy(y)){for(y=0,j=i.responseEnd,l+=1;l<n.length;l++){var k=n[l],V=k.startTime;if(V>j)break;var ae=k.transferSize,ie=k.initiatorType;ae&&dy(ie)&&(k=k.responseEnd,y+=ae*(k<j?1:(j-V)/(k-V)))}if(--l,t+=8*(c+y)/(i.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 uu=null,du=null;function Qi(e){return e.nodeType===9?e:e.ownerDocument}function fy(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 py(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 fu(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 pu=null;function p1(){var e=window.event;return e&&e.type==="popstate"?e===pu?!1:(pu=e,!0):(pu=null,!1)}var my=typeof setTimeout=="function"?setTimeout:void 0,m1=typeof clearTimeout=="function"?clearTimeout:void 0,hy=typeof Promise=="function"?Promise:void 0,h1=typeof queueMicrotask=="function"?queueMicrotask:typeof hy<"u"?function(e){return hy.resolve(null).then(e).catch(y1)}:my;function y1(e){setTimeout(function(){throw e})}function Ta(e){return e==="head"}function yy(e,t){var n=t,l=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(i),Hl(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")Or(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Or(n);for(var c=n.firstChild;c;){var y=c.nextSibling,j=c.nodeName;c[Zl]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=y}}else n==="body"&&Or(e.ownerDocument.body);n=i}while(n);Hl(t)}function gy(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function mu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":mu(n),bo(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function g1(e,t,n,l){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Zl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=jn(e.nextSibling),e===null)break}return null}function x1(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=jn(e.nextSibling),e===null))return null;return e}function xy(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=jn(e.nextSibling),e===null))return null;return e}function hu(e){return e.data==="$?"||e.data==="$~"}function yu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function b1(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function jn(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 gu=null;function by(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return jn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function vy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Sy(e,t,n){switch(t=Qi(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Or(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bo(e)}var An=new Map,jy=new Set;function Ji(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var na=ee.d;ee.d={f:v1,r:S1,D:j1,C:A1,L:N1,m:w1,X:E1,S:T1,M:C1};function v1(){var e=na.f(),t=Ii();return e||t}function S1(e){var t=ll(e);t!==null&&t.tag===5&&t.type==="form"?Hm(t):na.r(e)}var Dl=typeof document>"u"?null:document;function Ay(e,t,n){var l=Dl;if(l&&typeof t=="string"&&t){var i=hn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),jy.has(i)||(jy.add(i),e={rel:e,crossOrigin:n,href:t},l.querySelector(i)===null&&(t=l.createElement("link"),zt(t,"link",e),Et(t),l.head.appendChild(t)))}}function j1(e){na.D(e),Ay("dns-prefetch",e,null)}function A1(e,t){na.C(e,t),Ay("preconnect",e,t)}function N1(e,t,n){na.L(e,t,n);var l=Dl;if(l&&e&&t){var i='link[rel="preload"][as="'+hn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+hn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+hn(n.imageSizes)+'"]')):i+='[href="'+hn(e)+'"]';var c=i;switch(t){case"style":c=zl(e);break;case"script":c=Ul(e)}An.has(c)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),An.set(c,e),l.querySelector(i)!==null||t==="style"&&l.querySelector(Rr(c))||t==="script"&&l.querySelector($r(c))||(t=l.createElement("link"),zt(t,"link",e),Et(t),l.head.appendChild(t)))}}function w1(e,t){na.m(e,t);var n=Dl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+hn(l)+'"][href="'+hn(e)+'"]',c=i;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ul(e)}if(!An.has(c)&&(e=S({rel:"modulepreload",href:e},t),An.set(c,e),n.querySelector(i)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector($r(c)))return}l=n.createElement("link"),zt(l,"link",e),Et(l),n.head.appendChild(l)}}}function T1(e,t,n){na.S(e,t,n);var l=Dl;if(l&&e){var i=rl(l).hoistableStyles,c=zl(e);t=t||"default";var y=i.get(c);if(!y){var j={loading:0,preload:null};if(y=l.querySelector(Rr(c)))j.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=An.get(c))&&xu(e,n);var k=y=l.createElement("link");Et(k),zt(k,"link",e),k._p=new Promise(function(V,ae){k.onload=V,k.onerror=ae}),k.addEventListener("load",function(){j.loading|=1}),k.addEventListener("error",function(){j.loading|=2}),j.loading|=4,Pi(y,t,l)}y={type:"stylesheet",instance:y,count:1,state:j},i.set(c,y)}}}function E1(e,t){na.X(e,t);var n=Dl;if(n&&e){var l=rl(n).hoistableScripts,i=Ul(e),c=l.get(i);c||(c=n.querySelector($r(i)),c||(e=S({src:e,async:!0},t),(t=An.get(i))&&bu(e,t),c=n.createElement("script"),Et(c),zt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(i,c))}}function C1(e,t){na.M(e,t);var n=Dl;if(n&&e){var l=rl(n).hoistableScripts,i=Ul(e),c=l.get(i);c||(c=n.querySelector($r(i)),c||(e=S({src:e,async:!0,type:"module"},t),(t=An.get(i))&&bu(e,t),c=n.createElement("script"),Et(c),zt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(i,c))}}function Ny(e,t,n,l){var i=(i=Ee.current)?Ji(i):null;if(!i)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=zl(n.href),n=rl(i).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=zl(n.href);var c=rl(i).hoistableStyles,y=c.get(e);if(y||(i=i.ownerDocument||i,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,y),(c=i.querySelector(Rr(e)))&&!c._p&&(y.instance=c,y.state.loading=5),An.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},An.set(e,n),c||k1(i,e,n,y.state))),t&&l===null)throw Error(u(528,""));return y}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ul(n),n=rl(i).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function zl(e){return'href="'+hn(e)+'"'}function Rr(e){return'link[rel="stylesheet"]['+e+"]"}function wy(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function k1(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),zt(t,"link",n),Et(t),e.head.appendChild(t))}function Ul(e){return'[src="'+hn(e)+'"]'}function $r(e){return"script[async]"+e}function Ty(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+hn(n.href)+'"]');if(l)return t.instance=l,Et(l),l;var i=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Et(l),zt(l,"style",i),Pi(l,n.precedence,e),t.instance=l;case"stylesheet":i=zl(n.href);var c=e.querySelector(Rr(i));if(c)return t.state.loading|=4,t.instance=c,Et(c),c;l=wy(n),(i=An.get(i))&&xu(l,i),c=(e.ownerDocument||e).createElement("link"),Et(c);var y=c;return y._p=new Promise(function(j,k){y.onload=j,y.onerror=k}),zt(c,"link",l),t.state.loading|=4,Pi(c,n.precedence,e),t.instance=c;case"script":return c=Ul(n.src),(i=e.querySelector($r(c)))?(t.instance=i,Et(i),i):(l=n,(i=An.get(c))&&(l=S({},n),bu(l,i)),e=e.ownerDocument||e,i=e.createElement("script"),Et(i),zt(i,"link",l),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Pi(l,n.precedence,e));return t.instance}function Pi(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=l.length?l[l.length-1]:null,c=i,y=0;y<l.length;y++){var j=l[y];if(j.dataset.precedence===t)c=j;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function xu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Wi=null;function Ey(e,t,n){if(Wi===null){var l=new Map,i=Wi=new Map;i.set(n,l)}else i=Wi,l=i.get(n),l||(l=new Map,i.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var c=n[i];if(!(c[Zl]||c[$t]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var y=c.getAttribute(t)||"";y=e+y;var j=l.get(y);j?j.push(c):l.set(y,[c])}}return l}function Cy(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function _1(e,t,n){if(n===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 ky(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function O1(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=zl(l.href),c=t.querySelector(Rr(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=es.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=c,Et(c);return}c=t.ownerDocument||t,l=wy(l),(i=An.get(i))&&xu(l,i),c=c.createElement("link"),Et(c);var y=c;y._p=new Promise(function(j,k){y.onload=j,y.onerror=k}),zt(c,"link",l),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=es.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var vu=0;function R1(e,t){return e.stylesheets&&e.count===0&&ns(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&ns(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&vu===0&&(vu=62500*f1());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ns(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>vu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(i)}}:null}function es(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ns(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ts=null;function ns(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ts=new Map,t.forEach($1,e),ts=null,es.call(e))}function $1(e,t){if(!(t.state.loading&4)){var n=ts.get(e);if(n)var l=n.get(null);else{n=new Map,ts.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var y=i[c];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(n.set(y.dataset.precedence,y),l=y)}l&&n.set(null,l)}i=t.instance,y=i.getAttribute("data-precedence"),c=n.get(y)||l,c===l&&n.set(null,i),n.set(y,i),this.count++,l=es.bind(this),i.addEventListener("load",l),i.addEventListener("error",l),c?c.parentNode.insertBefore(i,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Mr={$$typeof:E,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function M1(e,t,n,l,i,c,y,j,k){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=Un(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Un(0),this.hiddenUpdates=Un(null),this.identifierPrefix=l,this.onUncaughtError=i,this.onCaughtError=c,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function _y(e,t,n,l,i,c,y,j,k,V,ae,ie){return e=new M1(e,t,n,y,k,V,ae,ie,j),t=1,c===!0&&(t|=24),c=ln(3,null,null,t),e.current=c,c.stateNode=e,t=Wo(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:n,cache:t},ac(c),e}function Oy(e){return e?(e=hl,e):hl}function Ry(e,t,n,l,i,c){i=Oy(i),l.context===null?l.context=i:l.pendingContext=i,l=ha(t),l.payload={element:n},c=c===void 0?null:c,c!==null&&(l.callback=c),n=ya(e,l,t),n!==null&&(en(n,e,t),fr(n,e,t))}function $y(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Su(e,t){$y(e,t),(e=e.alternate)&&$y(e,t)}function My(e){if(e.tag===13||e.tag===31){var t=Ua(e,67108864);t!==null&&en(t,e,67108864),Su(e,67108864)}}function qy(e){if(e.tag===13||e.tag===31){var t=un();t=yo(t);var n=Ua(e,t);n!==null&&en(n,e,t),Su(e,t)}}var as=!0;function q1(e,t,n,l){var i=O.T;O.T=null;var c=ee.p;try{ee.p=2,ju(e,t,n,l)}finally{ee.p=c,O.T=i}}function D1(e,t,n,l){var i=O.T;O.T=null;var c=ee.p;try{ee.p=8,ju(e,t,n,l)}finally{ee.p=c,O.T=i}}function ju(e,t,n,l){if(as){var i=Au(l);if(i===null)ou(e,t,l,ls,n),zy(e,l);else if(U1(i,e,t,n,l))l.stopPropagation();else if(zy(e,l),t&4&&-1<z1.indexOf(e)){for(;i!==null;){var c=ll(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var y=Re(c.pendingLanes);if(y!==0){var j=c;for(j.pendingLanes|=2,j.entangledLanes|=2;y;){var k=1<<31-I(y);j.entanglements[1]|=k,y&=~k}Dn(c),(lt&6)===0&&(Li=Oe()+500,Cr(0))}}break;case 31:case 13:j=Ua(c,2),j!==null&&en(j,c,2),Ii(),Su(c,2)}if(c=Au(l),c===null&&ou(e,t,l,ls,n),c===i)break;i=c}i!==null&&l.stopPropagation()}else ou(e,t,l,null,n)}}function Au(e){return e=wo(e),Nu(e)}var ls=null;function Nu(e){if(ls=null,e=al(e),e!==null){var t=p(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=g(t),e!==null)return e;e=null}else if(n===31){if(e=x(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ls=e,null}function Dy(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(it()){case Rt:return 2;case Kt:return 8;case Yt:case d:return 32;case H:return 268435456;default:return 32}default:return 32}}var wu=!1,Ea=null,Ca=null,ka=null,qr=new Map,Dr=new Map,_a=[],z1="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 zy(e,t){switch(e){case"focusin":case"focusout":Ea=null;break;case"dragenter":case"dragleave":Ca=null;break;case"mouseover":case"mouseout":ka=null;break;case"pointerover":case"pointerout":qr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dr.delete(t.pointerId)}}function zr(e,t,n,l,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:c,targetContainers:[i]},t!==null&&(t=ll(t),t!==null&&My(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function U1(e,t,n,l,i){switch(t){case"focusin":return Ea=zr(Ea,e,t,n,l,i),!0;case"dragenter":return Ca=zr(Ca,e,t,n,l,i),!0;case"mouseover":return ka=zr(ka,e,t,n,l,i),!0;case"pointerover":var c=i.pointerId;return qr.set(c,zr(qr.get(c)||null,e,t,n,l,i)),!0;case"gotpointercapture":return c=i.pointerId,Dr.set(c,zr(Dr.get(c)||null,e,t,n,l,i)),!0}return!1}function Uy(e){var t=al(e.target);if(t!==null){var n=p(t);if(n!==null){if(t=n.tag,t===13){if(t=g(n),t!==null){e.blockedOn=t,Pf(e.priority,function(){qy(n)});return}}else if(t===31){if(t=x(n),t!==null){e.blockedOn=t,Pf(e.priority,function(){qy(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function rs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Au(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);No=l,n.target.dispatchEvent(l),No=null}else return t=ll(n),t!==null&&My(t),e.blockedOn=n,!1;t.shift()}return!0}function Hy(e,t,n){rs(e)&&n.delete(t)}function H1(){wu=!1,Ea!==null&&rs(Ea)&&(Ea=null),Ca!==null&&rs(Ca)&&(Ca=null),ka!==null&&rs(ka)&&(ka=null),qr.forEach(Hy),Dr.forEach(Hy)}function is(e,t){e.blockedOn===t&&(e.blockedOn=null,wu||(wu=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,H1)))}var ss=null;function Ly(e){ss!==e&&(ss=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){ss===e&&(ss=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],i=e[t+2];if(typeof l!="function"){if(Nu(l||n)===null)continue;break}var c=ll(n);c!==null&&(e.splice(t,3),t-=3,Ac(c,{pending:!0,data:i,method:n.method,action:l},l,i))}}))}function Hl(e){function t(k){return is(k,e)}Ea!==null&&is(Ea,e),Ca!==null&&is(Ca,e),ka!==null&&is(ka,e),qr.forEach(t),Dr.forEach(t);for(var n=0;n<_a.length;n++){var l=_a[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<_a.length&&(n=_a[0],n.blockedOn===null);)Uy(n),n.blockedOn===null&&_a.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var i=n[l],c=n[l+1],y=i[Xt]||null;if(typeof c=="function")y||Ly(n);else if(y){var j=null;if(c&&c.hasAttribute("formAction")){if(i=c,y=c[Xt]||null)j=y.formAction;else if(Nu(i)!==null)continue}else j=y.action;typeof j=="function"?n[l+1]=j:(n.splice(l,3),l-=3),Ly(n)}}}function By(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(y){return i=y})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Tu(e){this._internalRoot=e}os.prototype.render=Tu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,l=un();Ry(n,l,e,t,null,null)},os.prototype.unmount=Tu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ry(e.current,2,null,e,null,null),Ii(),t[nl]=null}};function os(e){this._internalRoot=e}os.prototype.unstable_scheduleHydration=function(e){if(e){var t=Jf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<_a.length&&t!==0&&t<_a[n].priority;n++);_a.splice(n,0,e),n===0&&Uy(e)}};var Iy=r.version;if(Iy!=="19.2.8")throw Error(u(527,Iy,"19.2.8"));ee.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=m(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var L1={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cs.isDisabled&&cs.supportsFiber)try{Z=cs.inject(L1),h=cs}catch{}}return Bl.createRoot=function(e,t){if(!f(e))throw Error(u(299));var n=!1,l="",i=Zm,c=Qm,y=Jm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=_y(e,1,!1,null,null,n,l,null,i,c,y,By),e[nl]=t.current,su(e),new Tu(t)},Bl.hydrateRoot=function(e,t,n){if(!f(e))throw Error(u(299));var l=!1,i="",c=Zm,y=Qm,j=Jm,k=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(y=n.onCaughtError),n.onRecoverableError!==void 0&&(j=n.onRecoverableError),n.formState!==void 0&&(k=n.formState)),t=_y(e,1,!0,t,n??null,l,i,k,c,y,j,By),t.context=Oy(null),n=t.current,l=un(),l=yo(l),i=ha(l),i.callback=null,ya(n,i,l),n=l,t.current.lanes=n,En(t,n),Dn(t),e[nl]=t.current,su(e),new os(t)},Bl.version="19.2.8",Bl}var Uu;function Py(){if(Uu)return ds.exports;Uu=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(r){console.error(r)}}return a(),ds.exports=Jy(),ds.exports}var Wy=Py(),W=hs();const gs=Cu(W);const eg=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tg=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,u)=>u?u.toUpperCase():o.toLowerCase()),Hu=a=>{const r=tg(a);return r.charAt(0).toUpperCase()+r.slice(1)},Lu=(...a)=>a.filter((r,o,u)=>!!r&&r.trim()!==""&&u.indexOf(r)===o).join(" ").trim(),ng=a=>{for(const r in a)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var ag={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const lg=W.forwardRef(({color:a="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:u,className:f="",children:p,iconNode:g,...x},b)=>W.createElement("svg",{ref:b,...ag,width:r,height:r,stroke:a,strokeWidth:u?Number(o)*24/Number(r):o,className:Lu("lucide",f),...!p&&!ng(x)&&{"aria-hidden":"true"},...x},[...g.map(([m,v])=>W.createElement(m,v)),...Array.isArray(p)?p:[p]]));const et=(a,r)=>{const o=W.forwardRef(({className:u,...f},p)=>W.createElement(lg,{ref:p,iconNode:r,className:Lu(`lucide-${eg(Hu(a))}`,`lucide-${a}`,u),...f}));return o.displayName=Hu(a),o};const Bu=et("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const rg=et("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Iu=et("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Yu=et("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Ur=et("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Gu=et("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const ig=et("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const xs=et("clock-3",[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const sg=et("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const bs=et("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const vs=et("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const og=et("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const cg=et("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);const ug=et("library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);const Ss=et("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const dg=et("lock-open",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);const fg=et("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const pg=et("menu",[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]]);const Pa=et("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);const Ra=et("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const mg=et("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const hg=et("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const Fu=et("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const Vu=et("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);const yg=et("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const gg=et("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);const xg=et("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const Ku=et("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);const dn=et("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const bg=et("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Xu=et("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);const Zu=et("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function vg(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Ht={},Hr={},aa={},Qu;function Il(){if(Qu)return aa;Qu=1;function a(g){return typeof g>"u"||g===null}function r(g){return typeof g=="object"&&g!==null}function o(g){return Array.isArray(g)?g:a(g)?[]:[g]}function u(g,x){if(x){const b=Object.keys(x);for(let m=0,v=b.length;m<v;m+=1){const S=b[m];g[S]=x[S]}}return g}function f(g,x){let b="";for(let m=0;m<x;m+=1)b+=g;return b}function p(g){return g===0&&Number.NEGATIVE_INFINITY===1/g}return aa.isNothing=a,aa.isObject=r,aa.toArray=o,aa.repeat=f,aa.isNegativeZero=p,aa.extend=u,aa}var js,Ju;function Yl(){if(Ju)return js;Ju=1;function a(o,u){let f="";const p=o.reason||"(unknown reason)";return o.mark?(o.mark.name&&(f+='in "'+o.mark.name+'" '),f+="("+(o.mark.line+1)+":"+(o.mark.column+1)+")",!u&&o.mark.snippet&&(f+=`
10
10
 
11
- `+c.mark.snippet),p+" "+f):p}function i(c,u){Error.call(this),this.name="YAMLException",this.reason=c,this.mark=u,this.message=a(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i.prototype.toString=function(u){return this.name+": "+a(this,u)},bs=i,bs}var vs,Yu;function cg(){if(Yu)return vs;Yu=1;const a=Ya();function i(f,p,g,y,x){let h="",S="";const A=Math.floor(x/2)-1;return y-p>A&&(h=" ... ",p=y-A+h.length),g-y>A&&(S=" ...",g=y+A-S.length),{str:h+f.slice(p,g).replace(/\t/g,"→")+S,pos:y-p+h.length}}function c(f,p){return a.repeat(" ",p-f.length)+f}function u(f,p){if(p=Object.create(p||null),!f.buffer)return null;p.maxLength||(p.maxLength=79),typeof p.indent!="number"&&(p.indent=1),typeof p.linesBefore!="number"&&(p.linesBefore=3),typeof p.linesAfter!="number"&&(p.linesAfter=2);const g=/\r?\n|\r|\0/g,y=[0],x=[];let h,S=-1;for(;h=g.exec(f.buffer);)x.push(h.index),y.push(h.index+h[0].length),f.position<=h.index&&S<0&&(S=y.length-2);S<0&&(S=y.length-1);let A="";const C=Math.min(f.line+p.linesAfter,x.length).toString().length,M=p.maxLength-(p.indent+C+3);for(let G=1;G<=p.linesBefore&&!(S-G<0);G++){const U=i(f.buffer,y[S-G],x[S-G],f.position-(y[S]-y[S-G]),M);A=a.repeat(" ",p.indent)+c((f.line-G+1).toString(),C)+" | "+U.str+`
12
- `+A}const k=i(f.buffer,y[S],x[S],f.position,M);A+=a.repeat(" ",p.indent)+c((f.line+1).toString(),C)+" | "+k.str+`
13
- `,A+=a.repeat("-",p.indent+C+3+k.pos)+`^
14
- `;for(let G=1;G<=p.linesAfter&&!(S+G>=x.length);G++){const U=i(f.buffer,y[S+G],x[S+G],f.position-(y[S]-y[S+G]),M);A+=a.repeat(" ",p.indent)+c((f.line+G+1).toString(),C)+" | "+U.str+`
15
- `}return A.replace(/\n$/,"")}return vs=u,vs}var Ss,Gu;function Bt(){if(Gu)return Ss;Gu=1;const a=Ga(),i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],c=["scalar","sequence","mapping"];function u(p){const g={};return p!==null&&Object.keys(p).forEach(function(y){p[y].forEach(function(x){g[String(x)]=y})}),g}function f(p,g){if(g=g||{},Object.keys(g).forEach(function(y){if(i.indexOf(y)===-1)throw new a('Unknown option "'+y+'" is met in definition of "'+p+'" YAML type.')}),this.options=g,this.tag=p,this.kind=g.kind||null,this.resolve=g.resolve||function(){return!0},this.construct=g.construct||function(y){return y},this.instanceOf=g.instanceOf||null,this.predicate=g.predicate||null,this.represent=g.represent||null,this.representName=g.representName||null,this.defaultStyle=g.defaultStyle||null,this.multi=g.multi||!1,this.styleAliases=u(g.styleAliases||null),c.indexOf(this.kind)===-1)throw new a('Unknown kind "'+this.kind+'" is specified for "'+p+'" YAML type.')}return Ss=f,Ss}var As,Iu;function Fu(){if(Iu)return As;Iu=1;const a=Ga(),i=Bt();function c(p,g){const y=[];return p[g].forEach(function(x){let h=y.length;y.forEach(function(S,A){S.tag===x.tag&&S.kind===x.kind&&S.multi===x.multi&&(h=A)}),y[h]=x}),y}function u(){const p={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function g(y){y.multi?(p.multi[y.kind].push(y),p.multi.fallback.push(y)):p[y.kind][y.tag]=p.fallback[y.tag]=y}for(let y=0,x=arguments.length;y<x;y+=1)arguments[y].forEach(g);return p}function f(p){return this.extend(p)}return f.prototype.extend=function(g){let y=[],x=[];if(g instanceof i)x.push(g);else if(Array.isArray(g))x=x.concat(g);else if(g&&(Array.isArray(g.implicit)||Array.isArray(g.explicit)))g.implicit&&(y=y.concat(g.implicit)),g.explicit&&(x=x.concat(g.explicit));else throw new a("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");y.forEach(function(S){if(!(S instanceof i))throw new a("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(S.loadKind&&S.loadKind!=="scalar")throw new a("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(S.multi)throw new a("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),x.forEach(function(S){if(!(S instanceof i))throw new a("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const h=Object.create(f.prototype);return h.implicit=(this.implicit||[]).concat(y),h.explicit=(this.explicit||[]).concat(x),h.compiledImplicit=c(h,"implicit"),h.compiledExplicit=c(h,"explicit"),h.compiledTypeMap=u(h.compiledImplicit,h.compiledExplicit),h},As=f,As}var js,Vu;function Xu(){if(Vu)return js;Vu=1;const a=Bt();return js=new a("tag:yaml.org,2002:str",{kind:"scalar",construct:function(i){return i!==null?i:""}}),js}var Ns,Zu;function Qu(){if(Zu)return Ns;Zu=1;const a=Bt();return Ns=new a("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(i){return i!==null?i:[]}}),Ns}var ws,Ku;function Ju(){if(Ku)return ws;Ku=1;const a=Bt();return ws=new a("tag:yaml.org,2002:map",{kind:"mapping",construct:function(i){return i!==null?i:{}}}),ws}var Ts,Wu;function Pu(){if(Wu)return Ts;Wu=1;const a=Fu();return Ts=new a({explicit:[Xu(),Qu(),Ju()]}),Ts}var Es,ed;function td(){if(ed)return Es;ed=1;const a=Bt();function i(f){if(f===null)return!0;const p=f.length;return p===1&&f==="~"||p===4&&(f==="null"||f==="Null"||f==="NULL")}function c(){return null}function u(f){return f===null}return Es=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:c,predicate:u,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),Es}var Cs,nd;function ld(){if(nd)return Cs;nd=1;const a=Bt();function i(f){if(f===null)return!1;const p=f.length;return p===4&&(f==="true"||f==="True"||f==="TRUE")||p===5&&(f==="false"||f==="False"||f==="FALSE")}function c(f){return f==="true"||f==="True"||f==="TRUE"}function u(f){return Object.prototype.toString.call(f)==="[object Boolean]"}return Cs=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:c,predicate:u,represent:{lowercase:function(f){return f?"true":"false"},uppercase:function(f){return f?"TRUE":"FALSE"},camelcase:function(f){return f?"True":"False"}},defaultStyle:"lowercase"}),Cs}var _s,ad;function rd(){if(ad)return _s;ad=1;const a=Ya(),i=Bt();function c(h){return h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102}function u(h){return h>=48&&h<=55}function f(h){return h>=48&&h<=57}function p(h){if(h===null)return!1;const S=h.length;let A=0,C=!1;if(!S)return!1;let M=h[A];if((M==="-"||M==="+")&&(M=h[++A]),M==="0"){if(A+1===S)return!0;if(M=h[++A],M==="b"){for(A++;A<S;A++){if(M=h[A],M!=="0"&&M!=="1")return!1;C=!0}return C&&isFinite(g(h))}if(M==="x"){for(A++;A<S;A++){if(!c(h.charCodeAt(A)))return!1;C=!0}return C&&isFinite(g(h))}if(M==="o"){for(A++;A<S;A++){if(!u(h.charCodeAt(A)))return!1;C=!0}return C&&isFinite(g(h))}}for(;A<S;A++){if(!f(h.charCodeAt(A)))return!1;C=!0}return C?isFinite(g(h)):!1}function g(h){let S=h,A=1,C=S[0];if((C==="-"||C==="+")&&(C==="-"&&(A=-1),S=S.slice(1),C=S[0]),S==="0")return 0;if(C==="0"){if(S[1]==="b")return A*parseInt(S.slice(2),2);if(S[1]==="x")return A*parseInt(S.slice(2),16);if(S[1]==="o")return A*parseInt(S.slice(2),8)}return A*parseInt(S,10)}function y(h){return g(h)}function x(h){return Object.prototype.toString.call(h)==="[object Number]"&&h%1===0&&!a.isNegativeZero(h)}return _s=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:p,construct:y,predicate:x,represent:{binary:function(h){return h>=0?"0b"+h.toString(2):"-0b"+h.toString(2).slice(1)},octal:function(h){return h>=0?"0o"+h.toString(8):"-0o"+h.toString(8).slice(1)},decimal:function(h){return h.toString(10)},hexadecimal:function(h){return h>=0?"0x"+h.toString(16).toUpperCase():"-0x"+h.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),_s}var Os,id;function sd(){if(id)return Os;id=1;const a=Ya(),i=Bt(),c=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),u=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function f(h){return h===null||!c.test(h)?!1:isFinite(parseFloat(h,10))?!0:u.test(h)}function p(h){let S=h.toLowerCase();const A=S[0]==="-"?-1:1;return"+-".indexOf(S[0])>=0&&(S=S.slice(1)),S===".inf"?A===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:S===".nan"?NaN:A*parseFloat(S,10)}const g=/^[-+]?[0-9]+e/;function y(h,S){if(isNaN(h))switch(S){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===h)switch(S){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===h)switch(S){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(a.isNegativeZero(h))return"-0.0";const A=h.toString(10);return g.test(A)?A.replace("e",".e"):A}function x(h){return Object.prototype.toString.call(h)==="[object Number]"&&(h%1!==0||a.isNegativeZero(h))}return Os=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:f,construct:p,predicate:x,represent:y,defaultStyle:"lowercase"}),Os}var ks,od;function cd(){return od||(od=1,ks=Pu().extend({implicit:[td(),ld(),rd(),sd()]})),ks}var Rs,ud;function dd(){return ud||(ud=1,Rs=cd()),Rs}var qs,fd;function pd(){if(fd)return qs;fd=1;const a=Bt(),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),c=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function u(g){return g===null?!1:i.exec(g)!==null||c.exec(g)!==null}function f(g){let y=0,x=null,h=i.exec(g);if(h===null&&(h=c.exec(g)),h===null)throw new Error("Date resolve error");const S=+h[1],A=+h[2]-1,C=+h[3];if(!h[4])return new Date(Date.UTC(S,A,C));const M=+h[4],k=+h[5],G=+h[6];if(h[7]){for(y=h[7].slice(0,3);y.length<3;)y+="0";y=+y}if(h[9]){const I=+h[10],_=+(h[11]||0);x=(I*60+_)*6e4,h[9]==="-"&&(x=-x)}const U=new Date(Date.UTC(S,A,C,M,k,G,y));return x&&U.setTime(U.getTime()-x),U}function p(g){return g.toISOString()}return qs=new a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:u,construct:f,instanceOf:Date,represent:p}),qs}var Ms,md;function hd(){if(md)return Ms;md=1;const a=Bt();function i(c){return c==="<<"||c===null}return Ms=new a("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i}),Ms}var zs,yd;function gd(){if(yd)return zs;yd=1;const a=Bt(),i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
16
- \r`;function c(g){if(g===null)return!1;let y=0;const x=g.length,h=i;for(let S=0;S<x;S++){const A=h.indexOf(g.charAt(S));if(!(A>64)){if(A<0)return!1;y+=6}}return y%8===0}function u(g){const y=g.replace(/[\r\n=]/g,""),x=y.length,h=i;let S=0;const A=[];for(let M=0;M<x;M++)M%4===0&&M&&(A.push(S>>16&255),A.push(S>>8&255),A.push(S&255)),S=S<<6|h.indexOf(y.charAt(M));const C=x%4*6;return C===0?(A.push(S>>16&255),A.push(S>>8&255),A.push(S&255)):C===18?(A.push(S>>10&255),A.push(S>>2&255)):C===12&&A.push(S>>4&255),new Uint8Array(A)}function f(g){let y="",x=0;const h=g.length,S=i;for(let C=0;C<h;C++)C%3===0&&C&&(y+=S[x>>18&63],y+=S[x>>12&63],y+=S[x>>6&63],y+=S[x&63]),x=(x<<8)+g[C];const A=h%3;return A===0?(y+=S[x>>18&63],y+=S[x>>12&63],y+=S[x>>6&63],y+=S[x&63]):A===2?(y+=S[x>>10&63],y+=S[x>>4&63],y+=S[x<<2&63],y+=S[64]):A===1&&(y+=S[x>>2&63],y+=S[x<<4&63],y+=S[64],y+=S[64]),y}function p(g){return Object.prototype.toString.call(g)==="[object Uint8Array]"}return zs=new a("tag:yaml.org,2002:binary",{kind:"scalar",resolve:c,construct:u,predicate:p,represent:f}),zs}var $s,xd;function bd(){if(xd)return $s;xd=1;const a=Bt(),i=Object.prototype.hasOwnProperty,c=Object.prototype.toString;function u(p){if(p===null)return!0;const g={},y=p;for(let x=0,h=y.length;x<h;x+=1){const S=y[x];let A=!1;if(c.call(S)!=="[object Object]")return!1;let C;for(C in S)if(i.call(S,C))if(!A)A=!0;else return!1;if(!A||i.call(g,C))return!1;Object.defineProperty(g,C,{value:!0})}return!0}function f(p){return p!==null?p:[]}return $s=new a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:u,construct:f}),$s}var Ds,vd;function Sd(){if(vd)return Ds;vd=1;const a=Bt(),i=Object.prototype.toString;function c(f){if(f===null)return!0;const p=f,g=new Array(p.length);for(let y=0,x=p.length;y<x;y+=1){const h=p[y];if(i.call(h)!=="[object Object]")return!1;const S=Object.keys(h);if(S.length!==1)return!1;g[y]=[S[0],h[S[0]]]}return!0}function u(f){if(f===null)return[];const p=f,g=new Array(p.length);for(let y=0,x=p.length;y<x;y+=1){const h=p[y],S=Object.keys(h);g[y]=[S[0],h[S[0]]]}return g}return Ds=new a("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:c,construct:u}),Ds}var Us,Ad;function jd(){if(Ad)return Us;Ad=1;const a=Bt(),i=Object.prototype.hasOwnProperty;function c(f){if(f===null)return!0;const p=f;for(const g in p)if(i.call(p,g)&&p[g]!==null)return!1;return!0}function u(f){return f!==null?f:{}}return Us=new a("tag:yaml.org,2002:set",{kind:"mapping",resolve:c,construct:u}),Us}var Hs,Nd;function Ls(){return Nd||(Nd=1,Hs=dd().extend({implicit:[pd(),hd()],explicit:[gd(),bd(),Sd(),jd()]})),Hs}var wd;function ug(){if(wd)return Dr;wd=1;const a=Ya(),i=Ga(),c=cg(),u=Ls(),f=Object.prototype.hasOwnProperty,p=1,g=2,y=3,x=4,h=1,S=2,A=3,C=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,M=/[\x85\u2028\u2029]/,k=/[,\[\]{}]/,G=/^(?:!|!!|![0-9A-Za-z-]+!)$/,U=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function I(d){return Object.prototype.toString.call(d)}function _(d){return d===10||d===13}function N(d){return d===9||d===32}function j(d){return d===9||d===32||d===10||d===13}function R(d){return d===44||d===91||d===93||d===123||d===125}function Y(d){if(d>=48&&d<=57)return d-48;const q=d|32;return q>=97&&q<=102?q-97+10:-1}function D(d){return d===120?2:d===117?4:d===85?8:0}function X(d){return d>=48&&d<=57?d-48:-1}function me(d){switch(d){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
17
- `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function xe(d){return d<=65535?String.fromCharCode(d):String.fromCharCode((d-65536>>10)+55296,(d-65536&1023)+56320)}function ge(d,q,ae){q==="__proto__"?Object.defineProperty(d,q,{configurable:!0,enumerable:!0,writable:!0,value:ae}):d[q]=ae}const Ee=new Array(256),He=new Array(256);for(let d=0;d<256;d++)Ee[d]=me(d)?1:0,He[d]=me(d);function he(d,q){this.input=d,this.filename=q.filename||null,this.schema=q.schema||u,this.onWarning=q.onWarning||null,this.legacy=q.legacy||!1,this.json=q.json||!1,this.listener=q.listener||null,this.maxDepth=typeof q.maxDepth=="number"?q.maxDepth:100,this.maxTotalMergeKeys=typeof q.maxTotalMergeKeys=="number"?q.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=d.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function ke(d,q){const ae={name:d.filename,buffer:d.input.slice(0,-1),position:d.position,line:d.line,column:d.position-d.lineStart};return ae.snippet=c(ae),new i(q,ae)}function T(d,q){throw ke(d,q)}function ne(d,q){d.onWarning&&d.onWarning.call(null,ke(d,q))}function W(d,q,ae){const ie=d.anchorMapTransactions;if(ie.length!==0){const Q=ie[ie.length-1];f.call(Q,q)||(Q[q]={existed:f.call(d.anchorMap,q),value:d.anchorMap[q]})}d.anchorMap[q]=ae}function K(d){d.anchorMapTransactions.push(Object.create(null))}function P(d){const q=d.anchorMapTransactions.pop(),ae=d.anchorMapTransactions;if(ae.length===0)return;const ie=ae[ae.length-1],Q=Object.keys(q);for(let b=0,H=Q.length;b<H;b+=1){const F=Q[b];f.call(ie,F)||(ie[F]=q[F])}}function w(d){const q=d.anchorMapTransactions.pop(),ae=Object.keys(q);for(let ie=ae.length-1;ie>=0;ie-=1){const Q=q[ae[ie]];Q.existed?d.anchorMap[ae[ie]]=Q.value:delete d.anchorMap[ae[ie]]}}function $(d){return{position:d.position,line:d.line,lineStart:d.lineStart,lineIndent:d.lineIndent,firstTabInLine:d.firstTabInLine,tag:d.tag,anchor:d.anchor,kind:d.kind,result:d.result}}function ce(d,q){d.position=q.position,d.line=q.line,d.lineStart=q.lineStart,d.lineIndent=q.lineIndent,d.firstTabInLine=q.firstTabInLine,d.tag=q.tag,d.anchor=q.anchor,d.kind=q.kind,d.result=q.result}const pe={YAML:function(q,ae,ie){q.version!==null&&T(q,"duplication of %YAML directive"),ie.length!==1&&T(q,"YAML directive accepts exactly one argument");const Q=/^([0-9]+)\.([0-9]+)$/.exec(ie[0]);Q===null&&T(q,"ill-formed argument of the YAML directive");const b=parseInt(Q[1],10),H=parseInt(Q[2],10);b!==1&&T(q,"unacceptable YAML version of the document"),q.version=ie[0],q.checkLineBreaks=H<2,H!==1&&H!==2&&ne(q,"unsupported YAML version of the document")},TAG:function(q,ae,ie){let Q;ie.length!==2&&T(q,"TAG directive accepts exactly two arguments");const b=ie[0];Q=ie[1],G.test(b)||T(q,"ill-formed tag handle (first argument) of the TAG directive"),f.call(q.tagMap,b)&&T(q,'there is a previously declared suffix for "'+b+'" tag handle'),U.test(Q)||T(q,"ill-formed tag prefix (second argument) of the TAG directive");try{Q=decodeURIComponent(Q)}catch{T(q,"tag prefix is malformed: "+Q)}q.tagMap[b]=Q}};function ve(d,q,ae,ie){if(q<ae){const Q=d.input.slice(q,ae);if(ie)for(let b=0,H=Q.length;b<H;b+=1){const F=Q.charCodeAt(b);F===9||F>=32&&F<=1114111||T(d,"expected valid JSON character")}else C.test(Q)&&T(d,"the stream contains non-printable characters");d.result+=Q}}function Te(d){d.totalMergeKeys++,d.maxTotalMergeKeys!==-1&&d.totalMergeKeys>d.maxTotalMergeKeys&&T(d,"merge keys exceeded maxTotalMergeKeys ("+d.maxTotalMergeKeys+")")}function Re(d,q,ae,ie){a.isObject(ae)||T(d,"cannot merge mappings; the provided source object is unacceptable"),Te(d);const Q=Object.keys(ae);for(let b=0,H=Q.length;b<H;b+=1){const F=Q[b];Te(d),f.call(q,F)||(ge(q,F,ae[F]),ie[F]=!0)}}function Ve(d,q,ae,ie,Q,b,H,F,ue){if(Array.isArray(Q)){Q=Array.prototype.slice.call(Q);for(let de=0,fe=Q.length;de<fe;de+=1)Array.isArray(Q[de])&&T(d,"nested arrays are not supported inside keys"),typeof Q=="object"&&I(Q[de])==="[object Object]"&&(Q[de]="[object Object]")}if(typeof Q=="object"&&I(Q)==="[object Object]"&&(Q="[object Object]"),Q=String(Q),q===null&&(q={}),ie==="tag:yaml.org,2002:merge")if(Array.isArray(b)){b.length>100&&T(d,"abnormal merge sequence size");for(let de=0,fe=b.length;de<fe;de+=1)Re(d,q,b[de],ae)}else Re(d,q,b,ae);else!d.json&&!f.call(ae,Q)&&f.call(q,Q)&&(d.line=H||d.line,d.lineStart=F||d.lineStart,d.position=ue||d.position,T(d,"duplicated mapping key")),ge(q,Q,b),delete ae[Q];return q}function Ie(d){const q=d.input.charCodeAt(d.position);q===10?d.position++:q===13?(d.position++,d.input.charCodeAt(d.position)===10&&d.position++):T(d,"a line break is expected"),d.line+=1,d.lineStart=d.position,d.firstTabInLine=-1}function Be(d,q,ae){let ie=0,Q=d.input.charCodeAt(d.position);for(;Q!==0;){for(;N(Q);)Q===9&&d.firstTabInLine===-1&&(d.firstTabInLine=d.position),Q=d.input.charCodeAt(++d.position);if(q&&Q===35)do Q=d.input.charCodeAt(++d.position);while(Q!==10&&Q!==13&&Q!==0);if(_(Q))for(Ie(d),Q=d.input.charCodeAt(d.position),ie++,d.lineIndent=0;Q===32;)d.lineIndent++,Q=d.input.charCodeAt(++d.position);else break}return ae!==-1&&ie!==0&&d.lineIndent<ae&&ne(d,"deficient indentation"),ie}function Z(d){let q=d.position,ae=d.input.charCodeAt(q);return!!((ae===45||ae===46)&&ae===d.input.charCodeAt(q+1)&&ae===d.input.charCodeAt(q+2)&&(q+=3,ae=d.input.charCodeAt(q),ae===0||j(ae)))}function be(d,q){q===1?d.result+=" ":q>1&&(d.result+=a.repeat(`
18
- `,q-1))}function Se(d,q,ae){let ie,Q,b,H,F,ue;const de=d.kind,fe=d.result;let ee=d.input.charCodeAt(d.position);if(j(ee)||R(ee)||ee===35||ee===38||ee===42||ee===33||ee===124||ee===62||ee===39||ee===34||ee===37||ee===64||ee===96)return!1;if(ee===63||ee===45){const ye=d.input.charCodeAt(d.position+1);if(j(ye)||ae&&R(ye))return!1}for(d.kind="scalar",d.result="",ie=Q=d.position,b=!1;ee!==0;){if(ee===58){const ye=d.input.charCodeAt(d.position+1);if(j(ye)||ae&&R(ye))break}else if(ee===35){const ye=d.input.charCodeAt(d.position-1);if(j(ye))break}else{if(d.position===d.lineStart&&Z(d)||ae&&R(ee))break;if(_(ee))if(H=d.line,F=d.lineStart,ue=d.lineIndent,Be(d,!1,-1),d.lineIndent>=q){b=!0,ee=d.input.charCodeAt(d.position);continue}else{d.position=Q,d.line=H,d.lineStart=F,d.lineIndent=ue;break}}b&&(ve(d,ie,Q,!1),be(d,d.line-H),ie=Q=d.position,b=!1),N(ee)||(Q=d.position+1),ee=d.input.charCodeAt(++d.position)}return ve(d,ie,Q,!1),d.result?!0:(d.kind=de,d.result=fe,!1)}function Ne(d,q){let ae,ie,Q=d.input.charCodeAt(d.position);if(Q!==39)return!1;for(d.kind="scalar",d.result="",d.position++,ae=ie=d.position;(Q=d.input.charCodeAt(d.position))!==0;)if(Q===39)if(ve(d,ae,d.position,!0),Q=d.input.charCodeAt(++d.position),Q===39)ae=d.position,d.position++,ie=d.position;else return!0;else _(Q)?(ve(d,ae,ie,!0),be(d,Be(d,!1,q)),ae=ie=d.position):d.position===d.lineStart&&Z(d)?T(d,"unexpected end of the document within a single quoted scalar"):(d.position++,N(Q)||(ie=d.position));T(d,"unexpected end of the stream within a single quoted scalar")}function Je(d,q){let ae,ie,Q,b=d.input.charCodeAt(d.position);if(b!==34)return!1;for(d.kind="scalar",d.result="",d.position++,ae=ie=d.position;(b=d.input.charCodeAt(d.position))!==0;){if(b===34)return ve(d,ae,d.position,!0),d.position++,!0;if(b===92){if(ve(d,ae,d.position,!0),b=d.input.charCodeAt(++d.position),_(b))Be(d,!1,q);else if(b<256&&Ee[b])d.result+=He[b],d.position++;else if((Q=D(b))>0){let H=Q,F=0;for(;H>0;H--)b=d.input.charCodeAt(++d.position),(Q=Y(b))>=0?F=(F<<4)+Q:T(d,"expected hexadecimal character");d.result+=xe(F),d.position++}else T(d,"unknown escape sequence");ae=ie=d.position}else _(b)?(ve(d,ae,ie,!0),be(d,Be(d,!1,q)),ae=ie=d.position):d.position===d.lineStart&&Z(d)?T(d,"unexpected end of the document within a double quoted scalar"):(d.position++,N(b)||(ie=d.position))}T(d,"unexpected end of the stream within a double quoted scalar")}function at(d,q){let ae=!0,ie,Q,b;const H=d.tag;let F;const ue=d.anchor;let de,fe,ee,ye;const je=Object.create(null);let Oe,qe,$e,Ye=d.input.charCodeAt(d.position);if(Ye===91)de=93,ye=!1,F=[];else if(Ye===123)de=125,ye=!0,F={};else return!1;for(d.anchor!==null&&W(d,d.anchor,F),Ye=d.input.charCodeAt(++d.position);Ye!==0;){if(Be(d,!0,q),Ye=d.input.charCodeAt(d.position),Ye===de)return d.position++,d.tag=H,d.anchor=ue,d.kind=ye?"mapping":"sequence",d.result=F,!0;if(ae?Ye===44&&T(d,"expected the node content, but found ','"):T(d,"missed comma between flow collection entries"),qe=Oe=$e=null,fe=ee=!1,Ye===63){const jn=d.input.charCodeAt(d.position+1);j(jn)&&(fe=ee=!0,d.position++,Be(d,!0,q))}ie=d.line,Q=d.lineStart,b=d.position,_e(d,q,p,!1,!0),qe=d.tag,Oe=d.result,Be(d,!0,q),Ye=d.input.charCodeAt(d.position),(ee||d.line===ie)&&Ye===58&&(fe=!0,Ye=d.input.charCodeAt(++d.position),Be(d,!0,q),_e(d,q,p,!1,!0),$e=d.result),ye?Ve(d,F,je,qe,Oe,$e,ie,Q,b):fe?F.push(Ve(d,null,je,qe,Oe,$e,ie,Q,b)):F.push(Oe),Be(d,!0,q),Ye=d.input.charCodeAt(d.position),Ye===44?(ae=!0,Ye=d.input.charCodeAt(++d.position)):ae=!1}T(d,"unexpected end of the stream within a flow collection")}function ft(d,q){let ae,ie=h,Q=!1,b=!1,H=q,F=0,ue=!1,de,fe=d.input.charCodeAt(d.position);if(fe===124)ae=!1;else if(fe===62)ae=!0;else return!1;for(d.kind="scalar",d.result="";fe!==0;)if(fe=d.input.charCodeAt(++d.position),fe===43||fe===45)h===ie?ie=fe===43?A:S:T(d,"repeat of a chomping mode identifier");else if((de=X(fe))>=0)de===0?T(d,"bad explicit indentation width of a block scalar; it cannot be less than one"):b?T(d,"repeat of an indentation width identifier"):(H=q+de-1,b=!0);else break;if(N(fe)){do fe=d.input.charCodeAt(++d.position);while(N(fe));if(fe===35)do fe=d.input.charCodeAt(++d.position);while(!_(fe)&&fe!==0)}for(;fe!==0;){for(Ie(d),d.lineIndent=0,fe=d.input.charCodeAt(d.position);(!b||d.lineIndent<H)&&fe===32;)d.lineIndent++,fe=d.input.charCodeAt(++d.position);if(!b&&d.lineIndent>H&&(H=d.lineIndent),_(fe)){F++;continue}if(!b&&H===0&&T(d,"missing indentation for block scalar"),d.lineIndent<H){ie===A?d.result+=a.repeat(`
19
- `,Q?1+F:F):ie===h&&Q&&(d.result+=`
20
- `);break}ae?N(fe)?(ue=!0,d.result+=a.repeat(`
21
- `,Q?1+F:F)):ue?(ue=!1,d.result+=a.repeat(`
22
- `,F+1)):F===0?Q&&(d.result+=" "):d.result+=a.repeat(`
23
- `,F):d.result+=a.repeat(`
24
- `,Q?1+F:F),Q=!0,b=!0,F=0;const ee=d.position;for(;!_(fe)&&fe!==0;)fe=d.input.charCodeAt(++d.position);ve(d,ee,d.position,!1)}return!0}function dt(d,q){const ae=d.tag,ie=d.anchor,Q=[];let b=!1;if(d.firstTabInLine!==-1)return!1;d.anchor!==null&&W(d,d.anchor,Q);let H=d.input.charCodeAt(d.position);for(;H!==0&&(d.firstTabInLine!==-1&&(d.position=d.firstTabInLine,T(d,"tab characters must not be used in indentation")),H===45);){const F=d.input.charCodeAt(d.position+1);if(!j(F))break;if(b=!0,d.position++,Be(d,!0,-1)&&d.lineIndent<=q){Q.push(null),H=d.input.charCodeAt(d.position);continue}const ue=d.line;if(_e(d,q,y,!1,!0),Q.push(d.result),Be(d,!0,-1),H=d.input.charCodeAt(d.position),(d.line===ue||d.lineIndent>q)&&H!==0)T(d,"bad indentation of a sequence entry");else if(d.lineIndent<q)break}return b?(d.tag=ae,d.anchor=ie,d.kind="sequence",d.result=Q,!0):!1}function un(d,q,ae){let ie,Q,b,H;const F=d.tag,ue=d.anchor,de={},fe=Object.create(null);let ee=null,ye=null,je=null,Oe=!1,qe=!1;if(d.firstTabInLine!==-1)return!1;d.anchor!==null&&W(d,d.anchor,de);let $e=d.input.charCodeAt(d.position);for(;$e!==0;){!Oe&&d.firstTabInLine!==-1&&(d.position=d.firstTabInLine,T(d,"tab characters must not be used in indentation"));const Ye=d.input.charCodeAt(d.position+1),jn=d.line;if(($e===63||$e===58)&&j(Ye))$e===63?(Oe&&(Ve(d,de,fe,ee,ye,null,Q,b,H),ee=ye=je=null),qe=!0,Oe=!0,ie=!0):Oe?(Oe=!1,ie=!0):T(d,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),d.position+=1,$e=Ye;else{if(Q=d.line,b=d.lineStart,H=d.position,!_e(d,ae,g,!1,!0))break;if(d.line===jn){for($e=d.input.charCodeAt(d.position);N($e);)$e=d.input.charCodeAt(++d.position);if($e===58)$e=d.input.charCodeAt(++d.position),j($e)||T(d,"a whitespace character is expected after the key-value separator within a block mapping"),Oe&&(Ve(d,de,fe,ee,ye,null,Q,b,H),ee=ye=je=null),qe=!0,Oe=!1,ie=!1,ee=d.tag,ye=d.result;else if(qe)T(d,"can not read an implicit mapping pair; a colon is missed");else return d.tag=F,d.anchor=ue,!0}else if(qe)T(d,"can not read a block mapping entry; a multiline key may not be an implicit key");else return d.tag=F,d.anchor=ue,!0}if((d.line===jn||d.lineIndent>q)&&(Oe&&(Q=d.line,b=d.lineStart,H=d.position),_e(d,q,x,!0,ie)&&(Oe?ye=d.result:je=d.result),Oe||(Ve(d,de,fe,ee,ye,je,Q,b,H),ee=ye=je=null),Be(d,!0,-1),$e=d.input.charCodeAt(d.position)),(d.line===jn||d.lineIndent>q)&&$e!==0)T(d,"bad indentation of a mapping entry");else if(d.lineIndent<q)break}return Oe&&Ve(d,de,fe,ee,ye,null,Q,b,H),qe&&(d.tag=F,d.anchor=ue,d.kind="mapping",d.result=de),qe}function Yt(d){let q=!1,ae=!1,ie,Q,b=d.input.charCodeAt(d.position);if(b!==33)return!1;d.tag!==null&&T(d,"duplication of a tag property"),b=d.input.charCodeAt(++d.position),b===60?(q=!0,b=d.input.charCodeAt(++d.position)):b===33?(ae=!0,ie="!!",b=d.input.charCodeAt(++d.position)):ie="!";let H=d.position;if(q){do b=d.input.charCodeAt(++d.position);while(b!==0&&b!==62);d.position<d.length?(Q=d.input.slice(H,d.position),b=d.input.charCodeAt(++d.position)):T(d,"unexpected end of the stream within a verbatim tag")}else{for(;b!==0&&!j(b);)b===33&&(ae?T(d,"tag suffix cannot contain exclamation marks"):(ie=d.input.slice(H-1,d.position+1),G.test(ie)||T(d,"named tag handle cannot contain such characters"),ae=!0,H=d.position+1)),b=d.input.charCodeAt(++d.position);Q=d.input.slice(H,d.position),k.test(Q)&&T(d,"tag suffix cannot contain flow indicator characters")}Q&&!U.test(Q)&&T(d,"tag name cannot contain such characters: "+Q);try{Q=decodeURIComponent(Q)}catch{T(d,"tag name is malformed: "+Q)}return q?d.tag=Q:f.call(d.tagMap,ie)?d.tag=d.tagMap[ie]+Q:ie==="!"?d.tag="!"+Q:ie==="!!"?d.tag="tag:yaml.org,2002:"+Q:T(d,'undeclared tag handle "'+ie+'"'),!0}function It(d){let q=d.input.charCodeAt(d.position);if(q!==38)return!1;d.anchor!==null&&T(d,"duplication of an anchor property"),q=d.input.charCodeAt(++d.position);const ae=d.position;for(;q!==0&&!j(q)&&!R(q);)q=d.input.charCodeAt(++d.position);return d.position===ae&&T(d,"name of an anchor node must contain at least one character"),d.anchor=d.input.slice(ae,d.position),!0}function kn(d){let q=d.input.charCodeAt(d.position);if(q!==42)return!1;q=d.input.charCodeAt(++d.position);const ae=d.position;for(;q!==0&&!j(q)&&!R(q);)q=d.input.charCodeAt(++d.position);d.position===ae&&T(d,"name of an alias node must contain at least one character");const ie=d.input.slice(ae,d.position);return f.call(d.anchorMap,ie)||T(d,'unidentified alias "'+ie+'"'),d.result=d.anchorMap[ie],Be(d,!0,-1),!0}function Rn(d,q,ae,ie){const Q=$(d);return K(d),ce(d,q),d.tag=null,d.anchor=null,d.kind=null,d.result=null,un(d,ae,ie)&&d.kind==="mapping"?(P(d),!0):(w(d),ce(d,Q),!1)}function _e(d,q,ae,ie,Q){let b,H,F=1,ue=!1,de=!1,fe=null,ee,ye,je;d.depth>=d.maxDepth&&T(d,"nesting exceeded maxDepth ("+d.maxDepth+")"),d.depth+=1,d.listener!==null&&d.listener("open",d),d.tag=null,d.anchor=null,d.kind=null,d.result=null;const Oe=b=H=x===ae||y===ae;if(ie&&Be(d,!0,-1)&&(ue=!0,d.lineIndent>q?F=1:d.lineIndent===q?F=0:d.lineIndent<q&&(F=-1)),F===1)for(;;){const qe=d.input.charCodeAt(d.position),$e=$(d);if(ue&&(qe===33&&d.tag!==null||qe===38&&d.anchor!==null)||!Yt(d)&&!It(d))break;fe===null&&(fe=$e),Be(d,!0,-1)?(ue=!0,H=Oe,d.lineIndent>q?F=1:d.lineIndent===q?F=0:d.lineIndent<q&&(F=-1)):H=!1}if(H&&(H=ue||Q),F===1||x===ae)if(p===ae||g===ae?ye=q:ye=q+1,je=d.position-d.lineStart,F===1)if(H&&(dt(d,je)||un(d,je,ye))||at(d,ye))de=!0;else{const qe=d.input.charCodeAt(d.position);fe!==null&&Oe&&!H&&qe!==124&&qe!==62&&Rn(d,fe,fe.position-fe.lineStart,ye)||b&&ft(d,ye)||Ne(d,ye)||Je(d,ye)?de=!0:kn(d)?(de=!0,(d.tag!==null||d.anchor!==null)&&T(d,"alias node should not have any properties")):Se(d,ye,p===ae)&&(de=!0,d.tag===null&&(d.tag="?")),d.anchor!==null&&W(d,d.anchor,d.result)}else F===0&&(de=H&&dt(d,je));if(d.tag===null)d.anchor!==null&&W(d,d.anchor,d.result);else if(d.tag==="?"){d.result!==null&&d.kind!=="scalar"&&T(d,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+d.kind+'"');for(let qe=0,$e=d.implicitTypes.length;qe<$e;qe+=1)if(ee=d.implicitTypes[qe],ee.resolve(d.result)){d.result=ee.construct(d.result),d.tag=ee.tag,d.anchor!==null&&W(d,d.anchor,d.result);break}}else if(d.tag!=="!"){if(f.call(d.typeMap[d.kind||"fallback"],d.tag))ee=d.typeMap[d.kind||"fallback"][d.tag];else{ee=null;const qe=d.typeMap.multi[d.kind||"fallback"];for(let $e=0,Ye=qe.length;$e<Ye;$e+=1)if(d.tag.slice(0,qe[$e].tag.length)===qe[$e].tag){ee=qe[$e];break}}ee||T(d,"unknown tag !<"+d.tag+">"),d.result!==null&&ee.kind!==d.kind&&T(d,"unacceptable node kind for !<"+d.tag+'> tag; it should be "'+ee.kind+'", not "'+d.kind+'"'),ee.resolve(d.result,d.tag)?(d.result=ee.construct(d.result,d.tag),d.anchor!==null&&W(d,d.anchor,d.result)):T(d,"cannot resolve a node with !<"+d.tag+"> explicit tag")}return d.listener!==null&&d.listener("close",d),d.depth-=1,d.tag!==null||d.anchor!==null||de}function se(d){const q=d.position;let ae=!1,ie;for(d.version=null,d.checkLineBreaks=d.legacy,d.tagMap=Object.create(null),d.anchorMap=Object.create(null);(ie=d.input.charCodeAt(d.position))!==0&&(Be(d,!0,-1),ie=d.input.charCodeAt(d.position),!(d.lineIndent>0||ie!==37));){ae=!0,ie=d.input.charCodeAt(++d.position);let Q=d.position;for(;ie!==0&&!j(ie);)ie=d.input.charCodeAt(++d.position);const b=d.input.slice(Q,d.position),H=[];for(b.length<1&&T(d,"directive name must not be less than one character in length");ie!==0;){for(;N(ie);)ie=d.input.charCodeAt(++d.position);if(ie===35){do ie=d.input.charCodeAt(++d.position);while(ie!==0&&!_(ie));break}if(_(ie))break;for(Q=d.position;ie!==0&&!j(ie);)ie=d.input.charCodeAt(++d.position);H.push(d.input.slice(Q,d.position))}ie!==0&&Ie(d),f.call(pe,b)?pe[b](d,b,H):ne(d,'unknown document directive "'+b+'"')}if(Be(d,!0,-1),d.lineIndent===0&&d.input.charCodeAt(d.position)===45&&d.input.charCodeAt(d.position+1)===45&&d.input.charCodeAt(d.position+2)===45?(d.position+=3,Be(d,!0,-1)):ae&&T(d,"directives end mark is expected"),_e(d,d.lineIndent-1,x,!1,!0),Be(d,!0,-1),d.checkLineBreaks&&M.test(d.input.slice(q,d.position))&&ne(d,"non-ASCII line breaks are interpreted as content"),d.documents.push(d.result),d.position===d.lineStart&&Z(d)){d.input.charCodeAt(d.position)===46&&(d.position+=3,Be(d,!0,-1));return}d.position<d.length-1&&T(d,"end of the stream or a document separator is expected")}function Ae(d,q){d=String(d),q=q||{},d.length!==0&&(d.charCodeAt(d.length-1)!==10&&d.charCodeAt(d.length-1)!==13&&(d+=`
25
- `),d.charCodeAt(0)===65279&&(d=d.slice(1)));const ae=new he(d,q),ie=d.indexOf("\0");for(ie!==-1&&(ae.position=ie,T(ae,"null byte is not allowed in input")),ae.input+="\0";ae.input.charCodeAt(ae.position)===32;)ae.lineIndent+=1,ae.position+=1;for(;ae.position<ae.length-1;)se(ae);return ae.documents}function De(d,q,ae){q!==null&&typeof q=="object"&&typeof ae>"u"&&(ae=q,q=null);const ie=Ae(d,ae);if(typeof q!="function")return ie;for(let Q=0,b=ie.length;Q<b;Q+=1)q(ie[Q])}function dn(d,q){const ae=Ae(d,q);if(ae.length!==0){if(ae.length===1)return ae[0];throw new i("expected a single document in the stream, but found more")}}return Dr.loadAll=De,Dr.load=dn,Dr}var Bs={},Td;function dg(){if(Td)return Bs;Td=1;const a=Ya(),i=Ga(),c=Ls(),u=Object.prototype.toString,f=Object.prototype.hasOwnProperty,p=65279,g=9,y=10,x=13,h=32,S=33,A=34,C=35,M=37,k=38,G=39,U=42,I=44,_=45,N=58,j=61,R=62,Y=63,D=64,X=91,me=93,xe=96,ge=123,Ee=124,He=125,he={};he[0]="\\0",he[7]="\\a",he[8]="\\b",he[9]="\\t",he[10]="\\n",he[11]="\\v",he[12]="\\f",he[13]="\\r",he[27]="\\e",he[34]='\\"',he[92]="\\\\",he[133]="\\N",he[160]="\\_",he[8232]="\\L",he[8233]="\\P";const ke=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],T=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ne(b,H){if(H===null)return{};const F={},ue=Object.keys(H);for(let de=0,fe=ue.length;de<fe;de+=1){let ee=ue[de],ye=String(H[ee]);ee.slice(0,2)==="!!"&&(ee="tag:yaml.org,2002:"+ee.slice(2));const je=b.compiledTypeMap.fallback[ee];je&&f.call(je.styleAliases,ye)&&(ye=je.styleAliases[ye]),F[ee]=ye}return F}function W(b){let H,F;const ue=b.toString(16).toUpperCase();if(b<=255)H="x",F=2;else if(b<=65535)H="u",F=4;else if(b<=4294967295)H="U",F=8;else throw new i("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+H+a.repeat("0",F-ue.length)+ue}const K=1,P=2;function w(b){this.schema=b.schema||c,this.indent=Math.max(1,b.indent||2),this.noArrayIndent=b.noArrayIndent||!1,this.skipInvalid=b.skipInvalid||!1,this.flowLevel=a.isNothing(b.flowLevel)?-1:b.flowLevel,this.styleMap=ne(this.schema,b.styles||null),this.sortKeys=b.sortKeys||!1,this.lineWidth=b.lineWidth||80,this.noRefs=b.noRefs||!1,this.noCompatMode=b.noCompatMode||!1,this.condenseFlow=b.condenseFlow||!1,this.quotingType=b.quotingType==='"'?P:K,this.forceQuotes=b.forceQuotes||!1,this.replacer=typeof b.replacer=="function"?b.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function $(b,H){const F=a.repeat(" ",H);let ue=0,de="";const fe=b.length;for(;ue<fe;){let ee;const ye=b.indexOf(`
26
- `,ue);ye===-1?(ee=b.slice(ue),ue=fe):(ee=b.slice(ue,ye+1),ue=ye+1),ee.length&&ee!==`
27
- `&&(de+=F),de+=ee}return de}function ce(b,H){return`
28
- `+a.repeat(" ",b.indent*H)}function pe(b,H){for(let F=0,ue=b.implicitTypes.length;F<ue;F+=1)if(b.implicitTypes[F].resolve(H))return!0;return!1}function ve(b){return b===h||b===g}function Te(b){return b>=32&&b<=126||b>=161&&b<=55295&&b!==8232&&b!==8233||b>=57344&&b<=65533&&b!==p||b>=65536&&b<=1114111}function Re(b){return Te(b)&&b!==p&&b!==x&&b!==y}function Ve(b,H,F){const ue=Re(b),de=ue&&!ve(b);return(F?ue:ue&&b!==I&&b!==X&&b!==me&&b!==ge&&b!==He)&&b!==C&&!(H===N&&!de)||Re(H)&&!ve(H)&&b===C||H===N&&de}function Ie(b){return Te(b)&&b!==p&&!ve(b)&&b!==_&&b!==Y&&b!==N&&b!==I&&b!==X&&b!==me&&b!==ge&&b!==He&&b!==C&&b!==k&&b!==U&&b!==S&&b!==Ee&&b!==j&&b!==R&&b!==G&&b!==A&&b!==M&&b!==D&&b!==xe}function Be(b){return!ve(b)&&b!==N}function Z(b,H){const F=b.charCodeAt(H);let ue;return F>=55296&&F<=56319&&H+1<b.length&&(ue=b.charCodeAt(H+1),ue>=56320&&ue<=57343)?(F-55296)*1024+ue-56320+65536:F}function be(b){return/^\n* /.test(b)}const Se=1,Ne=2,Je=3,at=4,ft=5;function dt(b,H,F,ue,de,fe,ee,ye){let je,Oe=0,qe=null,$e=!1,Ye=!1;const jn=ue!==-1;let Un=-1,Nn=Ie(Z(b,0))&&Be(Z(b,b.length-1));if(H||ee)for(je=0;je<b.length;Oe>=65536?je+=2:je++){if(Oe=Z(b,je),!Te(Oe))return ft;Nn=Nn&&Ve(Oe,qe,ye),qe=Oe}else{for(je=0;je<b.length;Oe>=65536?je+=2:je++){if(Oe=Z(b,je),Oe===y)$e=!0,jn&&(Ye=Ye||je-Un-1>ue&&b[Un+1]!==" ",Un=je);else if(!Te(Oe))return ft;Nn=Nn&&Ve(Oe,qe,ye),qe=Oe}Ye=Ye||jn&&je-Un-1>ue&&b[Un+1]!==" "}return!$e&&!Ye?Nn&&!ee&&!de(b)?Se:fe===P?ft:Ne:F>9&&be(b)?ft:ee?fe===P?ft:Ne:Ye?at:Je}function un(b,H,F,ue,de){b.dump=(function(){if(H.length===0)return b.quotingType===P?'""':"''";if(!b.noCompatMode&&(ke.indexOf(H)!==-1||T.test(H)))return b.quotingType===P?'"'+H+'"':"'"+H+"'";const fe=b.indent*Math.max(1,F),ee=b.lineWidth===-1?-1:Math.max(Math.min(b.lineWidth,40),b.lineWidth-fe),ye=ue||b.flowLevel>-1&&F>=b.flowLevel;function je(Oe){return pe(b,Oe)}switch(dt(H,ye,b.indent,ee,je,b.quotingType,b.forceQuotes&&!ue,de)){case Se:return H;case Ne:return"'"+H.replace(/'/g,"''")+"'";case Je:return"|"+Yt(H,b.indent)+It($(H,fe));case at:return">"+Yt(H,b.indent)+It($(kn(H,ee),fe));case ft:return'"'+_e(H)+'"';default:throw new i("impossible error: invalid scalar style")}})()}function Yt(b,H){const F=be(b)?String(H):"",ue=b[b.length-1]===`
29
- `,fe=ue&&(b[b.length-2]===`
30
- `||b===`
31
- `)?"+":ue?"":"-";return F+fe+`
32
- `}function It(b){return b[b.length-1]===`
33
- `?b.slice(0,-1):b}function kn(b,H){const F=/(\n+)([^\n]*)/g;let ue=(function(){let ye=b.indexOf(`
34
- `);return ye=ye!==-1?ye:b.length,F.lastIndex=ye,Rn(b.slice(0,ye),H)})(),de=b[0]===`
35
- `||b[0]===" ",fe,ee;for(;ee=F.exec(b);){const ye=ee[1],je=ee[2];fe=je[0]===" ",ue+=ye+(!de&&!fe&&je!==""?`
36
- `:"")+Rn(je,H),de=fe}return ue}function Rn(b,H){if(b===""||b[0]===" ")return b;const F=/ [^ ]/g;let ue,de=0,fe,ee=0,ye=0,je="";for(;ue=F.exec(b);)ye=ue.index,ye-de>H&&(fe=ee>de?ee:ye,je+=`
37
- `+b.slice(de,fe),de=fe+1),ee=ye;return je+=`
38
- `,b.length-de>H&&ee>de?je+=b.slice(de,ee)+`
39
- `+b.slice(ee+1):je+=b.slice(de),je.slice(1)}function _e(b){let H="",F=0;for(let ue=0;ue<b.length;F>=65536?ue+=2:ue++){F=Z(b,ue);const de=he[F];!de&&Te(F)?(H+=b[ue],F>=65536&&(H+=b[ue+1])):H+=de||W(F)}return H}function se(b,H,F){let ue="";const de=b.tag;for(let fe=0,ee=F.length;fe<ee;fe+=1){let ye=F[fe];b.replacer&&(ye=b.replacer.call(F,String(fe),ye)),(q(b,H,ye,!1,!1)||typeof ye>"u"&&q(b,H,null,!1,!1))&&(ue!==""&&(ue+=","+(b.condenseFlow?"":" ")),ue+=b.dump)}b.tag=de,b.dump="["+ue+"]"}function Ae(b,H,F,ue){let de="";const fe=b.tag;for(let ee=0,ye=F.length;ee<ye;ee+=1){let je=F[ee];b.replacer&&(je=b.replacer.call(F,String(ee),je)),(q(b,H+1,je,!0,!0,!1,!0)||typeof je>"u"&&q(b,H+1,null,!0,!0,!1,!0))&&((!ue||de!=="")&&(de+=ce(b,H)),b.dump&&y===b.dump.charCodeAt(0)?de+="-":de+="- ",de+=b.dump)}b.tag=fe,b.dump=de||"[]"}function De(b,H,F){let ue="";const de=b.tag,fe=Object.keys(F);for(let ee=0,ye=fe.length;ee<ye;ee+=1){let je="";ue!==""&&(je+=", "),b.condenseFlow&&(je+='"');const Oe=fe[ee];let qe=F[Oe];b.replacer&&(qe=b.replacer.call(F,Oe,qe)),q(b,H,Oe,!1,!1)&&(b.dump.length>1024&&(je+="? "),je+=b.dump+(b.condenseFlow?'"':"")+":"+(b.condenseFlow?"":" "),q(b,H,qe,!1,!1)&&(je+=b.dump,ue+=je))}b.tag=de,b.dump="{"+ue+"}"}function dn(b,H,F,ue){let de="";const fe=b.tag,ee=Object.keys(F);if(b.sortKeys===!0)ee.sort();else if(typeof b.sortKeys=="function")ee.sort(b.sortKeys);else if(b.sortKeys)throw new i("sortKeys must be a boolean or a function");for(let ye=0,je=ee.length;ye<je;ye+=1){let Oe="";(!ue||de!=="")&&(Oe+=ce(b,H));const qe=ee[ye];let $e=F[qe];if(b.replacer&&($e=b.replacer.call(F,qe,$e)),!q(b,H+1,qe,!0,!0,!0))continue;const Ye=b.tag!==null&&b.tag!=="?"||b.dump&&b.dump.length>1024;Ye&&(b.dump&&y===b.dump.charCodeAt(0)?Oe+="?":Oe+="? "),Oe+=b.dump,Ye&&(Oe+=ce(b,H)),q(b,H+1,$e,!0,Ye)&&(b.dump&&y===b.dump.charCodeAt(0)?Oe+=":":Oe+=": ",Oe+=b.dump,de+=Oe)}b.tag=fe,b.dump=de||"{}"}function d(b,H,F){const ue=F?b.explicitTypes:b.implicitTypes;for(let de=0,fe=ue.length;de<fe;de+=1){const ee=ue[de];if((ee.instanceOf||ee.predicate)&&(!ee.instanceOf||typeof H=="object"&&H instanceof ee.instanceOf)&&(!ee.predicate||ee.predicate(H))){if(F?ee.multi&&ee.representName?b.tag=ee.representName(H):b.tag=ee.tag:b.tag="?",ee.represent){const ye=b.styleMap[ee.tag]||ee.defaultStyle;let je;if(u.call(ee.represent)==="[object Function]")je=ee.represent(H,ye);else if(f.call(ee.represent,ye))je=ee.represent[ye](H,ye);else throw new i("!<"+ee.tag+'> tag resolver accepts not "'+ye+'" style');b.dump=je}return!0}}return!1}function q(b,H,F,ue,de,fe,ee){b.tag=null,b.dump=F,d(b,F,!1)||d(b,F,!0);const ye=u.call(b.dump),je=ue;ue&&(ue=b.flowLevel<0||b.flowLevel>H);const Oe=ye==="[object Object]"||ye==="[object Array]";let qe,$e;if(Oe&&(qe=b.duplicates.indexOf(F),$e=qe!==-1),(b.tag!==null&&b.tag!=="?"||$e||b.indent!==2&&H>0)&&(de=!1),$e&&b.usedDuplicates[qe])b.dump="*ref_"+qe;else{if(Oe&&$e&&!b.usedDuplicates[qe]&&(b.usedDuplicates[qe]=!0),ye==="[object Object]")ue&&Object.keys(b.dump).length!==0?(dn(b,H,b.dump,de),$e&&(b.dump="&ref_"+qe+b.dump)):(De(b,H,b.dump),$e&&(b.dump="&ref_"+qe+" "+b.dump));else if(ye==="[object Array]")ue&&b.dump.length!==0?(b.noArrayIndent&&!ee&&H>0?Ae(b,H-1,b.dump,de):Ae(b,H,b.dump,de),$e&&(b.dump="&ref_"+qe+b.dump)):(se(b,H,b.dump),$e&&(b.dump="&ref_"+qe+" "+b.dump));else if(ye==="[object String]")b.tag!=="?"&&un(b,b.dump,H,fe,je);else{if(ye==="[object Undefined]")return!1;if(b.skipInvalid)return!1;throw new i("unacceptable kind of an object to dump "+ye)}if(b.tag!==null&&b.tag!=="?"){let Ye=encodeURI(b.tag[0]==="!"?b.tag.slice(1):b.tag).replace(/!/g,"%21");b.tag[0]==="!"?Ye="!"+Ye:Ye.slice(0,18)==="tag:yaml.org,2002:"?Ye="!!"+Ye.slice(18):Ye="!<"+Ye+">",b.dump=Ye+" "+b.dump}}return!0}function ae(b,H){const F=[],ue=[];ie(b,F,ue);const de=ue.length;for(let fe=0;fe<de;fe+=1)H.duplicates.push(F[ue[fe]]);H.usedDuplicates=new Array(de)}function ie(b,H,F){if(b!==null&&typeof b=="object"){const ue=H.indexOf(b);if(ue!==-1)F.indexOf(ue)===-1&&F.push(ue);else if(H.push(b),Array.isArray(b))for(let de=0,fe=b.length;de<fe;de+=1)ie(b[de],H,F);else{const de=Object.keys(b);for(let fe=0,ee=de.length;fe<ee;fe+=1)ie(b[de[fe]],H,F)}}}function Q(b,H){H=H||{};const F=new w(H);F.noRefs||ae(b,F);let ue=b;return F.replacer&&(ue=F.replacer.call({"":ue},"",ue)),q(F,0,ue,!0,!0)?F.dump+`
40
- `:""}return Bs.dump=Q,Bs}var Ed;function fg(){if(Ed)return Ut;Ed=1;const a=ug(),i=dg();function c(u,f){return function(){throw new Error("Function yaml."+u+" is removed in js-yaml 4. Use yaml."+f+" instead, which is now safe by default.")}}return Ut.Type=Bt(),Ut.Schema=Fu(),Ut.FAILSAFE_SCHEMA=Pu(),Ut.JSON_SCHEMA=cd(),Ut.CORE_SCHEMA=dd(),Ut.DEFAULT_SCHEMA=Ls(),Ut.load=a.load,Ut.loadAll=a.loadAll,Ut.dump=i.dump,Ut.YAMLException=Ga(),Ut.types={binary:gd(),float:sd(),map:Ju(),null:td(),pairs:Sd(),set:jd(),timestamp:pd(),bool:ld(),int:rd(),merge:hd(),omap:bd(),seq:Qu(),str:Xu()},Ut.safeLoad=c("safeLoad","load"),Ut.safeLoadAll=c("safeLoadAll","loadAll"),Ut.safeDump=c("safeDump","dump"),Ut}var pg=fg();const mg=og(pg),{Type:Q1,Schema:K1,FAILSAFE_SCHEMA:J1,JSON_SCHEMA:W1,CORE_SCHEMA:P1,DEFAULT_SCHEMA:e2,load:hg,loadAll:t2,dump:n2,YAMLException:l2,types:a2,safeLoad:r2,safeLoadAll:i2,safeDump:s2}=mg;let _n=class ky{static async parseSpec(i){let c;if(typeof i=="string"){const u=i.trim();try{c=JSON.parse(u)}catch{try{c=hg(u)}catch{throw new Error("Invalid OpenAPI specification format")}}}else c=i;if(!c.openapi||!c.info||!c.paths)throw new Error("Invalid OpenAPI specification: missing required fields");return c}static getHttpMethods(i){return["get","post","put","delete","patch","options","head","trace"].filter(u=>i[u])}static decodePointerToken(i){return decodeURIComponent(i).replace(/~1/g,"/").replace(/~0/g,"~")}static encodePointerToken(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}static resolveReference(i,c){if(!c.startsWith("#/"))throw new Error(`Only local references are supported synchronously; bundle external references first: ${c}`);const u=c.substring(2).split("/").map(ky.decodePointerToken);let f=i;for(const p of u){if(f===null||typeof f!="object"||!(p in f))throw new Error(`Reference not found: ${c}`);f=f[p]}return f}static isReference(i){return!!i&&typeof i=="object"&&"$ref"in i&&typeof i.$ref=="string"}};class Wt{static async parseSpec(i){return _n.parseSpec(i)}static getHttpMethods(i){return _n.getHttpMethods(i)}static getMethodColor(i,c){const p=c==="dark"?{get:"text-blue-300 bg-blue-900/30 border-blue-700",post:"text-green-300 bg-green-900/30 border-green-700",put:"text-orange-300 bg-orange-900/30 border-orange-700",delete:"text-red-300 bg-red-900/30 border-red-700",patch:"text-purple-300 bg-purple-900/30 border-purple-700",options:"text-cyan-100 bg-cyan-800/50 border-cyan-500",head:"text-gray-300 bg-gray-700/50 border-gray-600",trace:"text-gray-300 bg-gray-700/50 border-gray-600"}:{get:"text-blue-600 bg-blue-50 border-blue-200",post:"text-green-600 bg-green-50 border-green-200",put:"text-orange-600 bg-orange-50 border-orange-200",delete:"text-red-600 bg-red-50 border-red-200",patch:"text-purple-600 bg-purple-50 border-purple-200",options:"text-gray-600 bg-gray-50 border-gray-200",head:"text-gray-600 bg-gray-50 border-gray-200",trace:"text-gray-600 bg-gray-50 border-gray-200"},g=c==="dark"?"text-gray-300 bg-gray-700/50 border-gray-600":"text-gray-600 bg-gray-50 border-gray-200";return p[i.toLowerCase()]||g}static decodePointerToken(i){return _n.decodePointerToken(i)}static encodePointerToken(i){return _n.encodePointerToken(i)}static resolveReference(i,c){return _n.resolveReference(i,c)}static isReference(i){return _n.isReference(i)}}const Cd=({spec:a,onEndpointSelect:i,selectedEndpoint:c=null,theme:u="light"})=>{const[f,p]=le.useState(""),[g,y]=le.useState(new Set(["default"])),x=u==="dark"?"bg-gray-900 border-r border-gray-800 text-white":"bg-white border-r border-gray-200 text-gray-700",h=u==="dark"?"bg-gray-800 border-gray-700 text-white placeholder-gray-400 focus:ring-blue-500 focus:border-blue-500 focus:ring-1":"border-gray-300 text-gray-700 placeholder-gray-400 focus:ring-blue-500 focus:border-blue-500 focus:ring-1",S=u==="dark"?"text-gray-300":"text-gray-500",A=u==="dark"?"bg-gray-800/50 border-gray-700 text-white":"bg-gray-50 border-gray-100 text-gray-700",C=U=>{const I="text-xs font-bold px-2 py-0.5 rounded border",_={dark:{get:"bg-blue-900/30 border-blue-700 text-blue-200",post:"bg-green-900/30 border-green-700 text-green-200",put:"bg-yellow-900/30 border-yellow-700 text-yellow-200",patch:"bg-purple-900/30 border-purple-700 text-purple-200",delete:"bg-red-900/30 border-red-700 text-red-200",default:"bg-gray-800/50 border-gray-700 text-gray-200"},light:{get:"bg-blue-50 border-blue-200 text-blue-700",post:"bg-green-50 border-green-200 text-green-700",put:"bg-yellow-50 border-yellow-200 text-yellow-700",patch:"bg-purple-50 border-purple-200 text-purple-700",delete:"bg-red-50 border-red-200 text-red-700",default:"bg-gray-100 border-gray-200 text-gray-600"}},N=u==="dark"?_.dark:_.light;return`${I} ${N[U.toLowerCase()]||N.default}`},M=Object.entries(a.paths).reduce((U,[I,_])=>(Wt.getHttpMethods(_).forEach(N=>{const j=_[N];(j?.tags||["default"]).forEach(Y=>{U[Y]||(U[Y]=[]),U[Y].push({path:I,method:N,operation:j})})}),U),{}),k=Object.entries(M).reduce((U,[I,_])=>{const N=f.toLowerCase(),j=_.filter(R=>`${R.method} ${R.path} ${R.operation?.summary||""} ${I}`.toLowerCase().includes(N));return j.length&&(U[I]=j),U},{}),G=U=>y(I=>{const _=new Set(I);return _.has(U)?_.delete(U):_.add(U),_});return o.jsxs("div",{className:`flex h-full w-full min-w-0 flex-col ${x}`,style:{backgroundColor:"var(--flexdoc-sidebar-bg)",color:"var(--flexdoc-sidebar-text)"},children:[o.jsxs("div",{className:`border-b p-4 ${u==="dark"?"border-gray-800":"border-gray-100"}`,children:[o.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[o.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br from-blue-500 to-blue-600",children:o.jsx(gs,{className:"h-4 w-4 text-white"})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("h1",{className:`truncate text-lg font-semibold ${u==="dark"?"text-white":"text-gray-900"}`,children:"FlexDoc"}),o.jsx("p",{className:`truncate text-sm ${u==="dark"?"text-gray-300":"text-gray-500"}`,children:"API Documentation"})]})]}),o.jsx("label",{className:"sr-only",htmlFor:"flexdoc-endpoint-search",children:"Search endpoints"}),o.jsxs("div",{className:"relative",children:[o.jsx(zu,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),o.jsx("input",{id:"flexdoc-endpoint-search",type:"search",placeholder:"Search endpoints...",value:f,onChange:U=>p(U.target.value),className:`w-full rounded-lg border py-2 pl-10 pr-4 text-sm transition-colors ${h}`})]})]}),o.jsx("div",{className:"flex-1 overflow-y-auto overscroll-contain",children:o.jsxs("div",{className:"p-4",children:[o.jsxs("div",{className:"mb-6",children:[o.jsx("h3",{className:`mb-2 text-xs font-semibold uppercase tracking-wider ${S}`,children:"API Information"}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:`rounded-lg border p-3 ${A}`,children:[o.jsx("h4",{className:`truncate font-medium ${u==="dark"?"text-white":"text-gray-900"}`,children:a.info.title}),o.jsxs("p",{className:`text-sm ${u==="dark"?"text-gray-300":"text-gray-600"}`,children:["Version ",a.info.version]})]}),a.servers&&a.servers.length>0&&o.jsxs("div",{className:`rounded-lg border p-3 ${A}`,children:[o.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[o.jsx($u,{className:"h-4 w-4 text-gray-400"}),o.jsx("span",{className:"text-sm font-medium",children:"Servers"})]}),o.jsx("div",{className:"space-y-2",children:a.servers.map((U,I)=>o.jsxs("div",{className:"min-w-0 text-sm",children:[o.jsx("code",{className:`block max-w-full overflow-x-auto rounded px-1.5 py-0.5 text-xs ${u==="dark"?"bg-gray-700/50 text-blue-200":"bg-gray-100 text-blue-600"}`,children:U.url}),U.description&&o.jsx("p",{className:`mt-1.5 ${u==="dark"?"text-gray-300":"text-gray-600"}`,children:U.description})]},`${U.url}:${I}`))})]})]})]}),o.jsxs("div",{children:[o.jsx("h3",{className:`mb-3 text-xs font-semibold uppercase tracking-wider ${S}`,children:"Endpoints"}),Object.keys(k).length===0&&o.jsx("p",{className:`px-2 py-4 text-sm ${S}`,children:"No endpoints match your search."}),Object.entries(k).map(([U,I])=>o.jsxs("div",{className:"mb-4",children:[o.jsxs("button",{onClick:()=>G(U),className:`flex min-h-11 w-full items-center gap-2 rounded-lg p-2 text-left transition-colors ${u==="dark"?"hover:bg-gray-800/50 text-white":"hover:bg-gray-50 text-gray-700"}`,children:[g.has(U)?o.jsx(Ru,{className:"h-4 w-4 shrink-0 text-gray-400"}):o.jsx(qu,{className:"h-4 w-4 shrink-0 text-gray-400"}),o.jsx(Du,{className:"h-4 w-4 shrink-0 text-gray-400"}),o.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:U==="default"?"General":U}),o.jsx("span",{className:`ml-auto shrink-0 rounded-full px-2 py-0.5 text-xs ${u==="dark"?"bg-gray-800 text-white":"bg-gray-100 text-gray-500"}`,children:I.length})]}),g.has(U)&&o.jsx("div",{className:"ml-4 mt-1.5 space-y-1.5 sm:ml-6",children:I.map(({path:_,method:N,operation:j})=>{const R=c?.path===_&&c?.method===N;return o.jsxs("button",{onClick:()=>i(_,N),className:`mb-2 min-h-11 w-full rounded-lg border p-2 text-left transition-all ${R?u==="dark"?"bg-blue-900/20 border-blue-800/50 shadow-sm":"bg-blue-50 border-blue-100 shadow-sm":u==="dark"?"hover:bg-gray-800/50 border-transparent hover:border-gray-700":"hover:bg-gray-50 border-transparent hover:border-gray-100"}`,style:R?{color:"var(--flexdoc-sidebar-active-text)"}:void 0,children:[o.jsx("div",{className:"mb-1 flex items-center gap-2",children:o.jsx("span",{className:C(N),children:N.toUpperCase()})}),o.jsx("div",{className:`break-all font-mono text-sm ${R?u==="dark"?"text-blue-300":"text-blue-600":u==="dark"?"text-gray-300":"text-gray-800"}`,children:_}),j?.summary&&o.jsx("div",{className:`mt-1 text-xs ${u==="dark"?"text-gray-400":"text-gray-600"}`,children:j.summary})]},`${N}-${_}`)})})]},U))]})]})})]})},Rl=["parameters","requestBody","responses","tryIt","codeSamples"],Ys={all:Rl,none:[],minimal:[],documentation:["parameters","requestBody","responses"],interactive:["parameters","requestBody","tryIt","codeSamples"]},yg=new Set(["minimal","documentation","interactive"]),_d=new Set(Rl),gg=new Set(Object.keys(Ys));function xg(a){return typeof a=="string"?gg.has(a):Array.isArray(a)&&a.every(i=>typeof i=="string"&&(_d.has(i)||yg.has(i)))}function bg(a,i){for(const c of Ys[i])a.add(c)}function Gs(a,i){if(a===void 0&&i!==void 0){const u=new Set(["parameters","requestBody","tryIt","codeSamples"]);return i!=="none"&&u.add("responses"),Rl.filter(f=>u.has(f))}if(a===void 0)return[];if(typeof a=="string")return[...Ys[a]];const c=new Set;for(const u of a)_d.has(u)?c.add(u):bg(c,u);return Rl.filter(u=>c.has(u))}function vg(a,i){return`flexdoc:viewer:${encodeURIComponent(i?.trim()||"unknown-host")}:${encodeURIComponent(a?.trim()||"untitled")}`}function Od(a,i){const c=typeof window<"u"?window.localStorage:void 0;if(!c)return{version:1};try{const u=c.getItem(a);if(!u)return{version:1};const f=JSON.parse(u);return f.version!==1||f.expand!==void 0&&!xg(f.expand)?{version:1}:{version:1,...f.expand!==void 0?{expand:f.expand}:{}}}catch{return{version:1}}}function Sg(a,i,c){const u=typeof window<"u"?window.localStorage:void 0;if(u)try{i===void 0?u.removeItem(a):u.setItem(a,JSON.stringify({version:1,expand:i}))}catch{}}function al(a,i){if(i)return _n.isReference(i)?_n.resolveReference(a,i.$ref):i}function Ag(a,i){const c=a.paths[i];if(!c)throw new Error(`Path not found: ${i}`);return al(a,c)}function jg(a,i={}){return a.url.replace(/\{([^}]+)\}/g,(c,u)=>{const f=a.variables?.[u],p=i[u]??f?.default;if(p===void 0)throw new Error(`Missing server variable: ${u}`);if(f?.enum?.length&&!f.enum.includes(p))throw new Error(`Invalid value for server variable ${u}: ${p}`);return p})}function Is(a,i,c){const u=Ag(a,i),f=u[c.toLowerCase()];if(!f||typeof f!="object"||!("responses"in f))throw new Error(`Operation not found: ${c.toUpperCase()} ${i}`);const p=[...u.parameters||[],...f.parameters||[]].map(x=>al(a,x)).filter(x=>!!x),g=new Map;for(const x of p)g.set(`${x.in}:${x.name}`,x);const y={};for(const[x,h]of Object.entries(f.responses||{})){const S=al(a,h);S&&(y[x]=S)}return{path:i,method:c.toUpperCase(),pathItem:u,operation:f,parameters:[...g.values()],requestBody:al(a,f.requestBody),responses:y,servers:f.servers||u.servers||a.servers||[],security:f.security!==void 0?f.security:a.security||[]}}function Ng(a,i,c){return Is(a,i,c).parameters}function wg(a,i){return al(a,i.schema)}function Tg(a,i){if(i.example!==void 0)return i.example;const c=wg(a,i);return c?.example!==void 0?c.example:c?.examples?.length?c.examples[0]:c?.default!==void 0?c.default:c?.enum?.length?c.enum[0]:c?.type==="array"?[]:c?.type==="object"?{}:c?.type==="integer"||c?.type==="number"?1:c?.type==="boolean"?!0:""}function Eg(a,i,c){const u=Is(a,i,c),f={parameters:{},headers:{},cookies:{},auth:{}};for(const y of u.parameters){const x=y.in==="header"?f.headers:y.in==="cookie"?f.cookies:f.parameters;x[y.name]=Tg(a,y)}const p=u.requestBody,g=p?Object.keys(p.content||{})[0]:void 0;if(g){f.contentType=g;const y=p.content[g],x=al(a,y.schema),h=y.examples?Object.values(y.examples)[0]:void 0,S=al(a,h),A=y.example??S?.value??x?.example??x?.examples?.[0]??x?.default;f.body=A!==void 0?JSON.stringify(A,null,2):""}return f}function Ot(a){return a===null?"null":typeof a=="object"?JSON.stringify(a):String(a)}function Fs(a){if(typeof a!="string")return a;const i=a.trim();if(!i||!i.startsWith("[")&&!i.startsWith("{"))return a;try{return JSON.parse(i)}catch{return a}}function kd(a,i=!1){const c=Ot(a);return i?encodeURI(c).replace(/%5B/g,"[").replace(/%5D/g,"]"):encodeURIComponent(c)}function Rd(a,i=!1){const c=Fs(a);if(Array.isArray(c))return c.map(Ot).join(",");if(c&&typeof c=="object"){const u=Object.entries(c);return i?u.map(([f,p])=>`${f}=${Ot(p)}`).join(","):u.flatMap(([f,p])=>[f,Ot(p)]).join(",")}return Ot(c)}function Cg(a,i){const c=a.style||"simple",u=a.explode??!1,f=Fs(i),p=y=>kd(y,a.allowReserved);if(Array.isArray(f)){const y=f.map(p);return c==="label"?`.${y.join(u?".":",")}`:c==="matrix"?u?y.map(x=>`;${a.name}=${x}`).join(""):`;${a.name}=${y.join(",")}`:y.join(",")}if(f&&typeof f=="object"){const y=Object.entries(f).map(([x,h])=>[p(x),p(h)]);return c==="label"?u?`.${y.map(([x,h])=>`${x}=${h}`).join(".")}`:`.${y.flatMap(([x,h])=>[x,h]).join(",")}`:c==="matrix"?u?y.map(([x,h])=>`;${x}=${h}`).join(""):`;${a.name}=${y.flatMap(([x,h])=>[x,h]).join(",")}`:u?y.map(([x,h])=>`${x}=${h}`).join(","):y.flatMap(([x,h])=>[x,h]).join(",")}const g=p(f);return c==="label"?`.${g}`:c==="matrix"?`;${a.name}=${g}`:g}function _g(a,i){const c=a.style||"form",u=a.explode??c==="form",f=Fs(i);if(c==="deepObject"&&f&&typeof f=="object"&&!Array.isArray(f))return Object.entries(f).map(([p,g])=>[`${a.name}[${p}]`,Ot(g)]);if(Array.isArray(f))return c==="spaceDelimited"?[[a.name,f.map(Ot).join(" ")]]:c==="pipeDelimited"?[[a.name,f.map(Ot).join("|")]]:u?f.map(p=>[a.name,Ot(p)]):[[a.name,f.map(Ot).join(",")]];if(f&&typeof f=="object"){const p=Object.entries(f);return u?p.map(([g,y])=>[g,Ot(y)]):[[a.name,p.flatMap(([g,y])=>[g,Ot(y)]).join(",")]]}return[[a.name,Ot(f)]]}function Og(a){return typeof globalThis.btoa=="function"?globalThis.btoa(unescape(encodeURIComponent(a))):a}function kg(a,i){return Object.keys(a).every(c=>!!i[c])}function Rg(a,i,c,u,f,p){if(!i.length||!a.components?.securitySchemes)return;const g=i.find(y=>Object.keys(y).length===0||kg(y,p))||i[0];for(const y of Object.keys(g)){const x=al(a,a.components.securitySchemes[y]),h=p[y];!x||!h||(x.type==="http"&&x.scheme?.toLowerCase()==="bearer"?c.Authorization=`Bearer ${h}`:x.type==="http"&&x.scheme?.toLowerCase()==="basic"?c.Authorization=`Basic ${Og(h)}`:x.type==="apiKey"&&x.in==="header"&&x.name?c[x.name]=h:x.type==="apiKey"&&x.in==="query"&&x.name?u.push(`${encodeURIComponent(x.name)}=${encodeURIComponent(h)}`):x.type==="apiKey"&&x.in==="cookie"&&x.name?f.push(`${x.name}=${encodeURIComponent(h)}`):(x.type==="oauth2"||x.type==="openIdConnect")&&(c.Authorization=`Bearer ${h}`))}}function qd(a){try{const i=JSON.parse(a);return i&&typeof i=="object"&&!Array.isArray(i)?i:void 0}catch{return}}function qg(a,i,c,u={}){const f=Is(a,i,c),p=f.servers[0],g=u.serverUrl||(p?jg(p,u.serverVariables):"");let y=i;const x=[],h={...u.headers||{}},S=[];for(const U of f.parameters){const I=U.in==="header"?u.headers?.[U.name]:U.in==="cookie"?u.cookies?.[U.name]:u.parameters?.[U.name];if(!(I===void 0||I===""))if(U.in==="path")y=y.replace(`{${U.name}}`,Cg(U,I));else if(U.in==="query")for(const[_,N]of _g(U,I))x.push(`${encodeURIComponent(_)}=${kd(N,U.allowReserved)}`);else U.in==="header"?h[U.name]=Rd(I,U.explode):U.in==="cookie"&&S.push(`${U.name}=${encodeURIComponent(Rd(I,U.explode))}`)}Rg(a,f.security,h,x,S,u.auth||{}),S.length&&(h.Cookie=S.join("; "));let A,C,M;if(u.body&&!["GET","HEAD"].includes(f.method)){const U=u.contentType||"application/json";if(A=u.body,U==="application/x-www-form-urlencoded"){const I=qd(u.body);A=I?Object.entries(I).flatMap(([_,N])=>Array.isArray(N)?N.map(j=>`${encodeURIComponent(_)}=${encodeURIComponent(Ot(j))}`):[`${encodeURIComponent(_)}=${encodeURIComponent(Ot(N))}`]).join("&"):u.body,M=A,C="form",h["Content-Type"]=U}else if(U.startsWith("multipart/form-data")){const I=qd(u.body);if(I&&typeof FormData<"u"){const _=new FormData;for(const[N,j]of Object.entries(I))Array.isArray(j)?j.forEach(R=>_.append(N,Ot(R))):_.append(N,Ot(j));M=_}else M=u.body;C="multipart"}else M=u.body,C=U.includes("json")?"json":"text",h["Content-Type"]=U}const k=x.join("&");return{url:`${g.replace(/\/$/,"")}${y}${k?`?${k}`:""}`,method:f.method,headers:h,body:A,bodyKind:C,init:{method:f.method,headers:h,body:M}}}function Md(a,i,c){return Ng(a,i,c)}function Vs(a,i,c){return Eg(a,i,c)}function Ur(a,i,c,u={}){return qg(a,i,c,u)}const kt=a=>JSON.stringify(a);function Mg(a,i){const c=Object.entries(a.headers);if(i==="curl"){const p=[`curl -X ${a.method} ${kt(a.url)}`];for(const[g,y]of c)p.push(` -H ${kt(`${g}: ${y}`)}`);return a.body&&p.push(` --data-raw ${kt(a.body)}`),p.join(` \\
41
- `)}if(i==="javascript"){const p={method:a.method};return c.length&&(p.headers=a.headers),a.body&&(p.body=a.body),`const response = await fetch(${kt(a.url)}, ${JSON.stringify(p,null,2)});
42
- const data = await response.json();`}if(i==="python"){const p=["import requests","",`url = ${kt(a.url)}`];return c.length&&p.push(`headers = ${JSON.stringify(a.headers,null,2)}`),a.body&&p.push(`body = ${kt(a.body)}`),p.push(`response = requests.request(${kt(a.method)}, url${c.length?", headers=headers":""}${a.body?", data=body":""})`,"print(response.text)"),p.join(`
43
- `)}if(i==="go"){const p=a.body?`strings.NewReader(${kt(a.body)})`:"nil",g=["package main","","import (",' "fmt"',' "io"',' "net/http"'];a.body&&g.push(' "strings"'),g.push(")","","func main() {",` req, _ := http.NewRequest(${kt(a.method)}, ${kt(a.url)}, ${p})`);for(const[y,x]of c)g.push(` req.Header.Set(${kt(y)}, ${kt(x)})`);return g.push(" res, err := http.DefaultClient.Do(req)"," if err != nil { panic(err) }"," defer res.Body.Close()"," data, _ := io.ReadAll(res.Body)"," fmt.Println(string(data))","}"),g.join(`
44
- `)}const u=["import java.net.URI;","import java.net.http.*;","","var client = HttpClient.newHttpClient();","var builder = HttpRequest.newBuilder()",` .uri(URI.create(${kt(a.url)}))`];for(const[p,g]of c)u.push(` .header(${kt(p)}, ${kt(g)})`);const f=a.body?`HttpRequest.BodyPublishers.ofString(${kt(a.body)})`:"HttpRequest.BodyPublishers.noBody()";return u.push(` .method(${kt(a.method)}, ${f});`,"var response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());","System.out.println(response.body());"),u.join(`
45
- `)}function zg(a){return{curl:"cURL",javascript:"JavaScript",python:"Python",go:"Go",java:"Java"}[a]}function $g(a,i){return Mg(a,i)}function zd(a){return zg(a)}var Xs={exports:{}},$d;function Dg(){return $d||($d=1,(function(a){var i=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var c=(function(u){var f=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,p=0,g={},y={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function _(N){return N instanceof x?new x(N.type,_(N.content),N.alias):Array.isArray(N)?N.map(_):N.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(_){return Object.prototype.toString.call(_).slice(8,-1)},objId:function(_){return _.__id||Object.defineProperty(_,"__id",{value:++p}),_.__id},clone:function _(N,j){j=j||{};var R,Y;switch(y.util.type(N)){case"Object":if(Y=y.util.objId(N),j[Y])return j[Y];R={},j[Y]=R;for(var D in N)N.hasOwnProperty(D)&&(R[D]=_(N[D],j));return R;case"Array":return Y=y.util.objId(N),j[Y]?j[Y]:(R=[],j[Y]=R,N.forEach(function(X,me){R[me]=_(X,j)}),R);default:return N}},getLanguage:function(_){for(;_;){var N=f.exec(_.className);if(N)return N[1].toLowerCase();_=_.parentElement}return"none"},setLanguage:function(_,N){_.className=_.className.replace(RegExp(f,"gi"),""),_.classList.add("language-"+N)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(R){var _=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(R.stack)||[])[1];if(_){var N=document.getElementsByTagName("script");for(var j in N)if(N[j].src==_)return N[j]}return null}},isActive:function(_,N,j){for(var R="no-"+N;_;){var Y=_.classList;if(Y.contains(N))return!0;if(Y.contains(R))return!1;_=_.parentElement}return!!j}},languages:{plain:g,plaintext:g,text:g,txt:g,extend:function(_,N){var j=y.util.clone(y.languages[_]);for(var R in N)j[R]=N[R];return j},insertBefore:function(_,N,j,R){R=R||y.languages;var Y=R[_],D={};for(var X in Y)if(Y.hasOwnProperty(X)){if(X==N)for(var me in j)j.hasOwnProperty(me)&&(D[me]=j[me]);j.hasOwnProperty(X)||(D[X]=Y[X])}var xe=R[_];return R[_]=D,y.languages.DFS(y.languages,function(ge,Ee){Ee===xe&&ge!=_&&(this[ge]=D)}),D},DFS:function _(N,j,R,Y){Y=Y||{};var D=y.util.objId;for(var X in N)if(N.hasOwnProperty(X)){j.call(N,X,N[X],R||X);var me=N[X],xe=y.util.type(me);xe==="Object"&&!Y[D(me)]?(Y[D(me)]=!0,_(me,j,null,Y)):xe==="Array"&&!Y[D(me)]&&(Y[D(me)]=!0,_(me,j,X,Y))}}},plugins:{},highlightAll:function(_,N){y.highlightAllUnder(document,_,N)},highlightAllUnder:function(_,N,j){var R={callback:j,container:_,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};y.hooks.run("before-highlightall",R),R.elements=Array.prototype.slice.apply(R.container.querySelectorAll(R.selector)),y.hooks.run("before-all-elements-highlight",R);for(var Y=0,D;D=R.elements[Y++];)y.highlightElement(D,N===!0,R.callback)},highlightElement:function(_,N,j){var R=y.util.getLanguage(_),Y=y.languages[R];y.util.setLanguage(_,R);var D=_.parentElement;D&&D.nodeName.toLowerCase()==="pre"&&y.util.setLanguage(D,R);var X=_.textContent,me={element:_,language:R,grammar:Y,code:X};function xe(Ee){me.highlightedCode=Ee,y.hooks.run("before-insert",me),me.element.innerHTML=me.highlightedCode,y.hooks.run("after-highlight",me),y.hooks.run("complete",me),j&&j.call(me.element)}if(y.hooks.run("before-sanity-check",me),D=me.element.parentElement,D&&D.nodeName.toLowerCase()==="pre"&&!D.hasAttribute("tabindex")&&D.setAttribute("tabindex","0"),!me.code){y.hooks.run("complete",me),j&&j.call(me.element);return}if(y.hooks.run("before-highlight",me),!me.grammar){xe(y.util.encode(me.code));return}if(N&&u.Worker){var ge=new Worker(y.filename);ge.onmessage=function(Ee){xe(Ee.data)},ge.postMessage(JSON.stringify({language:me.language,code:me.code,immediateClose:!0}))}else xe(y.highlight(me.code,me.grammar,me.language))},highlight:function(_,N,j){var R={code:_,grammar:N,language:j};if(y.hooks.run("before-tokenize",R),!R.grammar)throw new Error('The language "'+R.language+'" has no grammar.');return R.tokens=y.tokenize(R.code,R.grammar),y.hooks.run("after-tokenize",R),x.stringify(y.util.encode(R.tokens),R.language)},tokenize:function(_,N){var j=N.rest;if(j){for(var R in j)N[R]=j[R];delete N.rest}var Y=new A;return C(Y,Y.head,_),S(_,Y,N,Y.head,0),k(Y)},hooks:{all:{},add:function(_,N){var j=y.hooks.all;j[_]=j[_]||[],j[_].push(N)},run:function(_,N){var j=y.hooks.all[_];if(!(!j||!j.length))for(var R=0,Y;Y=j[R++];)Y(N)}},Token:x};u.Prism=y;function x(_,N,j,R){this.type=_,this.content=N,this.alias=j,this.length=(R||"").length|0}x.stringify=function _(N,j){if(typeof N=="string")return N;if(Array.isArray(N)){var R="";return N.forEach(function(xe){R+=_(xe,j)}),R}var Y={type:N.type,content:_(N.content,j),tag:"span",classes:["token",N.type],attributes:{},language:j},D=N.alias;D&&(Array.isArray(D)?Array.prototype.push.apply(Y.classes,D):Y.classes.push(D)),y.hooks.run("wrap",Y);var X="";for(var me in Y.attributes)X+=" "+me+'="'+(Y.attributes[me]||"").replace(/"/g,"&quot;")+'"';return"<"+Y.tag+' class="'+Y.classes.join(" ")+'"'+X+">"+Y.content+"</"+Y.tag+">"};function h(_,N,j,R){_.lastIndex=N;var Y=_.exec(j);if(Y&&R&&Y[1]){var D=Y[1].length;Y.index+=D,Y[0]=Y[0].slice(D)}return Y}function S(_,N,j,R,Y,D){for(var X in j)if(!(!j.hasOwnProperty(X)||!j[X])){var me=j[X];me=Array.isArray(me)?me:[me];for(var xe=0;xe<me.length;++xe){if(D&&D.cause==X+","+xe)return;var ge=me[xe],Ee=ge.inside,He=!!ge.lookbehind,he=!!ge.greedy,ke=ge.alias;if(he&&!ge.pattern.global){var T=ge.pattern.toString().match(/[imsuy]*$/)[0];ge.pattern=RegExp(ge.pattern.source,T+"g")}for(var ne=ge.pattern||ge,W=R.next,K=Y;W!==N.tail&&!(D&&K>=D.reach);K+=W.value.length,W=W.next){var P=W.value;if(N.length>_.length)return;if(!(P instanceof x)){var w=1,$;if(he){if($=h(ne,K,_,He),!$||$.index>=_.length)break;var Te=$.index,ce=$.index+$[0].length,pe=K;for(pe+=W.value.length;Te>=pe;)W=W.next,pe+=W.value.length;if(pe-=W.value.length,K=pe,W.value instanceof x)continue;for(var ve=W;ve!==N.tail&&(pe<ce||typeof ve.value=="string");ve=ve.next)w++,pe+=ve.value.length;w--,P=_.slice(K,pe),$.index-=K}else if($=h(ne,0,P,He),!$)continue;var Te=$.index,Re=$[0],Ve=P.slice(0,Te),Ie=P.slice(Te+Re.length),Be=K+P.length;D&&Be>D.reach&&(D.reach=Be);var Z=W.prev;Ve&&(Z=C(N,Z,Ve),K+=Ve.length),M(N,Z,w);var be=new x(X,Ee?y.tokenize(Re,Ee):Re,ke,Re);if(W=C(N,Z,be),Ie&&C(N,W,Ie),w>1){var Se={cause:X+","+xe,reach:Be};S(_,N,j,W.prev,K,Se),D&&Se.reach>D.reach&&(D.reach=Se.reach)}}}}}}function A(){var _={value:null,prev:null,next:null},N={value:null,prev:_,next:null};_.next=N,this.head=_,this.tail=N,this.length=0}function C(_,N,j){var R=N.next,Y={value:j,prev:N,next:R};return N.next=Y,R.prev=Y,_.length++,Y}function M(_,N,j){for(var R=N.next,Y=0;Y<j&&R!==_.tail;Y++)R=R.next;N.next=R,R.prev=N,_.length-=Y}function k(_){for(var N=[],j=_.head.next;j!==_.tail;)N.push(j.value),j=j.next;return N}if(!u.document)return u.addEventListener&&(y.disableWorkerMessageHandler||u.addEventListener("message",function(_){var N=JSON.parse(_.data),j=N.language,R=N.code,Y=N.immediateClose;u.postMessage(y.highlight(R,y.languages[j],j)),Y&&u.close()},!1)),y;var G=y.util.currentScript();G&&(y.filename=G.src,G.hasAttribute("data-manual")&&(y.manual=!0));function U(){y.manual||y.highlightAll()}if(!y.manual){var I=document.readyState;I==="loading"||I==="interactive"&&G&&G.defer?document.addEventListener("DOMContentLoaded",U):window.requestAnimationFrame?window.requestAnimationFrame(U):window.setTimeout(U,16)}return y})(i);a.exports&&(a.exports=c),typeof gu<"u"&&(gu.Prism=c),c.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},c.languages.markup.tag.inside["attr-value"].inside.entity=c.languages.markup.entity,c.languages.markup.doctype.inside["internal-subset"].inside=c.languages.markup,c.hooks.add("wrap",function(u){u.type==="entity"&&(u.attributes.title=u.content.replace(/&amp;/,"&"))}),Object.defineProperty(c.languages.markup.tag,"addInlined",{value:function(f,p){var g={};g["language-"+p]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:c.languages[p]},g.cdata=/^<!\[CDATA\[|\]\]>$/i;var y={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:g}};y["language-"+p]={pattern:/[\s\S]+/,inside:c.languages[p]};var x={};x[f]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return f}),"i"),lookbehind:!0,greedy:!0,inside:y},c.languages.insertBefore("markup","cdata",x)}}),Object.defineProperty(c.languages.markup.tag,"addAttribute",{value:function(u,f){c.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+u+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[f,"language-"+f],inside:c.languages[f]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),c.languages.html=c.languages.markup,c.languages.mathml=c.languages.markup,c.languages.svg=c.languages.markup,c.languages.xml=c.languages.extend("markup",{}),c.languages.ssml=c.languages.xml,c.languages.atom=c.languages.xml,c.languages.rss=c.languages.xml,(function(u){var f=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;u.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+f.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+f.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+f.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+f.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:f,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},u.languages.css.atrule.inside.rest=u.languages.css;var p=u.languages.markup;p&&(p.tag.addInlined("style","css"),p.tag.addAttribute("style","css"))})(c),c.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},c.languages.javascript=c.languages.extend("clike",{"class-name":[c.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),c.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,c.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:c.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:c.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:c.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:c.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:c.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),c.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:c.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),c.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),c.languages.markup&&(c.languages.markup.tag.addInlined("script","javascript"),c.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),c.languages.js=c.languages.javascript,(function(){if(typeof c>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var u="Loading…",f=function(G,U){return"✖ Error "+G+" while fetching file: "+U},p="✖ Error: File does not exist or is empty",g={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},y="data-src-status",x="loading",h="loaded",S="failed",A="pre[data-src]:not(["+y+'="'+h+'"]):not(['+y+'="'+x+'"])';function C(G,U,I){var _=new XMLHttpRequest;_.open("GET",G,!0),_.onreadystatechange=function(){_.readyState==4&&(_.status<400&&_.responseText?U(_.responseText):_.status>=400?I(f(_.status,_.statusText)):I(p))},_.send(null)}function M(G){var U=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(G||"");if(U){var I=Number(U[1]),_=U[2],N=U[3];return _?N?[I,Number(N)]:[I,void 0]:[I,I]}}c.hooks.add("before-highlightall",function(G){G.selector+=", "+A}),c.hooks.add("before-sanity-check",function(G){var U=G.element;if(U.matches(A)){G.code="",U.setAttribute(y,x);var I=U.appendChild(document.createElement("CODE"));I.textContent=u;var _=U.getAttribute("data-src"),N=G.language;if(N==="none"){var j=(/\.(\w+)$/.exec(_)||[,"none"])[1];N=g[j]||j}c.util.setLanguage(I,N),c.util.setLanguage(U,N);var R=c.plugins.autoloader;R&&R.loadLanguages(N),C(_,function(Y){U.setAttribute(y,h);var D=M(U.getAttribute("data-range"));if(D){var X=Y.split(/\r\n?|\n/g),me=D[0],xe=D[1]==null?X.length:D[1];me<0&&(me+=X.length),me=Math.max(0,Math.min(me-1,X.length)),xe<0&&(xe+=X.length),xe=Math.max(0,Math.min(xe,X.length)),Y=X.slice(me,xe).join(`
46
- `),U.hasAttribute("data-start")||U.setAttribute("data-start",String(me+1))}I.textContent=Y,c.highlightElement(I)},function(Y){U.setAttribute(y,S),I.textContent=Y})}}),c.plugins.fileHighlight={highlight:function(U){for(var I=(U||document).querySelectorAll(A),_=0,N;N=I[_++];)c.highlightElement(N)}};var k=!1;c.fileHighlight=function(){k||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),k=!0),c.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(Xs)),Xs.exports}var Ug=Dg();const Hg=xu(Ug);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json,(function(a){var i=/[*&][^\s[\]{},]+/,c=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,u="(?:"+c.source+"(?:[ ]+"+i.source+")?|"+i.source+"(?:[ ]+"+c.source+")?)",f=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),p=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function g(y,x){x=(x||"").replace(/m/g,"")+"m";var h=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return u}).replace(/<<value>>/g,function(){return y});return RegExp(h,x)}a.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return u})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return u}).replace(/<<key>>/g,function(){return"(?:"+f+"|"+p+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:g(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:g(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:g(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:g(p),lookbehind:!0,greedy:!0},number:{pattern:g(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:c,important:i,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},a.languages.yml=a.languages.yaml})(Prism),Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,(function(a){var i="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",c={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},u={bash:c,environment:{pattern:RegExp("\\$"+i),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+i),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};a.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+i),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:u},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:c}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:u},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:u.entity}}],environment:{pattern:RegExp("\\$?"+i),alias:"constant"},variable:u.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},c.inside=a.languages.bash;for(var f=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],p=u.variable[1].inside,g=0;g<f.length;g++)p[f[g]]=a.languages.bash[f[g]];a.languages.sh=a.languages.bash,a.languages.shell=a.languages.bash})(Prism);var Dd={},Ud;function Lg(){return Ud||(Ud=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),Dd}Lg(),Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];var Hd={},Ld;function Bg(){return Ld||(Ld=1,(function(a){var i=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,c=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,u={pattern:RegExp(/(^|[^\w.])/.source+c+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};a.languages.java=a.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[u,{pattern:RegExp(/(^|[^\w.])/.source+c+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:u.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+c+/[A-Z]\w*\b/.source),lookbehind:!0,inside:u.inside}],keyword:i,function:[a.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),a.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),a.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":u,keyword:i,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+c+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:u.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+c+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:u.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return i.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),Hd}Bg();const On=({code:a,language:i,title:c,showCopy:u=!0,theme:f="dark",wrap:p=!1})=>{const[g,y]=ms.useState(!1);le.useEffect(()=>{Hg.highlightAll()},[a,f]);const x=async()=>{try{await navigator.clipboard.writeText(a),y(!0),setTimeout(()=>y(!1),2e3)}catch(C){console.error("Failed to copy text: ",C)}},h=f==="dark"?"bg-gray-900 border-gray-700":"bg-gray-50 border-gray-200",S=f==="dark"?"bg-gray-800 border-gray-700 text-gray-300":"bg-gray-100 border-gray-200 text-gray-700",A=f==="dark"?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-900";return o.jsxs("div",{className:`min-w-0 rounded-lg overflow-hidden border ${h}`,children:[(c||u)&&o.jsxs("div",{className:`flex items-center justify-between gap-3 px-3 sm:px-4 py-2 border-b ${S}`,children:[c&&o.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:c}),u&&o.jsx("button",{onClick:x,className:`shrink-0 flex items-center gap-1 text-xs transition-colors ${A}`,"aria-label":"Copy code to clipboard",children:g?o.jsxs(o.Fragment,{children:[o.jsx(Xy,{className:"w-3 h-3"}),o.jsx("span",{children:"Copied"})]}):o.jsxs(o.Fragment,{children:[o.jsx(Qy,{className:"w-3 h-3"}),o.jsx("span",{children:"Copy"})]})})]}),o.jsx("div",{className:`p-3 sm:p-4 overflow-x-auto ${f==="dark"?"bg-gray-800":"bg-white"}`,children:o.jsx("pre",{className:`m-0 text-xs sm:text-sm ${p?"whitespace-pre-wrap break-words":""} ${f==="dark"?"text-gray-100":"text-gray-800"}`,children:o.jsx("code",{className:`language-${i} bg-transparent`,children:a})})})]})};function Yg(a){const i=Array.isArray(a.type)?a.type.join(" | "):a.type;return i?a.format?`${i} (${a.format})`:i:a.oneOf?"oneOf":a.anyOf?"anyOf":a.allOf?"allOf":a.const!==void 0?"const":"any"}const rl=({spec:a,schema:i,theme:c,required:u=!1,level:f=0,seen:p=new Set,requiredPropsFirst:g=!1,sortPropsAlphabetically:y=!1})=>{const x={spec:a,theme:c,requiredPropsFirst:g,sortPropsAlphabetically:y};if(Wt.isReference(i)){if(p.has(i.$ref))return o.jsxs("div",{className:"py-1 text-sm opacity-70",children:["↳ ",o.jsx("code",{children:i.$ref.replace("#/components/schemas/","")})," (recursive reference)"]});const k=new Set(p);k.add(i.$ref);let G;try{G=Wt.resolveReference(a,i.$ref)}catch{return o.jsxs("div",{className:"py-1 text-sm text-red-500",children:["Unresolved reference: ",o.jsx("code",{children:i.$ref})]})}return o.jsx(rl,{...x,schema:G,required:u,level:f,seen:k})}const h=c==="dark"?"text-gray-400":"text-gray-600",S=c==="dark"?"border-gray-700":"border-gray-200",A=[["All of",i.allOf],["One of",i.oneOf],["Any of",i.anyOf]],C=new Set(i.required||[]),M=Object.entries(i.properties||{}).sort(([k],[G])=>{if(g){const U=Number(C.has(G))-Number(C.has(k));if(U)return U}return y?k.localeCompare(G):0});return o.jsxs("div",{className:f?`border-l-2 ${S} pl-3`:"",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2 py-1",children:[o.jsx("span",{className:c==="dark"?"text-blue-300":"text-blue-600",children:Yg(i)}),u&&o.jsx("span",{className:"rounded bg-red-100 px-2 py-0.5 text-xs text-red-700 dark:bg-red-900/30 dark:text-red-300",children:"required"}),(i.nullable||Array.isArray(i.type)&&i.type.includes("null"))&&o.jsx("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs text-gray-700 dark:bg-gray-700 dark:text-gray-300",children:"nullable"}),i.deprecated&&o.jsx("span",{className:"rounded bg-orange-100 px-2 py-0.5 text-xs text-orange-700",children:"deprecated"}),i.readOnly&&o.jsx("span",{className:"text-xs opacity-60",children:"readOnly"}),i.writeOnly&&o.jsx("span",{className:"text-xs opacity-60",children:"writeOnly"})]}),i.description&&o.jsx("p",{className:`mt-1 text-sm leading-relaxed ${h}`,children:i.description}),i.enum&&o.jsxs("p",{className:`mt-1 text-xs ${h}`,children:["Allowed: ",i.enum.map(String).join(", ")]}),i.const!==void 0&&o.jsxs("p",{className:`mt-1 text-xs ${h}`,children:["Constant: ",JSON.stringify(i.const)]}),i.default!==void 0&&o.jsxs("p",{className:`mt-1 text-xs ${h}`,children:["Default: ",JSON.stringify(i.default)]}),(i.example!==void 0||i.examples?.length)&&o.jsx("div",{className:"mt-2",children:o.jsx(On,{code:JSON.stringify(i.example??i.examples?.[0],null,2),language:"json",title:"Example",showCopy:!1,theme:c,wrap:!0})}),i.items&&o.jsxs("div",{className:"mt-3",children:[o.jsx("div",{className:"mb-1 text-xs font-semibold uppercase tracking-wide opacity-60",children:"Items"}),o.jsx(rl,{...x,schema:i.items,level:f+1,seen:p})]}),A.map(([k,G])=>G?.length?o.jsxs("div",{className:"mt-3",children:[o.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide opacity-60",children:k}),o.jsx("div",{className:"space-y-3",children:G.map((U,I)=>o.jsx(rl,{...x,schema:U,level:f+1,seen:p},I))})]},k):null),M.length>0&&o.jsx("div",{className:"mt-3 space-y-3",children:M.map(([k,G])=>o.jsxs("div",{children:[o.jsx("div",{className:"font-mono text-sm font-medium",children:k}),o.jsx(rl,{...x,schema:G,required:C.has(k),level:f+1,seen:p})]},k))}),i.additionalProperties&&typeof i.additionalProperties=="object"&&o.jsxs("div",{className:"mt-3",children:[o.jsx("div",{className:"mb-1 text-xs font-semibold uppercase tracking-wide opacity-60",children:"Additional properties"}),o.jsx(rl,{...x,schema:i.additionalProperties,level:f+1,seen:p})]})]})};function sn(a){return{preRequest:a?.preRequest||"",tests:a?.tests||""}}function Gg(a){return{...a,query:a.query?.map(i=>({...i})),headers:a.headers?.map(i=>({...i})),auth:a.auth?{...a.auth}:void 0}}function Hr(a){return Object.assign(Object.create(null),a)}function wt(a){if(typeof a=="string")return a;if(a instanceof Error)return a.message;try{return JSON.stringify(a)}catch{return String(a)}}function Wl(a,i){if(Object.is(a,i))return!0;if(typeof a!=typeof i||a===null||i===null)return!1;if(Array.isArray(a))return Array.isArray(i)&&a.length===i.length&&a.every((c,u)=>Wl(c,i[u]));if(typeof a=="object"&&typeof i=="object"){const c=a,u=i,f=Object.keys(c),p=Object.keys(u);return f.length===p.length&&f.every(g=>Object.prototype.hasOwnProperty.call(u,g)&&Wl(c[g],u[g]))}return!1}function on(a){throw new Error(a)}function Ig(a){const i=h=>{Object.is(a,h)||on(`expected ${wt(a)} to equal ${wt(h)}`)},c=h=>{Wl(a,h)||on(`expected ${wt(a)} to deeply equal ${wt(h)}`)},u=h=>{(typeof a=="string"?a.includes(String(h)):Array.isArray(a)&&a.some(A=>Wl(A,h)))||on(`expected ${wt(a)} to include ${wt(h)}`)},f=(h,...S)=>{(!a||typeof a!="object"||!Object.prototype.hasOwnProperty.call(a,h))&&on(`expected value to have property ${h}`),S.length>0&&!Wl(a[h],S[0])&&on(`expected property ${h} to equal ${wt(S[0])}`)},x={above:h=>{(typeof a!="number"||a<=h)&&on(`expected ${wt(a)} to be above ${h}`)},below:h=>{(typeof a!="number"||a>=h)&&on(`expected ${wt(a)} to be below ${h}`)},oneOf:h=>{h.some(S=>Wl(a,S))||on(`expected ${wt(a)} to be one of ${wt(h)}`)}};return Object.defineProperties(x,{ok:{get:()=>(a||on(`expected ${wt(a)} to be truthy`),!0)},true:{get:()=>(a!==!0&&on(`expected ${wt(a)} to be true`),!0)},false:{get:()=>(a!==!1&&on(`expected ${wt(a)} to be false`),!0)}}),{to:{equal:i,eql:c,include:u,match:h=>{(typeof a!="string"||!h.test(a))&&on(`expected ${wt(a)} to match ${h}`)},have:{property:f},be:x}}}function Zs(a,i){return a.findIndex(c=>c.key.toLowerCase()===i.toLowerCase())}function Fg(a){const i=()=>a.headers||(a.headers=[]),c=(u,f)=>{const p=i(),g=Zs(p,u),y={key:u,value:String(f),enabled:!0};g>=0?p[g]=y:p.push(y)};return{get(u){const f=Zs(i(),u);return f>=0?i()[f].value:void 0},has(u){return Zs(i(),u)>=0},set:c,upsert({key:u,value:f}){c(u,f)},remove(u){a.headers=i().filter(f=>f.key.toLowerCase()!==u.toLowerCase())},toObject(){const u={};for(const f of i())f.enabled!==!1&&(u[f.key]=f.value);return u}}}function Vg(a){return{get(i){return a.find(([c])=>c.toLowerCase()===i.toLowerCase())?.[1]},has(i){return a.some(([c])=>c.toLowerCase()===i.toLowerCase())},toObject(){const i={};for(const[c,u]of a)i[c]=u;return i}}}async function Bd(a){const i=Gg(a.draft),c=Hr(a.variables||{}),u=Hr(a.collectionVariables||{}),f=Hr(a.externalVariables||{}),p=Hr(a.environmentVariables||{}),g=[],y=[],x=[],h=[],S=[],A=j=>{Object.prototype.hasOwnProperty.call(p,j)?c[j]=p[j]:Object.prototype.hasOwnProperty.call(f,j)?c[j]=f[j]:Object.prototype.hasOwnProperty.call(u,j)?c[j]=u[j]:delete c[j]},C={get(j){return p[j]},has(j){return Object.prototype.hasOwnProperty.call(p,j)},set(j,R){const Y=String(R);p[j]=Y,c[j]=Y,y.push({action:"set",key:j,value:Y})},unset(j){delete p[j],A(j),y.push({action:"unset",key:j})},replaceIn(j){return j.replace(/\{\{\s*([^{}]+?)\s*\}\}/g,(R,Y)=>{const D=Y.trim();return Object.prototype.hasOwnProperty.call(p,D)?p[D]:R})}},M={get(j){return u[j]},has(j){return Object.prototype.hasOwnProperty.call(u,j)},set(j,R){const Y=String(R);u[j]=Y,A(j),g.push({action:"set",key:j,value:Y})},unset(j){delete u[j],A(j),g.push({action:"unset",key:j})},replaceIn(j){return j.replace(/\{\{\s*([^{}]+?)\s*\}\}/g,(R,Y)=>{const D=Y.trim();return Object.prototype.hasOwnProperty.call(u,D)?u[D]:R})}},k={get(j){return c[j]},has(j){return Object.prototype.hasOwnProperty.call(c,j)},set(j,R){c[j]=String(R)},unset(j){delete c[j]},replaceIn(j){return j.replace(/\{\{\s*([^{}]+?)\s*\}\}/g,(R,Y)=>{const D=Y.trim();return Object.prototype.hasOwnProperty.call(c,D)?c[D]:R})}},G={get raw(){return i.body||""},set raw(j){i.body=String(j)}},U={get method(){return i.method},set method(j){i.method=String(j)},get url(){return i.url},set url(j){i.url=String(j)},headers:Fg(i),body:G},I=a.response?{code:a.response.status,status:a.response.statusText,responseTime:a.response.responseTime,headers:Vg(a.response.headers),text:()=>a.response?.body||"",json:()=>JSON.parse(a.response?.body||"")}:void 0,_={request:U,response:I,environment:C,collection:M,variables:k,expect:Ig,test(j,R){if(a.phase!=="tests")throw new Error("flex.test is only available in post-response test scripts.");const Y=Promise.resolve().then(R).then(()=>{x.push({name:j,passed:!0})}).catch(D=>{x.push({name:j,passed:!1,error:D instanceof Error?D.message:String(D)})});S.push(Y)}},N={log:(...j)=>h.push(j.map(wt).join(" ")),info:(...j)=>h.push(j.map(wt).join(" ")),warn:(...j)=>h.push(`WARN ${j.map(wt).join(" ")}`),error:(...j)=>h.push(`ERROR ${j.map(wt).join(" ")}`)};try{return await new Function("flex","console",`"use strict"; return (async () => {
11
+ `+o.mark.snippet),p+" "+f):p}function r(o,u){Error.call(this),this.name="YAMLException",this.reason=o,this.mark=u,this.message=a(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(u){return this.name+": "+a(this,u)},js=r,js}var As,Pu;function Sg(){if(Pu)return As;Pu=1;const a=Il();function r(f,p,g,x,b){let m="",v="";const S=Math.floor(b/2)-1;return x-p>S&&(m=" ... ",p=x-S+m.length),g-x>S&&(v=" ...",g=x+S-v.length),{str:m+f.slice(p,g).replace(/\t/g,"→")+v,pos:x-p+m.length}}function o(f,p){return a.repeat(" ",p-f.length)+f}function u(f,p){if(p=Object.create(p||null),!f.buffer)return null;p.maxLength||(p.maxLength=79),typeof p.indent!="number"&&(p.indent=1),typeof p.linesBefore!="number"&&(p.linesBefore=3),typeof p.linesAfter!="number"&&(p.linesAfter=2);const g=/\r?\n|\r|\0/g,x=[0],b=[];let m,v=-1;for(;m=g.exec(f.buffer);)b.push(m.index),x.push(m.index+m[0].length),f.position<=m.index&&v<0&&(v=x.length-2);v<0&&(v=x.length-1);let S="";const N=Math.min(f.line+p.linesAfter,b.length).toString().length,_=p.maxLength-(p.indent+N+3);for(let z=1;z<=p.linesBefore&&!(v-z<0);z++){const M=r(f.buffer,x[v-z],b[v-z],f.position-(x[v]-x[v-z]),_);S=a.repeat(" ",p.indent)+o((f.line-z+1).toString(),N)+" | "+M.str+`
12
+ `+S}const R=r(f.buffer,x[v],b[v],f.position,_);S+=a.repeat(" ",p.indent)+o((f.line+1).toString(),N)+" | "+R.str+`
13
+ `,S+=a.repeat("-",p.indent+N+3+R.pos)+`^
14
+ `;for(let z=1;z<=p.linesAfter&&!(v+z>=b.length);z++){const M=r(f.buffer,x[v+z],b[v+z],f.position-(x[v]-x[v+z]),_);S+=a.repeat(" ",p.indent)+o((f.line+z+1).toString(),N)+" | "+M.str+`
15
+ `}return S.replace(/\n$/,"")}return As=u,As}var Ns,Wu;function Bt(){if(Wu)return Ns;Wu=1;const a=Yl(),r=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];function u(p){const g={};return p!==null&&Object.keys(p).forEach(function(x){p[x].forEach(function(b){g[String(b)]=x})}),g}function f(p,g){if(g=g||{},Object.keys(g).forEach(function(x){if(r.indexOf(x)===-1)throw new a('Unknown option "'+x+'" is met in definition of "'+p+'" YAML type.')}),this.options=g,this.tag=p,this.kind=g.kind||null,this.resolve=g.resolve||function(){return!0},this.construct=g.construct||function(x){return x},this.instanceOf=g.instanceOf||null,this.predicate=g.predicate||null,this.represent=g.represent||null,this.representName=g.representName||null,this.defaultStyle=g.defaultStyle||null,this.multi=g.multi||!1,this.styleAliases=u(g.styleAliases||null),o.indexOf(this.kind)===-1)throw new a('Unknown kind "'+this.kind+'" is specified for "'+p+'" YAML type.')}return Ns=f,Ns}var ws,ed;function td(){if(ed)return ws;ed=1;const a=Yl(),r=Bt();function o(p,g){const x=[];return p[g].forEach(function(b){let m=x.length;x.forEach(function(v,S){v.tag===b.tag&&v.kind===b.kind&&v.multi===b.multi&&(m=S)}),x[m]=b}),x}function u(){const p={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function g(x){x.multi?(p.multi[x.kind].push(x),p.multi.fallback.push(x)):p[x.kind][x.tag]=p.fallback[x.tag]=x}for(let x=0,b=arguments.length;x<b;x+=1)arguments[x].forEach(g);return p}function f(p){return this.extend(p)}return f.prototype.extend=function(g){let x=[],b=[];if(g instanceof r)b.push(g);else if(Array.isArray(g))b=b.concat(g);else if(g&&(Array.isArray(g.implicit)||Array.isArray(g.explicit)))g.implicit&&(x=x.concat(g.implicit)),g.explicit&&(b=b.concat(g.explicit));else throw new a("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");x.forEach(function(v){if(!(v instanceof r))throw new a("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(v.loadKind&&v.loadKind!=="scalar")throw new a("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(v.multi)throw new a("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),b.forEach(function(v){if(!(v instanceof r))throw new a("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const m=Object.create(f.prototype);return m.implicit=(this.implicit||[]).concat(x),m.explicit=(this.explicit||[]).concat(b),m.compiledImplicit=o(m,"implicit"),m.compiledExplicit=o(m,"explicit"),m.compiledTypeMap=u(m.compiledImplicit,m.compiledExplicit),m},ws=f,ws}var Ts,nd;function ad(){if(nd)return Ts;nd=1;const a=Bt();return Ts=new a("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}}),Ts}var Es,ld;function rd(){if(ld)return Es;ld=1;const a=Bt();return Es=new a("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}}),Es}var Cs,id;function sd(){if(id)return Cs;id=1;const a=Bt();return Cs=new a("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}}),Cs}var ks,od;function cd(){if(od)return ks;od=1;const a=td();return ks=new a({explicit:[ad(),rd(),sd()]}),ks}var _s,ud;function dd(){if(ud)return _s;ud=1;const a=Bt();function r(f){if(f===null)return!0;const p=f.length;return p===1&&f==="~"||p===4&&(f==="null"||f==="Null"||f==="NULL")}function o(){return null}function u(f){return f===null}return _s=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:r,construct:o,predicate:u,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),_s}var Os,fd;function pd(){if(fd)return Os;fd=1;const a=Bt();function r(f){if(f===null)return!1;const p=f.length;return p===4&&(f==="true"||f==="True"||f==="TRUE")||p===5&&(f==="false"||f==="False"||f==="FALSE")}function o(f){return f==="true"||f==="True"||f==="TRUE"}function u(f){return Object.prototype.toString.call(f)==="[object Boolean]"}return Os=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:r,construct:o,predicate:u,represent:{lowercase:function(f){return f?"true":"false"},uppercase:function(f){return f?"TRUE":"FALSE"},camelcase:function(f){return f?"True":"False"}},defaultStyle:"lowercase"}),Os}var Rs,md;function hd(){if(md)return Rs;md=1;const a=Il(),r=Bt();function o(m){return m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102}function u(m){return m>=48&&m<=55}function f(m){return m>=48&&m<=57}function p(m){if(m===null)return!1;const v=m.length;let S=0,N=!1;if(!v)return!1;let _=m[S];if((_==="-"||_==="+")&&(_=m[++S]),_==="0"){if(S+1===v)return!0;if(_=m[++S],_==="b"){for(S++;S<v;S++){if(_=m[S],_!=="0"&&_!=="1")return!1;N=!0}return N&&isFinite(g(m))}if(_==="x"){for(S++;S<v;S++){if(!o(m.charCodeAt(S)))return!1;N=!0}return N&&isFinite(g(m))}if(_==="o"){for(S++;S<v;S++){if(!u(m.charCodeAt(S)))return!1;N=!0}return N&&isFinite(g(m))}}for(;S<v;S++){if(!f(m.charCodeAt(S)))return!1;N=!0}return N?isFinite(g(m)):!1}function g(m){let v=m,S=1,N=v[0];if((N==="-"||N==="+")&&(N==="-"&&(S=-1),v=v.slice(1),N=v[0]),v==="0")return 0;if(N==="0"){if(v[1]==="b")return S*parseInt(v.slice(2),2);if(v[1]==="x")return S*parseInt(v.slice(2),16);if(v[1]==="o")return S*parseInt(v.slice(2),8)}return S*parseInt(v,10)}function x(m){return g(m)}function b(m){return Object.prototype.toString.call(m)==="[object Number]"&&m%1===0&&!a.isNegativeZero(m)}return Rs=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:p,construct:x,predicate:b,represent:{binary:function(m){return m>=0?"0b"+m.toString(2):"-0b"+m.toString(2).slice(1)},octal:function(m){return m>=0?"0o"+m.toString(8):"-0o"+m.toString(8).slice(1)},decimal:function(m){return m.toString(10)},hexadecimal:function(m){return m>=0?"0x"+m.toString(16).toUpperCase():"-0x"+m.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Rs}var $s,yd;function gd(){if(yd)return $s;yd=1;const a=Il(),r=Bt(),o=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),u=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function f(m){return m===null||!o.test(m)?!1:isFinite(parseFloat(m,10))?!0:u.test(m)}function p(m){let v=m.toLowerCase();const S=v[0]==="-"?-1:1;return"+-".indexOf(v[0])>=0&&(v=v.slice(1)),v===".inf"?S===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:v===".nan"?NaN:S*parseFloat(v,10)}const g=/^[-+]?[0-9]+e/;function x(m,v){if(isNaN(m))switch(v){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===m)switch(v){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===m)switch(v){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(a.isNegativeZero(m))return"-0.0";const S=m.toString(10);return g.test(S)?S.replace("e",".e"):S}function b(m){return Object.prototype.toString.call(m)==="[object Number]"&&(m%1!==0||a.isNegativeZero(m))}return $s=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:f,construct:p,predicate:b,represent:x,defaultStyle:"lowercase"}),$s}var Ms,xd;function bd(){return xd||(xd=1,Ms=cd().extend({implicit:[dd(),pd(),hd(),gd()]})),Ms}var qs,vd;function Sd(){return vd||(vd=1,qs=bd()),qs}var Ds,jd;function Ad(){if(jd)return Ds;jd=1;const a=Bt(),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function u(g){return g===null?!1:r.exec(g)!==null||o.exec(g)!==null}function f(g){let x=0,b=null,m=r.exec(g);if(m===null&&(m=o.exec(g)),m===null)throw new Error("Date resolve error");const v=+m[1],S=+m[2]-1,N=+m[3];if(!m[4])return new Date(Date.UTC(v,S,N));const _=+m[4],R=+m[5],z=+m[6];if(m[7]){for(x=m[7].slice(0,3);x.length<3;)x+="0";x=+x}if(m[9]){const B=+m[10],T=+(m[11]||0);b=(B*60+T)*6e4,m[9]==="-"&&(b=-b)}const M=new Date(Date.UTC(v,S,N,_,R,z,x));return b&&M.setTime(M.getTime()-b),M}function p(g){return g.toISOString()}return Ds=new a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:u,construct:f,instanceOf:Date,represent:p}),Ds}var zs,Nd;function wd(){if(Nd)return zs;Nd=1;const a=Bt();function r(o){return o==="<<"||o===null}return zs=new a("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r}),zs}var Us,Td;function Ed(){if(Td)return Us;Td=1;const a=Bt(),r=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
16
+ \r`;function o(g){if(g===null)return!1;let x=0;const b=g.length,m=r;for(let v=0;v<b;v++){const S=m.indexOf(g.charAt(v));if(!(S>64)){if(S<0)return!1;x+=6}}return x%8===0}function u(g){const x=g.replace(/[\r\n=]/g,""),b=x.length,m=r;let v=0;const S=[];for(let _=0;_<b;_++)_%4===0&&_&&(S.push(v>>16&255),S.push(v>>8&255),S.push(v&255)),v=v<<6|m.indexOf(x.charAt(_));const N=b%4*6;return N===0?(S.push(v>>16&255),S.push(v>>8&255),S.push(v&255)):N===18?(S.push(v>>10&255),S.push(v>>2&255)):N===12&&S.push(v>>4&255),new Uint8Array(S)}function f(g){let x="",b=0;const m=g.length,v=r;for(let N=0;N<m;N++)N%3===0&&N&&(x+=v[b>>18&63],x+=v[b>>12&63],x+=v[b>>6&63],x+=v[b&63]),b=(b<<8)+g[N];const S=m%3;return S===0?(x+=v[b>>18&63],x+=v[b>>12&63],x+=v[b>>6&63],x+=v[b&63]):S===2?(x+=v[b>>10&63],x+=v[b>>4&63],x+=v[b<<2&63],x+=v[64]):S===1&&(x+=v[b>>2&63],x+=v[b<<4&63],x+=v[64],x+=v[64]),x}function p(g){return Object.prototype.toString.call(g)==="[object Uint8Array]"}return Us=new a("tag:yaml.org,2002:binary",{kind:"scalar",resolve:o,construct:u,predicate:p,represent:f}),Us}var Hs,Cd;function kd(){if(Cd)return Hs;Cd=1;const a=Bt(),r=Object.prototype.hasOwnProperty,o=Object.prototype.toString;function u(p){if(p===null)return!0;const g={},x=p;for(let b=0,m=x.length;b<m;b+=1){const v=x[b];let S=!1;if(o.call(v)!=="[object Object]")return!1;let N;for(N in v)if(r.call(v,N))if(!S)S=!0;else return!1;if(!S||r.call(g,N))return!1;Object.defineProperty(g,N,{value:!0})}return!0}function f(p){return p!==null?p:[]}return Hs=new a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:u,construct:f}),Hs}var Ls,_d;function Od(){if(_d)return Ls;_d=1;const a=Bt(),r=Object.prototype.toString;function o(f){if(f===null)return!0;const p=f,g=new Array(p.length);for(let x=0,b=p.length;x<b;x+=1){const m=p[x];if(r.call(m)!=="[object Object]")return!1;const v=Object.keys(m);if(v.length!==1)return!1;g[x]=[v[0],m[v[0]]]}return!0}function u(f){if(f===null)return[];const p=f,g=new Array(p.length);for(let x=0,b=p.length;x<b;x+=1){const m=p[x],v=Object.keys(m);g[x]=[v[0],m[v[0]]]}return g}return Ls=new a("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:o,construct:u}),Ls}var Bs,Rd;function $d(){if(Rd)return Bs;Rd=1;const a=Bt(),r=Object.prototype.hasOwnProperty;function o(f){if(f===null)return!0;const p=f;for(const g in p)if(r.call(p,g)&&p[g]!==null)return!1;return!0}function u(f){return f!==null?f:{}}return Bs=new a("tag:yaml.org,2002:set",{kind:"mapping",resolve:o,construct:u}),Bs}var Is,Md;function Ys(){return Md||(Md=1,Is=Sd().extend({implicit:[Ad(),wd()],explicit:[Ed(),kd(),Od(),$d()]})),Is}var qd;function jg(){if(qd)return Hr;qd=1;const a=Il(),r=Yl(),o=Sg(),u=Ys(),f=Object.prototype.hasOwnProperty,p=1,g=2,x=3,b=4,m=1,v=2,S=3,N=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_=/[\x85\u2028\u2029]/,R=/[,\[\]{}]/,z=/^(?:!|!!|![0-9A-Za-z-]+!)$/,M=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function B(d){return Object.prototype.toString.call(d)}function T(d){return d===10||d===13}function E(d){return d===9||d===32}function w(d){return d===9||d===32||d===10||d===13}function U(d){return d===44||d===91||d===93||d===123||d===125}function Y(d){if(d>=48&&d<=57)return d-48;const H=d|32;return H>=97&&H<=102?H-97+10:-1}function $(d){return d===120?2:d===117?4:d===85?8:0}function q(d){return d>=48&&d<=57?d-48:-1}function J(d){switch(d){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
17
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function Se(d){return d<=65535?String.fromCharCode(d):String.fromCharCode((d-65536>>10)+55296,(d-65536&1023)+56320)}function Ae(d,H,te){H==="__proto__"?Object.defineProperty(d,H,{configurable:!0,enumerable:!0,writable:!0,value:te}):d[H]=te}const se=new Array(256),he=new Array(256);for(let d=0;d<256;d++)se[d]=J(d)?1:0,he[d]=J(d);function xe(d,H){this.input=d,this.filename=H.filename||null,this.schema=H.schema||u,this.onWarning=H.onWarning||null,this.legacy=H.legacy||!1,this.json=H.json||!1,this.listener=H.listener||null,this.maxDepth=typeof H.maxDepth=="number"?H.maxDepth:100,this.maxTotalMergeKeys=typeof H.maxTotalMergeKeys=="number"?H.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=d.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Ne(d,H){const te={name:d.filename,buffer:d.input.slice(0,-1),position:d.position,line:d.line,column:d.position-d.lineStart};return te.snippet=o(te),new r(H,te)}function O(d,H){throw Ne(d,H)}function ee(d,H){d.onWarning&&d.onWarning.call(null,Ne(d,H))}function oe(d,H,te){const le=d.anchorMapTransactions;if(le.length!==0){const Z=le[le.length-1];f.call(Z,H)||(Z[H]={existed:f.call(d.anchorMap,H),value:d.anchorMap[H]})}d.anchorMap[H]=te}function K(d){d.anchorMapTransactions.push(Object.create(null))}function ge(d){const H=d.anchorMapTransactions.pop(),te=d.anchorMapTransactions;if(te.length===0)return;const le=te[te.length-1],Z=Object.keys(H);for(let h=0,A=Z.length;h<A;h+=1){const I=Z[h];f.call(le,I)||(le[I]=H[I])}}function C(d){const H=d.anchorMapTransactions.pop(),te=Object.keys(H);for(let le=te.length-1;le>=0;le-=1){const Z=H[te[le]];Z.existed?d.anchorMap[te[le]]=Z.value:delete d.anchorMap[te[le]]}}function G(d){return{position:d.position,line:d.line,lineStart:d.lineStart,lineIndent:d.lineIndent,firstTabInLine:d.firstTabInLine,tag:d.tag,anchor:d.anchor,kind:d.kind,result:d.result}}function pe(d,H){d.position=H.position,d.line=H.line,d.lineStart=H.lineStart,d.lineIndent=H.lineIndent,d.firstTabInLine=H.firstTabInLine,d.tag=H.tag,d.anchor=H.anchor,d.kind=H.kind,d.result=H.result}const de={YAML:function(H,te,le){H.version!==null&&O(H,"duplication of %YAML directive"),le.length!==1&&O(H,"YAML directive accepts exactly one argument");const Z=/^([0-9]+)\.([0-9]+)$/.exec(le[0]);Z===null&&O(H,"ill-formed argument of the YAML directive");const h=parseInt(Z[1],10),A=parseInt(Z[2],10);h!==1&&O(H,"unacceptable YAML version of the document"),H.version=le[0],H.checkLineBreaks=A<2,A!==1&&A!==2&&ee(H,"unsupported YAML version of the document")},TAG:function(H,te,le){let Z;le.length!==2&&O(H,"TAG directive accepts exactly two arguments");const h=le[0];Z=le[1],z.test(h)||O(H,"ill-formed tag handle (first argument) of the TAG directive"),f.call(H.tagMap,h)&&O(H,'there is a previously declared suffix for "'+h+'" tag handle'),M.test(Z)||O(H,"ill-formed tag prefix (second argument) of the TAG directive");try{Z=decodeURIComponent(Z)}catch{O(H,"tag prefix is malformed: "+Z)}H.tagMap[h]=Z}};function be(d,H,te,le){if(H<te){const Z=d.input.slice(H,te);if(le)for(let h=0,A=Z.length;h<A;h+=1){const I=Z.charCodeAt(h);I===9||I>=32&&I<=1114111||O(d,"expected valid JSON character")}else N.test(Z)&&O(d,"the stream contains non-printable characters");d.result+=Z}}function Ee(d){d.totalMergeKeys++,d.maxTotalMergeKeys!==-1&&d.totalMergeKeys>d.maxTotalMergeKeys&&O(d,"merge keys exceeded maxTotalMergeKeys ("+d.maxTotalMergeKeys+")")}function ce(d,H,te,le){a.isObject(te)||O(d,"cannot merge mappings; the provided source object is unacceptable"),Ee(d);const Z=Object.keys(te);for(let h=0,A=Z.length;h<A;h+=1){const I=Z[h];Ee(d),f.call(H,I)||(Ae(H,I,te[I]),le[I]=!0)}}function Ce(d,H,te,le,Z,h,A,I,ue){if(Array.isArray(Z)){Z=Array.prototype.slice.call(Z);for(let fe=0,me=Z.length;fe<me;fe+=1)Array.isArray(Z[fe])&&O(d,"nested arrays are not supported inside keys"),typeof Z=="object"&&B(Z[fe])==="[object Object]"&&(Z[fe]="[object Object]")}if(typeof Z=="object"&&B(Z)==="[object Object]"&&(Z="[object Object]"),Z=String(Z),H===null&&(H={}),le==="tag:yaml.org,2002:merge")if(Array.isArray(h)){h.length>100&&O(d,"abnormal merge sequence size");for(let fe=0,me=h.length;fe<me;fe+=1)ce(d,H,h[fe],te)}else ce(d,H,h,te);else!d.json&&!f.call(te,Z)&&f.call(H,Z)&&(d.line=A||d.line,d.lineStart=I||d.lineStart,d.position=ue||d.position,O(d,"duplicated mapping key")),Ae(H,Z,h),delete te[Z];return H}function Le(d){const H=d.input.charCodeAt(d.position);H===10?d.position++:H===13?(d.position++,d.input.charCodeAt(d.position)===10&&d.position++):O(d,"a line break is expected"),d.line+=1,d.lineStart=d.position,d.firstTabInLine=-1}function Be(d,H,te){let le=0,Z=d.input.charCodeAt(d.position);for(;Z!==0;){for(;E(Z);)Z===9&&d.firstTabInLine===-1&&(d.firstTabInLine=d.position),Z=d.input.charCodeAt(++d.position);if(H&&Z===35)do Z=d.input.charCodeAt(++d.position);while(Z!==10&&Z!==13&&Z!==0);if(T(Z))for(Le(d),Z=d.input.charCodeAt(d.position),le++,d.lineIndent=0;Z===32;)d.lineIndent++,Z=d.input.charCodeAt(++d.position);else break}return te!==-1&&le!==0&&d.lineIndent<te&&ee(d,"deficient indentation"),le}function rt(d){let H=d.position,te=d.input.charCodeAt(H);return!!((te===45||te===46)&&te===d.input.charCodeAt(H+1)&&te===d.input.charCodeAt(H+2)&&(H+=3,te=d.input.charCodeAt(H),te===0||w(te)))}function P(d,H){H===1?d.result+=" ":H>1&&(d.result+=a.repeat(`
18
+ `,H-1))}function ve(d,H,te){let le,Z,h,A,I,ue;const fe=d.kind,me=d.result;let ne=d.input.charCodeAt(d.position);if(w(ne)||U(ne)||ne===35||ne===38||ne===42||ne===33||ne===124||ne===62||ne===39||ne===34||ne===37||ne===64||ne===96)return!1;if(ne===63||ne===45){const ye=d.input.charCodeAt(d.position+1);if(w(ye)||te&&U(ye))return!1}for(d.kind="scalar",d.result="",le=Z=d.position,h=!1;ne!==0;){if(ne===58){const ye=d.input.charCodeAt(d.position+1);if(w(ye)||te&&U(ye))break}else if(ne===35){const ye=d.input.charCodeAt(d.position-1);if(w(ye))break}else{if(d.position===d.lineStart&&rt(d)||te&&U(ne))break;if(T(ne))if(A=d.line,I=d.lineStart,ue=d.lineIndent,Be(d,!1,-1),d.lineIndent>=H){h=!0,ne=d.input.charCodeAt(d.position);continue}else{d.position=Z,d.line=A,d.lineStart=I,d.lineIndent=ue;break}}h&&(be(d,le,Z,!1),P(d,d.line-A),le=Z=d.position,h=!1),E(ne)||(Z=d.position+1),ne=d.input.charCodeAt(++d.position)}return be(d,le,Z,!1),d.result?!0:(d.kind=fe,d.result=me,!1)}function je(d,H){let te,le,Z=d.input.charCodeAt(d.position);if(Z!==39)return!1;for(d.kind="scalar",d.result="",d.position++,te=le=d.position;(Z=d.input.charCodeAt(d.position))!==0;)if(Z===39)if(be(d,te,d.position,!0),Z=d.input.charCodeAt(++d.position),Z===39)te=d.position,d.position++,le=d.position;else return!0;else T(Z)?(be(d,te,le,!0),P(d,Be(d,!1,H)),te=le=d.position):d.position===d.lineStart&&rt(d)?O(d,"unexpected end of the document within a single quoted scalar"):(d.position++,E(Z)||(le=d.position));O(d,"unexpected end of the stream within a single quoted scalar")}function ke(d,H){let te,le,Z,h=d.input.charCodeAt(d.position);if(h!==34)return!1;for(d.kind="scalar",d.result="",d.position++,te=le=d.position;(h=d.input.charCodeAt(d.position))!==0;){if(h===34)return be(d,te,d.position,!0),d.position++,!0;if(h===92){if(be(d,te,d.position,!0),h=d.input.charCodeAt(++d.position),T(h))Be(d,!1,H);else if(h<256&&se[h])d.result+=he[h],d.position++;else if((Z=$(h))>0){let A=Z,I=0;for(;A>0;A--)h=d.input.charCodeAt(++d.position),(Z=Y(h))>=0?I=(I<<4)+Z:O(d,"expected hexadecimal character");d.result+=Se(I),d.position++}else O(d,"unknown escape sequence");te=le=d.position}else T(h)?(be(d,te,le,!0),P(d,Be(d,!1,H)),te=le=d.position):d.position===d.lineStart&&rt(d)?O(d,"unexpected end of the document within a double quoted scalar"):(d.position++,E(h)||(le=d.position))}O(d,"unexpected end of the stream within a double quoted scalar")}function Pe(d,H){let te=!0,le,Z,h;const A=d.tag;let I;const ue=d.anchor;let fe,me,ne,ye;const we=Object.create(null);let Re,$e,Ue,Fe=d.input.charCodeAt(d.position);if(Fe===91)fe=93,ye=!1,I=[];else if(Fe===123)fe=125,ye=!0,I={};else return!1;for(d.anchor!==null&&oe(d,d.anchor,I),Fe=d.input.charCodeAt(++d.position);Fe!==0;){if(Be(d,!0,H),Fe=d.input.charCodeAt(d.position),Fe===fe)return d.position++,d.tag=A,d.anchor=ue,d.kind=ye?"mapping":"sequence",d.result=I,!0;if(te?Fe===44&&O(d,"expected the node content, but found ','"):O(d,"missed comma between flow collection entries"),$e=Re=Ue=null,me=ne=!1,Fe===63){const Tn=d.input.charCodeAt(d.position+1);w(Tn)&&(me=ne=!0,d.position++,Be(d,!0,H))}le=d.line,Z=d.lineStart,h=d.position,Oe(d,H,p,!1,!0),$e=d.tag,Re=d.result,Be(d,!0,H),Fe=d.input.charCodeAt(d.position),(ne||d.line===le)&&Fe===58&&(me=!0,Fe=d.input.charCodeAt(++d.position),Be(d,!0,H),Oe(d,H,p,!1,!0),Ue=d.result),ye?Ce(d,I,we,$e,Re,Ue,le,Z,h):me?I.push(Ce(d,null,we,$e,Re,Ue,le,Z,h)):I.push(Re),Be(d,!0,H),Fe=d.input.charCodeAt(d.position),Fe===44?(te=!0,Fe=d.input.charCodeAt(++d.position)):te=!1}O(d,"unexpected end of the stream within a flow collection")}function at(d,H){let te,le=m,Z=!1,h=!1,A=H,I=0,ue=!1,fe,me=d.input.charCodeAt(d.position);if(me===124)te=!1;else if(me===62)te=!0;else return!1;for(d.kind="scalar",d.result="";me!==0;)if(me=d.input.charCodeAt(++d.position),me===43||me===45)m===le?le=me===43?S:v:O(d,"repeat of a chomping mode identifier");else if((fe=q(me))>=0)fe===0?O(d,"bad explicit indentation width of a block scalar; it cannot be less than one"):h?O(d,"repeat of an indentation width identifier"):(A=H+fe-1,h=!0);else break;if(E(me)){do me=d.input.charCodeAt(++d.position);while(E(me));if(me===35)do me=d.input.charCodeAt(++d.position);while(!T(me)&&me!==0)}for(;me!==0;){for(Le(d),d.lineIndent=0,me=d.input.charCodeAt(d.position);(!h||d.lineIndent<A)&&me===32;)d.lineIndent++,me=d.input.charCodeAt(++d.position);if(!h&&d.lineIndent>A&&(A=d.lineIndent),T(me)){I++;continue}if(!h&&A===0&&O(d,"missing indentation for block scalar"),d.lineIndent<A){le===S?d.result+=a.repeat(`
19
+ `,Z?1+I:I):le===m&&Z&&(d.result+=`
20
+ `);break}te?E(me)?(ue=!0,d.result+=a.repeat(`
21
+ `,Z?1+I:I)):ue?(ue=!1,d.result+=a.repeat(`
22
+ `,I+1)):I===0?Z&&(d.result+=" "):d.result+=a.repeat(`
23
+ `,I):d.result+=a.repeat(`
24
+ `,Z?1+I:I),Z=!0,h=!0,I=0;const ne=d.position;for(;!T(me)&&me!==0;)me=d.input.charCodeAt(++d.position);be(d,ne,d.position,!1)}return!0}function yt(d,H){const te=d.tag,le=d.anchor,Z=[];let h=!1;if(d.firstTabInLine!==-1)return!1;d.anchor!==null&&oe(d,d.anchor,Z);let A=d.input.charCodeAt(d.position);for(;A!==0&&(d.firstTabInLine!==-1&&(d.position=d.firstTabInLine,O(d,"tab characters must not be used in indentation")),A===45);){const I=d.input.charCodeAt(d.position+1);if(!w(I))break;if(h=!0,d.position++,Be(d,!0,-1)&&d.lineIndent<=H){Z.push(null),A=d.input.charCodeAt(d.position);continue}const ue=d.line;if(Oe(d,H,x,!1,!0),Z.push(d.result),Be(d,!0,-1),A=d.input.charCodeAt(d.position),(d.line===ue||d.lineIndent>H)&&A!==0)O(d,"bad indentation of a sequence entry");else if(d.lineIndent<H)break}return h?(d.tag=te,d.anchor=le,d.kind="sequence",d.result=Z,!0):!1}function He(d,H,te){let le,Z,h,A;const I=d.tag,ue=d.anchor,fe={},me=Object.create(null);let ne=null,ye=null,we=null,Re=!1,$e=!1;if(d.firstTabInLine!==-1)return!1;d.anchor!==null&&oe(d,d.anchor,fe);let Ue=d.input.charCodeAt(d.position);for(;Ue!==0;){!Re&&d.firstTabInLine!==-1&&(d.position=d.firstTabInLine,O(d,"tab characters must not be used in indentation"));const Fe=d.input.charCodeAt(d.position+1),Tn=d.line;if((Ue===63||Ue===58)&&w(Fe))Ue===63?(Re&&(Ce(d,fe,me,ne,ye,null,Z,h,A),ne=ye=we=null),$e=!0,Re=!0,le=!0):Re?(Re=!1,le=!0):O(d,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),d.position+=1,Ue=Fe;else{if(Z=d.line,h=d.lineStart,A=d.position,!Oe(d,te,g,!1,!0))break;if(d.line===Tn){for(Ue=d.input.charCodeAt(d.position);E(Ue);)Ue=d.input.charCodeAt(++d.position);if(Ue===58)Ue=d.input.charCodeAt(++d.position),w(Ue)||O(d,"a whitespace character is expected after the key-value separator within a block mapping"),Re&&(Ce(d,fe,me,ne,ye,null,Z,h,A),ne=ye=we=null),$e=!0,Re=!1,le=!1,ne=d.tag,ye=d.result;else if($e)O(d,"can not read an implicit mapping pair; a colon is missed");else return d.tag=I,d.anchor=ue,!0}else if($e)O(d,"can not read a block mapping entry; a multiline key may not be an implicit key");else return d.tag=I,d.anchor=ue,!0}if((d.line===Tn||d.lineIndent>H)&&(Re&&(Z=d.line,h=d.lineStart,A=d.position),Oe(d,H,b,!0,le)&&(Re?ye=d.result:we=d.result),Re||(Ce(d,fe,me,ne,ye,we,Z,h,A),ne=ye=we=null),Be(d,!0,-1),Ue=d.input.charCodeAt(d.position)),(d.line===Tn||d.lineIndent>H)&&Ue!==0)O(d,"bad indentation of a mapping entry");else if(d.lineIndent<H)break}return Re&&Ce(d,fe,me,ne,ye,null,Z,h,A),$e&&(d.tag=I,d.anchor=ue,d.kind="mapping",d.result=fe),$e}function Ft(d){let H=!1,te=!1,le,Z,h=d.input.charCodeAt(d.position);if(h!==33)return!1;d.tag!==null&&O(d,"duplication of a tag property"),h=d.input.charCodeAt(++d.position),h===60?(H=!0,h=d.input.charCodeAt(++d.position)):h===33?(te=!0,le="!!",h=d.input.charCodeAt(++d.position)):le="!";let A=d.position;if(H){do h=d.input.charCodeAt(++d.position);while(h!==0&&h!==62);d.position<d.length?(Z=d.input.slice(A,d.position),h=d.input.charCodeAt(++d.position)):O(d,"unexpected end of the stream within a verbatim tag")}else{for(;h!==0&&!w(h);)h===33&&(te?O(d,"tag suffix cannot contain exclamation marks"):(le=d.input.slice(A-1,d.position+1),z.test(le)||O(d,"named tag handle cannot contain such characters"),te=!0,A=d.position+1)),h=d.input.charCodeAt(++d.position);Z=d.input.slice(A,d.position),R.test(Z)&&O(d,"tag suffix cannot contain flow indicator characters")}Z&&!M.test(Z)&&O(d,"tag name cannot contain such characters: "+Z);try{Z=decodeURIComponent(Z)}catch{O(d,"tag name is malformed: "+Z)}return H?d.tag=Z:f.call(d.tagMap,le)?d.tag=d.tagMap[le]+Z:le==="!"?d.tag="!"+Z:le==="!!"?d.tag="tag:yaml.org,2002:"+Z:O(d,'undeclared tag handle "'+le+'"'),!0}function Vt(d){let H=d.input.charCodeAt(d.position);if(H!==38)return!1;d.anchor!==null&&O(d,"duplication of an anchor property"),H=d.input.charCodeAt(++d.position);const te=d.position;for(;H!==0&&!w(H)&&!U(H);)H=d.input.charCodeAt(++d.position);return d.position===te&&O(d,"name of an anchor node must contain at least one character"),d.anchor=d.input.slice(te,d.position),!0}function wn(d){let H=d.input.charCodeAt(d.position);if(H!==42)return!1;H=d.input.charCodeAt(++d.position);const te=d.position;for(;H!==0&&!w(H)&&!U(H);)H=d.input.charCodeAt(++d.position);d.position===te&&O(d,"name of an alias node must contain at least one character");const le=d.input.slice(te,d.position);return f.call(d.anchorMap,le)||O(d,'unidentified alias "'+le+'"'),d.result=d.anchorMap[le],Be(d,!0,-1),!0}function Rn(d,H,te,le){const Z=G(d);return K(d),pe(d,H),d.tag=null,d.anchor=null,d.kind=null,d.result=null,He(d,te,le)&&d.kind==="mapping"?(ge(d),!0):(C(d),pe(d,Z),!1)}function Oe(d,H,te,le,Z){let h,A,I=1,ue=!1,fe=!1,me=null,ne,ye,we;d.depth>=d.maxDepth&&O(d,"nesting exceeded maxDepth ("+d.maxDepth+")"),d.depth+=1,d.listener!==null&&d.listener("open",d),d.tag=null,d.anchor=null,d.kind=null,d.result=null;const Re=h=A=b===te||x===te;if(le&&Be(d,!0,-1)&&(ue=!0,d.lineIndent>H?I=1:d.lineIndent===H?I=0:d.lineIndent<H&&(I=-1)),I===1)for(;;){const $e=d.input.charCodeAt(d.position),Ue=G(d);if(ue&&($e===33&&d.tag!==null||$e===38&&d.anchor!==null)||!Ft(d)&&!Vt(d))break;me===null&&(me=Ue),Be(d,!0,-1)?(ue=!0,A=Re,d.lineIndent>H?I=1:d.lineIndent===H?I=0:d.lineIndent<H&&(I=-1)):A=!1}if(A&&(A=ue||Z),I===1||b===te)if(p===te||g===te?ye=H:ye=H+1,we=d.position-d.lineStart,I===1)if(A&&(yt(d,we)||He(d,we,ye))||Pe(d,ye))fe=!0;else{const $e=d.input.charCodeAt(d.position);me!==null&&Re&&!A&&$e!==124&&$e!==62&&Rn(d,me,me.position-me.lineStart,ye)||h&&at(d,ye)||je(d,ye)||ke(d,ye)?fe=!0:wn(d)?(fe=!0,(d.tag!==null||d.anchor!==null)&&O(d,"alias node should not have any properties")):ve(d,ye,p===te)&&(fe=!0,d.tag===null&&(d.tag="?")),d.anchor!==null&&oe(d,d.anchor,d.result)}else I===0&&(fe=A&&yt(d,we));if(d.tag===null)d.anchor!==null&&oe(d,d.anchor,d.result);else if(d.tag==="?"){d.result!==null&&d.kind!=="scalar"&&O(d,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+d.kind+'"');for(let $e=0,Ue=d.implicitTypes.length;$e<Ue;$e+=1)if(ne=d.implicitTypes[$e],ne.resolve(d.result)){d.result=ne.construct(d.result),d.tag=ne.tag,d.anchor!==null&&oe(d,d.anchor,d.result);break}}else if(d.tag!=="!"){if(f.call(d.typeMap[d.kind||"fallback"],d.tag))ne=d.typeMap[d.kind||"fallback"][d.tag];else{ne=null;const $e=d.typeMap.multi[d.kind||"fallback"];for(let Ue=0,Fe=$e.length;Ue<Fe;Ue+=1)if(d.tag.slice(0,$e[Ue].tag.length)===$e[Ue].tag){ne=$e[Ue];break}}ne||O(d,"unknown tag !<"+d.tag+">"),d.result!==null&&ne.kind!==d.kind&&O(d,"unacceptable node kind for !<"+d.tag+'> tag; it should be "'+ne.kind+'", not "'+d.kind+'"'),ne.resolve(d.result,d.tag)?(d.result=ne.construct(d.result,d.tag),d.anchor!==null&&oe(d,d.anchor,d.result)):O(d,"cannot resolve a node with !<"+d.tag+"> explicit tag")}return d.listener!==null&&d.listener("close",d),d.depth-=1,d.tag!==null||d.anchor!==null||fe}function it(d){const H=d.position;let te=!1,le;for(d.version=null,d.checkLineBreaks=d.legacy,d.tagMap=Object.create(null),d.anchorMap=Object.create(null);(le=d.input.charCodeAt(d.position))!==0&&(Be(d,!0,-1),le=d.input.charCodeAt(d.position),!(d.lineIndent>0||le!==37));){te=!0,le=d.input.charCodeAt(++d.position);let Z=d.position;for(;le!==0&&!w(le);)le=d.input.charCodeAt(++d.position);const h=d.input.slice(Z,d.position),A=[];for(h.length<1&&O(d,"directive name must not be less than one character in length");le!==0;){for(;E(le);)le=d.input.charCodeAt(++d.position);if(le===35){do le=d.input.charCodeAt(++d.position);while(le!==0&&!T(le));break}if(T(le))break;for(Z=d.position;le!==0&&!w(le);)le=d.input.charCodeAt(++d.position);A.push(d.input.slice(Z,d.position))}le!==0&&Le(d),f.call(de,h)?de[h](d,h,A):ee(d,'unknown document directive "'+h+'"')}if(Be(d,!0,-1),d.lineIndent===0&&d.input.charCodeAt(d.position)===45&&d.input.charCodeAt(d.position+1)===45&&d.input.charCodeAt(d.position+2)===45?(d.position+=3,Be(d,!0,-1)):te&&O(d,"directives end mark is expected"),Oe(d,d.lineIndent-1,b,!1,!0),Be(d,!0,-1),d.checkLineBreaks&&_.test(d.input.slice(H,d.position))&&ee(d,"non-ASCII line breaks are interpreted as content"),d.documents.push(d.result),d.position===d.lineStart&&rt(d)){d.input.charCodeAt(d.position)===46&&(d.position+=3,Be(d,!0,-1));return}d.position<d.length-1&&O(d,"end of the stream or a document separator is expected")}function Rt(d,H){d=String(d),H=H||{},d.length!==0&&(d.charCodeAt(d.length-1)!==10&&d.charCodeAt(d.length-1)!==13&&(d+=`
25
+ `),d.charCodeAt(0)===65279&&(d=d.slice(1)));const te=new xe(d,H),le=d.indexOf("\0");for(le!==-1&&(te.position=le,O(te,"null byte is not allowed in input")),te.input+="\0";te.input.charCodeAt(te.position)===32;)te.lineIndent+=1,te.position+=1;for(;te.position<te.length-1;)it(te);return te.documents}function Kt(d,H,te){H!==null&&typeof H=="object"&&typeof te>"u"&&(te=H,H=null);const le=Rt(d,te);if(typeof H!="function")return le;for(let Z=0,h=le.length;Z<h;Z+=1)H(le[Z])}function Yt(d,H){const te=Rt(d,H);if(te.length!==0){if(te.length===1)return te[0];throw new r("expected a single document in the stream, but found more")}}return Hr.loadAll=Kt,Hr.load=Yt,Hr}var Gs={},Dd;function Ag(){if(Dd)return Gs;Dd=1;const a=Il(),r=Yl(),o=Ys(),u=Object.prototype.toString,f=Object.prototype.hasOwnProperty,p=65279,g=9,x=10,b=13,m=32,v=33,S=34,N=35,_=37,R=38,z=39,M=42,B=44,T=45,E=58,w=61,U=62,Y=63,$=64,q=91,J=93,Se=96,Ae=123,se=124,he=125,xe={};xe[0]="\\0",xe[7]="\\a",xe[8]="\\b",xe[9]="\\t",xe[10]="\\n",xe[11]="\\v",xe[12]="\\f",xe[13]="\\r",xe[27]="\\e",xe[34]='\\"',xe[92]="\\\\",xe[133]="\\N",xe[160]="\\_",xe[8232]="\\L",xe[8233]="\\P";const Ne=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],O=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ee(h,A){if(A===null)return{};const I={},ue=Object.keys(A);for(let fe=0,me=ue.length;fe<me;fe+=1){let ne=ue[fe],ye=String(A[ne]);ne.slice(0,2)==="!!"&&(ne="tag:yaml.org,2002:"+ne.slice(2));const we=h.compiledTypeMap.fallback[ne];we&&f.call(we.styleAliases,ye)&&(ye=we.styleAliases[ye]),I[ne]=ye}return I}function oe(h){let A,I;const ue=h.toString(16).toUpperCase();if(h<=255)A="x",I=2;else if(h<=65535)A="u",I=4;else if(h<=4294967295)A="U",I=8;else throw new r("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+A+a.repeat("0",I-ue.length)+ue}const K=1,ge=2;function C(h){this.schema=h.schema||o,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=a.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=ee(this.schema,h.styles||null),this.sortKeys=h.sortKeys||!1,this.lineWidth=h.lineWidth||80,this.noRefs=h.noRefs||!1,this.noCompatMode=h.noCompatMode||!1,this.condenseFlow=h.condenseFlow||!1,this.quotingType=h.quotingType==='"'?ge:K,this.forceQuotes=h.forceQuotes||!1,this.replacer=typeof h.replacer=="function"?h.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function G(h,A){const I=a.repeat(" ",A);let ue=0,fe="";const me=h.length;for(;ue<me;){let ne;const ye=h.indexOf(`
26
+ `,ue);ye===-1?(ne=h.slice(ue),ue=me):(ne=h.slice(ue,ye+1),ue=ye+1),ne.length&&ne!==`
27
+ `&&(fe+=I),fe+=ne}return fe}function pe(h,A){return`
28
+ `+a.repeat(" ",h.indent*A)}function de(h,A){for(let I=0,ue=h.implicitTypes.length;I<ue;I+=1)if(h.implicitTypes[I].resolve(A))return!0;return!1}function be(h){return h===m||h===g}function Ee(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==p||h>=65536&&h<=1114111}function ce(h){return Ee(h)&&h!==p&&h!==b&&h!==x}function Ce(h,A,I){const ue=ce(h),fe=ue&&!be(h);return(I?ue:ue&&h!==B&&h!==q&&h!==J&&h!==Ae&&h!==he)&&h!==N&&!(A===E&&!fe)||ce(A)&&!be(A)&&h===N||A===E&&fe}function Le(h){return Ee(h)&&h!==p&&!be(h)&&h!==T&&h!==Y&&h!==E&&h!==B&&h!==q&&h!==J&&h!==Ae&&h!==he&&h!==N&&h!==R&&h!==M&&h!==v&&h!==se&&h!==w&&h!==U&&h!==z&&h!==S&&h!==_&&h!==$&&h!==Se}function Be(h){return!be(h)&&h!==E}function rt(h,A){const I=h.charCodeAt(A);let ue;return I>=55296&&I<=56319&&A+1<h.length&&(ue=h.charCodeAt(A+1),ue>=56320&&ue<=57343)?(I-55296)*1024+ue-56320+65536:I}function P(h){return/^\n* /.test(h)}const ve=1,je=2,ke=3,Pe=4,at=5;function yt(h,A,I,ue,fe,me,ne,ye){let we,Re=0,$e=null,Ue=!1,Fe=!1;const Tn=ue!==-1;let Un=-1,En=Le(rt(h,0))&&Be(rt(h,h.length-1));if(A||ne)for(we=0;we<h.length;Re>=65536?we+=2:we++){if(Re=rt(h,we),!Ee(Re))return at;En=En&&Ce(Re,$e,ye),$e=Re}else{for(we=0;we<h.length;Re>=65536?we+=2:we++){if(Re=rt(h,we),Re===x)Ue=!0,Tn&&(Fe=Fe||we-Un-1>ue&&h[Un+1]!==" ",Un=we);else if(!Ee(Re))return at;En=En&&Ce(Re,$e,ye),$e=Re}Fe=Fe||Tn&&we-Un-1>ue&&h[Un+1]!==" "}return!Ue&&!Fe?En&&!ne&&!fe(h)?ve:me===ge?at:je:I>9&&P(h)?at:ne?me===ge?at:je:Fe?Pe:ke}function He(h,A,I,ue,fe){h.dump=(function(){if(A.length===0)return h.quotingType===ge?'""':"''";if(!h.noCompatMode&&(Ne.indexOf(A)!==-1||O.test(A)))return h.quotingType===ge?'"'+A+'"':"'"+A+"'";const me=h.indent*Math.max(1,I),ne=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-me),ye=ue||h.flowLevel>-1&&I>=h.flowLevel;function we(Re){return de(h,Re)}switch(yt(A,ye,h.indent,ne,we,h.quotingType,h.forceQuotes&&!ue,fe)){case ve:return A;case je:return"'"+A.replace(/'/g,"''")+"'";case ke:return"|"+Ft(A,h.indent)+Vt(G(A,me));case Pe:return">"+Ft(A,h.indent)+Vt(G(wn(A,ne),me));case at:return'"'+Oe(A)+'"';default:throw new r("impossible error: invalid scalar style")}})()}function Ft(h,A){const I=P(h)?String(A):"",ue=h[h.length-1]===`
29
+ `,me=ue&&(h[h.length-2]===`
30
+ `||h===`
31
+ `)?"+":ue?"":"-";return I+me+`
32
+ `}function Vt(h){return h[h.length-1]===`
33
+ `?h.slice(0,-1):h}function wn(h,A){const I=/(\n+)([^\n]*)/g;let ue=(function(){let ye=h.indexOf(`
34
+ `);return ye=ye!==-1?ye:h.length,I.lastIndex=ye,Rn(h.slice(0,ye),A)})(),fe=h[0]===`
35
+ `||h[0]===" ",me,ne;for(;ne=I.exec(h);){const ye=ne[1],we=ne[2];me=we[0]===" ",ue+=ye+(!fe&&!me&&we!==""?`
36
+ `:"")+Rn(we,A),fe=me}return ue}function Rn(h,A){if(h===""||h[0]===" ")return h;const I=/ [^ ]/g;let ue,fe=0,me,ne=0,ye=0,we="";for(;ue=I.exec(h);)ye=ue.index,ye-fe>A&&(me=ne>fe?ne:ye,we+=`
37
+ `+h.slice(fe,me),fe=me+1),ne=ye;return we+=`
38
+ `,h.length-fe>A&&ne>fe?we+=h.slice(fe,ne)+`
39
+ `+h.slice(ne+1):we+=h.slice(fe),we.slice(1)}function Oe(h){let A="",I=0;for(let ue=0;ue<h.length;I>=65536?ue+=2:ue++){I=rt(h,ue);const fe=xe[I];!fe&&Ee(I)?(A+=h[ue],I>=65536&&(A+=h[ue+1])):A+=fe||oe(I)}return A}function it(h,A,I){let ue="";const fe=h.tag;for(let me=0,ne=I.length;me<ne;me+=1){let ye=I[me];h.replacer&&(ye=h.replacer.call(I,String(me),ye)),(H(h,A,ye,!1,!1)||typeof ye>"u"&&H(h,A,null,!1,!1))&&(ue!==""&&(ue+=","+(h.condenseFlow?"":" ")),ue+=h.dump)}h.tag=fe,h.dump="["+ue+"]"}function Rt(h,A,I,ue){let fe="";const me=h.tag;for(let ne=0,ye=I.length;ne<ye;ne+=1){let we=I[ne];h.replacer&&(we=h.replacer.call(I,String(ne),we)),(H(h,A+1,we,!0,!0,!1,!0)||typeof we>"u"&&H(h,A+1,null,!0,!0,!1,!0))&&((!ue||fe!=="")&&(fe+=pe(h,A)),h.dump&&x===h.dump.charCodeAt(0)?fe+="-":fe+="- ",fe+=h.dump)}h.tag=me,h.dump=fe||"[]"}function Kt(h,A,I){let ue="";const fe=h.tag,me=Object.keys(I);for(let ne=0,ye=me.length;ne<ye;ne+=1){let we="";ue!==""&&(we+=", "),h.condenseFlow&&(we+='"');const Re=me[ne];let $e=I[Re];h.replacer&&($e=h.replacer.call(I,Re,$e)),H(h,A,Re,!1,!1)&&(h.dump.length>1024&&(we+="? "),we+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),H(h,A,$e,!1,!1)&&(we+=h.dump,ue+=we))}h.tag=fe,h.dump="{"+ue+"}"}function Yt(h,A,I,ue){let fe="";const me=h.tag,ne=Object.keys(I);if(h.sortKeys===!0)ne.sort();else if(typeof h.sortKeys=="function")ne.sort(h.sortKeys);else if(h.sortKeys)throw new r("sortKeys must be a boolean or a function");for(let ye=0,we=ne.length;ye<we;ye+=1){let Re="";(!ue||fe!=="")&&(Re+=pe(h,A));const $e=ne[ye];let Ue=I[$e];if(h.replacer&&(Ue=h.replacer.call(I,$e,Ue)),!H(h,A+1,$e,!0,!0,!0))continue;const Fe=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;Fe&&(h.dump&&x===h.dump.charCodeAt(0)?Re+="?":Re+="? "),Re+=h.dump,Fe&&(Re+=pe(h,A)),H(h,A+1,Ue,!0,Fe)&&(h.dump&&x===h.dump.charCodeAt(0)?Re+=":":Re+=": ",Re+=h.dump,fe+=Re)}h.tag=me,h.dump=fe||"{}"}function d(h,A,I){const ue=I?h.explicitTypes:h.implicitTypes;for(let fe=0,me=ue.length;fe<me;fe+=1){const ne=ue[fe];if((ne.instanceOf||ne.predicate)&&(!ne.instanceOf||typeof A=="object"&&A instanceof ne.instanceOf)&&(!ne.predicate||ne.predicate(A))){if(I?ne.multi&&ne.representName?h.tag=ne.representName(A):h.tag=ne.tag:h.tag="?",ne.represent){const ye=h.styleMap[ne.tag]||ne.defaultStyle;let we;if(u.call(ne.represent)==="[object Function]")we=ne.represent(A,ye);else if(f.call(ne.represent,ye))we=ne.represent[ye](A,ye);else throw new r("!<"+ne.tag+'> tag resolver accepts not "'+ye+'" style');h.dump=we}return!0}}return!1}function H(h,A,I,ue,fe,me,ne){h.tag=null,h.dump=I,d(h,I,!1)||d(h,I,!0);const ye=u.call(h.dump),we=ue;ue&&(ue=h.flowLevel<0||h.flowLevel>A);const Re=ye==="[object Object]"||ye==="[object Array]";let $e,Ue;if(Re&&($e=h.duplicates.indexOf(I),Ue=$e!==-1),(h.tag!==null&&h.tag!=="?"||Ue||h.indent!==2&&A>0)&&(fe=!1),Ue&&h.usedDuplicates[$e])h.dump="*ref_"+$e;else{if(Re&&Ue&&!h.usedDuplicates[$e]&&(h.usedDuplicates[$e]=!0),ye==="[object Object]")ue&&Object.keys(h.dump).length!==0?(Yt(h,A,h.dump,fe),Ue&&(h.dump="&ref_"+$e+h.dump)):(Kt(h,A,h.dump),Ue&&(h.dump="&ref_"+$e+" "+h.dump));else if(ye==="[object Array]")ue&&h.dump.length!==0?(h.noArrayIndent&&!ne&&A>0?Rt(h,A-1,h.dump,fe):Rt(h,A,h.dump,fe),Ue&&(h.dump="&ref_"+$e+h.dump)):(it(h,A,h.dump),Ue&&(h.dump="&ref_"+$e+" "+h.dump));else if(ye==="[object String]")h.tag!=="?"&&He(h,h.dump,A,me,we);else{if(ye==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new r("unacceptable kind of an object to dump "+ye)}if(h.tag!==null&&h.tag!=="?"){let Fe=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?Fe="!"+Fe:Fe.slice(0,18)==="tag:yaml.org,2002:"?Fe="!!"+Fe.slice(18):Fe="!<"+Fe+">",h.dump=Fe+" "+h.dump}}return!0}function te(h,A){const I=[],ue=[];le(h,I,ue);const fe=ue.length;for(let me=0;me<fe;me+=1)A.duplicates.push(I[ue[me]]);A.usedDuplicates=new Array(fe)}function le(h,A,I){if(h!==null&&typeof h=="object"){const ue=A.indexOf(h);if(ue!==-1)I.indexOf(ue)===-1&&I.push(ue);else if(A.push(h),Array.isArray(h))for(let fe=0,me=h.length;fe<me;fe+=1)le(h[fe],A,I);else{const fe=Object.keys(h);for(let me=0,ne=fe.length;me<ne;me+=1)le(h[fe[me]],A,I)}}}function Z(h,A){A=A||{};const I=new C(A);I.noRefs||te(h,I);let ue=h;return I.replacer&&(ue=I.replacer.call({"":ue},"",ue)),H(I,0,ue,!0,!0)?I.dump+`
40
+ `:""}return Gs.dump=Z,Gs}var zd;function Ng(){if(zd)return Ht;zd=1;const a=jg(),r=Ag();function o(u,f){return function(){throw new Error("Function yaml."+u+" is removed in js-yaml 4. Use yaml."+f+" instead, which is now safe by default.")}}return Ht.Type=Bt(),Ht.Schema=td(),Ht.FAILSAFE_SCHEMA=cd(),Ht.JSON_SCHEMA=bd(),Ht.CORE_SCHEMA=Sd(),Ht.DEFAULT_SCHEMA=Ys(),Ht.load=a.load,Ht.loadAll=a.loadAll,Ht.dump=r.dump,Ht.YAMLException=Yl(),Ht.types={binary:Ed(),float:gd(),map:sd(),null:dd(),pairs:Od(),set:$d(),timestamp:Ad(),bool:pd(),int:hd(),merge:wd(),omap:kd(),seq:rd(),str:ad()},Ht.safeLoad=o("safeLoad","load"),Ht.safeLoadAll=o("safeLoadAll","loadAll"),Ht.safeDump=o("safeDump","dump"),Ht}var wg=Ng();const Tg=vg(wg),{Type:v2,Schema:S2,FAILSAFE_SCHEMA:j2,JSON_SCHEMA:A2,CORE_SCHEMA:N2,DEFAULT_SCHEMA:w2,load:Eg,loadAll:T2,dump:E2,YAMLException:C2,types:k2,safeLoad:_2,safeLoadAll:O2,safeDump:R2}=Tg;let On=class Yy{static async parseSpec(r){let o;if(typeof r=="string"){const u=r.trim();try{o=JSON.parse(u)}catch{try{o=Eg(u)}catch{throw new Error("Invalid OpenAPI specification format")}}}else o=r;if(!o.openapi||!o.info||!o.paths)throw new Error("Invalid OpenAPI specification: missing required fields");return o}static getHttpMethods(r){return["get","post","put","delete","patch","options","head","trace"].filter(u=>r[u])}static decodePointerToken(r){return decodeURIComponent(r).replace(/~1/g,"/").replace(/~0/g,"~")}static encodePointerToken(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}static resolveReference(r,o){if(!o.startsWith("#/"))throw new Error(`Only local references are supported synchronously; bundle external references first: ${o}`);const u=o.substring(2).split("/").map(Yy.decodePointerToken);let f=r;for(const p of u){if(f===null||typeof f!="object"||!(p in f))throw new Error(`Reference not found: ${o}`);f=f[p]}return f}static isReference(r){return!!r&&typeof r=="object"&&"$ref"in r&&typeof r.$ref=="string"}};class tn{static async parseSpec(r){return On.parseSpec(r)}static getHttpMethods(r){return On.getHttpMethods(r)}static getMethodColor(r,o){const p=o==="dark"?{get:"text-blue-300 bg-blue-900/30 border-blue-700",post:"text-green-300 bg-green-900/30 border-green-700",put:"text-orange-300 bg-orange-900/30 border-orange-700",delete:"text-red-300 bg-red-900/30 border-red-700",patch:"text-purple-300 bg-purple-900/30 border-purple-700",options:"text-cyan-100 bg-cyan-800/50 border-cyan-500",head:"text-gray-300 bg-gray-700/50 border-gray-600",trace:"text-gray-300 bg-gray-700/50 border-gray-600"}:{get:"text-blue-600 bg-blue-50 border-blue-200",post:"text-green-600 bg-green-50 border-green-200",put:"text-orange-600 bg-orange-50 border-orange-200",delete:"text-red-600 bg-red-50 border-red-200",patch:"text-purple-600 bg-purple-50 border-purple-200",options:"text-gray-600 bg-gray-50 border-gray-200",head:"text-gray-600 bg-gray-50 border-gray-200",trace:"text-gray-600 bg-gray-50 border-gray-200"},g=o==="dark"?"text-gray-300 bg-gray-700/50 border-gray-600":"text-gray-600 bg-gray-50 border-gray-200";return p[r.toLowerCase()]||g}static decodePointerToken(r){return On.decodePointerToken(r)}static encodePointerToken(r){return On.encodePointerToken(r)}static resolveReference(r,o){return On.resolveReference(r,o)}static isReference(r){return On.isReference(r)}}const Ud=({spec:a,onEndpointSelect:r,selectedEndpoint:o=null,theme:u="light"})=>{const[f,p]=W.useState(""),[g,x]=W.useState(new Set(["default"])),b=u==="dark"?"bg-gray-900 border-r border-gray-800 text-white":"bg-white border-r border-gray-200 text-gray-700",m=u==="dark"?"bg-gray-800 border-gray-700 text-white placeholder-gray-400 focus:ring-blue-500 focus:border-blue-500 focus:ring-1":"border-gray-300 text-gray-700 placeholder-gray-400 focus:ring-blue-500 focus:border-blue-500 focus:ring-1",v=u==="dark"?"text-gray-300":"text-gray-500",S=u==="dark"?"bg-gray-800/50 border-gray-700 text-white":"bg-gray-50 border-gray-100 text-gray-700",N=M=>{const B="text-xs font-bold px-2 py-0.5 rounded border",T={dark:{get:"bg-blue-900/30 border-blue-700 text-blue-200",post:"bg-green-900/30 border-green-700 text-green-200",put:"bg-yellow-900/30 border-yellow-700 text-yellow-200",patch:"bg-purple-900/30 border-purple-700 text-purple-200",delete:"bg-red-900/30 border-red-700 text-red-200",default:"bg-gray-800/50 border-gray-700 text-gray-200"},light:{get:"bg-blue-50 border-blue-200 text-blue-700",post:"bg-green-50 border-green-200 text-green-700",put:"bg-yellow-50 border-yellow-200 text-yellow-700",patch:"bg-purple-50 border-purple-200 text-purple-700",delete:"bg-red-50 border-red-200 text-red-700",default:"bg-gray-100 border-gray-200 text-gray-600"}},E=u==="dark"?T.dark:T.light;return`${B} ${E[M.toLowerCase()]||E.default}`},_=Object.entries(a.paths).reduce((M,[B,T])=>(tn.getHttpMethods(T).forEach(E=>{const w=T[E];(w?.tags||["default"]).forEach(Y=>{M[Y]||(M[Y]=[]),M[Y].push({path:B,method:E,operation:w})})}),M),{}),R=Object.entries(_).reduce((M,[B,T])=>{const E=f.toLowerCase(),w=T.filter(U=>`${U.method} ${U.path} ${U.operation?.summary||""} ${B}`.toLowerCase().includes(E));return w.length&&(M[B]=w),M},{}),z=M=>x(B=>{const T=new Set(B);return T.has(M)?T.delete(M):T.add(M),T});return s.jsxs("div",{className:`flex h-full w-full min-w-0 flex-col ${b}`,style:{backgroundColor:"var(--flexdoc-sidebar-bg)",color:"var(--flexdoc-sidebar-text)"},children:[s.jsxs("div",{className:`border-b p-4 ${u==="dark"?"border-gray-800":"border-gray-100"}`,children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br from-blue-500 to-blue-600",children:s.jsx(vs,{className:"h-4 w-4 text-white"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h1",{className:`truncate text-lg font-semibold ${u==="dark"?"text-white":"text-gray-900"}`,children:"FlexDoc"}),s.jsx("p",{className:`truncate text-sm ${u==="dark"?"text-gray-300":"text-gray-500"}`,children:"API Documentation"})]})]}),s.jsx("label",{className:"sr-only",htmlFor:"flexdoc-endpoint-search",children:"Search endpoints"}),s.jsxs("div",{className:"relative",children:[s.jsx(Fu,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),s.jsx("input",{id:"flexdoc-endpoint-search",type:"search",placeholder:"Search endpoints...",value:f,onChange:M=>p(M.target.value),className:`w-full rounded-lg border py-2 pl-10 pr-4 text-sm transition-colors ${m}`})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto overscroll-contain",children:s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:`mb-2 text-xs font-semibold uppercase tracking-wider ${v}`,children:"API Information"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:`rounded-lg border p-3 ${S}`,children:[s.jsx("h4",{className:`truncate font-medium ${u==="dark"?"text-white":"text-gray-900"}`,children:a.info.title}),s.jsxs("p",{className:`text-sm ${u==="dark"?"text-gray-300":"text-gray-600"}`,children:["Version ",a.info.version]})]}),a.servers&&a.servers.length>0&&s.jsxs("div",{className:`rounded-lg border p-3 ${S}`,children:[s.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[s.jsx(Vu,{className:"h-4 w-4 text-gray-400"}),s.jsx("span",{className:"text-sm font-medium",children:"Servers"})]}),s.jsx("div",{className:"space-y-2",children:a.servers.map((M,B)=>s.jsxs("div",{className:"min-w-0 text-sm",children:[s.jsx("code",{className:`block max-w-full overflow-x-auto rounded px-1.5 py-0.5 text-xs ${u==="dark"?"bg-gray-700/50 text-blue-200":"bg-gray-100 text-blue-600"}`,children:M.url}),M.description&&s.jsx("p",{className:`mt-1.5 ${u==="dark"?"text-gray-300":"text-gray-600"}`,children:M.description})]},`${M.url}:${B}`))})]})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:`mb-3 text-xs font-semibold uppercase tracking-wider ${v}`,children:"Endpoints"}),Object.keys(R).length===0&&s.jsx("p",{className:`px-2 py-4 text-sm ${v}`,children:"No endpoints match your search."}),Object.entries(R).map(([M,B])=>s.jsxs("div",{className:"mb-4",children:[s.jsxs("button",{onClick:()=>z(M),className:`flex min-h-11 w-full items-center gap-2 rounded-lg p-2 text-left transition-colors ${u==="dark"?"hover:bg-gray-800/50 text-white":"hover:bg-gray-50 text-gray-700"}`,children:[g.has(M)?s.jsx(Iu,{className:"h-4 w-4 shrink-0 text-gray-400"}):s.jsx(Yu,{className:"h-4 w-4 shrink-0 text-gray-400"}),s.jsx(Ku,{className:"h-4 w-4 shrink-0 text-gray-400"}),s.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:M==="default"?"General":M}),s.jsx("span",{className:`ml-auto shrink-0 rounded-full px-2 py-0.5 text-xs ${u==="dark"?"bg-gray-800 text-white":"bg-gray-100 text-gray-500"}`,children:B.length})]}),g.has(M)&&s.jsx("div",{className:"ml-4 mt-1.5 space-y-1.5 sm:ml-6",children:B.map(({path:T,method:E,operation:w})=>{const U=o?.path===T&&o?.method===E;return s.jsxs("button",{onClick:()=>r(T,E),className:`mb-2 min-h-11 w-full rounded-lg border p-2 text-left transition-all ${U?u==="dark"?"bg-blue-900/20 border-blue-800/50 shadow-sm":"bg-blue-50 border-blue-100 shadow-sm":u==="dark"?"hover:bg-gray-800/50 border-transparent hover:border-gray-700":"hover:bg-gray-50 border-transparent hover:border-gray-100"}`,style:U?{color:"var(--flexdoc-sidebar-active-text)"}:void 0,children:[s.jsx("div",{className:"mb-1 flex items-center gap-2",children:s.jsx("span",{className:N(E),children:E.toUpperCase()})}),s.jsx("div",{className:`break-all font-mono text-sm ${U?u==="dark"?"text-blue-300":"text-blue-600":u==="dark"?"text-gray-300":"text-gray-800"}`,children:T}),w?.summary&&s.jsx("div",{className:`mt-1 text-xs ${u==="dark"?"text-gray-400":"text-gray-600"}`,children:w.summary})]},`${E}-${T}`)})})]},M))]})]})})]})},$a=["parameters","requestBody","responses","tryIt","codeSamples"],Fs={all:$a,none:[],minimal:[],documentation:["parameters","requestBody","responses"],interactive:["parameters","requestBody","tryIt","codeSamples"]},Cg=new Set(["minimal","documentation","interactive"]),Hd=new Set($a),kg=new Set(Object.keys(Fs));function _g(a){return typeof a=="string"?kg.has(a):Array.isArray(a)&&a.every(r=>typeof r=="string"&&(Hd.has(r)||Cg.has(r)))}function Og(a,r){for(const o of Fs[r])a.add(o)}function Vs(a,r){if(a===void 0&&r!==void 0){const u=new Set(["parameters","requestBody","tryIt","codeSamples"]);return r!=="none"&&u.add("responses"),$a.filter(f=>u.has(f))}if(a===void 0)return[];if(typeof a=="string")return[...Fs[a]];const o=new Set;for(const u of a)Hd.has(u)?o.add(u):Og(o,u);return $a.filter(u=>o.has(u))}function Rg(a,r){return`flexdoc:viewer:${encodeURIComponent(r?.trim()||"unknown-host")}:${encodeURIComponent(a?.trim()||"untitled")}`}function Ld(a,r){const o=typeof window<"u"?window.localStorage:void 0;if(!o)return{version:1};try{const u=o.getItem(a);if(!u)return{version:1};const f=JSON.parse(u);return f.version!==1||f.expand!==void 0&&!_g(f.expand)?{version:1}:{version:1,...f.expand!==void 0?{expand:f.expand}:{}}}catch{return{version:1}}}function $g(a,r,o){const u=typeof window<"u"?window.localStorage:void 0;if(u)try{r===void 0?u.removeItem(a):u.setItem(a,JSON.stringify({version:1,expand:r}))}catch{}}function la(a,r){if(r)return On.isReference(r)?On.resolveReference(a,r.$ref):r}function Mg(a,r){const o=a.paths[r];if(!o)throw new Error(`Path not found: ${r}`);return la(a,o)}function qg(a,r={}){return a.url.replace(/\{([^}]+)\}/g,(o,u)=>{const f=a.variables?.[u],p=r[u]??f?.default;if(p===void 0)throw new Error(`Missing server variable: ${u}`);if(f?.enum?.length&&!f.enum.includes(p))throw new Error(`Invalid value for server variable ${u}: ${p}`);return p})}function Ks(a,r,o){const u=Mg(a,r),f=u[o.toLowerCase()];if(!f||typeof f!="object"||!("responses"in f))throw new Error(`Operation not found: ${o.toUpperCase()} ${r}`);const p=[...u.parameters||[],...f.parameters||[]].map(b=>la(a,b)).filter(b=>!!b),g=new Map;for(const b of p)g.set(`${b.in}:${b.name}`,b);const x={};for(const[b,m]of Object.entries(f.responses||{})){const v=la(a,m);v&&(x[b]=v)}return{path:r,method:o.toUpperCase(),pathItem:u,operation:f,parameters:[...g.values()],requestBody:la(a,f.requestBody),responses:x,servers:f.servers||u.servers||a.servers||[],security:f.security!==void 0?f.security:a.security||[]}}function Dg(a,r,o){return Ks(a,r,o).parameters}function zg(a,r){return la(a,r.schema)}function Ug(a,r){if(r.example!==void 0)return r.example;const o=zg(a,r);return o?.example!==void 0?o.example:o?.examples?.length?o.examples[0]:o?.default!==void 0?o.default:o?.enum?.length?o.enum[0]:o?.type==="array"?[]:o?.type==="object"?{}:o?.type==="integer"||o?.type==="number"?1:o?.type==="boolean"?!0:""}function Hg(a,r,o){const u=Ks(a,r,o),f={parameters:{},headers:{},cookies:{},auth:{}};for(const x of u.parameters){const b=x.in==="header"?f.headers:x.in==="cookie"?f.cookies:f.parameters;b[x.name]=Ug(a,x)}const p=u.requestBody,g=p?Object.keys(p.content||{})[0]:void 0;if(g){f.contentType=g;const x=p.content[g],b=la(a,x.schema),m=x.examples?Object.values(x.examples)[0]:void 0,v=la(a,m),S=x.example??v?.value??b?.example??b?.examples?.[0]??b?.default;f.body=S!==void 0?JSON.stringify(S,null,2):""}return f}function kt(a){return a===null?"null":typeof a=="object"?JSON.stringify(a):String(a)}function Xs(a){if(typeof a!="string")return a;const r=a.trim();if(!r||!r.startsWith("[")&&!r.startsWith("{"))return a;try{return JSON.parse(r)}catch{return a}}function Bd(a,r=!1){const o=kt(a);return r?encodeURI(o).replace(/%5B/g,"[").replace(/%5D/g,"]"):encodeURIComponent(o)}function Id(a,r=!1){const o=Xs(a);if(Array.isArray(o))return o.map(kt).join(",");if(o&&typeof o=="object"){const u=Object.entries(o);return r?u.map(([f,p])=>`${f}=${kt(p)}`).join(","):u.flatMap(([f,p])=>[f,kt(p)]).join(",")}return kt(o)}function Lg(a,r){const o=a.style||"simple",u=a.explode??!1,f=Xs(r),p=x=>Bd(x,a.allowReserved);if(Array.isArray(f)){const x=f.map(p);return o==="label"?`.${x.join(u?".":",")}`:o==="matrix"?u?x.map(b=>`;${a.name}=${b}`).join(""):`;${a.name}=${x.join(",")}`:x.join(",")}if(f&&typeof f=="object"){const x=Object.entries(f).map(([b,m])=>[p(b),p(m)]);return o==="label"?u?`.${x.map(([b,m])=>`${b}=${m}`).join(".")}`:`.${x.flatMap(([b,m])=>[b,m]).join(",")}`:o==="matrix"?u?x.map(([b,m])=>`;${b}=${m}`).join(""):`;${a.name}=${x.flatMap(([b,m])=>[b,m]).join(",")}`:u?x.map(([b,m])=>`${b}=${m}`).join(","):x.flatMap(([b,m])=>[b,m]).join(",")}const g=p(f);return o==="label"?`.${g}`:o==="matrix"?`;${a.name}=${g}`:g}function Bg(a,r){const o=a.style||"form",u=a.explode??o==="form",f=Xs(r);if(o==="deepObject"&&f&&typeof f=="object"&&!Array.isArray(f))return Object.entries(f).map(([p,g])=>[`${a.name}[${p}]`,kt(g)]);if(Array.isArray(f))return o==="spaceDelimited"?[[a.name,f.map(kt).join(" ")]]:o==="pipeDelimited"?[[a.name,f.map(kt).join("|")]]:u?f.map(p=>[a.name,kt(p)]):[[a.name,f.map(kt).join(",")]];if(f&&typeof f=="object"){const p=Object.entries(f);return u?p.map(([g,x])=>[g,kt(x)]):[[a.name,p.flatMap(([g,x])=>[g,kt(x)]).join(",")]]}return[[a.name,kt(f)]]}function Ig(a){return typeof globalThis.btoa=="function"?globalThis.btoa(unescape(encodeURIComponent(a))):a}function Yg(a,r){return Object.keys(a).every(o=>!!r[o])}function Gg(a,r,o,u,f,p){if(!r.length||!a.components?.securitySchemes)return;const g=r.find(x=>Object.keys(x).length===0||Yg(x,p))||r[0];for(const x of Object.keys(g)){const b=la(a,a.components.securitySchemes[x]),m=p[x];!b||!m||(b.type==="http"&&b.scheme?.toLowerCase()==="bearer"?o.Authorization=`Bearer ${m}`:b.type==="http"&&b.scheme?.toLowerCase()==="basic"?o.Authorization=`Basic ${Ig(m)}`:b.type==="apiKey"&&b.in==="header"&&b.name?o[b.name]=m:b.type==="apiKey"&&b.in==="query"&&b.name?u.push(`${encodeURIComponent(b.name)}=${encodeURIComponent(m)}`):b.type==="apiKey"&&b.in==="cookie"&&b.name?f.push(`${b.name}=${encodeURIComponent(m)}`):(b.type==="oauth2"||b.type==="openIdConnect")&&(o.Authorization=`Bearer ${m}`))}}function Yd(a){try{const r=JSON.parse(a);return r&&typeof r=="object"&&!Array.isArray(r)?r:void 0}catch{return}}function Fg(a,r,o,u={}){const f=Ks(a,r,o),p=f.servers[0],g=u.serverUrl||(p?qg(p,u.serverVariables):"");let x=r;const b=[],m={...u.headers||{}},v=[];for(const M of f.parameters){const B=M.in==="header"?u.headers?.[M.name]:M.in==="cookie"?u.cookies?.[M.name]:u.parameters?.[M.name];if(!(B===void 0||B===""))if(M.in==="path")x=x.replace(`{${M.name}}`,Lg(M,B));else if(M.in==="query")for(const[T,E]of Bg(M,B))b.push(`${encodeURIComponent(T)}=${Bd(E,M.allowReserved)}`);else M.in==="header"?m[M.name]=Id(B,M.explode):M.in==="cookie"&&v.push(`${M.name}=${encodeURIComponent(Id(B,M.explode))}`)}Gg(a,f.security,m,b,v,u.auth||{}),v.length&&(m.Cookie=v.join("; "));let S,N,_;if(u.body&&!["GET","HEAD"].includes(f.method)){const M=u.contentType||"application/json";if(S=u.body,M==="application/x-www-form-urlencoded"){const B=Yd(u.body);S=B?Object.entries(B).flatMap(([T,E])=>Array.isArray(E)?E.map(w=>`${encodeURIComponent(T)}=${encodeURIComponent(kt(w))}`):[`${encodeURIComponent(T)}=${encodeURIComponent(kt(E))}`]).join("&"):u.body,_=S,N="form",m["Content-Type"]=M}else if(M.startsWith("multipart/form-data")){const B=Yd(u.body);if(B&&typeof FormData<"u"){const T=new FormData;for(const[E,w]of Object.entries(B))Array.isArray(w)?w.forEach(U=>T.append(E,kt(U))):T.append(E,kt(w));_=T}else _=u.body;N="multipart"}else _=u.body,N=M.includes("json")?"json":"text",m["Content-Type"]=M}const R=b.join("&");return{url:`${g.replace(/\/$/,"")}${x}${R?`?${R}`:""}`,method:f.method,headers:m,body:S,bodyKind:N,init:{method:f.method,headers:m,body:_}}}function Gd(a,r,o){return Dg(a,r,o)}function Zs(a,r,o){return Hg(a,r,o)}function Gl(a,r,o,u={}){return Fg(a,r,o,u)}const _t=a=>JSON.stringify(a);function Vg(a,r){const o=Object.entries(a.headers);if(r==="curl"){const p=[`curl -X ${a.method} ${_t(a.url)}`];for(const[g,x]of o)p.push(` -H ${_t(`${g}: ${x}`)}`);return a.body&&p.push(` --data-raw ${_t(a.body)}`),p.join(` \\
41
+ `)}if(r==="javascript"){const p={method:a.method};return o.length&&(p.headers=a.headers),a.body&&(p.body=a.body),`const response = await fetch(${_t(a.url)}, ${JSON.stringify(p,null,2)});
42
+ const data = await response.json();`}if(r==="python"){const p=["import requests","",`url = ${_t(a.url)}`];return o.length&&p.push(`headers = ${JSON.stringify(a.headers,null,2)}`),a.body&&p.push(`body = ${_t(a.body)}`),p.push(`response = requests.request(${_t(a.method)}, url${o.length?", headers=headers":""}${a.body?", data=body":""})`,"print(response.text)"),p.join(`
43
+ `)}if(r==="go"){const p=a.body?`strings.NewReader(${_t(a.body)})`:"nil",g=["package main","","import (",' "fmt"',' "io"',' "net/http"'];a.body&&g.push(' "strings"'),g.push(")","","func main() {",` req, _ := http.NewRequest(${_t(a.method)}, ${_t(a.url)}, ${p})`);for(const[x,b]of o)g.push(` req.Header.Set(${_t(x)}, ${_t(b)})`);return g.push(" res, err := http.DefaultClient.Do(req)"," if err != nil { panic(err) }"," defer res.Body.Close()"," data, _ := io.ReadAll(res.Body)"," fmt.Println(string(data))","}"),g.join(`
44
+ `)}const u=["import java.net.URI;","import java.net.http.*;","","var client = HttpClient.newHttpClient();","var builder = HttpRequest.newBuilder()",` .uri(URI.create(${_t(a.url)}))`];for(const[p,g]of o)u.push(` .header(${_t(p)}, ${_t(g)})`);const f=a.body?`HttpRequest.BodyPublishers.ofString(${_t(a.body)})`:"HttpRequest.BodyPublishers.noBody()";return u.push(` .method(${_t(a.method)}, ${f});`,"var response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());","System.out.println(response.body());"),u.join(`
45
+ `)}function Kg(a){return{curl:"cURL",javascript:"JavaScript",python:"Python",go:"Go",java:"Java"}[a]}function Xg(a,r){return Vg(a,r)}function Fd(a){return Kg(a)}var Qs={exports:{}},Vd;function Zg(){return Vd||(Vd=1,(function(a){var r=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var o=(function(u){var f=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,p=0,g={},x={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function T(E){return E instanceof b?new b(E.type,T(E.content),E.alias):Array.isArray(E)?E.map(T):E.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(T){return Object.prototype.toString.call(T).slice(8,-1)},objId:function(T){return T.__id||Object.defineProperty(T,"__id",{value:++p}),T.__id},clone:function T(E,w){w=w||{};var U,Y;switch(x.util.type(E)){case"Object":if(Y=x.util.objId(E),w[Y])return w[Y];U={},w[Y]=U;for(var $ in E)E.hasOwnProperty($)&&(U[$]=T(E[$],w));return U;case"Array":return Y=x.util.objId(E),w[Y]?w[Y]:(U=[],w[Y]=U,E.forEach(function(q,J){U[J]=T(q,w)}),U);default:return E}},getLanguage:function(T){for(;T;){var E=f.exec(T.className);if(E)return E[1].toLowerCase();T=T.parentElement}return"none"},setLanguage:function(T,E){T.className=T.className.replace(RegExp(f,"gi"),""),T.classList.add("language-"+E)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(U){var T=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(U.stack)||[])[1];if(T){var E=document.getElementsByTagName("script");for(var w in E)if(E[w].src==T)return E[w]}return null}},isActive:function(T,E,w){for(var U="no-"+E;T;){var Y=T.classList;if(Y.contains(E))return!0;if(Y.contains(U))return!1;T=T.parentElement}return!!w}},languages:{plain:g,plaintext:g,text:g,txt:g,extend:function(T,E){var w=x.util.clone(x.languages[T]);for(var U in E)w[U]=E[U];return w},insertBefore:function(T,E,w,U){U=U||x.languages;var Y=U[T],$={};for(var q in Y)if(Y.hasOwnProperty(q)){if(q==E)for(var J in w)w.hasOwnProperty(J)&&($[J]=w[J]);w.hasOwnProperty(q)||($[q]=Y[q])}var Se=U[T];return U[T]=$,x.languages.DFS(x.languages,function(Ae,se){se===Se&&Ae!=T&&(this[Ae]=$)}),$},DFS:function T(E,w,U,Y){Y=Y||{};var $=x.util.objId;for(var q in E)if(E.hasOwnProperty(q)){w.call(E,q,E[q],U||q);var J=E[q],Se=x.util.type(J);Se==="Object"&&!Y[$(J)]?(Y[$(J)]=!0,T(J,w,null,Y)):Se==="Array"&&!Y[$(J)]&&(Y[$(J)]=!0,T(J,w,q,Y))}}},plugins:{},highlightAll:function(T,E){x.highlightAllUnder(document,T,E)},highlightAllUnder:function(T,E,w){var U={callback:w,container:T,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};x.hooks.run("before-highlightall",U),U.elements=Array.prototype.slice.apply(U.container.querySelectorAll(U.selector)),x.hooks.run("before-all-elements-highlight",U);for(var Y=0,$;$=U.elements[Y++];)x.highlightElement($,E===!0,U.callback)},highlightElement:function(T,E,w){var U=x.util.getLanguage(T),Y=x.languages[U];x.util.setLanguage(T,U);var $=T.parentElement;$&&$.nodeName.toLowerCase()==="pre"&&x.util.setLanguage($,U);var q=T.textContent,J={element:T,language:U,grammar:Y,code:q};function Se(se){J.highlightedCode=se,x.hooks.run("before-insert",J),J.element.innerHTML=J.highlightedCode,x.hooks.run("after-highlight",J),x.hooks.run("complete",J),w&&w.call(J.element)}if(x.hooks.run("before-sanity-check",J),$=J.element.parentElement,$&&$.nodeName.toLowerCase()==="pre"&&!$.hasAttribute("tabindex")&&$.setAttribute("tabindex","0"),!J.code){x.hooks.run("complete",J),w&&w.call(J.element);return}if(x.hooks.run("before-highlight",J),!J.grammar){Se(x.util.encode(J.code));return}if(E&&u.Worker){var Ae=new Worker(x.filename);Ae.onmessage=function(se){Se(se.data)},Ae.postMessage(JSON.stringify({language:J.language,code:J.code,immediateClose:!0}))}else Se(x.highlight(J.code,J.grammar,J.language))},highlight:function(T,E,w){var U={code:T,grammar:E,language:w};if(x.hooks.run("before-tokenize",U),!U.grammar)throw new Error('The language "'+U.language+'" has no grammar.');return U.tokens=x.tokenize(U.code,U.grammar),x.hooks.run("after-tokenize",U),b.stringify(x.util.encode(U.tokens),U.language)},tokenize:function(T,E){var w=E.rest;if(w){for(var U in w)E[U]=w[U];delete E.rest}var Y=new S;return N(Y,Y.head,T),v(T,Y,E,Y.head,0),R(Y)},hooks:{all:{},add:function(T,E){var w=x.hooks.all;w[T]=w[T]||[],w[T].push(E)},run:function(T,E){var w=x.hooks.all[T];if(!(!w||!w.length))for(var U=0,Y;Y=w[U++];)Y(E)}},Token:b};u.Prism=x;function b(T,E,w,U){this.type=T,this.content=E,this.alias=w,this.length=(U||"").length|0}b.stringify=function T(E,w){if(typeof E=="string")return E;if(Array.isArray(E)){var U="";return E.forEach(function(Se){U+=T(Se,w)}),U}var Y={type:E.type,content:T(E.content,w),tag:"span",classes:["token",E.type],attributes:{},language:w},$=E.alias;$&&(Array.isArray($)?Array.prototype.push.apply(Y.classes,$):Y.classes.push($)),x.hooks.run("wrap",Y);var q="";for(var J in Y.attributes)q+=" "+J+'="'+(Y.attributes[J]||"").replace(/"/g,"&quot;")+'"';return"<"+Y.tag+' class="'+Y.classes.join(" ")+'"'+q+">"+Y.content+"</"+Y.tag+">"};function m(T,E,w,U){T.lastIndex=E;var Y=T.exec(w);if(Y&&U&&Y[1]){var $=Y[1].length;Y.index+=$,Y[0]=Y[0].slice($)}return Y}function v(T,E,w,U,Y,$){for(var q in w)if(!(!w.hasOwnProperty(q)||!w[q])){var J=w[q];J=Array.isArray(J)?J:[J];for(var Se=0;Se<J.length;++Se){if($&&$.cause==q+","+Se)return;var Ae=J[Se],se=Ae.inside,he=!!Ae.lookbehind,xe=!!Ae.greedy,Ne=Ae.alias;if(xe&&!Ae.pattern.global){var O=Ae.pattern.toString().match(/[imsuy]*$/)[0];Ae.pattern=RegExp(Ae.pattern.source,O+"g")}for(var ee=Ae.pattern||Ae,oe=U.next,K=Y;oe!==E.tail&&!($&&K>=$.reach);K+=oe.value.length,oe=oe.next){var ge=oe.value;if(E.length>T.length)return;if(!(ge instanceof b)){var C=1,G;if(xe){if(G=m(ee,K,T,he),!G||G.index>=T.length)break;var Ee=G.index,pe=G.index+G[0].length,de=K;for(de+=oe.value.length;Ee>=de;)oe=oe.next,de+=oe.value.length;if(de-=oe.value.length,K=de,oe.value instanceof b)continue;for(var be=oe;be!==E.tail&&(de<pe||typeof be.value=="string");be=be.next)C++,de+=be.value.length;C--,ge=T.slice(K,de),G.index-=K}else if(G=m(ee,0,ge,he),!G)continue;var Ee=G.index,ce=G[0],Ce=ge.slice(0,Ee),Le=ge.slice(Ee+ce.length),Be=K+ge.length;$&&Be>$.reach&&($.reach=Be);var rt=oe.prev;Ce&&(rt=N(E,rt,Ce),K+=Ce.length),_(E,rt,C);var P=new b(q,se?x.tokenize(ce,se):ce,Ne,ce);if(oe=N(E,rt,P),Le&&N(E,oe,Le),C>1){var ve={cause:q+","+Se,reach:Be};v(T,E,w,oe.prev,K,ve),$&&ve.reach>$.reach&&($.reach=ve.reach)}}}}}}function S(){var T={value:null,prev:null,next:null},E={value:null,prev:T,next:null};T.next=E,this.head=T,this.tail=E,this.length=0}function N(T,E,w){var U=E.next,Y={value:w,prev:E,next:U};return E.next=Y,U.prev=Y,T.length++,Y}function _(T,E,w){for(var U=E.next,Y=0;Y<w&&U!==T.tail;Y++)U=U.next;E.next=U,U.prev=E,T.length-=Y}function R(T){for(var E=[],w=T.head.next;w!==T.tail;)E.push(w.value),w=w.next;return E}if(!u.document)return u.addEventListener&&(x.disableWorkerMessageHandler||u.addEventListener("message",function(T){var E=JSON.parse(T.data),w=E.language,U=E.code,Y=E.immediateClose;u.postMessage(x.highlight(U,x.languages[w],w)),Y&&u.close()},!1)),x;var z=x.util.currentScript();z&&(x.filename=z.src,z.hasAttribute("data-manual")&&(x.manual=!0));function M(){x.manual||x.highlightAll()}if(!x.manual){var B=document.readyState;B==="loading"||B==="interactive"&&z&&z.defer?document.addEventListener("DOMContentLoaded",M):window.requestAnimationFrame?window.requestAnimationFrame(M):window.setTimeout(M,16)}return x})(r);a.exports&&(a.exports=o),typeof Eu<"u"&&(Eu.Prism=o),o.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},o.languages.markup.tag.inside["attr-value"].inside.entity=o.languages.markup.entity,o.languages.markup.doctype.inside["internal-subset"].inside=o.languages.markup,o.hooks.add("wrap",function(u){u.type==="entity"&&(u.attributes.title=u.content.replace(/&amp;/,"&"))}),Object.defineProperty(o.languages.markup.tag,"addInlined",{value:function(f,p){var g={};g["language-"+p]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:o.languages[p]},g.cdata=/^<!\[CDATA\[|\]\]>$/i;var x={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:g}};x["language-"+p]={pattern:/[\s\S]+/,inside:o.languages[p]};var b={};b[f]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return f}),"i"),lookbehind:!0,greedy:!0,inside:x},o.languages.insertBefore("markup","cdata",b)}}),Object.defineProperty(o.languages.markup.tag,"addAttribute",{value:function(u,f){o.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+u+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[f,"language-"+f],inside:o.languages[f]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),o.languages.html=o.languages.markup,o.languages.mathml=o.languages.markup,o.languages.svg=o.languages.markup,o.languages.xml=o.languages.extend("markup",{}),o.languages.ssml=o.languages.xml,o.languages.atom=o.languages.xml,o.languages.rss=o.languages.xml,(function(u){var f=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;u.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+f.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+f.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+f.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+f.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:f,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},u.languages.css.atrule.inside.rest=u.languages.css;var p=u.languages.markup;p&&(p.tag.addInlined("style","css"),p.tag.addAttribute("style","css"))})(o),o.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},o.languages.javascript=o.languages.extend("clike",{"class-name":[o.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),o.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,o.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:o.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:o.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:o.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:o.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:o.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),o.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:o.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),o.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),o.languages.markup&&(o.languages.markup.tag.addInlined("script","javascript"),o.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),o.languages.js=o.languages.javascript,(function(){if(typeof o>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var u="Loading…",f=function(z,M){return"✖ Error "+z+" while fetching file: "+M},p="✖ Error: File does not exist or is empty",g={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},x="data-src-status",b="loading",m="loaded",v="failed",S="pre[data-src]:not(["+x+'="'+m+'"]):not(['+x+'="'+b+'"])';function N(z,M,B){var T=new XMLHttpRequest;T.open("GET",z,!0),T.onreadystatechange=function(){T.readyState==4&&(T.status<400&&T.responseText?M(T.responseText):T.status>=400?B(f(T.status,T.statusText)):B(p))},T.send(null)}function _(z){var M=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(z||"");if(M){var B=Number(M[1]),T=M[2],E=M[3];return T?E?[B,Number(E)]:[B,void 0]:[B,B]}}o.hooks.add("before-highlightall",function(z){z.selector+=", "+S}),o.hooks.add("before-sanity-check",function(z){var M=z.element;if(M.matches(S)){z.code="",M.setAttribute(x,b);var B=M.appendChild(document.createElement("CODE"));B.textContent=u;var T=M.getAttribute("data-src"),E=z.language;if(E==="none"){var w=(/\.(\w+)$/.exec(T)||[,"none"])[1];E=g[w]||w}o.util.setLanguage(B,E),o.util.setLanguage(M,E);var U=o.plugins.autoloader;U&&U.loadLanguages(E),N(T,function(Y){M.setAttribute(x,m);var $=_(M.getAttribute("data-range"));if($){var q=Y.split(/\r\n?|\n/g),J=$[0],Se=$[1]==null?q.length:$[1];J<0&&(J+=q.length),J=Math.max(0,Math.min(J-1,q.length)),Se<0&&(Se+=q.length),Se=Math.max(0,Math.min(Se,q.length)),Y=q.slice(J,Se).join(`
46
+ `),M.hasAttribute("data-start")||M.setAttribute("data-start",String(J+1))}B.textContent=Y,o.highlightElement(B)},function(Y){M.setAttribute(x,v),B.textContent=Y})}}),o.plugins.fileHighlight={highlight:function(M){for(var B=(M||document).querySelectorAll(S),T=0,E;E=B[T++];)o.highlightElement(E)}};var R=!1;o.fileHighlight=function(){R||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),R=!0),o.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(Qs)),Qs.exports}var Qg=Zg();const Lr=Cu(Qg);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json,(function(a){var r=/[*&][^\s[\]{},]+/,o=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,u="(?:"+o.source+"(?:[ ]+"+r.source+")?|"+r.source+"(?:[ ]+"+o.source+")?)",f=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),p=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function g(x,b){b=(b||"").replace(/m/g,"")+"m";var m=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return u}).replace(/<<value>>/g,function(){return x});return RegExp(m,b)}a.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return u})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return u}).replace(/<<key>>/g,function(){return"(?:"+f+"|"+p+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:g(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:g(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:g(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:g(p),lookbehind:!0,greedy:!0},number:{pattern:g(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:o,important:r,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},a.languages.yml=a.languages.yaml})(Prism),Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,(function(a){var r="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",o={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},u={bash:o,environment:{pattern:RegExp("\\$"+r),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+r),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};a.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+r),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:u},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:o}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:u},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:u.entity}}],environment:{pattern:RegExp("\\$?"+r),alias:"constant"},variable:u.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},o.inside=a.languages.bash;for(var f=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],p=u.variable[1].inside,g=0;g<f.length;g++)p[f[g]]=a.languages.bash[f[g]];a.languages.sh=a.languages.bash,a.languages.shell=a.languages.bash})(Prism);var Kd={},Xd;function Jg(){return Xd||(Xd=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),Kd}Jg(),Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];var Zd={},Qd;function Pg(){return Qd||(Qd=1,(function(a){var r=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,o=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,u={pattern:RegExp(/(^|[^\w.])/.source+o+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};a.languages.java=a.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[u,{pattern:RegExp(/(^|[^\w.])/.source+o+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:u.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+o+/[A-Z]\w*\b/.source),lookbehind:!0,inside:u.inside}],keyword:r,function:[a.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),a.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),a.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":u,keyword:r,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+o+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:u.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+o+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:u.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return r.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),Zd}Pg();const zn=({code:a,language:r,title:o,showCopy:u=!0,theme:f="dark",wrap:p=!1})=>{const[g,x]=gs.useState(!1);W.useEffect(()=>{Lr.highlightAll()},[a,f]);const b=async()=>{try{await navigator.clipboard.writeText(a),x(!0),setTimeout(()=>x(!1),2e3)}catch(N){console.error("Failed to copy text: ",N)}},m=f==="dark"?"bg-gray-900 border-gray-700":"bg-gray-50 border-gray-200",v=f==="dark"?"bg-gray-800 border-gray-700 text-gray-300":"bg-gray-100 border-gray-200 text-gray-700",S=f==="dark"?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-900";return s.jsxs("div",{className:`min-w-0 rounded-lg overflow-hidden border ${m}`,children:[(o||u)&&s.jsxs("div",{className:`flex items-center justify-between gap-3 px-3 sm:px-4 py-2 border-b ${v}`,children:[o&&s.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:o}),u&&s.jsx("button",{onClick:b,className:`shrink-0 flex items-center gap-1 text-xs transition-colors ${S}`,"aria-label":"Copy code to clipboard",children:g?s.jsxs(s.Fragment,{children:[s.jsx(rg,{className:"w-3 h-3"}),s.jsx("span",{children:"Copied"})]}):s.jsxs(s.Fragment,{children:[s.jsx(sg,{className:"w-3 h-3"}),s.jsx("span",{children:"Copy"})]})})]}),s.jsx("div",{className:`p-3 sm:p-4 overflow-x-auto ${f==="dark"?"bg-gray-800":"bg-white"}`,children:s.jsx("pre",{className:`m-0 text-xs sm:text-sm ${p?"whitespace-pre-wrap break-words":""} ${f==="dark"?"text-gray-100":"text-gray-800"}`,children:s.jsx("code",{className:`language-${r} bg-transparent`,children:a})})})]})};function Wg(a){const r=Array.isArray(a.type)?a.type.join(" | "):a.type;return r?a.format?`${r} (${a.format})`:r:a.oneOf?"oneOf":a.anyOf?"anyOf":a.allOf?"allOf":a.const!==void 0?"const":"any"}const ra=({spec:a,schema:r,theme:o,required:u=!1,level:f=0,seen:p=new Set,requiredPropsFirst:g=!1,sortPropsAlphabetically:x=!1})=>{const b={spec:a,theme:o,requiredPropsFirst:g,sortPropsAlphabetically:x};if(tn.isReference(r)){if(p.has(r.$ref))return s.jsxs("div",{className:"py-1 text-sm opacity-70",children:["↳ ",s.jsx("code",{children:r.$ref.replace("#/components/schemas/","")})," (recursive reference)"]});const R=new Set(p);R.add(r.$ref);let z;try{z=tn.resolveReference(a,r.$ref)}catch{return s.jsxs("div",{className:"py-1 text-sm text-red-500",children:["Unresolved reference: ",s.jsx("code",{children:r.$ref})]})}return s.jsx(ra,{...b,schema:z,required:u,level:f,seen:R})}const m=o==="dark"?"text-gray-400":"text-gray-600",v=o==="dark"?"border-gray-700":"border-gray-200",S=[["All of",r.allOf],["One of",r.oneOf],["Any of",r.anyOf]],N=new Set(r.required||[]),_=Object.entries(r.properties||{}).sort(([R],[z])=>{if(g){const M=Number(N.has(z))-Number(N.has(R));if(M)return M}return x?R.localeCompare(z):0});return s.jsxs("div",{className:f?`border-l-2 ${v} pl-3`:"",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 py-1",children:[s.jsx("span",{className:o==="dark"?"text-blue-300":"text-blue-600",children:Wg(r)}),u&&s.jsx("span",{className:"rounded bg-red-100 px-2 py-0.5 text-xs text-red-700 dark:bg-red-900/30 dark:text-red-300",children:"required"}),(r.nullable||Array.isArray(r.type)&&r.type.includes("null"))&&s.jsx("span",{className:"rounded bg-gray-100 px-2 py-0.5 text-xs text-gray-700 dark:bg-gray-700 dark:text-gray-300",children:"nullable"}),r.deprecated&&s.jsx("span",{className:"rounded bg-orange-100 px-2 py-0.5 text-xs text-orange-700",children:"deprecated"}),r.readOnly&&s.jsx("span",{className:"text-xs opacity-60",children:"readOnly"}),r.writeOnly&&s.jsx("span",{className:"text-xs opacity-60",children:"writeOnly"})]}),r.description&&s.jsx("p",{className:`mt-1 text-sm leading-relaxed ${m}`,children:r.description}),r.enum&&s.jsxs("p",{className:`mt-1 text-xs ${m}`,children:["Allowed: ",r.enum.map(String).join(", ")]}),r.const!==void 0&&s.jsxs("p",{className:`mt-1 text-xs ${m}`,children:["Constant: ",JSON.stringify(r.const)]}),r.default!==void 0&&s.jsxs("p",{className:`mt-1 text-xs ${m}`,children:["Default: ",JSON.stringify(r.default)]}),(r.example!==void 0||r.examples?.length)&&s.jsx("div",{className:"mt-2",children:s.jsx(zn,{code:JSON.stringify(r.example??r.examples?.[0],null,2),language:"json",title:"Example",showCopy:!1,theme:o,wrap:!0})}),r.items&&s.jsxs("div",{className:"mt-3",children:[s.jsx("div",{className:"mb-1 text-xs font-semibold uppercase tracking-wide opacity-60",children:"Items"}),s.jsx(ra,{...b,schema:r.items,level:f+1,seen:p})]}),S.map(([R,z])=>z?.length?s.jsxs("div",{className:"mt-3",children:[s.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide opacity-60",children:R}),s.jsx("div",{className:"space-y-3",children:z.map((M,B)=>s.jsx(ra,{...b,schema:M,level:f+1,seen:p},B))})]},R):null),_.length>0&&s.jsx("div",{className:"mt-3 space-y-3",children:_.map(([R,z])=>s.jsxs("div",{children:[s.jsx("div",{className:"font-mono text-sm font-medium",children:R}),s.jsx(ra,{...b,schema:z,required:N.has(R),level:f+1,seen:p})]},R))}),r.additionalProperties&&typeof r.additionalProperties=="object"&&s.jsxs("div",{className:"mt-3",children:[s.jsx("div",{className:"mb-1 text-xs font-semibold uppercase tracking-wide opacity-60",children:"Additional properties"}),s.jsx(ra,{...b,schema:r.additionalProperties,level:f+1,seen:p})]})]})};function fn(a){return{preRequest:a?.preRequest||"",tests:a?.tests||""}}function e0(a){return{...a,query:a.query?.map(r=>({...r})),headers:a.headers?.map(r=>({...r})),urlencoded:a.urlencoded?.map(r=>({...r})),formData:a.formData?.map(r=>({...r})),binary:a.binary?{...a.binary}:void 0,graphql:a.graphql?{...a.graphql}:void 0,auth:a.auth?{...a.auth}:void 0}}function Br(a){return Object.assign(Object.create(null),a)}function wt(a){if(typeof a=="string")return a;if(a instanceof Error)return a.message;try{return JSON.stringify(a)}catch{return String(a)}}function Wa(a,r){if(Object.is(a,r))return!0;if(typeof a!=typeof r||a===null||r===null)return!1;if(Array.isArray(a))return Array.isArray(r)&&a.length===r.length&&a.every((o,u)=>Wa(o,r[u]));if(typeof a=="object"&&typeof r=="object"){const o=a,u=r,f=Object.keys(o),p=Object.keys(u);return f.length===p.length&&f.every(g=>Object.prototype.hasOwnProperty.call(u,g)&&Wa(o[g],u[g]))}return!1}function pn(a){throw new Error(a)}function t0(a){const r=m=>{Object.is(a,m)||pn(`expected ${wt(a)} to equal ${wt(m)}`)},o=m=>{Wa(a,m)||pn(`expected ${wt(a)} to deeply equal ${wt(m)}`)},u=m=>{(typeof a=="string"?a.includes(String(m)):Array.isArray(a)&&a.some(S=>Wa(S,m)))||pn(`expected ${wt(a)} to include ${wt(m)}`)},f=(m,...v)=>{(!a||typeof a!="object"||!Object.prototype.hasOwnProperty.call(a,m))&&pn(`expected value to have property ${m}`),v.length>0&&!Wa(a[m],v[0])&&pn(`expected property ${m} to equal ${wt(v[0])}`)},b={above:m=>{(typeof a!="number"||a<=m)&&pn(`expected ${wt(a)} to be above ${m}`)},below:m=>{(typeof a!="number"||a>=m)&&pn(`expected ${wt(a)} to be below ${m}`)},oneOf:m=>{m.some(v=>Wa(a,v))||pn(`expected ${wt(a)} to be one of ${wt(m)}`)}};return Object.defineProperties(b,{ok:{get:()=>(a||pn(`expected ${wt(a)} to be truthy`),!0)},true:{get:()=>(a!==!0&&pn(`expected ${wt(a)} to be true`),!0)},false:{get:()=>(a!==!1&&pn(`expected ${wt(a)} to be false`),!0)}}),{to:{equal:r,eql:o,include:u,match:m=>{(typeof a!="string"||!m.test(a))&&pn(`expected ${wt(a)} to match ${m}`)},have:{property:f},be:b}}}function Js(a,r){return a.findIndex(o=>o.key.toLowerCase()===r.toLowerCase())}function n0(a){const r=()=>a.headers||(a.headers=[]),o=(u,f)=>{const p=r(),g=Js(p,u),x={key:u,value:String(f),enabled:!0};g>=0?p[g]=x:p.push(x)};return{get(u){const f=Js(r(),u);return f>=0?r()[f].value:void 0},has(u){return Js(r(),u)>=0},set:o,upsert({key:u,value:f}){o(u,f)},remove(u){a.headers=r().filter(f=>f.key.toLowerCase()!==u.toLowerCase())},toObject(){const u={};for(const f of r())f.enabled!==!1&&(u[f.key]=f.value);return u}}}function a0(a){return{get(r){return a.find(([o])=>o.toLowerCase()===r.toLowerCase())?.[1]},has(r){return a.some(([o])=>o.toLowerCase()===r.toLowerCase())},toObject(){const r={};for(const[o,u]of a)r[o]=u;return r}}}async function Jd(a){const r=e0(a.draft),o=Br(a.variables||{}),u=Br(a.collectionVariables||{}),f=Br(a.externalVariables||{}),p=Br(a.environmentVariables||{}),g=[],x=[],b=[],m=[],v=[],S=w=>{Object.prototype.hasOwnProperty.call(p,w)?o[w]=p[w]:Object.prototype.hasOwnProperty.call(f,w)?o[w]=f[w]:Object.prototype.hasOwnProperty.call(u,w)?o[w]=u[w]:delete o[w]},N={get(w){return p[w]},has(w){return Object.prototype.hasOwnProperty.call(p,w)},set(w,U){const Y=String(U);p[w]=Y,o[w]=Y,x.push({action:"set",key:w,value:Y})},unset(w){delete p[w],S(w),x.push({action:"unset",key:w})},replaceIn(w){return w.replace(/\{\{\s*([^{}]+?)\s*\}\}/g,(U,Y)=>{const $=Y.trim();return Object.prototype.hasOwnProperty.call(p,$)?p[$]:U})}},_={get(w){return u[w]},has(w){return Object.prototype.hasOwnProperty.call(u,w)},set(w,U){const Y=String(U);u[w]=Y,S(w),g.push({action:"set",key:w,value:Y})},unset(w){delete u[w],S(w),g.push({action:"unset",key:w})},replaceIn(w){return w.replace(/\{\{\s*([^{}]+?)\s*\}\}/g,(U,Y)=>{const $=Y.trim();return Object.prototype.hasOwnProperty.call(u,$)?u[$]:U})}},R={get(w){return o[w]},has(w){return Object.prototype.hasOwnProperty.call(o,w)},set(w,U){o[w]=String(U)},unset(w){delete o[w]},replaceIn(w){return w.replace(/\{\{\s*([^{}]+?)\s*\}\}/g,(U,Y)=>{const $=Y.trim();return Object.prototype.hasOwnProperty.call(o,$)?o[$]:U})}},z={get raw(){return r.body||""},set raw(w){r.body=String(w),r.bodyMode="raw"}},M={get method(){return r.method},set method(w){r.method=String(w)},get url(){return r.url},set url(w){r.url=String(w)},headers:n0(r),body:z},B=a.response?{code:a.response.status,status:a.response.statusText,responseTime:a.response.responseTime,headers:a0(a.response.headers),text:()=>a.response?.body||"",json:()=>JSON.parse(a.response?.body||"")}:void 0,T={request:M,response:B,environment:N,collection:_,variables:R,expect:t0,test(w,U){if(a.phase!=="tests")throw new Error("flex.test is only available in post-response test scripts.");const Y=Promise.resolve().then(U).then(()=>{b.push({name:w,passed:!0})}).catch($=>{b.push({name:w,passed:!1,error:$ instanceof Error?$.message:String($)})});v.push(Y)}},E={log:(...w)=>m.push(w.map(wt).join(" ")),info:(...w)=>m.push(w.map(wt).join(" ")),warn:(...w)=>m.push(`WARN ${w.map(wt).join(" ")}`),error:(...w)=>m.push(`ERROR ${w.map(wt).join(" ")}`)};try{return await new Function("flex","console",`"use strict"; return (async () => {
47
47
  ${a.script}
48
- })();`)(_,N),await Promise.all(S),{draft:i,variables:c,collectionVariables:u,externalVariables:f,environmentVariables:p,collectionChanges:g,environmentChanges:y,tests:x,logs:h}}catch(j){return await Promise.all(S),{draft:i,variables:c,collectionVariables:u,externalVariables:f,environmentVariables:p,collectionChanges:g,environmentChanges:y,tests:x,logs:h,error:j instanceof Error?j.message:String(j)}}}const Xg="flexdoc-api-client",Zg=1,Pl="workspaces",Qg="My Collection",Yd=100,Gd=256*1024;function Ia(){return new Date().toISOString()}function cn(a){return!!a&&typeof a=="object"&&!Array.isArray(a)}function Fe(a,i){return typeof a[i]=="string"}function Lr(a,i){const c=a[i];return c===void 0||typeof c=="number"&&Number.isFinite(c)}function Id(a){return!cn(a)||!Fe(a,"key")||!Fe(a,"value")?!1:a.enabled===void 0||typeof a.enabled=="boolean"}function Qs(a){if(!cn(a)||typeof a.type!="string")return!1;if(a.type==="none"||a.type==="inherit")return!0;if(a.type==="bearer")return Fe(a,"token");if(a.type==="oauth2"){if(!Fe(a,"accessToken"))return!1;const i=new Set(["accessToken","authorizationCode","clientCredentials","password","implicit"]);if(a.grantType!==void 0&&(typeof a.grantType!="string"||!i.has(a.grantType))||a.clientAuthentication!==void 0&&a.clientAuthentication!=="body"&&a.clientAuthentication!=="basic")return!1;for(const c of["authorizationUrl","tokenUrl","clientId","clientSecret","redirectUri","username","password","refreshToken"])if(a[c]!==void 0&&typeof a[c]!="string")return!1;return a.scopes===void 0||Array.isArray(a.scopes)&&a.scopes.every(c=>typeof c=="string")}return a.type==="basic"?Fe(a,"username")&&Fe(a,"password"):a.type==="apiKey"&&Fe(a,"key")&&Fe(a,"value")&&(a.in==="header"||a.in==="query")}function Fd(a){return!cn(a)||!Fe(a,"method")||!Fe(a,"url")||a.query!==void 0&&(!Array.isArray(a.query)||!a.query.every(Id))||a.headers!==void 0&&(!Array.isArray(a.headers)||!a.headers.every(Id))||a.body!==void 0&&typeof a.body!="string"||a.contentType!==void 0&&typeof a.contentType!="string"?!1:a.auth===void 0||Qs(a.auth)}function Vd(a){return cn(a)&&Fe(a,"id")&&Fe(a,"key")&&Fe(a,"value")&&(a.enabled===void 0||typeof a.enabled=="boolean")}function Kg(a){return!cn(a)||!Fe(a,"id")||!Fe(a,"name")||!Fe(a,"createdAt")||!Fe(a,"updatedAt")?null:{id:a.id,name:a.name,auth:Qs(a.auth)?a.auth:{type:"none"},variables:Array.isArray(a.variables)?a.variables.filter(Vd):[],createdAt:a.createdAt,updatedAt:a.updatedAt}}function Jg(a){return!cn(a)||!Fe(a,"id")||!Fe(a,"collectionId")||a.parentFolderId!==void 0&&typeof a.parentFolderId!="string"||!Fe(a,"name")||!Fe(a,"createdAt")||!Fe(a,"updatedAt")?null:{id:a.id,collectionId:a.collectionId,parentFolderId:a.parentFolderId,name:a.name,auth:Qs(a.auth)?a.auth:{type:"inherit"},createdAt:a.createdAt,updatedAt:a.updatedAt}}function Wg(a,i){const c=a.map(Jg).filter(f=>f!==null).filter(f=>i.has(f.collectionId)),u=new Map(c.map(f=>[f.id,f]));for(const f of c){if(!f.parentFolderId)continue;const p=u.get(f.parentFolderId);(!p||p.collectionId!==f.collectionId||p.id===f.id)&&(f.parentFolderId=void 0)}for(const f of c){if(!f.parentFolderId)continue;const p=new Set([f.id]);let g=f.parentFolderId;for(;g;){if(p.has(g)){f.parentFolderId=void 0;break}p.add(g),g=u.get(g)?.parentFolderId}}return c}function Xd(a){if(!(!cn(a)||!Fe(a,"preRequest")||!Fe(a,"tests")))return{preRequest:a.preRequest,tests:a.tests}}function Pg(a){if(!cn(a)||!Fe(a,"id")||!Fe(a,"collectionId")||a.folderId!==void 0&&typeof a.folderId!="string"||!Fe(a,"name")||!Fd(a.request)||!Fe(a,"createdAt")||!Fe(a,"updatedAt"))return null;const i=Xd(a.scripts);return{id:a.id,collectionId:a.collectionId,folderId:a.folderId,name:a.name,request:a.request,...i?{scripts:i}:{},createdAt:a.createdAt,updatedAt:a.updatedAt}}function e0(a){return!cn(a)||!Fe(a,"id")||!Fe(a,"name")||!Array.isArray(a.variables)||!Fe(a,"createdAt")||!Fe(a,"updatedAt")?null:{id:a.id,name:a.name,variables:a.variables.filter(Vd),createdAt:a.createdAt,updatedAt:a.updatedAt}}function t0(a){return Array.isArray(a)&&a.length===2&&typeof a[0]=="string"&&typeof a[1]=="string"}function n0(a){return!cn(a)||!Fe(a,"name")||typeof a.passed!="boolean"||a.error!==void 0&&typeof a.error!="string"?null:{name:a.name,passed:a.passed,error:a.error}}function l0(a){if(!cn(a)||!Fe(a,"id")||!Fd(a.request)||!Fe(a,"executedMethod")||!Fe(a,"resolvedUrl")||!Lr(a,"status")||a.statusText!==void 0&&typeof a.statusText!="string"||!Lr(a,"responseTime")||a.responseHeaders!==void 0&&(!Array.isArray(a.responseHeaders)||!a.responseHeaders.every(t0))||a.responseBody!==void 0&&typeof a.responseBody!="string"||a.responseBodyTruncated!==void 0&&typeof a.responseBodyTruncated!="boolean"||a.runId!==void 0&&typeof a.runId!="string"||a.runName!==void 0&&typeof a.runName!="string"||!Lr(a,"runIndex")||!Lr(a,"runTotal")||a.runPassed!==void 0&&typeof a.runPassed!="boolean"||a.runCancelled!==void 0&&typeof a.runCancelled!="boolean"||a.error!==void 0&&typeof a.error!="string"||a.scriptError!==void 0&&typeof a.scriptError!="string"||!Fe(a,"createdAt"))return null;const i=Xd(a.scripts),c=Array.isArray(a.scriptTests)?a.scriptTests.map(n0).filter(f=>f!==null):[],u=Array.isArray(a.scriptLogs)?a.scriptLogs.filter(f=>typeof f=="string"):[];return{id:a.id,collectionId:typeof a.collectionId=="string"?a.collectionId:void 0,folderId:typeof a.folderId=="string"?a.folderId:void 0,request:a.request,...i?{scripts:i}:{},executedMethod:a.executedMethod,resolvedUrl:a.resolvedUrl,status:a.status,statusText:a.statusText,responseTime:a.responseTime,responseHeaders:Array.isArray(a.responseHeaders)?a.responseHeaders.map(([f,p])=>[f,p]):void 0,responseBody:typeof a.responseBody=="string"?a.responseBody:void 0,responseBodyTruncated:a.responseBodyTruncated===!0?!0:void 0,runId:typeof a.runId=="string"?a.runId:void 0,runName:typeof a.runName=="string"?a.runName:void 0,runIndex:typeof a.runIndex=="number"?a.runIndex:void 0,runTotal:typeof a.runTotal=="number"?a.runTotal:void 0,runPassed:typeof a.runPassed=="boolean"?a.runPassed:void 0,runCancelled:a.runCancelled===!0?!0:void 0,error:a.error,...c.length?{scriptTests:c}:{},...u.length?{scriptLogs:u}:{},scriptError:a.scriptError,createdAt:a.createdAt}}function Zd(a){const i=Object.create(null);for(const c of a){const u=c.key.trim();c.enabled===!1||!u||(i[u]=c.value)}return i}function Ht(a){const i=globalThis.crypto?.randomUUID?.();return i?`${a}-${i}`:`${a}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function a0(a,i){const c=i?.trim()||"unknown-host",u=a?.trim()||"untitled";return`flexdoc:${encodeURIComponent(c)}:${encodeURIComponent(u)}`}function Dn(a){const i=a.auth?a.auth.type==="oauth2"?{...a.auth,scopes:a.auth.scopes?[...a.auth.scopes]:void 0}:{...a.auth}:void 0;return{...a,query:a.query?.map(c=>({...c})),headers:a.headers?.map(c=>({...c})),auth:i}}function Fa(){const a=Ia();return{version:6,collections:[{id:Ht("collection"),name:Qg,auth:{type:"none"},variables:[],createdAt:a,updatedAt:a}],folders:[],requests:[],environments:[],history:[]}}function r0(a){if(!cn(a)||![1,2,3,4,5,6].includes(a.version))return Fa();const i=(Array.isArray(a.collections)?a.collections:[]).map(Kg).filter(h=>h!==null);if(i.length===0)return Fa();const c=new Set(i.map(h=>h.id)),u=Wg(Array.isArray(a.folders)?a.folders:[],c),f=new Map(u.map(h=>[h.id,h])),p=(Array.isArray(a.requests)?a.requests:[]).map(Pg).filter(h=>h!==null).filter(h=>c.has(h.collectionId)).map(h=>h.folderId?f.get(h.folderId)?.collectionId===h.collectionId?h:{...h,folderId:void 0}:h);if(a.version===1)return{version:6,collections:i,folders:u,requests:p,environments:[],history:[]};const g=(Array.isArray(a.environments)?a.environments:[]).map(e0).filter(h=>h!==null),y=typeof a.activeEnvironmentId=="string"&&g.some(h=>h.id===a.activeEnvironmentId)?a.activeEnvironmentId:void 0,x=(a.version===4||a.version===5||a.version===6)&&Array.isArray(a.history)?a.history.map(l0).filter(h=>h!==null).slice(0,Yd):[];return{version:6,collections:i,folders:u,requests:p,environments:g,activeEnvironmentId:y,history:x}}function Qd(a,i){const c=i.responseBody===void 0?void 0:i.responseBody.slice(0,Gd),u=i.responseBodyTruncated===!0||(i.responseBody?.length||0)>Gd,f={id:Ht("history"),collectionId:i.collectionId,folderId:i.folderId,request:Dn(i.request),...i.scripts?{scripts:sn(i.scripts)}:{},executedMethod:i.executedMethod,resolvedUrl:i.resolvedUrl,status:i.status,statusText:i.statusText,responseTime:i.responseTime,...i.responseHeaders?.length?{responseHeaders:i.responseHeaders.map(([p,g])=>[p,g])}:{},...c!==void 0?{responseBody:c,...u?{responseBodyTruncated:!0}:{}}:{},runId:i.runId,runName:i.runName,runIndex:i.runIndex,runTotal:i.runTotal,runPassed:i.runPassed,...i.runCancelled?{runCancelled:!0}:{},error:i.error,...i.scriptTests?.length?{scriptTests:i.scriptTests.map(p=>({...p}))}:{},...i.scriptLogs?.length?{scriptLogs:[...i.scriptLogs]}:{},scriptError:i.scriptError,createdAt:Ia()};return{...a,history:[f,...a.history].slice(0,Yd)}}function Kd(a,i,c,u={type:"none"}){if(u.type!=="inherit")return{...u};const f=new Map(a.folders.map(x=>[x.id,x])),p=new Set;let g=c?f.get(c):void 0;for(;g&&g.collectionId===i&&!p.has(g.id);){if(p.add(g.id),g.auth.type!=="inherit")return{...g.auth};g=g.parentFolderId?f.get(g.parentFolderId):void 0}const y=a.collections.find(x=>x.id===i);return y&&y.auth.type!=="inherit"?{...y.auth}:{type:"none"}}function Jd(a,i){const c=a.collections.find(u=>u.id===i);return Zd(c?.variables||[])}function Wd(a){const i=a.environments.find(c=>c.id===a.activeEnvironmentId);return Zd(i?.variables||[])}function Pd(a,i){if(!a.activeEnvironmentId||i.length===0)return a;const c=a.environments.findIndex(y=>y.id===a.activeEnvironmentId);if(c<0)return a;let f=a.environments[c].variables.map(y=>({...y})),p=!1;for(const y of i){const x=y.key.trim();if(!x)continue;if(y.action==="unset"){const A=f.filter(C=>C.key.trim()!==x);A.length!==f.length&&(f=A,p=!0);continue}const h=f.map((A,C)=>A.key.trim()===x?C:-1).filter(A=>A>=0),S=y.value||"";if(h.length>0){const A=h[0];f[A]={...f[A],key:x,value:S,enabled:!0},h.length>1&&(f=f.filter((C,M)=>M===A||C.key.trim()!==x))}else f.push({id:Ht("variable"),key:x,value:S,enabled:!0});p=!0}if(!p)return a;const g=a.environments.map((y,x)=>x===c?{...y,variables:f,updatedAt:Ia()}:y);return{...a,environments:g}}function ef(a,i,c){if(!i||c.length===0)return a;const u=a.collections.findIndex(x=>x.id===i);if(u<0)return a;let p=a.collections[u].variables.map(x=>({...x})),g=!1;for(const x of c){const h=x.key.trim();if(!h)continue;if(x.action==="unset"){const C=p.filter(M=>M.key.trim()!==h);C.length!==p.length&&(p=C,g=!0);continue}const S=p.map((C,M)=>C.key.trim()===h?M:-1).filter(C=>C>=0),A=x.value||"";if(S.length>0){const C=S[0];p[C]={...p[C],key:h,value:A,enabled:!0},S.length>1&&(p=p.filter((M,k)=>k===C||M.key.trim()!==h))}else p.push({id:Ht("variable"),key:h,value:A,enabled:!0});g=!0}if(!g)return a;const y=a.collections.map((x,h)=>h===u?{...x,variables:p,updatedAt:Ia()}:x);return{...a,collections:y}}function i0(a,i){return{...a,environments:a.environments.filter(c=>c.id!==i),activeEnvironmentId:a.activeEnvironmentId===i?void 0:a.activeEnvironmentId}}function s0(a,i){const c=a.folders.find(f=>f.id===i);if(!c)return a;const u=Ia();return{...a,folders:a.folders.filter(f=>f.id!==i).map(f=>f.parentFolderId===i?{...f,parentFolderId:c.parentFolderId,updatedAt:u}:f),requests:a.requests.map(f=>f.folderId===i?{...f,folderId:c.parentFolderId,updatedAt:u}:f)}}function o0(a,i){const c=a.collections.filter(u=>u.id!==i);return c.length===0?{...Fa(),environments:a.environments,activeEnvironmentId:a.activeEnvironmentId,history:a.history}:{...a,collections:c,folders:a.folders.filter(u=>u.collectionId!==i),requests:a.requests.filter(u=>u.collectionId!==i)}}function tf(){return typeof indexedDB>"u"?Promise.resolve(null):new Promise((a,i)=>{const c=indexedDB.open(Xg,Zg);c.onupgradeneeded=()=>{const u=c.result;u.objectStoreNames.contains(Pl)||u.createObjectStore(Pl)},c.onsuccess=()=>a(c.result),c.onerror=()=>i(c.error||new Error("Unable to open FlexDoc API Client storage"))})}async function c0(a){const i=await tf();if(!i)return Fa();try{return await new Promise((c,u)=>{const p=i.transaction(Pl,"readonly").objectStore(Pl).get(a);p.onsuccess=()=>c(r0(p.result)),p.onerror=()=>u(p.error||new Error("Unable to load FlexDoc API Client workspace"))})}finally{i.close()}}async function u0(a,i){const c=await tf();if(c)try{await new Promise((u,f)=>{const p=c.transaction(Pl,"readwrite");p.objectStore(Pl).put(i,a),p.oncomplete=()=>u(),p.onerror=()=>f(p.error||new Error("Unable to save FlexDoc API Client workspace")),p.onabort=()=>f(p.error||new Error("Unable to save FlexDoc API Client workspace"))})}finally{c.close()}}function ea(a,i){const c=a?.trim();if(!c)throw new Error(`${i} is required for this OAuth flow.`);return c}function Br(a){return(a.scopes||[]).map(i=>i.trim()).filter(Boolean).join(" ")}function d0(a){if(typeof TextEncoder>"u")throw new Error("OAuth Basic client authentication requires UTF-8 encoding support.");const i=new TextEncoder().encode(a);let c="";for(const p of i)c+=String.fromCharCode(p);const u=globalThis.Buffer,f=typeof btoa=="function"?btoa(c):u?.from(c,"binary").toString("base64");if(!f)throw new Error("OAuth Basic client authentication requires Base64 support in this runtime.");return f}function nf(a){let i="";for(const f of a)i+=String.fromCharCode(f);const c=globalThis.Buffer,u=typeof btoa=="function"?btoa(i):c?.from(i,"binary").toString("base64");if(!u)throw new Error("OAuth PKCE requires Base64 support in this runtime.");return u.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}function lf(a=32){if(!globalThis.crypto?.getRandomValues)throw new Error("OAuth requires cryptographic random-number support.");const i=new Uint8Array(a);return globalThis.crypto.getRandomValues(i),nf(i)}async function f0(a){if(!globalThis.crypto?.subtle||typeof TextEncoder>"u")throw new Error("OAuth authorization-code flow requires Web Crypto PKCE support.");const i=await globalThis.crypto.subtle.digest("SHA-256",new TextEncoder().encode(a));return nf(new Uint8Array(i))}function af(a,i,c,u){const f=ea(a.authorizationUrl,"Authorization URL"),p=ea(a.clientId,"Client ID"),g=new URL(f),y=a.grantType||"accessToken";g.searchParams.set("response_type",y==="implicit"?"token":"code"),g.searchParams.set("client_id",p),g.searchParams.set("redirect_uri",c),g.searchParams.set("state",i);const x=Br(a);return x&&g.searchParams.set("scope",x),u&&(g.searchParams.set("code_challenge",u),g.searchParams.set("code_challenge_method","S256")),g.toString()}function p0(a){const i=new URL(a.location.href);return i.search="",i.hash="",i.toString()}async function m0(a,i){const c=i??(typeof window>"u"?void 0:window);if(!c)throw new Error("Interactive OAuth requires a browser window.");const u=a.redirectUri?.trim()||p0(c);if(new URL(u).origin!==c.location.origin)throw new Error("Interactive OAuth redirect URI must use the same origin as the FlexDoc page so the popup result can be read.");const f=lf(24);if((a.grantType||"accessToken")==="implicit")return{url:af(a,f,u),state:f,redirectUri:u};const p=lf(48),g=await f0(p);return{url:af(a,f,u,g),state:f,redirectUri:u,codeVerifier:p}}async function h0(a){const i=await a.text();let c;try{c=i?JSON.parse(i):{}}catch{c=Object.fromEntries(new URLSearchParams(i))}if(!a.ok){const g=String(c.error_description||c.error||`OAuth token endpoint returned ${a.status}`);throw new Error(g)}const u=typeof c.access_token=="string"?c.access_token:"";if(!u)throw new Error("OAuth token endpoint did not return access_token.");const f=c.expires_in,p=typeof f=="number"?f:typeof f=="string"&&f.trim()!==""&&Number.isFinite(Number(f))?Number(f):void 0;return{accessToken:u,refreshToken:typeof c.refresh_token=="string"?c.refresh_token:void 0,tokenType:typeof c.token_type=="string"?c.token_type:void 0,expiresIn:p,scope:typeof c.scope=="string"?c.scope:void 0}}async function Yr(a,i,c){const u=ea(a.tokenUrl,"Token URL"),f={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},p=a.clientId?.trim();(a.clientAuthentication||"body")==="basic"&&p?f.Authorization=`Basic ${d0(`${p}:${a.clientSecret||""}`)}`:(p&&i.set("client_id",p),a.clientSecret&&i.set("client_secret",a.clientSecret));const g=await c(u,{method:"POST",headers:f,body:i.toString()});return h0(g)}async function y0(a,i){const c=i.windowObject??(typeof window>"u"?void 0:window);if(!c)throw new Error("Interactive OAuth requires a browser window.");const u=c.open(a.url,"flexdoc-oauth","popup,width=640,height=760");if(!u)throw new Error("OAuth popup was blocked. Allow popups for this documentation origin and try again.");const f=new URL(a.redirectUri),p=Date.now(),g=i.popupTimeoutMs??12e4,y=i.pollIntervalMs??200;for(;Date.now()-p<g;){if(u.closed)throw new Error("OAuth popup was closed before authorization completed.");try{const x=new URL(u.location.href);if(x.origin===f.origin&&x.pathname===f.pathname)return u.close(),x}catch{}await new Promise(x=>setTimeout(x,y))}throw u.close(),new Error("OAuth authorization timed out.")}async function g0(a,i={}){const c=a.grantType||"accessToken",u=i.fetchImpl??fetch;if(c==="accessToken")return{accessToken:ea(a.accessToken,"Access token")};if(c==="clientCredentials"){const A=new URLSearchParams({grant_type:"client_credentials"}),C=Br(a);return C&&A.set("scope",C),Yr(a,A,u)}if(c==="password"){const A=new URLSearchParams({grant_type:"password",username:ea(a.username,"Username"),password:a.password||""}),C=Br(a);return C&&A.set("scope",C),Yr(a,A,u)}const f=await m0(a,i.windowObject),p=await y0(f,i);if((p.searchParams.get("state")||new URLSearchParams(p.hash.replace(/^#/,"")).get("state"))!==f.state)throw new Error("OAuth state mismatch; authorization response was rejected.");const y=new URLSearchParams(p.hash.replace(/^#/,"")),x=p.searchParams.get("error")||y.get("error");if(x){const A=p.searchParams.get("error_description")||y.get("error_description");throw new Error(A||x)}if(c==="implicit"){const A=y.get("access_token")||"";if(!A)throw new Error("OAuth implicit response did not include access_token.");return{accessToken:A,tokenType:y.get("token_type")||void 0,expiresIn:y.get("expires_in")?Number(y.get("expires_in")):void 0,scope:y.get("scope")||void 0}}const h=p.searchParams.get("code");if(!h)throw new Error("OAuth authorization response did not include code.");const S=new URLSearchParams({grant_type:"authorization_code",code:h,redirect_uri:f.redirectUri});return f.codeVerifier&&S.set("code_verifier",f.codeVerifier),Yr(a,S,u)}async function x0(a,i={}){const c=ea(a.refreshToken,"Refresh token"),u=new URLSearchParams({grant_type:"refresh_token",refresh_token:c}),f=Br(a);return f&&u.set("scope",f),Yr(a,u,i.fetchImpl??fetch)}function b0(a){return a==="inherit"?{type:"inherit"}:a==="bearer"?{type:"bearer",token:""}:a==="oauth2"?{type:"oauth2",accessToken:"",grantType:"accessToken",scopes:[]}:a==="basic"?{type:"basic",username:"",password:""}:a==="apiKey"?{type:"apiKey",key:"",value:"",in:"header"}:{type:"none"}}function v0(a){return a.split(/\s+/).map(i=>i.trim()).filter(Boolean)}const rf=({auth:a,fieldClass:i,label:c,onChange:u})=>{const[f,p]=le.useState(!1),[g,y]=le.useState(null),x=a.grantType||"accessToken",h=x==="authorizationCode"||x==="implicit",S=x==="authorizationCode"||x==="clientCredentials"||x==="password",A=x!=="accessToken",C=async()=>{p(!0),y(null);try{const k=await g0(a);u({...a,accessToken:k.accessToken,refreshToken:k.refreshToken??a.refreshToken}),y(k.expiresIn?`Access token acquired; expires in ${k.expiresIn}s.`:"Access token acquired.")}catch(k){y(k instanceof Error?k.message:"OAuth authorization failed.")}finally{p(!1)}},M=async()=>{p(!0),y(null);try{const k=await x0(a);u({...a,accessToken:k.accessToken,refreshToken:k.refreshToken??a.refreshToken}),y("Access token refreshed.")}catch(k){y(k instanceof Error?k.message:"OAuth token refresh failed.")}finally{p(!1)}};return o.jsxs("div",{className:"space-y-2",children:[o.jsxs("select",{"aria-label":c?`${c} OAuth grant type`:"OAuth grant type",className:i,value:x,onChange:k=>u({...a,grantType:k.target.value}),children:[o.jsx("option",{value:"accessToken",children:"Manual access token"}),o.jsx("option",{value:"authorizationCode",children:"Authorization Code + PKCE"}),o.jsx("option",{value:"clientCredentials",children:"Client Credentials"}),o.jsx("option",{value:"password",children:"Password grant (legacy)"}),o.jsx("option",{value:"implicit",children:"Implicit grant (legacy)"})]}),h&&o.jsx("input",{"aria-label":c?`${c} OAuth authorization URL`:"OAuth authorization URL",className:i,placeholder:"Authorization URL",value:a.authorizationUrl||"",onChange:k=>u({...a,authorizationUrl:k.target.value})}),S&&o.jsx("input",{"aria-label":c?`${c} OAuth token URL`:"OAuth token URL",className:i,placeholder:"Token URL",value:a.tokenUrl||"",onChange:k=>u({...a,tokenUrl:k.target.value})}),A&&o.jsx("input",{"aria-label":c?`${c} OAuth client ID`:"OAuth client ID",className:i,placeholder:"Client ID",value:a.clientId||"",onChange:k=>u({...a,clientId:k.target.value})}),(x==="authorizationCode"||x==="clientCredentials"||x==="password")&&o.jsx("input",{"aria-label":c?`${c} OAuth client secret`:"OAuth client secret",type:"password",autoComplete:"off",className:i,placeholder:x==="authorizationCode"?"Client secret (optional for PKCE/public clients)":"Client secret (optional)",value:a.clientSecret||"",onChange:k=>u({...a,clientSecret:k.target.value})}),S&&o.jsxs("select",{"aria-label":c?`${c} OAuth client authentication`:"OAuth client authentication",className:i,value:a.clientAuthentication||"body",onChange:k=>u({...a,clientAuthentication:k.target.value}),children:[o.jsx("option",{value:"body",children:"Send client credentials in body"}),o.jsx("option",{value:"basic",children:"Send as Basic Auth header"})]}),h&&o.jsx("input",{"aria-label":c?`${c} OAuth redirect URI`:"OAuth redirect URI",className:i,placeholder:"Redirect URI (defaults to this page)",value:a.redirectUri||"",onChange:k=>u({...a,redirectUri:k.target.value})}),A&&o.jsx("input",{"aria-label":c?`${c} OAuth scopes`:"OAuth scopes",className:i,placeholder:"Scopes separated by spaces",value:(a.scopes||[]).join(" "),onChange:k=>u({...a,scopes:v0(k.target.value)})}),x==="password"&&o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsx("input",{"aria-label":c?`${c} OAuth username`:"OAuth username",className:i,placeholder:"Resource owner username",value:a.username||"",onChange:k=>u({...a,username:k.target.value})}),o.jsx("input",{"aria-label":c?`${c} OAuth password`:"OAuth password",type:"password",autoComplete:"off",className:i,placeholder:"Resource owner password",value:a.password||"",onChange:k=>u({...a,password:k.target.value})})]}),o.jsx("input",{"aria-label":c?`${c} OAuth access token`:"OAuth access token",type:"password",autoComplete:"off",className:i,placeholder:"Access token",value:a.accessToken,onChange:k=>u({...a,accessToken:k.target.value})}),x!=="accessToken"&&o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx("button",{type:"button",disabled:f,onClick:C,className:"rounded-md border px-2.5 py-1.5 text-xs font-medium disabled:opacity-60",children:f?"Authorizing…":"Get access token"}),a.refreshToken&&a.tokenUrl&&o.jsx("button",{type:"button",disabled:f,onClick:M,className:"rounded-md border px-2.5 py-1.5 text-xs font-medium disabled:opacity-60",children:"Refresh access token"})]}),x!=="accessToken"&&o.jsx("p",{className:"text-[11px] opacity-70",children:"Authorization Code uses PKCE. Popup callbacks must return to this page origin; token endpoints must allow browser CORS. Client secrets entered here are browser-visible and should only be used when the OAuth provider permits it."}),g&&o.jsx("p",{role:"status",className:"text-xs",children:g})]})},sf=({auth:a,label:i,allowInherit:c=!1,onChange:u,theme:f})=>{const g=`w-full rounded-md border px-2 py-1.5 text-xs ${f==="dark"?"bg-gray-900 border-gray-700 text-gray-100":"bg-white border-gray-300 text-gray-900"}`;return o.jsxs("div",{className:"space-y-2",children:[o.jsxs("select",{"aria-label":`${i} authorization type`,className:g,value:a.type==="inherit"&&!c?"none":a.type,onChange:y=>u(b0(y.target.value)),children:[c&&o.jsx("option",{value:"inherit",children:"Inherit from parent"}),o.jsx("option",{value:"none",children:"No auth"}),o.jsx("option",{value:"bearer",children:"Bearer token"}),o.jsx("option",{value:"oauth2",children:"OAuth 2.0"}),o.jsx("option",{value:"basic",children:"Basic auth"}),o.jsx("option",{value:"apiKey",children:"API key"})]}),a.type==="bearer"&&o.jsx("input",{"aria-label":`${i} bearer token`,type:"password",autoComplete:"off",className:g,value:a.token,onChange:y=>u({type:"bearer",token:y.target.value})}),a.type==="oauth2"&&o.jsx(rf,{auth:a,fieldClass:g,label:i,onChange:u}),a.type==="basic"&&o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsx("input",{"aria-label":`${i} basic username`,className:g,placeholder:"Username",value:a.username,onChange:y=>u({...a,username:y.target.value})}),o.jsx("input",{"aria-label":`${i} basic password`,type:"password",autoComplete:"off",className:g,placeholder:"Password",value:a.password,onChange:y=>u({...a,password:y.target.value})})]}),a.type==="apiKey"&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("input",{"aria-label":`${i} API key name`,className:g,placeholder:"Key name",value:a.key,onChange:y=>u({...a,key:y.target.value})}),o.jsx("input",{"aria-label":`${i} API key value`,type:"password",autoComplete:"off",className:g,placeholder:"Value",value:a.value,onChange:y=>u({...a,value:y.target.value})}),o.jsxs("select",{"aria-label":`${i} API key location`,className:g,value:a.in,onChange:y=>u({...a,in:y.target.value}),children:[o.jsx("option",{value:"header",children:"Header"}),o.jsx("option",{value:"query",children:"Query"})]})]})]})},Ks=[{label:"get",kind:"method",signature:"get(key: string): string | undefined",documentation:"Read a variable by key."},{label:"has",kind:"method",signature:"has(key: string): boolean",documentation:"Check whether a variable is defined."},{label:"set",kind:"method",signature:"set(key: string, value: unknown): void",documentation:"Set a variable. Collection and environment stores persist the change in the workspace."},{label:"unset",kind:"method",signature:"unset(key: string): void",documentation:"Remove a variable by key."},{label:"replaceIn",kind:"method",signature:"replaceIn(value: string): string",documentation:"Replace {{variable}} placeholders using this variable scope."}],S0={flex:[{label:"request",kind:"property",documentation:"The mutable request draft available to pre-request and test scripts."},{label:"response",kind:"property",documentation:"The response from the executed request.",testsOnly:!0},{label:"environment",kind:"property",documentation:"Read and mutate variables in the active environment."},{label:"collection",kind:"property",documentation:"Read and mutate variables on the current collection."},{label:"variables",kind:"property",documentation:"Read and mutate the effective variables for this execution."},{label:"expect",kind:"function",signature:"expect(actual: unknown): FlexExpectation",documentation:"Create an assertion chain for a value."},{label:"test",kind:"function",signature:"test(name: string, callback: () => unknown | Promise<unknown>): void",documentation:"Register a post-response test.",testsOnly:!0}],"flex.request":[{label:"method",kind:"property",signature:"method: string",documentation:"Read or replace the HTTP method."},{label:"url",kind:"property",signature:"url: string",documentation:"Read or replace the request URL before variable resolution."},{label:"headers",kind:"property",documentation:"Mutable request-header helpers."},{label:"body",kind:"property",documentation:"Mutable raw request-body helpers."}],"flex.request.headers":[{label:"get",kind:"method",signature:"get(name: string): string | undefined",documentation:"Read a request header case-insensitively."},{label:"has",kind:"method",signature:"has(name: string): boolean",documentation:"Check whether a request header exists."},{label:"set",kind:"method",signature:"set(name: string, value: unknown): void",documentation:"Set or replace a request header."},{label:"upsert",kind:"method",signature:"upsert({ key, value }: { key: string; value: unknown }): void",documentation:"Set or replace a request header from a key/value object."},{label:"remove",kind:"method",signature:"remove(name: string): void",documentation:"Remove a request header case-insensitively."},{label:"toObject",kind:"method",signature:"toObject(): Record<string, string>",documentation:"Return enabled request headers as an object."}],"flex.request.body":[{label:"raw",kind:"property",signature:"raw: string",documentation:"Read or replace the raw request body."}],"flex.response":[{label:"code",kind:"property",signature:"code: number",documentation:"HTTP response status code.",testsOnly:!0},{label:"status",kind:"property",signature:"status: string",documentation:"HTTP response status text.",testsOnly:!0},{label:"responseTime",kind:"property",signature:"responseTime: number",documentation:"Measured response time in milliseconds.",testsOnly:!0},{label:"headers",kind:"property",documentation:"Read-only response-header helpers.",testsOnly:!0},{label:"text",kind:"method",signature:"text(): string",documentation:"Return the response body as text.",testsOnly:!0},{label:"json",kind:"method",signature:"json(): unknown",documentation:"Parse and return the response body as JSON.",testsOnly:!0}],"flex.response.headers":[{label:"get",kind:"method",signature:"get(name: string): string | undefined",documentation:"Read a response header case-insensitively.",testsOnly:!0},{label:"has",kind:"method",signature:"has(name: string): boolean",documentation:"Check whether a response header exists.",testsOnly:!0},{label:"toObject",kind:"method",signature:"toObject(): Record<string, string>",documentation:"Return response headers as an object.",testsOnly:!0}],"flex.environment":Ks,"flex.collection":Ks,"flex.variables":Ks.map(a=>({...a,documentation:a.label==="set"||a.label==="unset"?`${a.documentation} Local effective-variable changes apply only to the current request execution.`:a.documentation})),"flex.expect.to":[{label:"equal",kind:"method",signature:"equal(expected: unknown): void",documentation:"Assert strict equality with Object.is."},{label:"eql",kind:"method",signature:"eql(expected: unknown): void",documentation:"Assert deep structural equality."},{label:"include",kind:"method",signature:"include(expected: unknown): void",documentation:"Assert that a string or array contains the expected value."},{label:"match",kind:"method",signature:"match(pattern: RegExp): void",documentation:"Assert that a string matches a regular expression."},{label:"have",kind:"property",documentation:"Property assertions."},{label:"be",kind:"property",documentation:"Boolean, range, and membership assertions."}],"flex.expect.to.have":[{label:"property",kind:"method",signature:"property(name: string, expected?: unknown): void",documentation:"Assert that an object has a property, optionally with an expected value."}],"flex.expect.to.be":[{label:"above",kind:"method",signature:"above(expected: number): void",documentation:"Assert that a number is greater than expected."},{label:"below",kind:"method",signature:"below(expected: number): void",documentation:"Assert that a number is less than expected."},{label:"oneOf",kind:"method",signature:"oneOf(expected: unknown[]): void",documentation:"Assert deep equality with one value from a list."},{label:"ok",kind:"property",signature:"ok: true",documentation:"Assert that the value is truthy."},{label:"true",kind:"property",signature:"true: true",documentation:"Assert that the value is exactly true."},{label:"false",kind:"property",signature:"false: true",documentation:"Assert that the value is exactly false."}],console:[{label:"log",kind:"method",signature:"log(...values: unknown[]): void",documentation:"Write a line to the API Client script console."},{label:"info",kind:"method",signature:"info(...values: unknown[]): void",documentation:"Write an informational line to the API Client script console."},{label:"warn",kind:"method",signature:"warn(...values: unknown[]): void",documentation:"Write a warning line to the API Client script console."},{label:"error",kind:"method",signature:"error(...values: unknown[]): void",documentation:"Write an error line to the API Client script console."}]};function of(a,i){return[...S0[a]||[]].filter(c=>i==="tests"||!c.testsOnly).map(c=>({...c}))}function A0(a,i,c={}){const u=i.toLowerCase();return[...new Set(c[a]||[])].filter(Boolean).filter(f=>f.toLowerCase().startsWith(u)).sort((f,p)=>f.localeCompare(p)).map(f=>({label:f,kind:"variable",signature:f,documentation:`Known ${a==="variables"?"effective":a} variable.`}))}const j0=[{label:"flex",kind:"namespace",documentation:"FlexDoc request, response, variables, assertions, and test scripting API."},{label:"console",kind:"namespace",documentation:"Captured script console with log, info, warn, and error methods."}];function N0(a){const i=a.lastIndexOf("flex.expect(");if(i<0)return null;const c=a.slice(i),u=[[/\.to\.have\.([A-Za-z_$][\w$]*)?$/,"flex.expect.to.have"],[/\.to\.be\.([A-Za-z_$][\w$]*)?$/,"flex.expect.to.be"],[/\.to\.([A-Za-z_$][\w$]*)?$/,"flex.expect.to"]];for(const[f,p]of u){const g=c.match(f);if(g)return{path:p,prefix:g[1]||""}}return null}function w0(a){const i=a.match(/flex\.(environment|collection|variables)\.(?:get|has|set|unset)\(\s*['"]([^'"]*)$/);return i?{scope:i[1],prefix:i[2]||""}:null}function T0(a){const i=a.match(/(?:^|[^\w$])((?:flex|console)(?:\.[A-Za-z_$][\w$]*)*)\.([A-Za-z_$][\w$]*)?$/);return i?{path:i[1],prefix:i[2]||""}:null}function E0(a,i,c,u={},f=!1){const p=Math.max(0,Math.min(i,a.length)),g=a.slice(0,p),y=w0(g);if(y){const C=A0(y.scope,y.prefix,u);return C.length>0?{from:p-y.prefix.length,to:p,items:C}:null}const x=N0(g);if(x){const C=of(x.path,c).filter(M=>M.label.toLowerCase().startsWith(x.prefix.toLowerCase()));return C.length>0?{from:p-x.prefix.length,to:p,items:C}:null}const h=T0(g);if(h){const C=of(h.path,c).filter(M=>M.label.toLowerCase().startsWith(h.prefix.toLowerCase()));return C.length>0?{from:p-h.prefix.length,to:p,items:C}:null}const S=g.match(/([A-Za-z_$][\w$]*)$/)?.[1]||"";if(!f&&!S)return null;const A=j0.filter(C=>!S||C.label.startsWith(S));return!f&&A.length===0?null:A.length>0?{from:p-S.length,to:p,items:A.map(C=>({...C}))}:null}const cf=({ariaLabel:a,value:i,onChange:c,phase:u,theme:f="light",variableKeys:p={}})=>{const g=le.useRef(null),[y,x]=le.useState(null),[h,S]=le.useState(0),A=le.useMemo(()=>`api-client-script-completions-${a.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`,[a]),C=f==="dark",M=(N,j,R=!1)=>{const Y=E0(N,j,u,p,R);x(Y),S(0)},k=N=>{if(!y)return;const j=`${i.slice(0,y.from)}${N.label}${i.slice(y.to)}`,R=y.from+N.label.length;c(j),x(null),requestAnimationFrame(()=>{const Y=g.current;Y&&(Y.focus(),Y.setSelectionRange(R,R))})},G=N=>{const j=N.currentTarget;if((N.ctrlKey||N.metaKey)&&N.code==="Space"){N.preventDefault(),M(i,j.selectionStart,!0);return}if(!(!y||y.items.length===0)){if(N.key==="ArrowDown"){N.preventDefault(),S(R=>(R+1)%y.items.length);return}if(N.key==="ArrowUp"){N.preventDefault(),S(R=>(R-1+y.items.length)%y.items.length);return}if(N.key==="Enter"||N.key==="Tab"){N.preventDefault(),k(y.items[h]);return}N.key==="Escape"&&(N.preventDefault(),x(null))}},U=y?.items[h],I=C?"w-full min-h-40 max-h-96 resize-y rounded-md border border-gray-700 bg-gray-900 px-3 py-2 font-mono text-xs text-gray-100 outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-400":"w-full min-h-40 max-h-96 resize-y rounded-md border border-gray-300 bg-white px-3 py-2 font-mono text-xs text-gray-900 outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600",_=C?"absolute z-50 mt-1 w-full overflow-hidden rounded-md border border-gray-700 bg-gray-900 text-gray-100 shadow-xl":"absolute z-50 mt-1 w-full overflow-hidden rounded-md border border-gray-200 bg-white text-gray-900 shadow-xl";return o.jsxs("div",{className:"relative",children:[o.jsx("textarea",{ref:g,"aria-label":a,"aria-autocomplete":"list","aria-controls":y?A:void 0,"aria-expanded":!!y,"aria-activedescendant":y?`${A}-${h}`:void 0,className:I,"data-api-client-script-phase":u,"data-testid":`${a}-editor`,onBlur:()=>x(null),onChange:N=>{const j=N.target.value,R=N.target.selectionStart;c(j),M(j,R)},onKeyDown:G,spellCheck:!1,value:i}),y&&y.items.length>0&&o.jsxs("div",{className:_,children:[o.jsx("div",{id:A,role:"listbox",className:"max-h-52 overflow-y-auto py-1",children:y.items.map((N,j)=>o.jsxs("button",{"aria-selected":j===h,className:`flex w-full items-baseline gap-2 px-3 py-1.5 text-left text-xs ${j===h?C?"bg-blue-700 text-white":"bg-blue-50 text-gray-900":C?"hover:bg-gray-800":"hover:bg-gray-50"}`,id:`${A}-${j}`,onMouseDown:R=>{R.preventDefault(),k(N)},role:"option",type:"button",children:[o.jsx("span",{className:"font-mono font-semibold",children:N.label}),o.jsx("span",{className:`truncate ${j===h&&C?"text-blue-100":C?"text-gray-400":"text-gray-500"}`,children:N.signature||N.kind})]},`${N.kind}-${N.label}`))}),U&&o.jsxs("div",{className:`border-t px-3 py-2 text-[11px] ${C?"border-gray-700 text-gray-300":"border-gray-200 text-gray-600"}`,children:[U.signature&&o.jsx("div",{className:"mb-1 font-mono text-xs",children:U.signature}),o.jsx("div",{children:U.documentation})]})]}),o.jsxs("div",{className:`mt-1 text-[11px] ${C?"text-gray-400":"text-gray-500"}`,children:["IntelliSense: type ",o.jsx("code",{children:"flex."})," or press Ctrl+Space. Use ↑/↓ and Enter or Tab to complete. Known variable names are suggested inside variable helpers."]})]})};function uf(a){return(a||[]).filter(i=>i.enabled!==!1&&i.key.trim()!=="")}function C0(a,i){if(!i.length)return a;const c=a.indexOf("#"),u=c>=0?a.slice(0,c):a,f=c>=0?a.slice(c):"",p=i.map(({key:y,value:x})=>`${encodeURIComponent(y)}=${encodeURIComponent(x)}`).join("&"),g=u.includes("?")?u.endsWith("?")||u.endsWith("&")?"":"&":"?";return`${u}${g}${p}${f}`}function _0(a){const i=a.indexOf("#"),c=i>=0?a.slice(0,i):a,u=i>=0?a.slice(i):"",f=c.indexOf("?");if(f<0)return{url:a,query:[]};const p=[];return new URLSearchParams(c.slice(f+1)).forEach((y,x)=>p.push({key:x,value:y})),{url:`${c.slice(0,f)}${u}`,query:p}}function df(a,i){return a.find(([c])=>c.toLowerCase()===i.toLowerCase())?.[1]}function Gr(a,i,c){for(let u=a.length-1;u>=0;u-=1)a[u][0].toLowerCase()===i.toLowerCase()&&a.splice(u,1);a.push([i,c])}function O0(a){const i={};for(const[c,u]of a)i[c]=u;return i}function k0(a){const i=a.headerEntries;if(!Array.isArray(i))return Object.entries(a.headers||{});const c=[];for(const u of i){if(Array.isArray(u)&&u.length>=2){c.push([String(u[0]),String(u[1])]);continue}if(u&&typeof u=="object"&&"key"in u&&"value"in u){const f=u;f.enabled!==!1&&c.push([String(f.key),String(f.value)])}}return c.length||i.length===0?c:Object.entries(a.headers||{})}function R0(a){if(typeof globalThis.btoa=="function"){if(typeof TextEncoder>"u")throw new Error("Basic auth requires UTF-8 encoding support.");const c=new TextEncoder().encode(a);let u="";for(const f of c)u+=String.fromCharCode(f);return globalThis.btoa(u)}const i=globalThis.Buffer;if(i?.from)return i.from(a,"utf8").toString("base64");throw new Error("Basic auth requires a Base64 encoder in this runtime.")}function yt(a,i){return a===void 0||a===""?a:a.replace(/\{\{\s*([^{}]+?)\s*\}\}/g,(c,u)=>{const f=u.trim();return Object.prototype.hasOwnProperty.call(i,f)?i[f]:c})}function q0(a,i){if(!a||a.type==="none"||a.type==="inherit")return a;if(a.type==="bearer")return{type:"bearer",token:yt(a.token,i)||""};if(a.type==="oauth2"){const c={...a,accessToken:yt(a.accessToken,i)||""};return a.authorizationUrl!==void 0&&(c.authorizationUrl=yt(a.authorizationUrl,i)),a.tokenUrl!==void 0&&(c.tokenUrl=yt(a.tokenUrl,i)),a.clientId!==void 0&&(c.clientId=yt(a.clientId,i)),a.clientSecret!==void 0&&(c.clientSecret=yt(a.clientSecret,i)),a.redirectUri!==void 0&&(c.redirectUri=yt(a.redirectUri,i)),a.scopes!==void 0&&(c.scopes=a.scopes.map(u=>yt(u,i)||"")),a.username!==void 0&&(c.username=yt(a.username,i)),a.password!==void 0&&(c.password=yt(a.password,i)),a.refreshToken!==void 0&&(c.refreshToken=yt(a.refreshToken,i)),c}return a.type==="basic"?{type:"basic",username:yt(a.username,i)||"",password:yt(a.password,i)||""}:{type:"apiKey",key:yt(a.key,i)||"",value:yt(a.value,i)||"",in:a.in}}function M0(a,i){return{method:yt(a.method,i)??a.method,url:yt(a.url,i)??a.url,query:a.query?.map(c=>({...c,key:yt(c.key,i)||"",value:yt(c.value,i)||""})),headers:a.headers?.map(c=>({...c,key:yt(c.key,i)||"",value:yt(c.value,i)||""})),body:yt(a.body,i),contentType:yt(a.contentType,i),auth:q0(a.auth,i)}}function z0(a,i,c){const u=a.auth;if(!(!u||u.type==="none"||u.type==="inherit")){if(u.type==="bearer"){u.token&&Gr(i,"Authorization",`Bearer ${u.token}`);return}if(u.type==="oauth2"){u.accessToken&&Gr(i,"Authorization",`Bearer ${u.accessToken}`);return}if(u.type==="basic"){(u.username||u.password)&&Gr(i,"Authorization",`Basic ${R0(`${u.username}:${u.password}`)}`);return}u.key&&(u.in==="query"?c.push({key:u.key,value:u.value}):Gr(i,u.key,u.value))}}function $0(a,i={}){const c=i.variables?M0(a,i.variables):a,u=(c.method||"GET").trim().toUpperCase(),f=c.url.trim();if(!f)throw new Error("Request URL is required.");const p=uf(c.query),g=uf(c.headers).map(({key:C,value:M})=>[C,M]);z0(c,g,p);let y,x,h;if(c.body&&!["GET","HEAD"].includes(u)){y=c.body,h=c.body;const C=df(g,"Content-Type"),M=c.contentType?.trim();!C&&M&&g.push(["Content-Type",M]);const k=C||M;x=k?.includes("json")?"json":k==="application/x-www-form-urlencoded"?"form":k?.startsWith("multipart/form-data")?"multipart":"text"}const S=O0(g);return{url:C0(f,p),method:u,headers:S,headerEntries:g,body:y,bodyKind:x,init:{method:u,headers:g,body:h}}}function D0(a){const i=k0(a),c=_0(a.url);return{method:a.method,url:c.url,query:c.query,headers:i.map(([u,f])=>({key:u,value:f})),body:a.body,contentType:df(i,"Content-Type"),auth:{type:"none"}}}function ff(a,i={}){return $0(a,i)}function U0(a){return D0(a)}function pf(a){const i=a.auth?a.auth.type==="oauth2"?{...a.auth,scopes:a.auth.scopes?[...a.auth.scopes]:void 0}:{...a.auth}:void 0;return{...a,query:a.query?.map(c=>({...c})),headers:a.headers?.map(c=>({...c})),auth:i}}function Ir(a){return Object.assign(Object.create(null),a||{})}function H0(a){return a instanceof Error?a.message:"Request failed"}async function mf(a){const i=pf(a.request),c=sn(a.scripts),u=a.fetcher||globalThis.fetch,f=a.now||Date.now;let p=pf(a.request),g=Ir(a.variables),y=Ir(a.collectionVariables);const x=Ir(a.externalVariables);let h=Ir(a.environmentVariables),S=[],A=[],C,M="",k="",G=0,U=!1;try{if(c.preRequest.trim()){const xe=await Bd({script:c.preRequest,phase:"pre-request",draft:p,variables:g,collectionVariables:y,externalVariables:x,environmentVariables:h});if(p=xe.draft,g=xe.variables,y=xe.collectionVariables,h=xe.environmentVariables,S=[...S,...xe.logs],xe.collectionChanges.length>0&&a.onCollectionChanges?.(xe.collectionChanges),xe.environmentChanges.length>0&&a.onEnvironmentChanges?.(xe.environmentChanges),xe.error)return{scriptTests:A,scriptLogs:S,scriptError:`Pre-request script: ${xe.error}`}}a.resolveAuth&&(p={...p,auth:a.resolveAuth(p.auth)});const I=ff(p,{variables:g});M=I.method,k=I.url,a.onRequestBuilt?.(I);let _={...I.init,url:I.url,credentials:a.credentials||"same-origin",...a.signal?{signal:a.signal}:{}};a.requestInterceptor&&(_=await a.requestInterceptor(_)),a.signal&&(_.signal=a.signal);const{url:N,...j}=_;if(k=N,G=f(),U=!0,!u)throw new Error("Fetch API is not available");const R=await u(N,j),Y=await R.text(),D=f()-G,X=[...R.headers.entries()];if(c.tests.trim()){const xe=await Bd({script:c.tests,phase:"tests",draft:p,variables:g,collectionVariables:y,externalVariables:x,environmentVariables:h,response:{status:R.status,statusText:R.statusText,headers:X,body:Y,responseTime:D}});S=[...S,...xe.logs],A=xe.tests.map(ge=>({...ge})),xe.collectionChanges.length>0&&a.onCollectionChanges?.(xe.collectionChanges),xe.environmentChanges.length>0&&a.onEnvironmentChanges?.(xe.environmentChanges),xe.error&&(C=`Test script: ${xe.error}`)}return{result:{request:i,scripts:c,executedMethod:M,resolvedUrl:k,status:R.status,statusText:R.statusText,responseTime:D,responseHeaders:X.map(([xe,ge])=>[xe,ge]),responseBody:Y,...A.length?{scriptTests:A}:{},...S.length?{scriptLogs:[...S]}:{},...C?{scriptError:C}:{}},response:{status:R.status,statusText:R.statusText,headers:X,body:Y,responseTime:D},scriptTests:A,scriptLogs:S,...C?{scriptError:C}:{}}}catch(I){const _=H0(I),N={error:_,scriptTests:A,scriptLogs:S};return U&&(N.result={request:i,scripts:c,executedMethod:M,resolvedUrl:k,responseTime:G?f()-G:void 0,error:_,...S.length?{scriptLogs:[...S]}:{}}),N}}function Js(a){let i=a.url;for(const[c,u]of Object.entries(a.variables||{}))i=i.split(`{${c}}`).join(u.default);return i}function Ws(a){return a.replace(/\/+$/,"")}function hf(a,i){const c=Ws(i);return c?a===c||a.startsWith(`${c}/`)||a.startsWith(`${c}?`):!1}function L0(a,i,c){const u=Ws(c);if(!u)return a;const f=Ws(i);if(f&&hf(a,f))return`${u}${a.slice(f.length)}`;try{const p=new URL(a),g=`${p.pathname==="/"?"":p.pathname}${p.search}${p.hash}`;return`${u}${g}`}catch{return u}}const Ps=()=>({key:"",value:"",enabled:!0});function B0(a){return{method:a?.method||"GET",url:a?.url||"",query:a?.query?.length?a.query:[Ps()],headers:a?.headers?.length?a.headers:[Ps()],body:a?.body||"",contentType:a?.contentType||"application/json",auth:a?.auth||{type:"none"}}}function Y0(a){const i=a.auth?a.auth.type==="oauth2"?{...a.auth,scopes:a.auth.scopes?[...a.auth.scopes]:void 0}:{...a.auth}:void 0;return{...a,query:a.query?.map(c=>({...c})),headers:a.headers?.map(c=>({...c})),auth:i}}function G0(a){try{return new URL(a).origin}catch{return""}}function yf({label:a,entries:i,onChange:c,inputClass:u}){const f=(p,g)=>c(i.map((y,x)=>x===p?{...y,...g}:y));return o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-sm font-medium",children:a}),o.jsxs("button",{type:"button",className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-md border px-3 py-2 text-sm",onClick:()=>c([...i,Ps()]),children:[o.jsx(Ba,{className:"h-4 w-4"})," Add"]})]}),i.map((p,g)=>o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{"aria-label":`${a} ${g+1} enabled`,type:"checkbox",checked:p.enabled!==!1,onChange:y=>f(g,{enabled:y.target.checked})}),o.jsx("input",{"aria-label":`${a} ${g+1} key`,className:`w-full rounded-md border px-3 py-2 text-sm ${u}`,placeholder:"Key",value:p.key,onChange:y=>f(g,{key:y.target.value})}),o.jsx("input",{"aria-label":`${a} ${g+1} value`,className:`w-full rounded-md border px-3 py-2 text-sm ${u}`,placeholder:"Value",value:p.value,onChange:y=>f(g,{value:y.target.value})}),o.jsx("button",{type:"button","aria-label":`Remove ${a.toLowerCase()} ${g+1}`,className:"inline-flex min-h-11 items-center justify-center rounded-md border px-3 py-2",onClick:()=>c(i.filter((y,x)=>x!==g)),children:o.jsx(Cn,{className:"h-4 w-4"})})]},g))]})}const I0=({initialRequest:a,initialScripts:i,theme:c="light",credentials:u="same-origin",requestInterceptor:f,onRequestChange:p,onDraftChange:g,onScriptsChange:y,onExecutionStart:x,onExecutionComplete:h,resolveAuth:S,variables:A={},collectionVariables:C={},externalVariables:M={},environmentVariables:k={},onCollectionChanges:G,onEnvironmentChanges:U,serverOptions:I=[],initialServerUrl:_})=>{const N=B0(a),j=sn(i),R=I.map(se=>({server:se,url:Js(se)})),Y=R.map(se=>se.url),D=_||Y.find(se=>hf(N.url,se))||"",X=Y.includes(D)?D:Y[0]||"",me=D&&!Y.includes(D)?D:"",xe=D||X||G0(N.url),[ge,Ee]=le.useState(N),[He,he]=le.useState(j),[ke,T]=le.useState(X),[ne,W]=le.useState(me),K=le.useRef(xe),P=le.useRef(xe),[w,$]=le.useState(null),[ce,pe]=le.useState(null),[ve,Te]=le.useState(null),[Re,Ve]=le.useState([]),[Ie,Be]=le.useState([]),[Z,be]=le.useState(!1),Se=le.useRef(p),Ne=le.useRef(g),Je=le.useRef(y),at=le.useRef(null);le.useEffect(()=>{Se.current=p},[p]),le.useEffect(()=>{Ne.current=g},[g]),le.useEffect(()=>{Je.current=y},[y]),le.useEffect(()=>{Ne.current?.(Y0(ge))},[ge]),le.useEffect(()=>{Je.current?.(sn(He))},[He]),le.useEffect(()=>{try{const se=S?{...ge,auth:S(ge.auth)}:ge,Ae=ff(se,{variables:A}),De=JSON.stringify([Ae.method,Ae.url,Ae.headerEntries,Ae.body,Ae.bodyKind]);if(De===at.current)return;at.current=De,Se.current?.(Ae)}catch{}},[ge,S,A]);const ft=(ge.method||"GET").toUpperCase(),dt=c==="dark"?"bg-gray-900 border-gray-700 text-gray-100":"bg-white border-gray-300 text-gray-900",un=c==="dark"?"border-gray-700 bg-gray-800/60 text-gray-100":"border-gray-200 bg-gray-50 text-gray-900",Yt=c==="dark"?"text-gray-400":"text-gray-600",It=se=>{if(!se)return;const Ae=K.current;K.current=se,Ee(De=>({...De,url:L0(De.url,Ae,se)}))},kn=se=>{const Ae=se==="inherit"?{type:"inherit"}:se==="bearer"?{type:se,token:""}:se==="oauth2"?{type:se,accessToken:""}:se==="basic"?{type:se,username:"",password:""}:se==="apiKey"?{type:se,key:"",value:"",in:"header"}:{type:"none"};Ee(De=>({...De,auth:Ae}))},Rn=async()=>{x?.(),be(!0),pe(null),Te(null),Ve([]),Be([]),$(null);try{const se=await mf({request:ge,scripts:He,credentials:u,requestInterceptor:f,resolveAuth:S,variables:A,collectionVariables:C,externalVariables:M,environmentVariables:k,onRequestBuilt:Ae=>Se.current?.(Ae),onCollectionChanges:G,onEnvironmentChanges:U});pe(se.error||null),Te(se.scriptError||null),Ve(se.scriptTests),Be(se.scriptLogs),se.response&&$({status:se.response.status,statusText:se.response.statusText,headers:se.response.headers.map(([Ae,De])=>`${Ae}: ${De}`).join(`
49
- `),body:se.response.body}),se.result&&h?.(se.result)}finally{be(!1)}},_e=Re.filter(se=>se.passed).length;return o.jsx("div",{className:`rounded-xl border p-4 md:p-5 ${un}`,children:o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[I.length>0&&o.jsxs("label",{className:"text-sm font-medium",children:["Server",o.jsx("select",{"aria-label":"API Client server",className:`mt-1 w-full rounded-md border px-3 py-2 text-sm ${dt}`,value:ke,onChange:se=>{T(se.target.value),W(""),It(se.target.value)},children:R.map(({server:se,url:Ae})=>o.jsxs("option",{value:Ae,children:[se.description?`${se.description} — `:"",se.url]},`${se.url}:${Ae}`))})]}),o.jsxs("label",{className:"text-sm font-medium",children:["Custom server URL ",o.jsx("span",{className:"text-xs font-normal opacity-70",children:"(optional override)"}),o.jsx("input",{"aria-label":"API Client custom server URL",className:`mt-1 w-full rounded-md border px-3 py-2 font-mono text-sm ${dt}`,value:ne,onChange:se=>{const Ae=se.target.value;W(Ae);const De=ke||P.current;(Ae.trim()||De)&&It(Ae.trim()||De)},placeholder:"http://localhost:8080"})]})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("select",{"aria-label":"HTTP method",className:`rounded-md border px-3 py-2 font-medium ${dt}`,value:ft,onChange:se=>{const Ae=se.target.value;Ee(De=>({...De,method:Ae}))},children:["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"].map(se=>o.jsx("option",{children:se},se))}),o.jsx("input",{"aria-label":"Request URL",className:`w-full rounded-md border px-3 py-2 font-mono text-sm ${dt}`,placeholder:"https://api.example.com/resource or {{baseUrl}}/resource",value:ge.url,onChange:se=>{const Ae=se.target.value;Ee(De=>({...De,url:Ae}))}})]}),o.jsx(yf,{label:"Query parameters",entries:ge.query||[],onChange:se=>Ee(Ae=>({...Ae,query:se})),inputClass:dt}),o.jsx(yf,{label:"Headers",entries:ge.headers||[],onChange:se=>Ee(Ae=>({...Ae,headers:se})),inputClass:dt}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("label",{className:"text-sm font-medium",children:["Authorization",o.jsxs("select",{"aria-label":"Authorization type",className:`rounded-md border px-3 py-2 text-sm ${dt}`,value:ge.auth?.type||"none",onChange:se=>kn(se.target.value),children:[S&&o.jsx("option",{value:"inherit",children:"Inherit from parent"}),o.jsx("option",{value:"none",children:"None"}),o.jsx("option",{value:"bearer",children:"Bearer token"}),o.jsx("option",{value:"oauth2",children:"OAuth 2.0 access token"}),o.jsx("option",{value:"basic",children:"Basic auth"}),o.jsx("option",{value:"apiKey",children:"API key"})]})]}),ge.auth?.type==="bearer"&&o.jsx("input",{"aria-label":"Bearer token",type:"password",autoComplete:"off",className:`w-full rounded-md border px-3 py-2 ${dt}`,value:ge.auth.token,onChange:se=>{const Ae=se.target.value;Ee(De=>({...De,auth:{type:"bearer",token:Ae}}))}}),ge.auth?.type==="oauth2"&&o.jsx(rf,{auth:ge.auth,fieldClass:`w-full rounded-md border px-3 py-2 text-sm ${dt}`,label:"",onChange:se=>Ee(Ae=>({...Ae,auth:se}))}),ge.auth?.type==="basic"&&o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{"aria-label":"Basic auth username",className:`w-full rounded-md border px-3 py-2 ${dt}`,placeholder:"Username",value:ge.auth.username,onChange:se=>{const Ae=se.target.value;Ee(De=>({...De,auth:{...De.auth,type:"basic",username:Ae}}))}}),o.jsx("input",{"aria-label":"Basic auth password",type:"password",autoComplete:"off",className:`w-full rounded-md border px-3 py-2 ${dt}`,placeholder:"Password",value:ge.auth.password,onChange:se=>{const Ae=se.target.value;Ee(De=>({...De,auth:{...De.auth,type:"basic",password:Ae}}))}})]}),ge.auth?.type==="apiKey"&&o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{"aria-label":"API key name",className:`w-full rounded-md border px-3 py-2 ${dt}`,placeholder:"Key name",value:ge.auth.key,onChange:se=>{const Ae=se.target.value;Ee(De=>({...De,auth:{...De.auth,type:"apiKey",key:Ae}}))}}),o.jsx("input",{"aria-label":"API key value",type:"password",autoComplete:"off",className:`w-full rounded-md border px-3 py-2 ${dt}`,placeholder:"Value",value:ge.auth.value,onChange:se=>{const Ae=se.target.value;Ee(De=>({...De,auth:{...De.auth,type:"apiKey",value:Ae}}))}}),o.jsxs("select",{"aria-label":"API key location",className:`rounded-md border px-3 py-2 text-sm ${dt}`,value:ge.auth.in,onChange:se=>{const Ae=se.target.value;Ee(De=>({...De,auth:{...De.auth,type:"apiKey",in:Ae}}))},children:[o.jsx("option",{value:"header",children:"Header"}),o.jsx("option",{value:"query",children:"Query"})]})]})]}),!["GET","HEAD"].includes(ft)&&o.jsxs("div",{className:"space-y-3",children:[o.jsxs("label",{className:"text-sm font-medium",children:["Content type",o.jsx("input",{"aria-label":"Content type",className:`w-full rounded-md border px-3 py-2 ${dt}`,value:ge.contentType||"",onChange:se=>{const Ae=se.target.value;Ee(De=>({...De,contentType:Ae}))}})]}),o.jsxs("label",{className:"text-sm font-medium",children:["Request body",o.jsx("textarea",{"aria-label":"Request body",rows:8,className:`w-full rounded-md border px-3 py-2 font-mono text-sm ${dt}`,value:ge.body||"",onChange:se=>{const Ae=se.target.value;Ee(De=>({...De,body:Ae}))}})]})]}),o.jsxs("section",{className:"space-y-3 border-t pt-4","aria-labelledby":"api-client-scripts-heading",children:[o.jsxs("div",{children:[o.jsx("h3",{id:"api-client-scripts-heading",className:"font-semibold",children:"Scripts"}),o.jsx("p",{className:`text-xs ${Yt}`,children:"Trusted local JavaScript. Scripts are not sandboxed; only run code you trust."})]}),o.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[o.jsxs("label",{className:"text-sm font-medium",children:["Pre-request script",o.jsx("div",{className:"mt-1",children:o.jsx(cf,{ariaLabel:"Pre-request script",phase:"pre-request",theme:c,value:He.preRequest,onChange:se=>he(Ae=>({...Ae,preRequest:se})),variableKeys:{environment:Object.keys(k),collection:Object.keys(C),variables:Object.keys(A)}})})]}),o.jsxs("label",{className:"text-sm font-medium",children:["Tests",o.jsx("div",{className:"mt-1",children:o.jsx(cf,{ariaLabel:"Tests script",phase:"tests",theme:c,value:He.tests,onChange:se=>he(Ae=>({...Ae,tests:se})),variableKeys:{environment:Object.keys(k),collection:Object.keys(C),variables:Object.keys(A)}})})]})]})]}),o.jsxs("button",{onClick:Rn,disabled:Z,className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-md bg-blue-600 px-4 py-2 font-medium text-white hover:bg-blue-700 disabled:opacity-60",children:[Z?o.jsx(xs,{className:"h-4 w-4 animate-spin"}):o.jsx(Jl,{className:"h-4 w-4"})," ",Z?"Sending…":"Send request"]}),ce&&o.jsxs("div",{role:"alert",className:"flex gap-2 rounded-md border border-red-300 bg-red-50 p-3 text-sm text-red-700",children:[o.jsx($r,{className:"mt-0.5 h-4 w-4 shrink-0"}),ce]}),ve&&o.jsxs("div",{role:"alert",className:"flex gap-2 rounded-md border border-amber-300 bg-amber-50 p-3 text-sm text-amber-800",children:[o.jsx($r,{className:"mt-0.5 h-4 w-4 shrink-0"}),ve]}),w&&o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"font-semibold",children:["Response ",o.jsxs("span",{className:w.status>=400?"text-red-600":"text-green-600",children:[w.status," ",w.statusText]})]}),w.headers&&o.jsx(On,{code:w.headers,language:"text",title:"Headers",theme:c,wrap:!0}),o.jsx(On,{code:w.body||"(empty response)",language:"json",title:"Body",theme:c,wrap:!0})]}),Re.length>0&&o.jsxs("section",{className:"space-y-2","aria-labelledby":"api-client-test-results-heading",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h3",{id:"api-client-test-results-heading",className:"font-semibold",children:"Test results"}),o.jsxs("span",{className:`text-xs ${Yt}`,children:[_e,"/",Re.length," passed"]})]}),o.jsx("div",{className:"space-y-2",children:Re.map((se,Ae)=>o.jsxs("div",{className:`rounded-md border px-3 py-2 text-sm ${se.passed?"border-green-300 bg-green-50 text-green-800":"border-red-300 bg-red-50 text-red-800"}`,children:[o.jsxs("div",{className:"font-medium",children:[se.passed?"PASS":"FAIL"," — ",se.name]}),se.error&&o.jsx("div",{className:"mt-1 text-xs",children:se.error})]},`${se.name}:${Ae}`))})]}),Ie.length>0&&o.jsx(On,{code:Ie.join(`
50
- `),language:"text",title:"Script console",theme:c,wrap:!0})]})})};function F0(a,i,c){if(!c)return null;const u=a.folders.find(g=>g.id===c&&g.collectionId===i);if(!u)return new Set;const f=new Set([u.id]);let p=!0;for(;p;){p=!1;for(const g of a.folders)g.collectionId!==i||!g.parentFolderId||f.has(g.id)||f.has(g.parentFolderId)&&(f.add(g.id),p=!0)}return f}function Fr(a,i,c){const u=F0(a,i,c);return a.requests.filter(f=>f.collectionId!==i?!1:u?!!f.folderId&&u.has(f.folderId):!0)}function V0(a,i){const c=new Map(a.map(g=>[g.id,g])),u=[],f=new Set;let p=c.get(i);for(;p&&!f.has(p.id);)f.add(p.id),u.unshift(p.name),p=p.parentFolderId?c.get(p.parentFolderId):void 0;return u.join(" / ")}function gf(a,i,c){const u=a.collections.find(p=>p.id===i)?.name||"Deleted collection";if(!c)return u;const f=V0(a.folders.filter(p=>p.collectionId===i),c);return f?`${u} / ${f}`:`${u} / Deleted folder`}function X0(a){return!a.error&&!a.scriptError&&a.scriptTests.every(i=>i.passed)}async function Z0(a){const i=Fr(a.workspace,a.collectionId,a.folderId),c=a.runId||Ht("run"),u=a.runName||gf(a.workspace,a.collectionId,a.folderId);let f=a.workspace;const p=[];let g=a.signal?.aborted===!0;for(let S=0;S<i.length&&!g;S+=1){if(a.signal?.aborted){g=!0;break}const A=i[S];a.onRequestStart?.(A,S,i.length);const C=Jd(f,a.collectionId),M=Wd(f),k={...a.externalEnvironmentVariables||{},...M},G={...C,...a.externalVariables||{},...k},U=await mf({request:A.request,scripts:A.scripts,credentials:a.credentials,requestInterceptor:a.requestInterceptor,resolveAuth:R=>Kd(f,A.collectionId,A.folderId,R||{type:"none"}),variables:G,collectionVariables:C,externalVariables:a.externalVariables,environmentVariables:k,signal:a.signal,fetcher:a.fetcher,now:a.now,onCollectionChanges:R=>{f=ef(f,A.collectionId,R),a.onCollectionChanges?.(R)},onEnvironmentChanges:R=>{f=Pd(f,R),a.onEnvironmentChanges?.(R)}}),I=a.signal?.aborted===!0,_=!I&&X0(U);let N;U.result&&!I&&(f=Qd(f,{...U.result,collectionId:A.collectionId,folderId:A.folderId,runId:c,runName:u,runIndex:S+1,runTotal:i.length,runPassed:_}),N=f.history[0]?.id);const j={requestId:A.id,requestName:A.name,collectionId:A.collectionId,folderId:A.folderId,passed:_,cancelled:I,historyEntryId:N,outcome:U};if(p.push(j),a.onRequestComplete?.(j,S,i.length),I){g=!0;break}if(!j.passed&&a.stopOnFailure&&S<i.length-1){g=!0;break}}const y=p.filter(S=>S.passed).length,x=p.filter(S=>S.cancelled).length,h=p.filter(S=>!S.passed&&!S.cancelled).length;return{runId:c,runName:u,collectionId:a.collectionId,folderId:a.folderId,total:i.length,completed:p.length,passed:y,failed:h,cancelled:x,stopped:g,items:p,workspace:f}}function il(){return new Date().toISOString()}const Q0=({request:a,scripts:i,onLoadRequest:c,onSelectedCollectionChange:u,onSelectedFolderChange:f,onRunCollection:p,onRunFolder:g,selectedCollectionId:y,selectedFolderId:x="",workspace:h,onWorkspaceChange:S,theme:A})=>{const[C,M]=le.useState(""),[k,G]=le.useState(""),[U,I]=le.useState(""),[_,N]=le.useState(null),j=h.collections.find(Z=>Z.id===y)||h.collections[0],R=le.useMemo(()=>h.folders.filter(Z=>Z.collectionId===j?.id),[j?.id,h.folders]),Y=le.useMemo(()=>h.requests.filter(Z=>Z.collectionId===j?.id),[j?.id,h.requests]),D=R.find(Z=>Z.id===x),X=le.useMemo(()=>new Map(R.map(Z=>[Z.id,Z])),[R]),me=le.useMemo(()=>{const Z=[],be=new Set,Se=(Ne,Je)=>{R.filter(at=>at.parentFolderId===Ne).forEach(at=>{be.has(at.id)||(be.add(at.id),Z.push({folder:at,depth:Je}),Se(at.id,Je+1))})};return Se(void 0,0),R.forEach(Ne=>{be.has(Ne.id)||(be.add(Ne.id),Z.push({folder:Ne,depth:0}),Se(Ne.id,1))}),Z},[R]),xe=Z=>{const be=[],Se=new Set;let Ne=X.get(Z);for(;Ne&&!Se.has(Ne.id);)Se.add(Ne.id),be.unshift(Ne.name),Ne=Ne.parentFolderId?X.get(Ne.parentFolderId):void 0;return be.join(" / ")};le.useEffect(()=>{u?.(j?.id)},[u,j?.id]);const ge=()=>{const Z=C.trim();if(!Z)return;const be=il(),Se=Ht("collection");S(Ne=>({...Ne,collections:[...Ne.collections,{id:Se,name:Z,auth:{type:"none"},variables:[],createdAt:be,updatedAt:be}]})),u?.(Se),f?.(""),M(""),N(null)},Ee=Z=>{if(!j)return;const be=il();S(Se=>({...Se,collections:Se.collections.map(Ne=>Ne.id===j.id?{...Ne,auth:Z,updatedAt:be}:Ne)}))},He=Z=>{if(!D)return;const be=il();S(Se=>({...Se,folders:Se.folders.map(Ne=>Ne.id===D.id?{...Ne,auth:Z,updatedAt:be}:Ne)}))},he=()=>{if(!j)return;const Z=il();S(be=>({...be,collections:be.collections.map(Se=>Se.id===j.id?{...Se,variables:[...Se.variables,{id:Ht("variable"),key:"",value:"",enabled:!0}],updatedAt:Z}:Se)}))},ke=(Z,be)=>{if(!j)return;const Se=il();S(Ne=>({...Ne,collections:Ne.collections.map(Je=>Je.id===j.id?{...Je,variables:Je.variables.map(at=>at.id===Z?{...at,...be}:at),updatedAt:Se}:Je)}))},T=Z=>{if(!j)return;const be=il();S(Se=>({...Se,collections:Se.collections.map(Ne=>Ne.id===j.id?{...Ne,variables:Ne.variables.filter(Je=>Je.id!==Z),updatedAt:be}:Ne)}))},ne=()=>{const Z=k.trim();if(!Z||!j)return;const be=il(),Se=Ht("folder");S(Ne=>({...Ne,folders:[...Ne.folders,{id:Se,collectionId:j.id,parentFolderId:x||void 0,name:Z,auth:{type:"inherit"},createdAt:be,updatedAt:be}]})),f?.(Se),G("")},W=()=>{if(!j)return;const Z=U.trim()||a.url||"Untitled request",be=il();if(_){S(Ne=>({...Ne,requests:Ne.requests.map(Je=>Je.id===_?{...Je,collectionId:j.id,folderId:x||void 0,name:Z,request:Dn(a),scripts:sn(i),updatedAt:be}:Je)}));return}const Se={id:Ht("request"),collectionId:j.id,folderId:x||void 0,name:Z,request:Dn(a),scripts:sn(i),createdAt:be,updatedAt:be};S(Ne=>({...Ne,requests:[...Ne.requests,Se]})),N(Se.id),I(Z)},K=Z=>{const be=h.requests.find(Se=>Se.id===Z);be&&(N(be.id),u?.(be.collectionId),f?.(be.folderId||""),I(be.name),c(Dn(be.request),be.scripts?sn(be.scripts):void 0,be.collectionId,be.folderId))},P=Z=>{S(be=>({...be,requests:be.requests.filter(Se=>Se.id!==Z)})),_===Z&&(N(null),I(""))},w=Z=>{const be=h.folders.find(Se=>Se.id===Z);S(Se=>s0(Se,Z)),x===Z&&f?.(be?.parentFolderId||"")},$=Z=>{const be=o0(h,Z);S(be),y===Z&&(u?.(be.collections[0]?.id||""),f?.(""),N(null),I(""))},ce=A==="dark"?"bg-gray-900 border-gray-700 text-gray-100":"bg-white border-gray-300 text-gray-900",pe=A==="dark"?"text-gray-400":"text-gray-500",ve=A==="dark"?"bg-blue-500/10 text-blue-300":"bg-blue-500/10 text-blue-700",Te=Z=>o.jsxs("div",{className:`group flex items-center gap-1 rounded-md ${_===Z.id?"bg-blue-500/10":""}`,children:[o.jsxs("button",{type:"button",className:"min-w-0 flex-1 rounded-md px-2 py-2 text-left text-sm hover:bg-blue-500/10","aria-label":`Load saved request ${Z.name}`,onClick:()=>K(Z.id),children:[o.jsx("span",{className:"mr-2 font-mono text-xs font-semibold text-blue-600",children:Z.request.method.toUpperCase()}),o.jsx("span",{className:"truncate",children:Z.name})]}),o.jsx("button",{type:"button",className:"rounded-md p-2 opacity-70 hover:opacity-100","aria-label":`Delete saved request ${Z.name}`,onClick:()=>P(Z.id),children:o.jsx(Cn,{className:"h-4 w-4"})})]},Z.id),Re=(Z,be,Se=new Set)=>{if(Se.has(Z.id))return null;const Ne=new Set(Se);Ne.add(Z.id);const Je=xe(Z.id),at=R.filter(ft=>ft.parentFolderId===Z.id);return o.jsxs(ms.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("button",{type:"button","aria-label":`Select folder ${Je}`,className:`min-w-0 flex-1 rounded-md py-2 pr-2 text-left text-sm ${x===Z.id?"bg-blue-500/10":""}`,style:{paddingLeft:`${8+be*16}px`},onClick:()=>f?.(Z.id),children:Z.name}),o.jsx("button",{type:"button",disabled:Fr(h,Z.collectionId,Z.id).length===0,"aria-label":`Run folder ${Je}`,className:"rounded-md p-2 opacity-70 hover:opacity-100 disabled:cursor-not-allowed disabled:opacity-30",onClick:()=>g?.(Z.collectionId,Z.id),children:o.jsx(Jl,{className:"h-4 w-4"})}),o.jsx("button",{type:"button","aria-label":`Delete folder ${Je}`,className:"rounded-md p-2 opacity-70 hover:opacity-100",onClick:()=>w(Z.id),children:o.jsx(Cn,{className:"h-4 w-4"})})]}),at.map(ft=>Re(ft,be+1,Ne))]},Z.id)},Ve=(Z,be,Se=new Set)=>{if(Se.has(Z.id))return null;const Ne=new Set(Se);Ne.add(Z.id);const Je=Y.filter(ft=>ft.folderId===Z.id),at=R.filter(ft=>ft.parentFolderId===Z.id);return Je.length===0&&at.length===0?null:o.jsxs("div",{className:"space-y-1",children:[Je.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:`mb-1 text-xs font-semibold uppercase tracking-wide ${pe}`,style:{paddingLeft:`${8+be*12}px`},children:Z.name}),o.jsx("div",{style:{paddingLeft:`${be*12}px`},children:Je.map(Te)})]}),at.map(ft=>Ve(ft,be+1,Ne))]},Z.id)},Ie=R.filter(Z=>!Z.parentFolderId),Be=x?xe(x):"";return o.jsxs("section",{className:"space-y-4","aria-labelledby":"api-client-collections-heading",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Wy,{className:"h-4 w-4"}),o.jsx("h3",{id:"api-client-collections-heading",className:"font-semibold",children:"Collections"})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{"aria-label":"New collection name",className:`min-w-0 flex-1 rounded-md border px-2 py-2 text-sm ${ce}`,value:C,onChange:Z=>M(Z.target.value),placeholder:"New collection"}),o.jsx("button",{type:"button","aria-label":"Add collection",className:"rounded-md border px-3 py-2",onClick:ge,children:o.jsx(Ba,{className:"h-4 w-4"})})]}),o.jsx("div",{className:"space-y-2",children:h.collections.map(Z=>o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("button",{type:"button",className:`min-w-0 flex-1 rounded-md px-2 py-2 text-left text-sm font-medium ${Z.id===j?.id?ve:""}`,onClick:()=>{u?.(Z.id),f?.(""),N(null),I("")},children:Z.name}),o.jsx("button",{type:"button",disabled:Fr(h,Z.id).length===0,"aria-label":`Run collection ${Z.name}`,className:"rounded-md p-2 opacity-70 hover:opacity-100 disabled:cursor-not-allowed disabled:opacity-30",onClick:()=>p?.(Z.id),children:o.jsx(Jl,{className:"h-4 w-4"})}),h.collections.length>1&&o.jsx("button",{type:"button","aria-label":`Delete collection ${Z.name}`,className:"rounded-md p-2 opacity-70 hover:opacity-100",onClick:()=>$(Z.id),children:o.jsx(Cn,{className:"h-4 w-4"})})]},Z.id))}),j&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"space-y-2 border-t pt-3",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide",children:"Collection authorization"}),o.jsx(sf,{auth:j.auth,label:"Collection",onChange:Ee,theme:A}),o.jsx("p",{className:`text-xs ${pe}`,children:"Requests set to inherit use the nearest folder override, then this collection authorization."})]}),o.jsxs("div",{className:"space-y-2 border-t pt-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide",children:"Collection variables"}),o.jsxs("button",{type:"button","aria-label":"Add collection variable",className:"inline-flex items-center gap-1 rounded-md border px-2 py-1 text-xs",onClick:he,children:[o.jsx(Ba,{className:"h-3.5 w-3.5"})," Add"]})]}),o.jsxs("div",{className:"space-y-2",children:[j.variables.map((Z,be)=>o.jsxs("div",{className:"grid grid-cols-[auto_minmax(0,1fr)_minmax(0,1fr)_auto] items-center gap-1",children:[o.jsx("input",{"aria-label":`Collection variable ${be+1} enabled`,type:"checkbox",checked:Z.enabled!==!1,onChange:Se=>ke(Z.id,{enabled:Se.target.checked})}),o.jsx("input",{"aria-label":`Collection variable ${be+1} key`,className:`min-w-0 rounded-md border px-2 py-1.5 font-mono text-xs ${ce}`,placeholder:"baseUrl",value:Z.key,onChange:Se=>ke(Z.id,{key:Se.target.value})}),o.jsx("input",{"aria-label":`Collection variable ${be+1} value`,className:`min-w-0 rounded-md border px-2 py-1.5 font-mono text-xs ${ce}`,placeholder:"https://api.example.com",value:Z.value,onChange:Se=>ke(Z.id,{value:Se.target.value})}),o.jsx("button",{type:"button","aria-label":`Remove collection variable ${be+1}`,className:"rounded-md p-1.5 opacity-70 hover:opacity-100",onClick:()=>T(Z.id),children:o.jsx(Cn,{className:"h-3.5 w-3.5"})})]},Z.id)),j.variables.length===0&&o.jsxs("p",{className:`text-xs ${pe}`,children:["Collection variables provide reusable defaults such as ",o.jsx("code",{children:"{{baseUrl}}"}),". Active environment values override matching collection keys."]})]})]}),o.jsxs("div",{className:"space-y-1 border-t pt-3",children:[o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{"aria-label":"New folder name",className:`min-w-0 flex-1 rounded-md border px-2 py-2 text-sm ${ce}`,value:k,onChange:Z=>G(Z.target.value),placeholder:"Folder"}),o.jsx("button",{type:"button","aria-label":"Add folder",className:"rounded-md border px-3 py-2",onClick:ne,children:o.jsx(Ky,{className:"h-4 w-4"})})]}),o.jsx("p",{className:`text-xs ${pe}`,children:Be?`New folders are created inside ${Be}.`:"New folders are created at the collection root."})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("button",{type:"button","aria-label":"Select collection root",className:`w-full rounded-md px-2 py-2 text-left text-sm ${x===""?"bg-blue-500/10":""}`,onClick:()=>f?.(""),children:"Unfiled / collection root"}),Ie.map(Z=>Re(Z,0))]}),D&&o.jsxs("div",{className:"space-y-2 border-t pt-3",children:[o.jsxs("div",{className:"text-xs font-semibold uppercase tracking-wide",children:["Folder authorization — ",Be]}),o.jsx(sf,{auth:D.auth,label:"Folder",allowInherit:!0,onChange:He,theme:A})]}),o.jsxs("div",{className:"space-y-2 border-t pt-3",children:[o.jsx("input",{"aria-label":"Saved request name",className:`w-full rounded-md border px-2 py-2 text-sm ${ce}`,value:U,onChange:Z=>I(Z.target.value),placeholder:"Request name"}),o.jsxs("select",{"aria-label":"Saved request folder",className:`w-full rounded-md border px-2 py-2 text-sm ${ce}`,value:x,onChange:Z=>f?.(Z.target.value),children:[o.jsx("option",{value:"",children:"Unfiled"}),me.map(({folder:Z,depth:be})=>o.jsx("option",{value:Z.id,children:`${"— ".repeat(be)}${Z.name}`},Z.id))]}),o.jsxs("button",{type:"button",className:"inline-flex w-full items-center justify-center gap-2 rounded-md border px-3 py-2 text-sm font-medium",onClick:W,children:[o.jsx(lg,{className:"h-4 w-4"})," ",_?"Update request":"Save request"]})]}),o.jsxs("div",{className:"space-y-3 border-t pt-3",children:[Y.filter(Z=>!Z.folderId).map(Te),Ie.map(Z=>Ve(Z,0)),Y.length===0&&o.jsx("p",{className:`px-2 text-xs ${pe}`,children:"Save the current request to build a reusable collection."})]})]})]})};function Va(){return new Date().toISOString()}const K0=({workspace:a,onWorkspaceChange:i,theme:c})=>{const[u,f]=le.useState(""),p=a.environments.find(M=>M.id===a.activeEnvironmentId),g=c==="dark"?"bg-gray-900 border-gray-700 text-gray-100":"bg-white border-gray-300 text-gray-900",y=c==="dark"?"text-gray-400":"text-gray-500",x=()=>{const M=u.trim();if(!M)return;const k=Va(),G=Ht("environment");i(U=>({...U,environments:[...U.environments,{id:G,name:M,variables:[],createdAt:k,updatedAt:k}],activeEnvironmentId:G})),f("")},h=M=>{if(!p)return;const k=Va();i(G=>({...G,environments:G.environments.map(U=>U.id===p.id?{...U,name:M,updatedAt:k}:U)}))},S=()=>{if(!p)return;const M=Va();i(k=>({...k,environments:k.environments.map(G=>G.id===p.id?{...G,variables:[...G.variables,{id:Ht("variable"),key:"",value:"",enabled:!0}],updatedAt:M}:G)}))},A=(M,k)=>{if(!p)return;const G=Va();i(U=>({...U,environments:U.environments.map(I=>I.id===p.id?{...I,variables:I.variables.map(_=>_.id===M?{..._,...k}:_),updatedAt:G}:I)}))},C=M=>{if(!p)return;const k=Va();i(G=>({...G,environments:G.environments.map(U=>U.id===p.id?{...U,variables:U.variables.filter(I=>I.id!==M),updatedAt:k}:U)}))};return o.jsxs("section",{className:"space-y-3","aria-labelledby":"api-client-environment-heading",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("h3",{id:"api-client-environment-heading",className:"font-semibold",children:"Environment"}),p&&o.jsx("button",{type:"button","aria-label":`Delete environment ${p.name}`,className:"rounded-md p-2 opacity-70 hover:opacity-100",onClick:()=>i(M=>i0(M,p.id)),children:o.jsx(Cn,{className:"h-4 w-4"})})]}),o.jsxs("select",{"aria-label":"Active environment",className:`w-full rounded-md border px-2 py-2 text-sm ${g}`,value:a.activeEnvironmentId||"",onChange:M=>i(k=>({...k,activeEnvironmentId:M.target.value||void 0})),children:[o.jsx("option",{value:"",children:"No environment"}),a.environments.map(M=>o.jsx("option",{value:M.id,children:M.name},M.id))]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{"aria-label":"New environment name",className:`min-w-0 flex-1 rounded-md border px-2 py-2 text-sm ${g}`,value:u,onChange:M=>f(M.target.value),placeholder:"New environment"}),o.jsx("button",{type:"button","aria-label":"Add environment",className:"rounded-md border px-3 py-2",onClick:x,children:o.jsx(Ba,{className:"h-4 w-4"})})]}),p&&o.jsxs("div",{className:"space-y-3",children:[o.jsx("input",{"aria-label":"Environment name",className:`w-full rounded-md border px-2 py-2 text-sm font-medium ${g}`,value:p.name,onChange:M=>h(M.target.value)}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide",children:"Variables"}),o.jsxs("button",{type:"button","aria-label":"Add environment variable",className:"inline-flex items-center gap-1 rounded-md border px-2 py-1 text-xs",onClick:S,children:[o.jsx(Ba,{className:"h-3.5 w-3.5"})," Add"]})]}),o.jsxs("div",{className:"space-y-2",children:[p.variables.map((M,k)=>o.jsxs("div",{className:"grid grid-cols-[auto_minmax(0,1fr)_minmax(0,1fr)_auto] items-center gap-1",children:[o.jsx("input",{"aria-label":`Environment variable ${k+1} enabled`,type:"checkbox",checked:M.enabled!==!1,onChange:G=>A(M.id,{enabled:G.target.checked})}),o.jsx("input",{"aria-label":`Environment variable ${k+1} key`,className:`min-w-0 rounded-md border px-2 py-1.5 font-mono text-xs ${g}`,placeholder:"baseUrl",value:M.key,onChange:G=>A(M.id,{key:G.target.value})}),o.jsx("input",{"aria-label":`Environment variable ${k+1} value`,className:`min-w-0 rounded-md border px-2 py-1.5 font-mono text-xs ${g}`,placeholder:"https://api.example.com",value:M.value,onChange:G=>A(M.id,{value:G.target.value})}),o.jsx("button",{type:"button","aria-label":`Remove environment variable ${k+1}`,className:"rounded-md p-1.5 opacity-70 hover:opacity-100",onClick:()=>C(M.id),children:o.jsx(Cn,{className:"h-3.5 w-3.5"})})]},M.id)),p.variables.length===0&&o.jsxs("p",{className:`text-xs ${y}`,children:["Add variables such as ",o.jsx("code",{children:"{{baseUrl}}"})," or ",o.jsx("code",{children:"{{token}}"}),"."]})]})]})]})};function J0(a){const i=new Date(a);return Number.isNaN(i.getTime())?a:i.toLocaleString()}const W0=({workspace:a,onWorkspaceChange:i,onLoadRequest:c,onViewAll:u,theme:f})=>{const p=f==="dark"?"text-gray-400":"text-gray-500",g=x=>{const h=a.history.find(S=>S.id===x);h&&c(Dn(h.request),h.scripts?sn(h.scripts):void 0,h.collectionId,h.folderId)},y=x=>{i(h=>({...h,history:h.history.filter(S=>S.id!==x)}))};return o.jsxs("section",{className:"space-y-3","aria-labelledby":"api-client-history-heading",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(hs,{className:"h-4 w-4"}),o.jsx("h3",{id:"api-client-history-heading",className:"font-semibold",children:"Recent history"})]}),a.history.length>0&&u&&o.jsx("button",{type:"button",className:`text-xs underline underline-offset-2 ${p}`,onClick:u,children:"View all"})]}),o.jsxs("div",{className:"space-y-1",children:[a.history.slice(0,5).map(x=>{const h=x.status!==void 0?`${x.status}${x.statusText?` ${x.statusText}`:""}`:x.error?"Error":"Sent",S=x.responseTime!==void 0?` · ${x.responseTime} ms`:"",A=x.scriptTests?.filter(M=>M.passed).length||0,C=x.scriptTests?.length?`${A}/${x.scriptTests.length} tests passed`:x.scriptError?"Script error":void 0;return o.jsxs("div",{className:"group flex items-start gap-1 rounded-md",children:[o.jsxs("button",{type:"button",className:"min-w-0 flex-1 rounded-md px-2 py-2 text-left hover:bg-blue-500/10","aria-label":`Load history request ${x.executedMethod.toUpperCase()} ${x.resolvedUrl}`,onClick:()=>g(x.id),children:[o.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[o.jsx("span",{className:"font-mono font-semibold text-blue-600",children:x.executedMethod.toUpperCase()}),o.jsxs("span",{className:x.error?"text-red-600":p,children:[h,S]})]}),o.jsx("div",{className:"truncate font-mono text-xs",title:x.resolvedUrl,children:x.resolvedUrl}),C&&o.jsx("div",{className:`mt-1 text-[11px] ${x.scriptError?"text-red-600":p}`,children:C}),o.jsx("div",{className:`mt-1 text-[11px] ${p}`,children:J0(x.createdAt)})]}),o.jsx("button",{type:"button",className:"rounded-md p-2 opacity-70 hover:opacity-100","aria-label":`Delete history request ${x.executedMethod.toUpperCase()} ${x.resolvedUrl}`,onClick:()=>y(x.id),children:o.jsx(Cn,{className:"h-4 w-4"})})]},x.id)}),a.history.length===0&&o.jsx("p",{className:`px-2 text-xs ${p}`,children:"Sent requests appear here for quick replay."})]}),a.history.length>0&&u&&o.jsxs("button",{type:"button",className:"w-full rounded-md border px-3 py-2 text-xs font-medium hover:bg-blue-500/10",onClick:u,children:["Open full history · ",a.history.length]})]})};function P0(a){return!!a.error||!!a.scriptError||a.status!==void 0&&a.status>=400||!!a.scriptTests?.some(i=>!i.passed)}function ex(a,i){const c=i.query.trim().toLowerCase();return a.history.filter(u=>{const f=u.collectionId?a.collections.find(S=>S.id===u.collectionId)?.name||"Deleted collection":"",p=u.folderId?a.folders.find(S=>S.id===u.folderId)?.name||"Deleted folder":"",g=!c||[u.executedMethod,u.resolvedUrl,u.status,u.statusText,f,p,u.runName].filter(S=>S!==void 0).some(S=>String(S).toLowerCase().includes(c)),y=i.method==="all"||u.executedMethod.toUpperCase()===i.method,x=P0(u),h=i.outcome==="all"||i.outcome==="success"&&!x||i.outcome==="failed"&&x||i.outcome==="tests"&&!!u.scriptTests?.length;return g&&y&&h})}function tx(a){const i=new Set,c=[];for(const u of a){if(!u.runId){c.push({kind:"entry",entry:u});continue}if(i.has(u.runId))continue;i.add(u.runId);const f=a.filter(g=>g.runId===u.runId).sort((g,y)=>(g.runIndex||Number.MAX_SAFE_INTEGER)-(y.runIndex||Number.MAX_SAFE_INTEGER)),p=Math.max(f.length,...f.map(g=>g.runTotal||0));c.push({kind:"run",group:{runId:u.runId,runName:u.runName||"Collection run",entries:f,total:p,captured:f.length,passed:f.filter(g=>g.runPassed===!0).length,failed:f.filter(g=>g.runPassed===!1).length,cancelled:0}})}return c}function xf(a){const i=new Date(a);return Number.isNaN(i.getTime())?a:i.toLocaleString()}function eo(a){return!!a.error||!!a.scriptError||a.status!==void 0&&a.status>=400||!!a.scriptTests?.some(i=>!i.passed)}function to(a){return a.error?"Request failed":a.status!==void 0?`${a.status}${a.statusText?` ${a.statusText}`:""}`:"Sent"}function nx(a){return(a||[]).filter(i=>i.enabled!==!1&&(i.key.trim()||i.value.trim()))}function bf({title:a,values:i,mutedClass:c}){const u=nx(i);return u.length===0?null:o.jsxs("section",{className:"space-y-2",children:[o.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide",children:a}),o.jsx("div",{className:"overflow-hidden rounded-md border",children:u.map((f,p)=>o.jsxs("div",{className:"grid grid-cols-[minmax(8rem,0.35fr)_minmax(0,1fr)] gap-3 border-b px-3 py-2 text-xs last:border-b-0",children:[o.jsx("span",{className:"break-all font-mono font-medium",children:f.key||"—"}),o.jsx("span",{className:`break-all font-mono ${c}`,children:f.value})]},`${f.key}:${p}`))})]})}function vf(a){const i=[`${a.passed} runner passed`,`${a.failed} runner failed`];return a.cancelled&&i.push(`${a.cancelled} cancelled`),i.join(" · ")}const lx=({workspace:a,onWorkspaceChange:i,onLoadRequest:c,onBack:u,theme:f,initialEntryId:p,initialRunId:g})=>{const[y,x]=le.useState(""),[h,S]=le.useState("all"),[A,C]=le.useState("all"),[M,k]=le.useState(g?void 0:p||a.history[0]?.id),[G,U]=le.useState(g),I=f==="dark"?"border-gray-700 bg-gray-900 text-gray-100":"border-gray-300 bg-white text-gray-900",_=f==="dark"?"border-gray-700 bg-gray-800/60 text-gray-100":"border-gray-200 bg-gray-50 text-gray-900",N=f==="dark"?"text-gray-400":"text-gray-500",j=f==="dark"?"border-gray-700 bg-gray-950 text-gray-100":"border-gray-200 bg-white text-gray-900",R=le.useMemo(()=>ex(a,{query:y,method:h,outcome:A}),[h,A,y,a]),Y=le.useMemo(()=>tx(R),[R]),D=G&&Y.find(K=>K.kind==="run"&&K.group.runId===G)?.kind==="run"?Y.find(K=>K.kind==="run"&&K.group.runId===G).group:void 0,X=D?void 0:R.find(K=>K.id===M)||R[0],me=X?.collectionId?a.collections.find(K=>K.id===X.collectionId):void 0,xe=X?.folderId?a.folders.find(K=>K.id===X.folderId):void 0,ge=()=>{k(void 0),U(void 0)},Ee=K=>{k(K),U(void 0)},He=K=>{U(K),k(void 0)},he=K=>{c(Dn(K.request),K.scripts?sn(K.scripts):void 0,K.collectionId,K.folderId),u()},ke=K=>{i(P=>({...P,history:P.history.filter(w=>w.id!==K)})),M===K&&k(void 0)},T=()=>{i(K=>({...K,history:[]})),ge()},ne=X?.responseHeaders||[],W=X?.scriptTests?.filter(K=>K.passed).length||0;return o.jsx("section",{className:`rounded-xl border p-4 md:p-5 ${_}`,"aria-labelledby":"api-client-history-page-heading",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("header",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center gap-2 rounded-md border px-3 py-2 text-sm",onClick:u,children:[o.jsx(ku,{className:"h-4 w-4"})," Client"]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(hs,{className:"h-5 w-5"}),o.jsx("h2",{id:"api-client-history-page-heading",className:"text-lg font-semibold",children:"Request history"})]}),o.jsxs("p",{className:`text-xs ${N}`,children:[a.history.length," persisted request",a.history.length===1?"":"s"," · newest first"]})]})]}),a.history.length>0&&o.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center gap-2 self-start rounded-md border px-3 py-2 text-sm text-red-600",onClick:T,children:[o.jsx(Cn,{className:"h-4 w-4"})," Clear history"]})]}),o.jsxs("div",{className:"grid gap-2 md:grid-cols-[minmax(0,1fr)_10rem_12rem]",children:[o.jsxs("label",{className:"relative",children:[o.jsx("span",{className:"sr-only",children:"Search history"}),o.jsx(zu,{className:`pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 ${N}`}),o.jsx("input",{"aria-label":"Search history",className:`w-full rounded-md border py-2 pl-9 pr-3 text-sm ${I}`,value:y,onChange:K=>{x(K.target.value),ge()},placeholder:"Search URL, status, collection or run…"})]}),o.jsxs("select",{"aria-label":"History method filter",className:`rounded-md border px-3 py-2 text-sm ${I}`,value:h,onChange:K=>{S(K.target.value),ge()},children:[o.jsx("option",{value:"all",children:"All methods"}),["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"].map(K=>o.jsx("option",{value:K,children:K},K))]}),o.jsxs("select",{"aria-label":"History outcome filter",className:`rounded-md border px-3 py-2 text-sm ${I}`,value:A,onChange:K=>{C(K.target.value),ge()},children:[o.jsx("option",{value:"all",children:"All outcomes"}),o.jsx("option",{value:"success",children:"Successful HTTP"}),o.jsx("option",{value:"failed",children:"HTTP / script failures"}),o.jsx("option",{value:"tests",children:"With tests"})]})]}),o.jsxs("div",{className:"grid min-h-[32rem] gap-4 lg:grid-cols-[minmax(18rem,0.85fr)_minmax(0,1.35fr)]",children:[o.jsxs("div",{className:"max-h-[48rem] space-y-2 overflow-auto rounded-lg border p-2",children:[Y.map(K=>{if(K.kind==="entry"){const $=K.entry,ce=X?.id===$.id,pe=eo($),ve=$.collectionId?a.collections.find(Te=>Te.id===$.collectionId)?.name||"Deleted collection":void 0;return o.jsxs("button",{type:"button",className:`w-full rounded-md border px-3 py-3 text-left transition ${ce?"border-blue-500 bg-blue-500/10":"border-transparent hover:bg-blue-500/5"}`,onClick:()=>Ee($.id),children:[o.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs",children:[o.jsx("span",{className:"font-mono font-semibold text-blue-600",children:$.executedMethod.toUpperCase()}),o.jsxs("span",{className:pe?"text-red-600":N,children:[to($),$.responseTime!==void 0?` · ${$.responseTime} ms`:""]})]}),o.jsx("div",{className:"mt-1 truncate font-mono text-xs",title:$.resolvedUrl,children:$.resolvedUrl}),o.jsxs("div",{className:`mt-1 flex items-center justify-between gap-2 text-[11px] ${N}`,children:[o.jsx("span",{className:"truncate",children:ve||"Unsaved request"}),o.jsx("span",{children:xf($.createdAt)})]})]},$.id)}const P=K.group,w=D?.runId===P.runId;return o.jsxs("div",{className:`rounded-lg border ${w?"border-blue-500 bg-blue-500/5":""}`,children:[o.jsxs("button",{type:"button","aria-label":`Open collection run ${P.runName}`,className:"w-full px-3 py-3 text-left",onClick:()=>He(P.runId),children:[o.jsx("div",{className:"text-xs font-semibold text-blue-600",children:"Collection run"}),o.jsx("div",{className:"mt-1 truncate text-sm font-medium",children:P.runName}),o.jsxs("div",{className:`mt-1 text-[11px] ${N}`,children:[P.captured,"/",P.total," history entries · ",vf(P)]})]}),o.jsx("div",{className:"border-t px-2 py-1",children:P.entries.map($=>o.jsxs("button",{type:"button",className:`w-full rounded-md px-2 py-2 text-left text-xs hover:bg-blue-500/10 ${X?.id===$.id?"bg-blue-500/10":""}`,onClick:()=>Ee($.id),children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsxs("span",{children:[o.jsx("span",{className:"mr-2 text-[10px] text-gray-500",children:$.runIndex||"–"}),o.jsx("span",{className:"font-mono font-semibold text-blue-600",children:$.executedMethod.toUpperCase()})]}),o.jsx("span",{className:eo($)?"text-red-600":N,children:to($)})]}),o.jsx("div",{className:"mt-1 truncate font-mono",title:$.resolvedUrl,children:$.resolvedUrl})]},$.id))})]},P.runId)}),R.length===0&&o.jsx("div",{className:`px-3 py-8 text-center text-sm ${N}`,children:a.history.length===0?"Send a request to start building history.":"No history entries match these filters."})]}),o.jsxs("div",{className:"min-w-0 rounded-lg border p-4",children:[D&&o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"border-b pb-4",children:[o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-blue-600",children:"Collection run"}),o.jsx("h3",{className:"mt-1 text-lg font-semibold",children:D.runName}),o.jsxs("p",{className:`mt-1 text-sm ${N}`,children:[D.captured," / ",D.total," history entries captured · ",vf(D)]}),o.jsx("p",{className:`mt-2 text-xs ${N}`,children:"Runner pass/fail is based on transport, scripts, and tests. An HTTP 4xx/5xx can therefore be a runner pass while still appearing as an HTTP failure in the request inspector."})]}),o.jsx("div",{className:"space-y-2",children:D.entries.map(K=>o.jsxs("button",{type:"button","aria-label":`Inspect history ${K.runIndex||""}`,className:"w-full rounded-md border px-3 py-3 text-left hover:bg-blue-500/5",onClick:()=>Ee(K.id),children:[o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-sm",children:[o.jsxs("span",{children:[o.jsx("span",{className:`mr-2 text-xs ${N}`,children:K.runIndex||"–"}),o.jsx("span",{className:"font-mono font-bold text-blue-600",children:K.executedMethod.toUpperCase()})]}),o.jsxs("span",{className:K.runPassed===!1?"text-red-600":K.runPassed===!0?"text-green-600":N,children:[K.runPassed===!0?"Runner pass":K.runPassed===!1?"Runner fail":"Recorded",K.status!==void 0?` · HTTP ${K.status}`:""]})]}),o.jsx("div",{className:"mt-1 truncate font-mono text-xs",children:K.resolvedUrl})]},K.id))})]}),!D&&!X&&o.jsx("div",{className:`flex min-h-[20rem] items-center justify-center text-sm ${N}`,children:"Select a history entry or collection run to inspect it."}),X&&o.jsxs("div",{className:"space-y-5",children:[o.jsxs("div",{className:"space-y-2 border-b pb-4",children:[o.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[o.jsx("span",{className:"font-mono font-bold text-blue-600",children:X.executedMethod.toUpperCase()}),o.jsx("span",{className:eo(X)?"text-red-600":N,children:to(X)}),X.responseTime!==void 0&&o.jsxs("span",{className:N,children:[X.responseTime," ms"]}),X.runPassed!==void 0&&o.jsx("span",{className:X.runPassed?"text-green-600":"text-red-600",children:X.runPassed?"Runner pass":"Runner fail"})]}),o.jsx("div",{className:"mt-1 break-all font-mono text-sm",children:X.resolvedUrl}),o.jsxs("div",{className:`mt-1 text-xs ${N}`,children:[xf(X.createdAt),X.collectionId?` · ${me?.name||"Deleted collection"}`:"",X.folderId?` / ${xe?.name||"Deleted folder"}`:"",X.runName?` · Run: ${X.runName}`:""]})]}),o.jsxs("div",{className:"flex shrink-0 gap-2",children:[o.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center gap-2 rounded-md border px-3 py-2 text-sm font-medium hover:bg-blue-500/10",onClick:()=>he(X),children:[o.jsx(ng,{className:"h-4 w-4"})," Open in client"]}),o.jsx("button",{type:"button","aria-label":"Delete selected history entry",className:"inline-flex min-h-10 items-center rounded-md border px-3 py-2 text-red-600",onClick:()=>ke(X.id),children:o.jsx(Cn,{className:"h-4 w-4"})})]})]}),X.error&&o.jsx("div",{className:"rounded-md border border-red-300 bg-red-500/10 px-3 py-2 text-sm text-red-700",children:X.error})]}),o.jsxs("section",{className:"space-y-3",children:[o.jsx("h3",{className:"font-semibold",children:"Request"}),o.jsxs("div",{className:"grid gap-3 text-xs sm:grid-cols-2",children:[o.jsxs("div",{children:[o.jsx("span",{className:N,children:"Original URL"}),o.jsx("div",{className:"mt-1 break-all font-mono",children:X.request.url})]}),o.jsxs("div",{children:[o.jsx("span",{className:N,children:"Content type"}),o.jsx("div",{className:"mt-1 font-mono",children:X.request.contentType||"—"})]})]}),o.jsx(bf,{title:"Query parameters",values:X.request.query,mutedClass:N}),o.jsx(bf,{title:"Headers",values:X.request.headers,mutedClass:N}),X.request.body&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide",children:"Body"}),o.jsx("pre",{className:`max-h-72 overflow-auto whitespace-pre-wrap break-words rounded-md border p-3 text-xs ${j}`,children:X.request.body})]})]}),o.jsxs("section",{className:"space-y-3 border-t pt-4",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("h3",{className:"font-semibold",children:"Response"}),X.responseBodyTruncated&&o.jsx("span",{className:"text-xs text-amber-600",children:"Body truncated in history"})]}),ne.length>0&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide",children:"Headers"}),o.jsx("div",{className:"overflow-hidden rounded-md border",children:ne.map(([K,P],w)=>o.jsxs("div",{className:"grid grid-cols-[minmax(8rem,0.35fr)_minmax(0,1fr)] gap-3 border-b px-3 py-2 text-xs last:border-b-0",children:[o.jsx("span",{className:"break-all font-mono font-medium",children:K}),o.jsx("span",{className:`break-all font-mono ${N}`,children:P})]},`${K}:${w}`))})]}),X.responseBody!==void 0?o.jsxs("div",{className:"space-y-2",children:[o.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide",children:"Body"}),o.jsx("pre",{className:`max-h-96 overflow-auto whitespace-pre-wrap break-words rounded-md border p-3 text-xs ${j}`,children:X.responseBody||"(empty response body)"})]}):o.jsx("p",{className:`text-sm ${N}`,children:"Response payload was not captured for this older history entry."})]}),(X.scriptTests?.length||X.scriptError||X.scriptLogs?.length)&&o.jsxs("section",{className:"space-y-3 border-t pt-4",children:[o.jsx("h3",{className:"font-semibold",children:"Tests & console"}),X.scriptTests?.length?o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:`text-xs ${N}`,children:[W,"/",X.scriptTests.length," tests passed"]}),X.scriptTests.map((K,P)=>o.jsxs("div",{className:`rounded-md border px-3 py-2 text-sm ${K.passed?"":"border-red-300 bg-red-500/10 text-red-700"}`,children:[o.jsxs("span",{className:"font-medium",children:[K.passed?"✓":"✕"," ",K.name]}),K.error&&o.jsx("div",{className:"mt-1 text-xs",children:K.error})]},`${K.name}:${P}`))]}):null,X.scriptError&&o.jsx("div",{className:"rounded-md border border-red-300 bg-red-500/10 px-3 py-2 text-sm text-red-700",children:X.scriptError}),X.scriptLogs?.length?o.jsx("pre",{className:`max-h-56 overflow-auto whitespace-pre-wrap rounded-md border p-3 text-xs ${j}`,children:X.scriptLogs.join(`
51
- `)}):null]}),(X.scripts?.preRequest.trim()||X.scripts?.tests.trim())&&o.jsxs("section",{className:"space-y-3 border-t pt-4",children:[o.jsx("h3",{className:"font-semibold",children:"Scripts used"}),X.scripts?.preRequest.trim()&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide",children:"Pre-request"}),o.jsx("pre",{className:`max-h-56 overflow-auto whitespace-pre-wrap rounded-md border p-3 text-xs ${j}`,children:X.scripts.preRequest})]}),X.scripts?.tests.trim()&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide",children:"Tests"}),o.jsx("pre",{className:`max-h-56 overflow-auto whitespace-pre-wrap rounded-md border p-3 text-xs ${j}`,children:X.scripts.tests})]})]})]})]})]})]})})};function Lt(a){return!!a&&typeof a=="object"&&!Array.isArray(a)}function Pe(a){if(a==null)return"";if(typeof a=="string")return a;if(typeof a=="number"||typeof a=="boolean")return String(a);try{return JSON.stringify(a)}catch{return String(a)}}function An(a,i,c,u){a.push({code:i,path:c,message:u})}function sl(a){return Array.isArray(a)?a.filter(Lt):[]}function Et(a,i,c){const u=sl(a[i]).find(f=>f.key===c);return u?Pe(u.value):""}function ax(a){switch(a){case"authorization_code":return"authorizationCode";case"client_credentials":return"clientCredentials";case"password_credentials":case"password":return"password";case"implicit":return"implicit";case"access_token":return"accessToken";default:return}}function no(a,i,c,u){if(!Lt(a)||typeof a.type!="string")return{...i};const f=a.type.toLowerCase();if(f==="inherit")return{...i};if(f==="noauth")return{type:"none"};if(f==="bearer")return{type:"bearer",token:Et(a,"bearer","token")};if(f==="basic")return{type:"basic",username:Et(a,"basic","username"),password:Et(a,"basic","password")};if(f==="apikey"){const p=Et(a,"apikey","in").toLowerCase();return p&&p!=="header"&&p!=="query"&&An(u,"postman-auth-apikey-location",c,`Unsupported Postman API-key location "${p}"; imported as a header API key.`),{type:"apiKey",key:Et(a,"apikey","key"),value:Et(a,"apikey","value"),in:p==="query"?"query":"header"}}if(f==="oauth2"){const p=Et(a,"oauth2","scope"),g=ax(Et(a,"oauth2","grant_type")),y=Et(a,"oauth2","client_authentication").toLowerCase();return{type:"oauth2",accessToken:Et(a,"oauth2","accessToken"),...g?{grantType:g}:{},authorizationUrl:Et(a,"oauth2","authUrl")||void 0,tokenUrl:Et(a,"oauth2","accessTokenUrl")||void 0,clientId:Et(a,"oauth2","clientId")||void 0,clientSecret:Et(a,"oauth2","clientSecret")||void 0,clientAuthentication:y==="header"||y==="basic"?"basic":"body",redirectUri:Et(a,"oauth2","redirect_uri")||void 0,scopes:p?p.split(/[\s,]+/).filter(Boolean):void 0,username:Et(a,"oauth2","username")||void 0,password:Et(a,"oauth2","password")||void 0,refreshToken:Et(a,"oauth2","refreshToken")||void 0}}return An(u,"postman-auth-unsupported",c,`Postman auth type "${a.type}" is not supported by FlexDoc and was left to inherited/default auth.`),{...i}}function Sf(a,i,c){return sl(a).flatMap((u,f)=>{const p=Pe(u.key).trim();return p?[{id:Ht("variable"),key:p,value:Pe(u.value),enabled:u.disabled!==!0&&u.enabled!==!1}]:(An(c,"postman-variable-empty-key",`${i}[${f}]`,"Skipped a Postman variable with an empty key."),[])})}function rx(a,i,c){const u=["pm.sendRequest","pm.globals","pm.iterationData","pm.cookies","pm.vault","pm.require","pm.execution","postman."].filter(p=>a.includes(p));let f=a.replace(/\bpm\.response\.to\.have\.status\(([^)\n]+)\)\s*;?/g,"flex.expect(flex.response?.code).to.equal($1);").replace(/\bpm\.response\.to\.have\.header\(([^)\n]+)\)\s*;?/g,"flex.expect(flex.response?.headers.has($1)).to.equal(true);").replace(/\bpm\.collectionVariables\b/g,"flex.collection").replace(/\bpm\.environment\b/g,"flex.environment").replace(/\bpm\.variables\b/g,"flex.variables").replace(/\bpm\.request\b/g,"flex.request").replace(/\bpm\.response\b/g,"flex.response").replace(/\bpm\.expect\b/g,"flex.expect").replace(/\bpm\.test\b/g,"flex.test").replace(/\bflex\.request\.headers\.add\s*\(/g,"flex.request.headers.upsert(");return/\bpm\./.test(f)&&u.push("other pm.* APIs"),u.length>0&&(An(c,"postman-script-partial-compatibility",i,`Imported script uses unsupported Postman APIs (${[...new Set(u)].join(", ")}); review the script before relying on it.`),f=`// Imported from Postman. Review unsupported API usage before relying on this script.
52
- ${f}`),f}function ix(a,i,c){return Lt(a)?(a.src!==void 0&&An(c,"postman-script-src",i,"External Postman script sources are not fetched; only inline script.exec content is imported."),Array.isArray(a.exec)?a.exec.map(Pe).join(`
53
- `):Pe(a.exec)):""}function Af(a,i,c){const u={preRequest:[],tests:[]};return sl(a).forEach((f,p)=>{const g=Pe(f.listen).toLowerCase();if(g!=="prerequest"&&g!=="test")return;const y=`${i}[${p}]`,x=ix(f.script,`${y}.script`,c).trim();if(!x)return;const h=rx(x,`${y}.script`,c);g==="prerequest"?u.preRequest.push(h):u.tests.push(h)}),u}function sx(a,i){return{preRequest:[...a.preRequest,...i.preRequest],tests:[...a.tests,...i.tests]}}function ox(a){const i=a.preRequest.filter(Boolean).join(`
48
+ })();`)(T,E),await Promise.all(v),{draft:r,variables:o,collectionVariables:u,externalVariables:f,environmentVariables:p,collectionChanges:g,environmentChanges:x,tests:b,logs:m}}catch(w){return await Promise.all(v),{draft:r,variables:o,collectionVariables:u,externalVariables:f,environmentVariables:p,collectionChanges:g,environmentChanges:x,tests:b,logs:m,error:w instanceof Error?w.message:String(w)}}}const l0="flexdoc-api-client",r0=1,el="workspaces",i0="My Collection",Pd=100,Wd=256*1024;function Fl(){return new Date().toISOString()}function It(a){return!!a&&typeof a=="object"&&!Array.isArray(a)}function ze(a,r){return typeof a[r]=="string"}function Ir(a,r){const o=a[r];return o===void 0||typeof o=="number"&&Number.isFinite(o)}function Yr(a){return!It(a)||!ze(a,"key")||!ze(a,"value")?!1:a.enabled===void 0||typeof a.enabled=="boolean"}function s0(a){if(!Yr(a))return!1;const r=a;return!(r.type!==void 0&&r.type!=="text"&&r.type!=="file"||r.fileName!==void 0&&typeof r.fileName!="string"||r.contentType!==void 0&&typeof r.contentType!="string"||r.file!==void 0&&typeof File<"u"&&!(r.file instanceof File))}function o0(a){return!(!It(a)||a.fileName!==void 0&&typeof a.fileName!="string"||a.contentType!==void 0&&typeof a.contentType!="string"||a.file!==void 0&&typeof File<"u"&&!(a.file instanceof File))}function Ps(a){if(!It(a)||typeof a.type!="string")return!1;if(a.type==="none"||a.type==="inherit")return!0;if(a.type==="bearer")return ze(a,"token");if(a.type==="oauth2"){if(!ze(a,"accessToken"))return!1;const r=new Set(["accessToken","authorizationCode","clientCredentials","password","implicit"]);if(a.grantType!==void 0&&(typeof a.grantType!="string"||!r.has(a.grantType))||a.clientAuthentication!==void 0&&a.clientAuthentication!=="body"&&a.clientAuthentication!=="basic")return!1;for(const o of["authorizationUrl","tokenUrl","clientId","clientSecret","redirectUri","username","password","refreshToken"])if(a[o]!==void 0&&typeof a[o]!="string")return!1;return a.scopes===void 0||Array.isArray(a.scopes)&&a.scopes.every(o=>typeof o=="string")}return a.type==="basic"||a.type==="digest"?ze(a,"username")&&ze(a,"password"):a.type==="apiKey"?ze(a,"key")&&ze(a,"value")&&(a.in==="header"||a.in==="query"||a.in==="cookie"):a.type==="hawk"?ze(a,"id")&&ze(a,"key")&&(a.algorithm===void 0||a.algorithm==="sha1"||a.algorithm==="sha256")&&(a.ext===void 0||typeof a.ext=="string"):a.type==="ntlm"?ze(a,"username")&&ze(a,"password")&&(a.domain===void 0||typeof a.domain=="string")&&(a.workstation===void 0||typeof a.workstation=="string"):a.type==="oauth1"?ze(a,"consumerKey")&&ze(a,"consumerSecret")&&(a.token===void 0||typeof a.token=="string")&&(a.tokenSecret===void 0||typeof a.tokenSecret=="string")&&(a.realm===void 0||typeof a.realm=="string")&&(a.signatureMethod===void 0||["HMAC-SHA1","HMAC-SHA256","PLAINTEXT"].includes(String(a.signatureMethod))):a.type==="awsv4"?ze(a,"accessKey")&&ze(a,"secretKey")&&ze(a,"region")&&ze(a,"service")&&(a.sessionToken===void 0||typeof a.sessionToken=="string"):!1}function ef(a){return!It(a)||!ze(a,"method")||!ze(a,"url")||a.query!==void 0&&(!Array.isArray(a.query)||!a.query.every(Yr))||a.headers!==void 0&&(!Array.isArray(a.headers)||!a.headers.every(Yr))||a.body!==void 0&&typeof a.body!="string"||a.contentType!==void 0&&typeof a.contentType!="string"||a.bodyMode!==void 0&&!["none","raw","json","urlencoded","formdata","binary","graphql"].includes(String(a.bodyMode))||a.urlencoded!==void 0&&(!Array.isArray(a.urlencoded)||!a.urlencoded.every(Yr))||a.formData!==void 0&&(!Array.isArray(a.formData)||!a.formData.every(s0))||a.binary!==void 0&&!o0(a.binary)||a.graphql!==void 0&&(!It(a.graphql)||!ze(a.graphql,"query")||!ze(a.graphql,"variables"))||a.hostExecution!==void 0&&(!It(a.hostExecution)||a.hostExecution.certificateId!==void 0&&typeof a.hostExecution.certificateId!="string"||a.hostExecution.cookieJar!==void 0&&a.hostExecution.cookieJar!=="session")?!1:a.auth===void 0||Ps(a.auth)}function tf(a){return It(a)&&ze(a,"id")&&ze(a,"key")&&ze(a,"value")&&(a.enabled===void 0||typeof a.enabled=="boolean")}function c0(a){return!It(a)||!ze(a,"id")||!ze(a,"name")||!ze(a,"createdAt")||!ze(a,"updatedAt")?null:{id:a.id,name:a.name,auth:Ps(a.auth)?a.auth:{type:"none"},variables:Array.isArray(a.variables)?a.variables.filter(tf):[],createdAt:a.createdAt,updatedAt:a.updatedAt}}function u0(a){return!It(a)||!ze(a,"id")||!ze(a,"collectionId")||a.parentFolderId!==void 0&&typeof a.parentFolderId!="string"||!ze(a,"name")||!ze(a,"createdAt")||!ze(a,"updatedAt")?null:{id:a.id,collectionId:a.collectionId,parentFolderId:a.parentFolderId,name:a.name,auth:Ps(a.auth)?a.auth:{type:"inherit"},createdAt:a.createdAt,updatedAt:a.updatedAt}}function d0(a,r){const o=a.map(u0).filter(f=>f!==null).filter(f=>r.has(f.collectionId)),u=new Map(o.map(f=>[f.id,f]));for(const f of o){if(!f.parentFolderId)continue;const p=u.get(f.parentFolderId);(!p||p.collectionId!==f.collectionId||p.id===f.id)&&(f.parentFolderId=void 0)}for(const f of o){if(!f.parentFolderId)continue;const p=new Set([f.id]);let g=f.parentFolderId;for(;g;){if(p.has(g)){f.parentFolderId=void 0;break}p.add(g),g=u.get(g)?.parentFolderId}}return o}function nf(a){if(!(!It(a)||!ze(a,"preRequest")||!ze(a,"tests")))return{preRequest:a.preRequest,tests:a.tests}}function f0(a){if(!It(a)||!ze(a,"id")||!ze(a,"collectionId")||a.folderId!==void 0&&typeof a.folderId!="string"||!ze(a,"name")||!ef(a.request)||!ze(a,"createdAt")||!ze(a,"updatedAt"))return null;const r=nf(a.scripts);return{id:a.id,collectionId:a.collectionId,folderId:a.folderId,name:a.name,request:Nn(a.request),...r?{scripts:r}:{},createdAt:a.createdAt,updatedAt:a.updatedAt}}function p0(a){return!It(a)||!ze(a,"id")||!ze(a,"name")||!Array.isArray(a.variables)||!ze(a,"createdAt")||!ze(a,"updatedAt")?null:{id:a.id,name:a.name,variables:a.variables.filter(tf),createdAt:a.createdAt,updatedAt:a.updatedAt}}function m0(a){return Array.isArray(a)&&a.length===2&&typeof a[0]=="string"&&typeof a[1]=="string"}function h0(a){return!It(a)||!ze(a,"name")||typeof a.passed!="boolean"||a.error!==void 0&&typeof a.error!="string"?null:{name:a.name,passed:a.passed,error:a.error}}function y0(a){if(!It(a)||!ze(a,"id")||!ef(a.request)||!ze(a,"executedMethod")||!ze(a,"resolvedUrl")||!Ir(a,"status")||a.statusText!==void 0&&typeof a.statusText!="string"||!Ir(a,"responseTime")||a.responseHeaders!==void 0&&(!Array.isArray(a.responseHeaders)||!a.responseHeaders.every(m0))||a.responseBody!==void 0&&typeof a.responseBody!="string"||a.responseBodyTruncated!==void 0&&typeof a.responseBodyTruncated!="boolean"||a.runId!==void 0&&typeof a.runId!="string"||a.runName!==void 0&&typeof a.runName!="string"||!Ir(a,"runIndex")||!Ir(a,"runTotal")||a.runPassed!==void 0&&typeof a.runPassed!="boolean"||a.runCancelled!==void 0&&typeof a.runCancelled!="boolean"||a.error!==void 0&&typeof a.error!="string"||a.scriptError!==void 0&&typeof a.scriptError!="string"||!ze(a,"createdAt"))return null;const r=nf(a.scripts),o=Array.isArray(a.scriptTests)?a.scriptTests.map(h0).filter(f=>f!==null):[],u=Array.isArray(a.scriptLogs)?a.scriptLogs.filter(f=>typeof f=="string"):[];return{id:a.id,collectionId:typeof a.collectionId=="string"?a.collectionId:void 0,folderId:typeof a.folderId=="string"?a.folderId:void 0,request:Nn(a.request),...r?{scripts:r}:{},executedMethod:a.executedMethod,resolvedUrl:a.resolvedUrl,status:a.status,statusText:a.statusText,responseTime:a.responseTime,responseHeaders:Array.isArray(a.responseHeaders)?a.responseHeaders.map(([f,p])=>[f,p]):void 0,responseBody:typeof a.responseBody=="string"?a.responseBody:void 0,responseBodyTruncated:a.responseBodyTruncated===!0?!0:void 0,runId:typeof a.runId=="string"?a.runId:void 0,runName:typeof a.runName=="string"?a.runName:void 0,runIndex:typeof a.runIndex=="number"?a.runIndex:void 0,runTotal:typeof a.runTotal=="number"?a.runTotal:void 0,runPassed:typeof a.runPassed=="boolean"?a.runPassed:void 0,runCancelled:a.runCancelled===!0?!0:void 0,error:a.error,...o.length?{scriptTests:o}:{},...u.length?{scriptLogs:u}:{},scriptError:a.scriptError,createdAt:a.createdAt}}function af(a){const r=Object.create(null);for(const o of a){const u=o.key.trim();o.enabled===!1||!u||(r[u]=o.value)}return r}function Lt(a){const r=globalThis.crypto?.randomUUID?.();return r?`${a}-${r}`:`${a}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function g0(a,r){const o=r?.trim()||"unknown-host",u=a?.trim()||"untitled";return`flexdoc:${encodeURIComponent(o)}:${encodeURIComponent(u)}`}function Nn(a){const r=a.auth?a.auth.type==="oauth2"?{...a.auth,scopes:a.auth.scopes?[...a.auth.scopes]:void 0}:{...a.auth}:void 0;return{...a,query:a.query?.map(o=>({...o})),headers:a.headers?.map(o=>({...o})),urlencoded:a.urlencoded?.map(o=>({...o})),formData:a.formData?.map(o=>({...o,file:void 0})),binary:a.binary?{...a.binary,file:void 0}:void 0,graphql:a.graphql?{...a.graphql}:void 0,auth:r,hostExecution:a.hostExecution?{...a.hostExecution}:void 0}}function Vl(){const a=Fl();return{version:6,collections:[{id:Lt("collection"),name:i0,auth:{type:"none"},variables:[],createdAt:a,updatedAt:a}],folders:[],requests:[],environments:[],history:[]}}function x0(a){if(!It(a)||![1,2,3,4,5,6].includes(a.version))return Vl();const r=(Array.isArray(a.collections)?a.collections:[]).map(c0).filter(m=>m!==null);if(r.length===0)return Vl();const o=new Set(r.map(m=>m.id)),u=d0(Array.isArray(a.folders)?a.folders:[],o),f=new Map(u.map(m=>[m.id,m])),p=(Array.isArray(a.requests)?a.requests:[]).map(f0).filter(m=>m!==null).filter(m=>o.has(m.collectionId)).map(m=>m.folderId?f.get(m.folderId)?.collectionId===m.collectionId?m:{...m,folderId:void 0}:m);if(a.version===1)return{version:6,collections:r,folders:u,requests:p,environments:[],history:[]};const g=(Array.isArray(a.environments)?a.environments:[]).map(p0).filter(m=>m!==null),x=typeof a.activeEnvironmentId=="string"&&g.some(m=>m.id===a.activeEnvironmentId)?a.activeEnvironmentId:void 0,b=(a.version===4||a.version===5||a.version===6)&&Array.isArray(a.history)?a.history.map(y0).filter(m=>m!==null).slice(0,Pd):[];return{version:6,collections:r,folders:u,requests:p,environments:g,activeEnvironmentId:x,history:b}}function lf(a,r){const o=r.responseBody===void 0?void 0:r.responseBody.slice(0,Wd),u=r.responseBodyTruncated===!0||(r.responseBody?.length||0)>Wd,f={id:Lt("history"),collectionId:r.collectionId,folderId:r.folderId,request:Nn(r.request),...r.scripts?{scripts:fn(r.scripts)}:{},executedMethod:r.executedMethod,resolvedUrl:r.resolvedUrl,status:r.status,statusText:r.statusText,responseTime:r.responseTime,...r.responseHeaders?.length?{responseHeaders:r.responseHeaders.map(([p,g])=>[p,g])}:{},...o!==void 0?{responseBody:o,...u?{responseBodyTruncated:!0}:{}}:{},runId:r.runId,runName:r.runName,runIndex:r.runIndex,runTotal:r.runTotal,runPassed:r.runPassed,...r.runCancelled?{runCancelled:!0}:{},error:r.error,...r.scriptTests?.length?{scriptTests:r.scriptTests.map(p=>({...p}))}:{},...r.scriptLogs?.length?{scriptLogs:[...r.scriptLogs]}:{},scriptError:r.scriptError,createdAt:Fl()};return{...a,history:[f,...a.history].slice(0,Pd)}}function rf(a,r,o,u={type:"none"}){if(u.type!=="inherit")return{...u};const f=new Map(a.folders.map(b=>[b.id,b])),p=new Set;let g=o?f.get(o):void 0;for(;g&&g.collectionId===r&&!p.has(g.id);){if(p.add(g.id),g.auth.type!=="inherit")return{...g.auth};g=g.parentFolderId?f.get(g.parentFolderId):void 0}const x=a.collections.find(b=>b.id===r);return x&&x.auth.type!=="inherit"?{...x.auth}:{type:"none"}}function sf(a,r){const o=a.collections.find(u=>u.id===r);return af(o?.variables||[])}function of(a){const r=a.environments.find(o=>o.id===a.activeEnvironmentId);return af(r?.variables||[])}function cf(a,r){if(!a.activeEnvironmentId||r.length===0)return a;const o=a.environments.findIndex(x=>x.id===a.activeEnvironmentId);if(o<0)return a;let f=a.environments[o].variables.map(x=>({...x})),p=!1;for(const x of r){const b=x.key.trim();if(!b)continue;if(x.action==="unset"){const S=f.filter(N=>N.key.trim()!==b);S.length!==f.length&&(f=S,p=!0);continue}const m=f.map((S,N)=>S.key.trim()===b?N:-1).filter(S=>S>=0),v=x.value||"";if(m.length>0){const S=m[0];f[S]={...f[S],key:b,value:v,enabled:!0},m.length>1&&(f=f.filter((N,_)=>_===S||N.key.trim()!==b))}else f.push({id:Lt("variable"),key:b,value:v,enabled:!0});p=!0}if(!p)return a;const g=a.environments.map((x,b)=>b===o?{...x,variables:f,updatedAt:Fl()}:x);return{...a,environments:g}}function uf(a,r,o){if(!r||o.length===0)return a;const u=a.collections.findIndex(b=>b.id===r);if(u<0)return a;let p=a.collections[u].variables.map(b=>({...b})),g=!1;for(const b of o){const m=b.key.trim();if(!m)continue;if(b.action==="unset"){const N=p.filter(_=>_.key.trim()!==m);N.length!==p.length&&(p=N,g=!0);continue}const v=p.map((N,_)=>N.key.trim()===m?_:-1).filter(N=>N>=0),S=b.value||"";if(v.length>0){const N=v[0];p[N]={...p[N],key:m,value:S,enabled:!0},v.length>1&&(p=p.filter((_,R)=>R===N||_.key.trim()!==m))}else p.push({id:Lt("variable"),key:m,value:S,enabled:!0});g=!0}if(!g)return a;const x=a.collections.map((b,m)=>m===u?{...b,variables:p,updatedAt:Fl()}:b);return{...a,collections:x}}function b0(a,r){return{...a,environments:a.environments.filter(o=>o.id!==r),activeEnvironmentId:a.activeEnvironmentId===r?void 0:a.activeEnvironmentId}}function v0(a,r){const o=a.folders.find(f=>f.id===r);if(!o)return a;const u=Fl();return{...a,folders:a.folders.filter(f=>f.id!==r).map(f=>f.parentFolderId===r?{...f,parentFolderId:o.parentFolderId,updatedAt:u}:f),requests:a.requests.map(f=>f.folderId===r?{...f,folderId:o.parentFolderId,updatedAt:u}:f)}}function S0(a,r){const o=a.collections.filter(u=>u.id!==r);return o.length===0?{...Vl(),environments:a.environments,activeEnvironmentId:a.activeEnvironmentId,history:a.history}:{...a,collections:o,folders:a.folders.filter(u=>u.collectionId!==r),requests:a.requests.filter(u=>u.collectionId!==r)}}function df(){return typeof indexedDB>"u"?Promise.resolve(null):new Promise((a,r)=>{const o=indexedDB.open(l0,r0);o.onupgradeneeded=()=>{const u=o.result;u.objectStoreNames.contains(el)||u.createObjectStore(el)},o.onsuccess=()=>a(o.result),o.onerror=()=>r(o.error||new Error("Unable to open FlexDoc API Client storage"))})}async function j0(a){const r=await df();if(!r)return Vl();try{return await new Promise((o,u)=>{const p=r.transaction(el,"readonly").objectStore(el).get(a);p.onsuccess=()=>o(x0(p.result)),p.onerror=()=>u(p.error||new Error("Unable to load FlexDoc API Client workspace"))})}finally{r.close()}}async function A0(a,r){const o=await df();if(o)try{await new Promise((u,f)=>{const p=o.transaction(el,"readwrite");p.objectStore(el).put(r,a),p.oncomplete=()=>u(),p.onerror=()=>f(p.error||new Error("Unable to save FlexDoc API Client workspace")),p.onabort=()=>f(p.error||new Error("Unable to save FlexDoc API Client workspace"))})}finally{o.close()}}function tl(a,r){const o=a?.trim();if(!o)throw new Error(`${r} is required for this OAuth flow.`);return o}function Gr(a){return(a.scopes||[]).map(r=>r.trim()).filter(Boolean).join(" ")}function N0(a){if(typeof TextEncoder>"u")throw new Error("OAuth Basic client authentication requires UTF-8 encoding support.");const r=new TextEncoder().encode(a);let o="";for(const p of r)o+=String.fromCharCode(p);const u=globalThis.Buffer,f=typeof btoa=="function"?btoa(o):u?.from(o,"binary").toString("base64");if(!f)throw new Error("OAuth Basic client authentication requires Base64 support in this runtime.");return f}function ff(a){let r="";for(const f of a)r+=String.fromCharCode(f);const o=globalThis.Buffer,u=typeof btoa=="function"?btoa(r):o?.from(r,"binary").toString("base64");if(!u)throw new Error("OAuth PKCE requires Base64 support in this runtime.");return u.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}function pf(a=32){if(!globalThis.crypto?.getRandomValues)throw new Error("OAuth requires cryptographic random-number support.");const r=new Uint8Array(a);return globalThis.crypto.getRandomValues(r),ff(r)}async function w0(a){if(!globalThis.crypto?.subtle||typeof TextEncoder>"u")throw new Error("OAuth authorization-code flow requires Web Crypto PKCE support.");const r=await globalThis.crypto.subtle.digest("SHA-256",new TextEncoder().encode(a));return ff(new Uint8Array(r))}function mf(a,r,o,u){const f=tl(a.authorizationUrl,"Authorization URL"),p=tl(a.clientId,"Client ID"),g=new URL(f),x=a.grantType||"accessToken";g.searchParams.set("response_type",x==="implicit"?"token":"code"),g.searchParams.set("client_id",p),g.searchParams.set("redirect_uri",o),g.searchParams.set("state",r);const b=Gr(a);return b&&g.searchParams.set("scope",b),u&&(g.searchParams.set("code_challenge",u),g.searchParams.set("code_challenge_method","S256")),g.toString()}function T0(a){const r=new URL(a.location.href);return r.search="",r.hash="",r.toString()}async function E0(a,r){const o=r??(typeof window>"u"?void 0:window);if(!o)throw new Error("Interactive OAuth requires a browser window.");const u=a.redirectUri?.trim()||T0(o);if(new URL(u).origin!==o.location.origin)throw new Error("Interactive OAuth redirect URI must use the same origin as the FlexDoc page so the popup result can be read.");const f=pf(24);if((a.grantType||"accessToken")==="implicit")return{url:mf(a,f,u),state:f,redirectUri:u};const p=pf(48),g=await w0(p);return{url:mf(a,f,u,g),state:f,redirectUri:u,codeVerifier:p}}async function C0(a){const r=await a.text();let o;try{o=r?JSON.parse(r):{}}catch{o=Object.fromEntries(new URLSearchParams(r))}if(!a.ok){const g=String(o.error_description||o.error||`OAuth token endpoint returned ${a.status}`);throw new Error(g)}const u=typeof o.access_token=="string"?o.access_token:"";if(!u)throw new Error("OAuth token endpoint did not return access_token.");const f=o.expires_in,p=typeof f=="number"?f:typeof f=="string"&&f.trim()!==""&&Number.isFinite(Number(f))?Number(f):void 0;return{accessToken:u,refreshToken:typeof o.refresh_token=="string"?o.refresh_token:void 0,tokenType:typeof o.token_type=="string"?o.token_type:void 0,expiresIn:p,scope:typeof o.scope=="string"?o.scope:void 0}}async function Fr(a,r,o){const u=tl(a.tokenUrl,"Token URL"),f={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},p=a.clientId?.trim();(a.clientAuthentication||"body")==="basic"&&p?f.Authorization=`Basic ${N0(`${p}:${a.clientSecret||""}`)}`:(p&&r.set("client_id",p),a.clientSecret&&r.set("client_secret",a.clientSecret));const g=await o(u,{method:"POST",headers:f,body:r.toString()});return C0(g)}async function k0(a,r){const o=r.windowObject??(typeof window>"u"?void 0:window);if(!o)throw new Error("Interactive OAuth requires a browser window.");const u=o.open(a.url,"flexdoc-oauth","popup,width=640,height=760");if(!u)throw new Error("OAuth popup was blocked. Allow popups for this documentation origin and try again.");const f=new URL(a.redirectUri),p=Date.now(),g=r.popupTimeoutMs??12e4,x=r.pollIntervalMs??200;for(;Date.now()-p<g;){if(u.closed)throw new Error("OAuth popup was closed before authorization completed.");try{const b=new URL(u.location.href);if(b.origin===f.origin&&b.pathname===f.pathname)return u.close(),b}catch{}await new Promise(b=>setTimeout(b,x))}throw u.close(),new Error("OAuth authorization timed out.")}async function _0(a,r={}){const o=a.grantType||"accessToken",u=r.fetchImpl??fetch;if(o==="accessToken")return{accessToken:tl(a.accessToken,"Access token")};if(o==="clientCredentials"){const S=new URLSearchParams({grant_type:"client_credentials"}),N=Gr(a);return N&&S.set("scope",N),Fr(a,S,u)}if(o==="password"){const S=new URLSearchParams({grant_type:"password",username:tl(a.username,"Username"),password:a.password||""}),N=Gr(a);return N&&S.set("scope",N),Fr(a,S,u)}const f=await E0(a,r.windowObject),p=await k0(f,r);if((p.searchParams.get("state")||new URLSearchParams(p.hash.replace(/^#/,"")).get("state"))!==f.state)throw new Error("OAuth state mismatch; authorization response was rejected.");const x=new URLSearchParams(p.hash.replace(/^#/,"")),b=p.searchParams.get("error")||x.get("error");if(b){const S=p.searchParams.get("error_description")||x.get("error_description");throw new Error(S||b)}if(o==="implicit"){const S=x.get("access_token")||"";if(!S)throw new Error("OAuth implicit response did not include access_token.");return{accessToken:S,tokenType:x.get("token_type")||void 0,expiresIn:x.get("expires_in")?Number(x.get("expires_in")):void 0,scope:x.get("scope")||void 0}}const m=p.searchParams.get("code");if(!m)throw new Error("OAuth authorization response did not include code.");const v=new URLSearchParams({grant_type:"authorization_code",code:m,redirect_uri:f.redirectUri});return f.codeVerifier&&v.set("code_verifier",f.codeVerifier),Fr(a,v,u)}async function O0(a,r={}){const o=tl(a.refreshToken,"Refresh token"),u=new URLSearchParams({grant_type:"refresh_token",refresh_token:o}),f=Gr(a);return f&&u.set("scope",f),Fr(a,u,r.fetchImpl??fetch)}function R0(a){return a==="inherit"?{type:"inherit"}:a==="bearer"?{type:"bearer",token:""}:a==="oauth2"?{type:"oauth2",accessToken:"",grantType:"accessToken",scopes:[]}:a==="basic"?{type:"basic",username:"",password:""}:a==="apiKey"?{type:"apiKey",key:"",value:"",in:"header"}:a==="digest"?{type:"digest",username:"",password:""}:a==="hawk"?{type:"hawk",id:"",key:"",algorithm:"sha256"}:a==="ntlm"?{type:"ntlm",username:"",password:""}:a==="oauth1"?{type:"oauth1",consumerKey:"",consumerSecret:"",signatureMethod:"HMAC-SHA1"}:a==="awsv4"?{type:"awsv4",accessKey:"",secretKey:"",region:"",service:""}:{type:"none"}}function $0(a){return a.split(/\s+/).map(r=>r.trim()).filter(Boolean)}const hf=({auth:a,fieldClass:r,label:o,onChange:u})=>{const[f,p]=W.useState(!1),[g,x]=W.useState(null),b=a.grantType||"accessToken",m=b==="authorizationCode"||b==="implicit",v=b==="authorizationCode"||b==="clientCredentials"||b==="password",S=b!=="accessToken",N=async()=>{p(!0),x(null);try{const R=await _0(a);u({...a,accessToken:R.accessToken,refreshToken:R.refreshToken??a.refreshToken}),x(R.expiresIn?`Access token acquired; expires in ${R.expiresIn}s.`:"Access token acquired.")}catch(R){x(R instanceof Error?R.message:"OAuth authorization failed.")}finally{p(!1)}},_=async()=>{p(!0),x(null);try{const R=await O0(a);u({...a,accessToken:R.accessToken,refreshToken:R.refreshToken??a.refreshToken}),x("Access token refreshed.")}catch(R){x(R instanceof Error?R.message:"OAuth token refresh failed.")}finally{p(!1)}};return s.jsxs("div",{className:"space-y-2",children:[s.jsxs("select",{"aria-label":o?`${o} OAuth grant type`:"OAuth grant type",className:r,value:b,onChange:R=>u({...a,grantType:R.target.value}),children:[s.jsx("option",{value:"accessToken",children:"Manual access token"}),s.jsx("option",{value:"authorizationCode",children:"Authorization Code + PKCE"}),s.jsx("option",{value:"clientCredentials",children:"Client Credentials"}),s.jsx("option",{value:"password",children:"Password grant (legacy)"}),s.jsx("option",{value:"implicit",children:"Implicit grant (legacy)"})]}),m&&s.jsx("input",{"aria-label":o?`${o} OAuth authorization URL`:"OAuth authorization URL",className:r,placeholder:"Authorization URL",value:a.authorizationUrl||"",onChange:R=>u({...a,authorizationUrl:R.target.value})}),v&&s.jsx("input",{"aria-label":o?`${o} OAuth token URL`:"OAuth token URL",className:r,placeholder:"Token URL",value:a.tokenUrl||"",onChange:R=>u({...a,tokenUrl:R.target.value})}),S&&s.jsx("input",{"aria-label":o?`${o} OAuth client ID`:"OAuth client ID",className:r,placeholder:"Client ID",value:a.clientId||"",onChange:R=>u({...a,clientId:R.target.value})}),(b==="authorizationCode"||b==="clientCredentials"||b==="password")&&s.jsx("input",{"aria-label":o?`${o} OAuth client secret`:"OAuth client secret",type:"password",autoComplete:"off",className:r,placeholder:b==="authorizationCode"?"Client secret (optional for PKCE/public clients)":"Client secret (optional)",value:a.clientSecret||"",onChange:R=>u({...a,clientSecret:R.target.value})}),v&&s.jsxs("select",{"aria-label":o?`${o} OAuth client authentication`:"OAuth client authentication",className:r,value:a.clientAuthentication||"body",onChange:R=>u({...a,clientAuthentication:R.target.value}),children:[s.jsx("option",{value:"body",children:"Send client credentials in body"}),s.jsx("option",{value:"basic",children:"Send as Basic Auth header"})]}),m&&s.jsx("input",{"aria-label":o?`${o} OAuth redirect URI`:"OAuth redirect URI",className:r,placeholder:"Redirect URI (defaults to this page)",value:a.redirectUri||"",onChange:R=>u({...a,redirectUri:R.target.value})}),S&&s.jsx("input",{"aria-label":o?`${o} OAuth scopes`:"OAuth scopes",className:r,placeholder:"Scopes separated by spaces",value:(a.scopes||[]).join(" "),onChange:R=>u({...a,scopes:$0(R.target.value)})}),b==="password"&&s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsx("input",{"aria-label":o?`${o} OAuth username`:"OAuth username",className:r,placeholder:"Resource owner username",value:a.username||"",onChange:R=>u({...a,username:R.target.value})}),s.jsx("input",{"aria-label":o?`${o} OAuth password`:"OAuth password",type:"password",autoComplete:"off",className:r,placeholder:"Resource owner password",value:a.password||"",onChange:R=>u({...a,password:R.target.value})})]}),s.jsx("input",{"aria-label":o?`${o} OAuth access token`:"OAuth access token",type:"password",autoComplete:"off",className:r,placeholder:"Access token",value:a.accessToken,onChange:R=>u({...a,accessToken:R.target.value})}),b!=="accessToken"&&s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx("button",{type:"button",disabled:f,onClick:N,className:"rounded-md border px-2.5 py-1.5 text-xs font-medium disabled:opacity-60",children:f?"Authorizing…":"Get access token"}),a.refreshToken&&a.tokenUrl&&s.jsx("button",{type:"button",disabled:f,onClick:_,className:"rounded-md border px-2.5 py-1.5 text-xs font-medium disabled:opacity-60",children:"Refresh access token"})]}),b!=="accessToken"&&s.jsx("p",{className:"text-[11px] opacity-70",children:"Authorization Code uses PKCE. Popup callbacks must return to this page origin; token endpoints must allow browser CORS. Client secrets entered here are browser-visible and should only be used when the OAuth provider permits it."}),g&&s.jsx("p",{role:"status",className:"text-xs",children:g})]})},yf=({auth:a,label:r,allowInherit:o=!1,hostExecution:u,onChange:f,theme:p})=>{const x=`w-full rounded-md border px-2 py-1.5 text-xs ${p==="dark"?"bg-gray-900 border-gray-700 text-gray-100":"bg-white border-gray-300 text-gray-900"}`,b=new Set(u?.capabilities||[]),m=S=>u?.available===!0&&b.has(S),v=a.type==="digest"?"digest":a.type==="hawk"?"hawk":a.type==="ntlm"?"ntlm":a.type==="oauth1"?"oauth1":a.type==="awsv4"?"awsv4":a.type==="apiKey"&&a.in==="cookie"?"cookies":void 0;return s.jsxs("div",{className:"space-y-2",children:[s.jsxs("select",{"aria-label":`${r} authorization type`,className:x,value:a.type==="inherit"&&!o?"none":a.type,onChange:S=>f(R0(S.target.value)),children:[o&&s.jsx("option",{value:"inherit",children:"Inherit from parent"}),s.jsx("option",{value:"none",children:"No auth"}),s.jsx("option",{value:"bearer",children:"Bearer token"}),s.jsx("option",{value:"oauth2",children:"OAuth 2.0"}),s.jsx("option",{value:"basic",children:"Basic auth"}),s.jsx("option",{value:"apiKey",children:"API key"}),s.jsx("option",{value:"digest",disabled:!m("digest"),children:"Digest (API host)"}),s.jsx("option",{value:"hawk",disabled:!m("hawk"),children:"Hawk (API host)"}),s.jsx("option",{value:"ntlm",disabled:!m("ntlm"),children:"NTLM / Negotiate (API host)"}),s.jsx("option",{value:"oauth1",disabled:!m("oauth1"),children:"OAuth 1.0 (API host)"}),s.jsx("option",{value:"awsv4",disabled:!m("awsv4"),children:"AWS Signature v4 (API host)"})]}),a.type==="bearer"&&s.jsx("input",{"aria-label":`${r} bearer token`,type:"password",autoComplete:"off",className:x,value:a.token,onChange:S=>f({...a,token:S.target.value})}),a.type==="oauth2"&&s.jsx(hf,{auth:a,fieldClass:x,label:r,onChange:f}),(a.type==="basic"||a.type==="digest")&&s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsx("input",{"aria-label":`${r} ${a.type} username`,className:x,placeholder:"Username",value:a.username,onChange:S=>f({...a,username:S.target.value})}),s.jsx("input",{"aria-label":`${r} ${a.type} password`,type:"password",autoComplete:"off",className:x,placeholder:"Password",value:a.password,onChange:S=>f({...a,password:S.target.value})})]}),a.type==="apiKey"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("input",{"aria-label":`${r} API key name`,className:x,placeholder:"Key name",value:a.key,onChange:S=>f({...a,key:S.target.value})}),s.jsx("input",{"aria-label":`${r} API key value`,type:"password",autoComplete:"off",className:x,placeholder:"Value",value:a.value,onChange:S=>f({...a,value:S.target.value})}),s.jsxs("select",{"aria-label":`${r} API key location`,className:x,value:a.in,onChange:S=>f({...a,in:S.target.value}),children:[s.jsx("option",{value:"header",children:"Header"}),s.jsx("option",{value:"query",children:"Query"}),s.jsx("option",{value:"cookie",disabled:!m("cookies"),children:"Cookie (API host)"})]})]}),a.type==="hawk"&&s.jsxs("div",{className:"grid gap-2",children:[s.jsx("input",{"aria-label":`${r} Hawk id`,className:x,placeholder:"ID",value:a.id,onChange:S=>f({...a,id:S.target.value})}),s.jsx("input",{"aria-label":`${r} Hawk key`,type:"password",autoComplete:"off",className:x,placeholder:"Key",value:a.key,onChange:S=>f({...a,key:S.target.value})}),s.jsxs("select",{"aria-label":`${r} Hawk algorithm`,className:x,value:a.algorithm||"sha256",onChange:S=>f({...a,algorithm:S.target.value}),children:[s.jsx("option",{value:"sha256",children:"SHA-256"}),s.jsx("option",{value:"sha1",children:"SHA-1"})]}),s.jsx("input",{"aria-label":`${r} Hawk ext`,className:x,placeholder:"ext (optional)",value:a.ext||"",onChange:S=>f({...a,ext:S.target.value})})]}),a.type==="ntlm"&&s.jsxs("div",{className:"grid gap-2",children:[s.jsx("input",{"aria-label":`${r} NTLM username`,className:x,placeholder:"Username",value:a.username,onChange:S=>f({...a,username:S.target.value})}),s.jsx("input",{"aria-label":`${r} NTLM password`,type:"password",autoComplete:"off",className:x,placeholder:"Password",value:a.password,onChange:S=>f({...a,password:S.target.value})}),s.jsx("input",{"aria-label":`${r} NTLM domain`,className:x,placeholder:"Domain (optional)",value:a.domain||"",onChange:S=>f({...a,domain:S.target.value})}),s.jsx("input",{"aria-label":`${r} NTLM workstation`,className:x,placeholder:"Workstation (optional)",value:a.workstation||"",onChange:S=>f({...a,workstation:S.target.value})})]}),a.type==="oauth1"&&s.jsxs("div",{className:"grid gap-2",children:[s.jsx("input",{"aria-label":`${r} OAuth1 consumer key`,className:x,placeholder:"Consumer key",value:a.consumerKey,onChange:S=>f({...a,consumerKey:S.target.value})}),s.jsx("input",{"aria-label":`${r} OAuth1 consumer secret`,type:"password",autoComplete:"off",className:x,placeholder:"Consumer secret",value:a.consumerSecret,onChange:S=>f({...a,consumerSecret:S.target.value})}),s.jsx("input",{"aria-label":`${r} OAuth1 token`,className:x,placeholder:"Token (optional)",value:a.token||"",onChange:S=>f({...a,token:S.target.value})}),s.jsx("input",{"aria-label":`${r} OAuth1 token secret`,type:"password",autoComplete:"off",className:x,placeholder:"Token secret (optional)",value:a.tokenSecret||"",onChange:S=>f({...a,tokenSecret:S.target.value})}),s.jsxs("select",{"aria-label":`${r} OAuth1 signature method`,className:x,value:a.signatureMethod||"HMAC-SHA1",onChange:S=>f({...a,signatureMethod:S.target.value}),children:[s.jsx("option",{children:"HMAC-SHA1"}),s.jsx("option",{children:"HMAC-SHA256"}),s.jsx("option",{children:"PLAINTEXT"})]}),s.jsx("input",{"aria-label":`${r} OAuth1 realm`,className:x,placeholder:"Realm (optional)",value:a.realm||"",onChange:S=>f({...a,realm:S.target.value})})]}),a.type==="awsv4"&&s.jsxs("div",{className:"grid gap-2",children:[s.jsx("input",{"aria-label":`${r} AWS access key`,className:x,placeholder:"Access key",value:a.accessKey,onChange:S=>f({...a,accessKey:S.target.value})}),s.jsx("input",{"aria-label":`${r} AWS secret key`,type:"password",autoComplete:"off",className:x,placeholder:"Secret key",value:a.secretKey,onChange:S=>f({...a,secretKey:S.target.value})}),s.jsx("input",{"aria-label":`${r} AWS session token`,type:"password",autoComplete:"off",className:x,placeholder:"Session token (optional)",value:a.sessionToken||"",onChange:S=>f({...a,sessionToken:S.target.value})}),s.jsx("input",{"aria-label":`${r} AWS region`,className:x,placeholder:"Region",value:a.region,onChange:S=>f({...a,region:S.target.value})}),s.jsx("input",{"aria-label":`${r} AWS service`,className:x,placeholder:"Service",value:a.service,onChange:S=>f({...a,service:S.target.value})})]}),v&&s.jsx("p",{role:m(v)?"status":"alert",className:"text-[11px] opacity-75",children:m(v)?"This authorization mode is executed by the FlexDoc API host.":"Host execution is disabled or this documentation host does not support the selected authorization mode."})]})};Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){a.type==="entity"&&(a.attributes.title=a.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(r,o){var u={};u["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[o]},u.cdata=/^<!\[CDATA\[|\]\]>$/i;var f={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:u}};f["language-"+o]={pattern:/[\s\S]+/,inside:Prism.languages[o]};var p={};p[r]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:f},Prism.languages.insertBefore("markup","cdata",p)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,r){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+a+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:Prism.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",function(r){if(r.language!=="graphql")return;var o=r.tokens.filter(function(z){return typeof z!="string"&&z.type!=="comment"&&z.type!=="scalar"}),u=0;function f(z){return o[u+z]}function p(z,M){M=M||0;for(var B=0;B<z.length;B++){var T=f(B+M);if(!T||T.type!==z[B])return!1}return!0}function g(z,M){for(var B=1,T=u;T<o.length;T++){var E=o[T],w=E.content;if(E.type==="punctuation"&&typeof w=="string"){if(z.test(w))B++;else if(M.test(w)&&(B--,B===0))return T}}return-1}function x(z,M){var B=z.alias;B?Array.isArray(B)||(z.alias=B=[B]):z.alias=B=[],B.push(M)}for(;u<o.length;){var b=o[u++];if(b.type==="keyword"&&b.content==="mutation"){var m=[];if(p(["definition-mutation","punctuation"])&&f(1).content==="("){u+=2;var v=g(/^\($/,/^\)$/);if(v===-1)continue;for(;u<v;u++){var S=f(0);S.type==="variable"&&(x(S,"variable-input"),m.push(S.content))}u=v+1}if(p(["punctuation","property-query"])&&f(0).content==="{"&&(u++,x(f(0),"property-mutation"),m.length>0)){var N=g(/^\{$/,/^\}$/);if(N===-1)continue;for(var _=u;_<N;_++){var R=o[_];R.type==="variable"&&m.indexOf(R.content)>=0&&x(R,"variable-input")}}}}});const M0=`
49
+ .api-client-code-editor .token.comment,.api-client-code-editor .token.prolog,.api-client-code-editor .token.doctype,.api-client-code-editor .token.cdata{color:#6b7280}
50
+ .api-client-code-editor.light .token.punctuation{color:#4b5563}.api-client-code-editor.dark .token.punctuation{color:#d1d5db}
51
+ .api-client-code-editor.light .token.property,.api-client-code-editor.light .token.tag,.api-client-code-editor.light .token.boolean,.api-client-code-editor.light .token.number,.api-client-code-editor.light .token.constant,.api-client-code-editor.light .token.symbol{color:#b91c1c}
52
+ .api-client-code-editor.dark .token.property,.api-client-code-editor.dark .token.tag,.api-client-code-editor.dark .token.boolean,.api-client-code-editor.dark .token.number,.api-client-code-editor.dark .token.constant,.api-client-code-editor.dark .token.symbol{color:#fca5a5}
53
+ .api-client-code-editor.light .token.selector,.api-client-code-editor.light .token.attr-name,.api-client-code-editor.light .token.string,.api-client-code-editor.light .token.char,.api-client-code-editor.light .token.builtin,.api-client-code-editor.light .token.inserted{color:#047857}
54
+ .api-client-code-editor.dark .token.selector,.api-client-code-editor.dark .token.attr-name,.api-client-code-editor.dark .token.string,.api-client-code-editor.dark .token.char,.api-client-code-editor.dark .token.builtin,.api-client-code-editor.dark .token.inserted{color:#6ee7b7}
55
+ .api-client-code-editor.light .token.operator,.api-client-code-editor.light .token.entity,.api-client-code-editor.light .token.url,.api-client-code-editor.light .token.variable{color:#92400e}
56
+ .api-client-code-editor.dark .token.operator,.api-client-code-editor.dark .token.entity,.api-client-code-editor.dark .token.url,.api-client-code-editor.dark .token.variable{color:#fcd34d}
57
+ .api-client-code-editor.light .token.atrule,.api-client-code-editor.light .token.attr-value,.api-client-code-editor.light .token.function,.api-client-code-editor.light .token.class-name{color:#1d4ed8}
58
+ .api-client-code-editor.dark .token.atrule,.api-client-code-editor.dark .token.attr-value,.api-client-code-editor.dark .token.function,.api-client-code-editor.dark .token.class-name{color:#93c5fd}
59
+ .api-client-code-editor.light .token.keyword{color:#7e22ce}.api-client-code-editor.dark .token.keyword{color:#d8b4fe}
60
+ .api-client-code-editor.light .token.regex,.api-client-code-editor.light .token.important{color:#c2410c}.api-client-code-editor.dark .token.regex,.api-client-code-editor.dark .token.important{color:#fdba74}
61
+ `;function q0(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function D0(a){return a==="text"?{name:"text"}:a==="xml"||a==="html"?{grammar:Lr.languages.markup,name:"markup"}:{grammar:Lr.languages[a],name:a}}const Kl=W.forwardRef(({ariaLabel:a,value:r,onChange:o,language:u="text",theme:f="light",minLines:p=7,maxLines:g=16,dataTestId:x,onEditorKeyDown:b,onCursorChange:m},v)=>{const S=W.useRef(null),[N,_]=W.useState(0),[R,z]=W.useState(0),M=Math.max(1,r.split(`
62
+ `).length),T=Math.min(g,Math.max(p,M))*24+16,E=W.useMemo(()=>{const q=D0(u);return q.grammar?Lr.highlight(r||" ",q.grammar,q.name):q0(r||" ")},[u,r]),w=q=>{S.current=q,typeof v=="function"?v(q):v&&(v.current=q)},U=q=>requestAnimationFrame(()=>{const J=S.current;J&&(J.focus(),J.setSelectionRange(q,q),m?.(q))}),Y=(q,J)=>{const Se=q.selectionStart,Ae=q.selectionEnd;if(J){const se=r.lastIndexOf(`
63
+ `,Se-1)+1,he=r.slice(se,Math.min(se+2,r.length)).match(/^ {1,2}/)?.[0]||"";if(!he)return;o(`${r.slice(0,se)}${r.slice(se+he.length)}`),U(Math.max(se,Se-he.length));return}o(`${r.slice(0,Se)} ${r.slice(Ae)}`),U(Se+2)},$=f==="dark";return s.jsxs("div",{className:`api-client-code-editor ${$?"dark":"light"} overflow-hidden rounded-md border ${$?"border-gray-700 bg-gray-950":"border-gray-300 bg-white"}`,children:[s.jsx("style",{children:M0}),s.jsxs("div",{className:"grid grid-cols-[3rem_minmax(0,1fr)]",style:{height:T},children:[s.jsx("div",{"aria-hidden":"true",className:`select-none overflow-hidden border-r py-2 pr-2 text-right font-mono text-xs leading-6 ${$?"border-gray-800 bg-gray-900 text-gray-600":"border-gray-200 bg-gray-50 text-gray-400"}`,children:s.jsx("div",{style:{transform:`translateY(${-N}px)`},children:Array.from({length:M},(q,J)=>s.jsx("div",{children:J+1},J))})}),s.jsxs("div",{className:"relative min-w-0 overflow-hidden",children:[s.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 overflow-hidden",children:s.jsx("pre",{className:`m-0 min-w-max whitespace-pre px-3 py-2 font-mono text-xs leading-6 ${$?"text-gray-100":"text-gray-900"}`,style:{transform:`translate(${-R}px, ${-N}px)`,tabSize:2},children:s.jsx("code",{dangerouslySetInnerHTML:{__html:E.endsWith(`
64
+ `)?E:`${E}
65
+ `}})})}),s.jsx("textarea",{ref:w,"aria-label":a,className:"absolute inset-0 h-full w-full resize-none overflow-auto bg-transparent px-3 py-2 font-mono text-xs leading-6 outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500","data-testid":x,onChange:q=>{o(q.target.value),m?.(q.target.selectionStart)},onClick:q=>m?.(q.currentTarget.selectionStart),onKeyDown:q=>{b?.(q),!q.defaultPrevented&&q.key==="Tab"&&(q.preventDefault(),Y(q.currentTarget,q.shiftKey))},onKeyUp:q=>m?.(q.currentTarget.selectionStart),onScroll:q=>{_(q.currentTarget.scrollTop),z(q.currentTarget.scrollLeft)},onSelect:q=>m?.(q.currentTarget.selectionStart),spellCheck:!1,style:{color:"transparent",caretColor:$?"#f9fafb":"#111827",WebkitTextFillColor:"transparent",tabSize:2,whiteSpace:"pre"},value:r,wrap:"off"})]})]})]})});Kl.displayName="ApiClientCodeEditor";function Ws(a){return(a||[]).filter(r=>r.enabled!==!1&&r.key.trim()!=="")}function gf(a){if(a.bodyMode)return a.bodyMode;if(a.binary?.file||a.binary?.fileName)return"binary";if(a.formData?.length)return"formdata";if(a.urlencoded?.length)return"urlencoded";if(a.graphql&&(a.graphql.query||a.graphql.variables))return"graphql";if(!a.body)return"none";const r=(a.contentType||"").toLowerCase();return r.includes("application/x-www-form-urlencoded")?"urlencoded":r.includes("multipart/form-data")?"formdata":r.includes("json")?"json":"raw"}function xf(a){const r=new Set,o=a.auth;return o?.type==="apiKey"&&o.in==="cookie"?r.add("cookies"):o?.type==="digest"?r.add("digest"):o?.type==="hawk"?r.add("hawk"):o?.type==="ntlm"?r.add("ntlm"):o?.type==="oauth1"?r.add("oauth1"):o?.type==="awsv4"&&r.add("awsv4"),a.headers?.some(u=>u.enabled!==!1&&u.key.trim().toLowerCase()==="cookie")&&r.add("cookies"),a.hostExecution?.cookieJar==="session"&&r.add("cookies"),a.hostExecution?.certificateId&&r.add("clientCertificates"),[...r]}function z0(a,r){if(!r.length)return a;const o=a.indexOf("#"),u=o>=0?a.slice(0,o):a,f=o>=0?a.slice(o):"",p=r.map(({key:x,value:b})=>`${encodeURIComponent(x)}=${encodeURIComponent(b)}`).join("&"),g=u.includes("?")?u.endsWith("?")||u.endsWith("&")?"":"&":"?";return`${u}${g}${p}${f}`}function U0(a){const r=a.indexOf("#"),o=r>=0?a.slice(0,r):a,u=r>=0?a.slice(r):"",f=o.indexOf("?");if(f<0)return{url:a,query:[]};const p=[];return new URLSearchParams(o.slice(f+1)).forEach((x,b)=>p.push({key:b,value:x})),{url:`${o.slice(0,f)}${u}`,query:p}}function eo(a,r){return a.find(([o])=>o.toLowerCase()===r.toLowerCase())?.[1]}function Vr(a,r,o){for(let u=a.length-1;u>=0;u-=1)a[u][0].toLowerCase()===r.toLowerCase()&&a.splice(u,1);a.push([r,o])}function H0(a){const r={};for(const[o,u]of a)r[o]=u;return r}function L0(a){const r=a.headerEntries;if(!Array.isArray(r))return Object.entries(a.headers||{});const o=[];for(const u of r){if(Array.isArray(u)&&u.length>=2){o.push([String(u[0]),String(u[1])]);continue}if(u&&typeof u=="object"&&"key"in u&&"value"in u){const f=u;f.enabled!==!1&&o.push([String(f.key),String(f.value)])}}return o.length||r.length===0?o:Object.entries(a.headers||{})}function B0(a){if(typeof globalThis.btoa=="function"){if(typeof TextEncoder>"u")throw new Error("Basic auth requires UTF-8 encoding support.");const o=new TextEncoder().encode(a);let u="";for(const f of o)u+=String.fromCharCode(f);return globalThis.btoa(u)}const r=globalThis.Buffer;if(r?.from)return r.from(a,"utf8").toString("base64");throw new Error("Basic auth requires a Base64 encoder in this runtime.")}function qe(a,r){return a===void 0||a===""?a:a.replace(/\{\{\s*([^{}]+?)\s*\}\}/g,(o,u)=>{const f=u.trim();return Object.prototype.hasOwnProperty.call(r,f)?r[f]:o})}function I0(a,r){if(!a||a.type==="none"||a.type==="inherit")return a;if(a.type==="bearer")return{type:"bearer",token:qe(a.token,r)||""};if(a.type==="oauth2"){const o={...a,accessToken:qe(a.accessToken,r)||""};return a.authorizationUrl!==void 0&&(o.authorizationUrl=qe(a.authorizationUrl,r)),a.tokenUrl!==void 0&&(o.tokenUrl=qe(a.tokenUrl,r)),a.clientId!==void 0&&(o.clientId=qe(a.clientId,r)),a.clientSecret!==void 0&&(o.clientSecret=qe(a.clientSecret,r)),a.redirectUri!==void 0&&(o.redirectUri=qe(a.redirectUri,r)),a.scopes!==void 0&&(o.scopes=a.scopes.map(u=>qe(u,r)||"")),a.username!==void 0&&(o.username=qe(a.username,r)),a.password!==void 0&&(o.password=qe(a.password,r)),a.refreshToken!==void 0&&(o.refreshToken=qe(a.refreshToken,r)),o}return a.type==="basic"?{type:"basic",username:qe(a.username,r)||"",password:qe(a.password,r)||""}:a.type==="apiKey"?{type:"apiKey",key:qe(a.key,r)||"",value:qe(a.value,r)||"",in:a.in}:a.type==="digest"?{type:"digest",username:qe(a.username,r)||"",password:qe(a.password,r)||""}:a.type==="hawk"?{...a,id:qe(a.id,r)||"",key:qe(a.key,r)||"",ext:qe(a.ext,r)}:a.type==="ntlm"?{...a,username:qe(a.username,r)||"",password:qe(a.password,r)||"",domain:qe(a.domain,r),workstation:qe(a.workstation,r)}:a.type==="oauth1"?{...a,consumerKey:qe(a.consumerKey,r)||"",consumerSecret:qe(a.consumerSecret,r)||"",token:qe(a.token,r),tokenSecret:qe(a.tokenSecret,r),realm:qe(a.realm,r)}:{...a,accessKey:qe(a.accessKey,r)||"",secretKey:qe(a.secretKey,r)||"",sessionToken:qe(a.sessionToken,r),region:qe(a.region,r)||"",service:qe(a.service,r)||""}}function bf(a,r){return{method:qe(a.method,r)??a.method,url:qe(a.url,r)??a.url,query:a.query?.map(o=>({...o,key:qe(o.key,r)||"",value:qe(o.value,r)||""})),headers:a.headers?.map(o=>({...o,key:qe(o.key,r)||"",value:qe(o.value,r)||""})),body:qe(a.body,r),contentType:qe(a.contentType,r),bodyMode:a.bodyMode,urlencoded:a.urlencoded?.map(o=>({...o,key:qe(o.key,r)||"",value:qe(o.value,r)||""})),formData:a.formData?.map(o=>({...o,key:qe(o.key,r)||"",value:qe(o.value,r)||"",fileName:qe(o.fileName,r),contentType:qe(o.contentType,r)})),binary:a.binary?{...a.binary,fileName:qe(a.binary.fileName,r),contentType:qe(a.binary.contentType,r)}:void 0,graphql:a.graphql?{query:qe(a.graphql.query,r)||"",variables:qe(a.graphql.variables,r)||""}:void 0,auth:I0(a.auth,r),hostExecution:a.hostExecution?{...a.hostExecution}:void 0}}function Y0(a,r,o){const u=a.auth;if(!(!u||u.type==="none"||u.type==="inherit")){if(u.type==="bearer"){u.token&&Vr(r,"Authorization",`Bearer ${u.token}`);return}if(u.type==="oauth2"){u.accessToken&&Vr(r,"Authorization",`Bearer ${u.accessToken}`);return}if(u.type==="basic"){(u.username||u.password)&&Vr(r,"Authorization",`Basic ${B0(`${u.username}:${u.password}`)}`);return}u.type!=="apiKey"||!u.key||(u.in==="query"?o.push({key:u.key,value:u.value}):u.in==="header"&&Vr(r,u.key,u.value))}}function G0(a,r={}){const o=r.variables?bf(a,r.variables):a,u=(o.method||"GET").trim().toUpperCase(),f=o.url.trim();if(!f)throw new Error("Request URL is required.");const p=xf(o);if(p.length>0)throw new Error(`This request requires API host execution (${p.join(", ")}).`);const g=Ws(o.query),x=Ws(o.headers).map(({key:R,value:z})=>[R,z]);Y0(o,x,g);let b,m,v;const S=gf(o);if(!["GET","HEAD"].includes(u)&&S!=="none"){if(S==="formdata")for(let M=x.length-1;M>=0;M-=1)x[M][0].toLowerCase()==="content-type"&&x.splice(M,1);const R=eo(x,"Content-Type"),z=o.contentType?.trim();if(S==="urlencoded")b=Ws(o.urlencoded).map(({key:B,value:T})=>`${encodeURIComponent(B)}=${encodeURIComponent(T)}`).join("&"),v=b,R||x.push(["Content-Type",z||"application/x-www-form-urlencoded"]),m="form";else if(S==="formdata"){const M=new FormData,B=[];for(const T of(o.formData||[]).filter(E=>E.enabled!==!1&&E.key.trim()!==""))if(T.type==="file"){if(!T.file)throw new Error(`File field "${T.key}" needs a file selection.`);M.append(T.key,T.file,T.fileName||T.file.name),B.push(`${T.key}=[file: ${T.fileName||T.file.name}]`)}else M.append(T.key,T.value),B.push(`${T.key}=${T.value}`);b=B.join(`
66
+ `),v=M,m="multipart"}else if(S==="binary"){const M=o.binary;if(!M?.file)throw new Error("Binary body needs a file selection.");b=`[file: ${M.fileName||M.file.name}]`,v=M.file,R||x.push(["Content-Type",z||M.contentType||M.file.type||"application/octet-stream"]),m="binary"}else if(S==="graphql"){const M=o.graphql?.query||"",B=o.graphql?.variables?.trim()||"";let T={};if(B)try{T=JSON.parse(B)}catch{throw new Error("GraphQL variables must be valid JSON.")}b=JSON.stringify({query:M,variables:T}),v=b,R||x.push(["Content-Type",z||"application/json"]),m="json"}else{b=o.body||"",v=b;const M=S==="json"?"application/json":void 0;!R&&(z||M)&&x.push(["Content-Type",z||M]),m=S==="json"||(R||z||M)?.includes("json")?"json":"text"}}const N=H0(x);return{url:z0(f,g),method:u,headers:N,headerEntries:x,body:b,bodyKind:m,init:{method:u,headers:x,body:v}}}function F0(a){const r=L0(a),o=U0(a.url),u=a.bodyKind==="binary"&&typeof File<"u"&&a.init.body instanceof File?a.init.body:void 0;return{method:a.method,url:o.url,query:o.query,headers:r.map(([f,p])=>({key:f,value:p})),body:a.body,contentType:eo(r,"Content-Type"),bodyMode:a.bodyKind==="json"?"json":a.bodyKind==="form"?"urlencoded":a.bodyKind==="multipart"?"formdata":a.bodyKind==="binary"?"binary":a.body?"raw":"none",binary:a.bodyKind==="binary"?{file:u,fileName:u?.name,contentType:eo(r,"Content-Type")}:void 0,urlencoded:a.bodyKind==="form"&&a.body?[...new URLSearchParams(a.body).entries()].map(([f,p])=>({key:f,value:p,enabled:!0})):void 0,auth:{type:"none"}}}function vf(a,r={}){return G0(a,r)}function Sf(a){return gf(a)}function to(a){return xf(a)}function V0(a,r){return bf(a,r)}function no(a){return F0(a)}const jf=()=>({key:"",value:"",enabled:!0}),ao=()=>({key:"",value:"",enabled:!0,type:"text"}),Af=[["application/json","JSON — application/json"],["application/problem+json","Problem JSON — application/problem+json"],["application/ld+json","JSON-LD — application/ld+json"],["text/plain","Text — text/plain"],["application/xml","XML — application/xml"],["text/html","HTML — text/html"],["application/javascript","JavaScript — application/javascript"],["application/octet-stream","Binary — application/octet-stream"]];function K0(a){const r=(a||"").toLowerCase();return r.includes("json")?"json":r.includes("xml")?"xml":r.includes("html")?"html":r.includes("javascript")?"javascript":"text"}function X0({label:a,entries:r,onChange:o,inputClass:u}){const f=(p,g)=>o(r.map((x,b)=>b===p?{...x,...g}:x));return s.jsxs("div",{className:"space-y-2",children:[r.map((p,g)=>s.jsxs("div",{className:"grid grid-cols-[auto_1fr_1fr_auto] items-center gap-2",children:[s.jsx("input",{"aria-label":`${a} ${g+1} enabled`,type:"checkbox",checked:p.enabled!==!1,onChange:x=>f(g,{enabled:x.target.checked})}),s.jsx("input",{"aria-label":`${a} ${g+1} key`,className:`min-w-0 rounded-md border px-3 py-2 text-sm ${u}`,placeholder:"Key",value:p.key,onChange:x=>f(g,{key:x.target.value})}),s.jsx("input",{"aria-label":`${a} ${g+1} value`,className:`min-w-0 rounded-md border px-3 py-2 text-sm ${u}`,placeholder:"Value",value:p.value,onChange:x=>f(g,{value:x.target.value})}),s.jsx("button",{type:"button","aria-label":`Remove ${a.toLowerCase()} ${g+1}`,className:"rounded-md border p-2",onClick:()=>o(r.filter((x,b)=>b!==g)),children:s.jsx(dn,{className:"h-4 w-4"})})]},g)),s.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 rounded-md border px-3 py-2 text-xs",onClick:()=>o([...r,jf()]),children:[s.jsx(Ra,{className:"h-3.5 w-3.5"})," Add field"]})]})}const Z0=({draft:a,onChange:r,theme:o="light"})=>{const u=a.bodyMode||Sf(a),f=o==="dark",p=f?"border-gray-700 bg-gray-900 text-gray-100":"border-gray-300 bg-white text-gray-900",x=Af.some(([N])=>N===a.contentType)?a.contentType||"application/json":"__custom__",b=W.useMemo(()=>{if(u!=="json"||!(a.body||"").trim())return null;try{return JSON.parse(a.body||""),""}catch(N){return N instanceof Error?N.message:"Invalid JSON"}},[a.body,u]),m=W.useMemo(()=>{const N=a.graphql?.variables?.trim();if(u!=="graphql"||!N)return null;try{return JSON.parse(N),""}catch(_){return _ instanceof Error?_.message:"Invalid JSON"}},[a.graphql?.variables,u]),v=N=>{const _={bodyMode:N};N==="json"&&(!a.contentType||!a.contentType.includes("json"))&&(_.contentType="application/json"),N==="raw"&&!a.contentType&&(_.contentType="text/plain"),N==="urlencoded"&&(_.contentType="application/x-www-form-urlencoded"),N==="formdata"&&(_.contentType=void 0),N==="binary"&&!a.contentType&&(_.contentType="application/octet-stream"),N==="graphql"&&(_.contentType="application/json"),r({...a,..._})},S=(N,_)=>{const R=a.formData||[ao()];r({...a,formData:R.map((z,M)=>M===N?{...z,..._}:z)})};return s.jsxs("section",{className:"space-y-3","aria-labelledby":"api-client-body-heading",children:[s.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[s.jsxs("label",{className:"text-sm font-medium",children:["Body type",s.jsxs("select",{"aria-label":"Request body type",className:`ml-2 rounded-md border px-3 py-2 text-sm ${p}`,value:u,onChange:N=>v(N.target.value),children:[s.jsx("option",{value:"none",children:"None"}),s.jsx("option",{value:"json",children:"JSON"}),s.jsx("option",{value:"raw",children:"Raw"}),s.jsx("option",{value:"urlencoded",children:"x-www-form-urlencoded"}),s.jsx("option",{value:"formdata",children:"form-data"}),s.jsx("option",{value:"binary",children:"Binary"}),s.jsx("option",{value:"graphql",children:"GraphQL"})]})]}),(u==="json"||u==="raw"||u==="binary")&&s.jsxs("div",{className:"flex flex-wrap items-end gap-2",children:[s.jsxs("label",{className:"text-sm font-medium",children:["Content type",s.jsxs("select",{"aria-label":"Content type",className:`ml-2 rounded-md border px-3 py-2 text-sm ${p}`,value:x,onChange:N=>{const _=N.target.value==="__custom__"?"":N.target.value;r({...a,contentType:_})},children:[Af.map(([N,_])=>s.jsx("option",{value:N,children:_},N)),s.jsx("option",{value:"__custom__",children:"Custom…"})]})]}),x==="__custom__"&&s.jsx("input",{"aria-label":"Custom content type",className:`rounded-md border px-3 py-2 text-sm ${p}`,placeholder:"application/vnd.example+json",value:a.contentType||"",onChange:N=>r({...a,contentType:N.target.value})})]})]}),u==="none"&&s.jsx("div",{className:`rounded-md border border-dashed p-4 text-sm ${f?"border-gray-700 text-gray-400":"border-gray-300 text-gray-500"}`,children:"This request has no body."}),(u==="json"||u==="raw")&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(Kl,{ariaLabel:"Request body",language:u==="json"?"json":K0(a.contentType),theme:o,value:a.body||"",onChange:N=>r({...a,body:N}),minLines:9,maxLines:20}),s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[s.jsx("span",{className:`text-xs ${b?"text-red-600":u==="json"&&b===""?"text-green-600":f?"text-gray-400":"text-gray-500"}`,children:u==="json"?b?`Invalid JSON: ${b}`:(a.body||"").trim()?"Valid JSON":"Enter a JSON object, array, or value.":"Raw body is sent exactly as entered."}),u==="json"&&s.jsx("button",{type:"button",className:"rounded-md border px-3 py-1.5 text-xs",disabled:!!b||!(a.body||"").trim(),onClick:()=>{try{r({...a,body:JSON.stringify(JSON.parse(a.body||""),null,2)})}catch{}},children:"Beautify JSON"})]})]}),u==="urlencoded"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(X0,{label:"Form field",entries:a.urlencoded?.length?a.urlencoded:[jf()],inputClass:p,onChange:N=>r({...a,urlencoded:N,contentType:"application/x-www-form-urlencoded"})}),s.jsx("p",{className:`text-xs ${f?"text-gray-400":"text-gray-500"}`,children:"Enabled fields are URL-encoded at send time. Variable substitution still applies to keys and values."})]}),u==="formdata"&&s.jsxs("div",{className:"space-y-2",children:[(a.formData?.length?a.formData:[ao()]).map((N,_)=>s.jsxs("div",{className:"grid gap-2 md:grid-cols-[auto_7rem_1fr_1fr_auto]",children:[s.jsx("input",{"aria-label":`Form data ${_+1} enabled`,type:"checkbox",checked:N.enabled!==!1,onChange:R=>S(_,{enabled:R.target.checked})}),s.jsxs("select",{"aria-label":`Form data ${_+1} type`,className:`rounded-md border px-2 py-2 text-sm ${p}`,value:N.type||"text",onChange:R=>S(_,{type:R.target.value,file:void 0,fileName:void 0}),children:[s.jsx("option",{value:"text",children:"Text"}),s.jsx("option",{value:"file",children:"File"})]}),s.jsx("input",{"aria-label":`Form data ${_+1} key`,className:`min-w-0 rounded-md border px-3 py-2 text-sm ${p}`,placeholder:"Key",value:N.key,onChange:R=>S(_,{key:R.target.value})}),N.type==="file"?s.jsxs("label",{className:`flex min-w-0 cursor-pointer items-center rounded-md border px-3 py-2 text-sm ${p}`,children:[s.jsx("span",{className:"truncate",children:N.file?.name||N.fileName||"Choose file…"}),s.jsx("input",{"aria-label":`Form data ${_+1} file`,className:"sr-only",type:"file",onChange:R=>{const z=R.target.files?.[0];S(_,{file:z,fileName:z?.name,contentType:z?.type||void 0})}})]}):s.jsx("input",{"aria-label":`Form data ${_+1} value`,className:`min-w-0 rounded-md border px-3 py-2 text-sm ${p}`,placeholder:"Value",value:N.value,onChange:R=>S(_,{value:R.target.value})}),s.jsx("button",{type:"button","aria-label":`Remove form data ${_+1}`,className:"rounded-md border p-2",onClick:()=>r({...a,formData:(a.formData||[]).filter((R,z)=>z!==_)}),children:s.jsx(dn,{className:"h-4 w-4"})})]},_)),s.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 rounded-md border px-3 py-2 text-xs",onClick:()=>r({...a,formData:[...a.formData||[],ao()]}),children:[s.jsx(Ra,{className:"h-3.5 w-3.5"})," Add form-data field"]}),s.jsx("p",{className:`text-xs ${f?"text-gray-400":"text-gray-500"}`,children:"The browser supplies the multipart boundary automatically. Imported Postman file paths must be re-selected from this browser."})]}),u==="binary"&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{className:`flex cursor-pointer items-center justify-between gap-3 rounded-md border px-3 py-3 text-sm ${p}`,children:[s.jsx("span",{className:"min-w-0 truncate",children:a.binary?.file?.name||a.binary?.fileName||"Choose binary file…"}),s.jsx("span",{className:"shrink-0 text-xs font-medium",children:"Browse"}),s.jsx("input",{"aria-label":"Binary file",className:"sr-only",type:"file",onChange:N=>{const _=N.target.files?.[0];r({...a,contentType:_?.type||a.contentType||"application/octet-stream",binary:{file:_,fileName:_?.name||a.binary?.fileName,contentType:_?.type||a.binary?.contentType}})}})]}),s.jsx("p",{className:`text-xs ${f?"text-gray-400":"text-gray-500"}`,children:"The selected file is sent as the request body without text conversion. Saved requests retain only file metadata, so the browser asks you to re-select the file before a later send or collection run."})]}),u==="graphql"&&s.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"text-xs font-medium",children:"Query"}),s.jsx(Kl,{ariaLabel:"GraphQL query",language:"graphql",theme:o,value:a.graphql?.query||"",onChange:N=>r({...a,graphql:{query:N,variables:a.graphql?.variables||""}}),minLines:9,maxLines:20})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"text-xs font-medium",children:"Variables (JSON)"}),s.jsx(Kl,{ariaLabel:"GraphQL variables",language:"json",theme:o,value:a.graphql?.variables||"",onChange:N=>r({...a,graphql:{query:a.graphql?.query||"",variables:N}}),minLines:9,maxLines:20}),s.jsx("div",{className:`text-xs ${m?"text-red-600":f?"text-gray-400":"text-gray-500"}`,children:m?`Invalid variables JSON: ${m}`:"Variables are serialized with the query as application/json."})]})]})]})};function Q0(a,r){return a.find(([o])=>o.toLowerCase()===r.toLowerCase())?.[1]||""}function J0(a,r){const o=r.toLowerCase();if(o.includes("json"))try{return{body:JSON.stringify(JSON.parse(a),null,2),language:"json"}}catch{return{body:a,language:"json",invalidJson:!0}}return o.includes("html")?{body:a,language:"markup"}:o.includes("xml")?{body:a,language:"markup"}:o.includes("javascript")?{body:a,language:"javascript"}:{body:a,language:"text"}}const Nf=({response:a,theme:r="light"})=>{const[o,u]=W.useState("pretty"),f=Q0(a.headers,"content-type"),p=W.useMemo(()=>J0(a.body,f),[f,a.body]),g=/(?:text\/html|application\/xhtml\+xml)/i.test(f),x=W.useMemo(()=>new TextEncoder().encode(a.body).byteLength,[a.body]),b=r==="dark";return s.jsxs("section",{className:"space-y-3","aria-labelledby":"api-client-response-heading",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[s.jsxs("div",{id:"api-client-response-heading",className:"font-semibold",children:["Response ",s.jsxs("span",{className:a.status>=400?"text-red-600":"text-green-600",children:[a.status," ",a.statusText]})]}),s.jsxs("div",{className:`flex flex-wrap gap-3 text-xs ${b?"text-gray-400":"text-gray-500"}`,children:[s.jsxs("span",{children:[a.responseTime," ms"]}),s.jsxs("span",{children:[x.toLocaleString()," B"]}),f&&s.jsx("span",{className:"font-mono",children:f.split(";")[0]})]})]}),s.jsxs("div",{className:`flex w-fit overflow-hidden rounded-md border ${b?"border-gray-700":"border-gray-300"}`,role:"group","aria-label":"Response body view",children:[["pretty","raw"].map(m=>{const v=m==="pretty"?"Pretty":"Raw";return s.jsx("button",{type:"button","aria-label":v,"aria-pressed":o===m,className:`px-3 py-1.5 text-xs font-medium ${o===m?"bg-blue-600 text-white":b?"bg-gray-900 text-gray-300":"bg-white text-gray-700"}`,onClick:()=>u(m),children:v},m)}),s.jsx("button",{type:"button",disabled:!g,"aria-pressed":o==="preview",className:`px-3 py-1.5 text-xs font-medium ${o==="preview"?"bg-blue-600 text-white":b?"bg-gray-900 text-gray-300":"bg-white text-gray-700"} disabled:cursor-not-allowed disabled:opacity-40`,onClick:()=>u("preview"),children:"Preview"})]}),o==="pretty"&&s.jsxs("div",{className:"space-y-2",children:[p.invalidJson&&s.jsx("div",{className:"rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-xs text-amber-800",children:"Response declares JSON but could not be parsed. Showing the exact payload."}),s.jsx(zn,{code:p.body||"(empty response)",language:p.language,title:"Body — Pretty",theme:r,wrap:!0})]}),o==="raw"&&s.jsx("div",{"data-testid":"api-client-response-raw-body",children:s.jsx(zn,{code:a.body||"(empty response)",language:"text",title:"Body — Raw",theme:r,wrap:!0})}),o==="preview"&&g&&s.jsx("iframe",{title:"Response preview",sandbox:"",srcDoc:a.body,className:`min-h-80 w-full rounded-md border bg-white ${b?"border-gray-700":"border-gray-300"}`}),a.headers.length>0&&s.jsxs("details",{className:`rounded-md border ${b?"border-gray-700":"border-gray-200"}`,children:[s.jsxs("summary",{className:"cursor-pointer px-3 py-2 text-sm font-medium",children:["Response headers (",a.headers.length,")"]}),s.jsx("div",{className:"border-t p-3",children:s.jsx(zn,{code:a.headers.map(([m,v])=>`${m}: ${v}`).join(`
67
+ `),language:"text",theme:r,wrap:!0})})]})]})};function P0(a,r){const o=window.getComputedStyle(a),u=a.getBoundingClientRect(),f=document.createElement("div");f.style.position="fixed",f.style.visibility="hidden",f.style.pointerEvents="none",f.style.left=`${u.left}px`,f.style.top=`${u.top}px`,f.style.width=`${a.clientWidth}px`,f.style.height=`${a.clientHeight}px`,f.style.overflow="hidden",f.style.whiteSpace="pre",f.style.fontFamily=o.fontFamily,f.style.fontSize=o.fontSize,f.style.fontWeight=o.fontWeight,f.style.fontStyle=o.fontStyle,f.style.letterSpacing=o.letterSpacing,f.style.lineHeight=o.lineHeight,f.style.padding=o.padding,f.style.border=o.border,f.style.boxSizing=o.boxSizing,f.style.tabSize=o.tabSize;const p=document.createTextNode(a.value.slice(0,r)),g=document.createElement("span");g.textContent="​",f.append(p,g),document.body.appendChild(f);const x=g.getBoundingClientRect(),b=Number.parseFloat(o.lineHeight)||24,m={left:x.left-a.scrollLeft,top:x.top-a.scrollTop,bottom:x.top-a.scrollTop+b};return f.remove(),m}const lo=[{label:"get",kind:"method",signature:"get(key: string): string | undefined",documentation:"Read a variable by key."},{label:"has",kind:"method",signature:"has(key: string): boolean",documentation:"Check whether a variable is defined."},{label:"set",kind:"method",signature:"set(key: string, value: unknown): void",documentation:"Set a variable. Collection and environment stores persist the change in the workspace."},{label:"unset",kind:"method",signature:"unset(key: string): void",documentation:"Remove a variable by key."},{label:"replaceIn",kind:"method",signature:"replaceIn(value: string): string",documentation:"Replace {{variable}} placeholders using this variable scope."}],W0={flex:[{label:"request",kind:"property",documentation:"The mutable request draft available to pre-request and test scripts."},{label:"response",kind:"property",documentation:"The response from the executed request.",testsOnly:!0},{label:"environment",kind:"property",documentation:"Read and mutate variables in the active environment."},{label:"collection",kind:"property",documentation:"Read and mutate variables on the current collection."},{label:"variables",kind:"property",documentation:"Read and mutate the effective variables for this execution."},{label:"expect",kind:"function",signature:"expect(actual: unknown): FlexExpectation",documentation:"Create an assertion chain for a value."},{label:"test",kind:"function",signature:"test(name: string, callback: () => unknown | Promise<unknown>): void",documentation:"Register a post-response test.",testsOnly:!0}],"flex.request":[{label:"method",kind:"property",signature:"method: string",documentation:"Read or replace the HTTP method."},{label:"url",kind:"property",signature:"url: string",documentation:"Read or replace the request URL before variable resolution."},{label:"headers",kind:"property",documentation:"Mutable request-header helpers."},{label:"body",kind:"property",documentation:"Mutable raw request-body helpers."}],"flex.request.headers":[{label:"get",kind:"method",signature:"get(name: string): string | undefined",documentation:"Read a request header case-insensitively."},{label:"has",kind:"method",signature:"has(name: string): boolean",documentation:"Check whether a request header exists."},{label:"set",kind:"method",signature:"set(name: string, value: unknown): void",documentation:"Set or replace a request header."},{label:"upsert",kind:"method",signature:"upsert({ key, value }: { key: string; value: unknown }): void",documentation:"Set or replace a request header from a key/value object."},{label:"remove",kind:"method",signature:"remove(name: string): void",documentation:"Remove a request header case-insensitively."},{label:"toObject",kind:"method",signature:"toObject(): Record<string, string>",documentation:"Return enabled request headers as an object."}],"flex.request.body":[{label:"raw",kind:"property",signature:"raw: string",documentation:"Read or replace the raw request body."}],"flex.response":[{label:"code",kind:"property",signature:"code: number",documentation:"HTTP response status code.",testsOnly:!0},{label:"status",kind:"property",signature:"status: string",documentation:"HTTP response status text.",testsOnly:!0},{label:"responseTime",kind:"property",signature:"responseTime: number",documentation:"Measured response time in milliseconds.",testsOnly:!0},{label:"headers",kind:"property",documentation:"Read-only response-header helpers.",testsOnly:!0},{label:"text",kind:"method",signature:"text(): string",documentation:"Return the response body as text.",testsOnly:!0},{label:"json",kind:"method",signature:"json(): unknown",documentation:"Parse and return the response body as JSON.",testsOnly:!0}],"flex.response.headers":[{label:"get",kind:"method",signature:"get(name: string): string | undefined",documentation:"Read a response header case-insensitively.",testsOnly:!0},{label:"has",kind:"method",signature:"has(name: string): boolean",documentation:"Check whether a response header exists.",testsOnly:!0},{label:"toObject",kind:"method",signature:"toObject(): Record<string, string>",documentation:"Return response headers as an object.",testsOnly:!0}],"flex.environment":lo,"flex.collection":lo,"flex.variables":lo.map(a=>({...a,documentation:a.label==="set"||a.label==="unset"?`${a.documentation} Local effective-variable changes apply only to the current request execution.`:a.documentation})),"flex.expect.to":[{label:"equal",kind:"method",signature:"equal(expected: unknown): void",documentation:"Assert strict equality with Object.is."},{label:"eql",kind:"method",signature:"eql(expected: unknown): void",documentation:"Assert deep structural equality."},{label:"include",kind:"method",signature:"include(expected: unknown): void",documentation:"Assert that a string or array contains the expected value."},{label:"match",kind:"method",signature:"match(pattern: RegExp): void",documentation:"Assert that a string matches a regular expression."},{label:"have",kind:"property",documentation:"Property assertions."},{label:"be",kind:"property",documentation:"Boolean, range, and membership assertions."}],"flex.expect.to.have":[{label:"property",kind:"method",signature:"property(name: string, expected?: unknown): void",documentation:"Assert that an object has a property, optionally with an expected value."}],"flex.expect.to.be":[{label:"above",kind:"method",signature:"above(expected: number): void",documentation:"Assert that a number is greater than expected."},{label:"below",kind:"method",signature:"below(expected: number): void",documentation:"Assert that a number is less than expected."},{label:"oneOf",kind:"method",signature:"oneOf(expected: unknown[]): void",documentation:"Assert deep equality with one value from a list."},{label:"ok",kind:"property",signature:"ok: true",documentation:"Assert that the value is truthy."},{label:"true",kind:"property",signature:"true: true",documentation:"Assert that the value is exactly true."},{label:"false",kind:"property",signature:"false: true",documentation:"Assert that the value is exactly false."}],console:[{label:"log",kind:"method",signature:"log(...values: unknown[]): void",documentation:"Write a line to the API Client script console."},{label:"info",kind:"method",signature:"info(...values: unknown[]): void",documentation:"Write an informational line to the API Client script console."},{label:"warn",kind:"method",signature:"warn(...values: unknown[]): void",documentation:"Write a warning line to the API Client script console."},{label:"error",kind:"method",signature:"error(...values: unknown[]): void",documentation:"Write an error line to the API Client script console."}]};function wf(a,r){return[...W0[a]||[]].filter(o=>r==="tests"||!o.testsOnly).map(o=>({...o}))}function ex(a,r,o={}){const u=r.toLowerCase();return[...new Set(o[a]||[])].filter(Boolean).filter(f=>f.toLowerCase().startsWith(u)).sort((f,p)=>f.localeCompare(p)).map(f=>({label:f,kind:"variable",signature:f,documentation:`Known ${a==="variables"?"effective":a} variable.`}))}const tx=[{label:"flex",kind:"namespace",documentation:"FlexDoc request, response, variables, assertions, and test scripting API."},{label:"console",kind:"namespace",documentation:"Captured script console with log, info, warn, and error methods."}];function nx(a){const r=a.lastIndexOf("flex.expect(");if(r<0)return null;const o=a.slice(r),u=[[/\.to\.have\.([A-Za-z_$][\w$]*)?$/,"flex.expect.to.have"],[/\.to\.be\.([A-Za-z_$][\w$]*)?$/,"flex.expect.to.be"],[/\.to\.([A-Za-z_$][\w$]*)?$/,"flex.expect.to"]];for(const[f,p]of u){const g=o.match(f);if(g)return{path:p,prefix:g[1]||""}}return null}function ax(a){const r=a.match(/flex\.(environment|collection|variables)\.(?:get|has|set|unset)\(\s*['"]([^'"]*)$/);return r?{scope:r[1],prefix:r[2]||""}:null}function lx(a){const r=a.match(/(?:^|[^\w$])((?:flex|console)(?:\.[A-Za-z_$][\w$]*)*)\.([A-Za-z_$][\w$]*)?$/);return r?{path:r[1],prefix:r[2]||""}:null}function rx(a,r,o,u={},f=!1){const p=Math.max(0,Math.min(r,a.length)),g=a.slice(0,p),x=ax(g);if(x){const N=ex(x.scope,x.prefix,u);return N.length>0?{from:p-x.prefix.length,to:p,items:N}:null}const b=nx(g);if(b){const N=wf(b.path,o).filter(_=>_.label.toLowerCase().startsWith(b.prefix.toLowerCase()));return N.length>0?{from:p-b.prefix.length,to:p,items:N}:null}const m=lx(g);if(m){const N=wf(m.path,o).filter(_=>_.label.toLowerCase().startsWith(m.prefix.toLowerCase()));return N.length>0?{from:p-m.prefix.length,to:p,items:N}:null}const v=g.match(/([A-Za-z_$][\w$]*)$/)?.[1]||"";if(!f&&!v)return null;const S=tx.filter(N=>!v||N.label.startsWith(v));return!f&&S.length===0?null:S.length>0?{from:p-v.length,to:p,items:S.map(N=>({...N}))}:null}const Tf=({ariaLabel:a,value:r,onChange:o,phase:u,theme:f="light",variableKeys:p={}})=>{const g=W.useRef(null),x=W.useRef(null),b=W.useRef([]),[m,v]=W.useState(null),[S,N]=W.useState(0),[_,R]=W.useState({left:12,top:36}),z=W.useMemo(()=>`api-client-script-completions-${a.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`,[a]),M=f==="dark",B=$=>{const q=x.current,J=g.current;if(!q||!J)return;const Se=P0(q,$),Ae=J.getBoundingClientRect(),se=Se.left-Ae.left,he=Math.max(8,Ae.width-430);R({left:Math.max(8,Math.min(se,he)),top:Math.max(8,Se.bottom-Ae.top+2)})},T=($,q,J=!1)=>{const Se=rx($,q,u,p,J);v(Se),N(0),Se&&requestAnimationFrame(()=>B(q))},E=$=>{if(!m)return;const q=`${r.slice(0,m.from)}${$.label}${r.slice(m.to)}`,J=m.from+$.label.length;o(q),v(null),requestAnimationFrame(()=>{const Se=x.current;Se&&(Se.focus(),Se.setSelectionRange(J,J))})};W.useEffect(()=>{b.current[S]?.scrollIntoView({block:"nearest"})},[S]);const w=$=>{const q=$.currentTarget;if(($.ctrlKey||$.metaKey)&&$.code==="Space"){$.preventDefault(),T(r,q.selectionStart,!0);return}if(!(!m||m.items.length===0)){if($.key==="ArrowDown"){$.preventDefault(),N(J=>(J+1)%m.items.length);return}if($.key==="ArrowUp"){$.preventDefault(),N(J=>(J-1+m.items.length)%m.items.length);return}if($.key==="Enter"||$.key==="Tab"){$.preventDefault(),E(m.items[S]);return}$.key==="Escape"&&($.preventDefault(),v(null))}},U=m?.items[S],Y=M?"border-gray-700 bg-gray-900 text-gray-100 shadow-2xl":"border-gray-200 bg-white text-gray-900 shadow-2xl";return s.jsxs("div",{ref:g,className:"relative",onBlur:$=>{$.currentTarget.contains($.relatedTarget)||v(null)},children:[s.jsx(Kl,{ref:x,ariaLabel:a,dataTestId:`${a}-editor`,language:"javascript",onChange:$=>{const J=x.current?.selectionStart??$.length;o($),requestAnimationFrame(()=>{const Se=x.current;T($,Se?.selectionStart??J)})},onCursorChange:$=>{m&&B($)},onEditorKeyDown:w,theme:f,value:r}),m&&m.items.length>0&&s.jsxs("div",{className:`absolute z-[70] w-[min(26rem,calc(100%-1rem))] overflow-hidden rounded-md border ${Y}`,"data-testid":`${a}-completion-popup`,style:{left:_.left,top:_.top},children:[s.jsx("div",{id:z,role:"listbox",className:"max-h-56 overflow-y-auto py-1",children:m.items.map(($,q)=>s.jsxs("button",{ref:J=>{b.current[q]=J},"aria-label":$.label,"aria-selected":q===S,className:`flex w-full items-baseline gap-2 px-3 py-1.5 text-left text-xs ${q===S?M?"bg-blue-700 text-white":"bg-blue-50 text-gray-900":M?"hover:bg-gray-800":"hover:bg-gray-50"}`,id:`${z}-${q}`,onMouseEnter:()=>N(q),onMouseDown:J=>{J.preventDefault(),E($)},role:"option",type:"button",children:[s.jsx("span",{"aria-hidden":"true",className:"shrink-0 rounded bg-black/5 px-1 font-mono text-[10px] uppercase opacity-60 dark:bg-white/10",children:$.kind}),s.jsx("span",{className:"font-mono font-semibold",children:$.label}),s.jsx("span",{"aria-hidden":"true",className:`min-w-0 truncate ${q===S&&M?"text-blue-100":M?"text-gray-400":"text-gray-500"}`,children:$.signature||""})]},`${$.kind}-${$.label}`))}),U&&s.jsxs("div",{className:`border-t px-3 py-2 text-[11px] ${M?"border-gray-700 text-gray-300":"border-gray-200 text-gray-600"}`,children:[U.signature&&s.jsx("div",{className:"mb-1 overflow-x-auto whitespace-nowrap font-mono text-xs",children:U.signature}),s.jsx("div",{children:U.documentation})]})]}),s.jsxs("div",{className:`mt-1 flex flex-wrap gap-x-3 text-[11px] ${M?"text-gray-400":"text-gray-500"}`,children:[s.jsxs("span",{children:[s.jsx("code",{children:"flex."})," or Ctrl+Space"]}),s.jsx("span",{children:"↑/↓ choose"}),s.jsx("span",{children:"Enter/Tab complete"}),s.jsx("span",{children:"Esc dismiss"}),s.jsx("span",{children:"Tab indents when suggestions are closed"})]})]})};function ro(a){const r=a.auth?a.auth.type==="oauth2"?{...a.auth,scopes:a.auth.scopes?[...a.auth.scopes]:void 0}:{...a.auth}:void 0;return{...a,query:a.query?.map(o=>({...o})),headers:a.headers?.map(o=>({...o})),urlencoded:a.urlencoded?.map(o=>({...o})),formData:a.formData?.map(o=>({...o})),binary:a.binary?{...a.binary}:void 0,graphql:a.graphql?{...a.graphql}:void 0,auth:r,hostExecution:a.hostExecution?{...a.hostExecution}:void 0}}function ix(a){const r=ro(a);return r.binary&&(r.binary={fileName:r.binary.fileName,contentType:r.binary.contentType}),r.formData&&(r.formData=r.formData.map(o=>{const u={...o};return delete u.file,u})),r}function Kr(a){return Object.assign(Object.create(null),a||{})}function sx(a){return a instanceof Error?a.message:"Request failed"}function ox(a,r){return r?.available?`The API host does not support the required capability${a.length===1?"":"ies"}: ${a.join(", ")}.`:"Host execution is disabled on this documentation server."}function cx(a){if(typeof globalThis.btoa!="function")throw new Error("Host execution binary uploads require a Base64 encoder.");let r="";const o=32768;for(let u=0;u<a.length;u+=o)r+=String.fromCharCode(...a.subarray(u,Math.min(u+o,a.length)));return globalThis.btoa(r)}async function ux(a){const r={request:ix(a),...a.hostExecution?.certificateId?{certificateId:a.hostExecution.certificateId}:{},...a.hostExecution?.cookieJar?{cookieJar:a.hostExecution.cookieJar}:{}};a.bodyMode==="binary"&&a.binary?.file&&(r.bodyBase64=cx(new Uint8Array(await a.binary.file.arrayBuffer())));const o=(a.formData||[]).map((u,f)=>({entry:u,index:f})).filter(({entry:u})=>u.enabled!==!1&&u.type==="file"&&!!u.file);if(o.length>0){if(typeof FormData>"u")throw new Error("Host multipart execution requires FormData support.");const u=new FormData;u.append("descriptor",JSON.stringify(r));for(const{entry:f,index:p}of o){const g=f.file;u.append(`formData[${p}]`,g,f.fileName||g.name)}return{body:u,headers:{"X-FlexDoc-Execute":"1"}}}return{body:JSON.stringify(r),headers:{"X-FlexDoc-Execute":"1","Content-Type":"application/json"}}}async function io(a){const r=ro(a.request),o=fn(a.scripts),u=a.fetcher||globalThis.fetch,f=a.now||Date.now;let p=ro(a.request),g=Kr(a.variables),x=Kr(a.collectionVariables);const b=Kr(a.externalVariables);let m=Kr(a.environmentVariables),v=[],S=[],N,_="",R="",z=0,M=!1;try{if(o.preRequest.trim()){const w=await Jd({script:o.preRequest,phase:"pre-request",draft:p,variables:g,collectionVariables:x,externalVariables:b,environmentVariables:m});if(p=w.draft,g=w.variables,x=w.collectionVariables,m=w.environmentVariables,v=[...v,...w.logs],w.collectionChanges.length>0&&a.onCollectionChanges?.(w.collectionChanges),w.environmentChanges.length>0&&a.onEnvironmentChanges?.(w.environmentChanges),w.error)return{scriptTests:S,scriptLogs:v,scriptError:`Pre-request script: ${w.error}`}}a.resolveAuth&&(p={...p,auth:a.resolveAuth(p.auth)}),p=V0(p,g),_=(p.method||"GET").toUpperCase(),R=p.url;const B=to(p);let T;if(B.length>0){const w=new Set(a.hostExecution?.capabilities||[]),U=B.filter(he=>!w.has(he));if(!a.hostExecution?.available||U.length>0){const he=ox(U,a.hostExecution);return{error:he,result:{request:r,scripts:o,executedMethod:_,resolvedUrl:R,error:he,...v.length?{scriptLogs:[...v]}:{}},scriptTests:S,scriptLogs:v}}if(!u)throw new Error("Fetch API is not available");const Y=await ux(p);z=f(),M=!0;const $=await u(a.hostExecution.endpoint,{method:"POST",credentials:"same-origin",headers:Y.headers,body:Y.body,...a.signal?{signal:a.signal}:{}}),q=await $.text();let J;try{const he=q?JSON.parse(q):{};if(!he||typeof he!="object"||Array.isArray(he))throw new Error("invalid");J=he}catch{throw new Error("API host returned an invalid execution response.")}const Se=typeof J.error=="string"?J.error:void 0;if(!$.ok)throw new Error(Se||`API host execution failed with HTTP ${$.status}.`);if(typeof J.status!="number"||!Array.isArray(J.headers))throw new Error("API host returned an invalid execution response.");const Ae=J.headers.map(he=>Array.isArray(he)?[String(he[0]),String(he[1])]:["",""]).filter(([he])=>!!he),se=Array.isArray(J.cookies)?J.cookies:void 0;T={status:J.status,statusText:String(J.statusText||""),headers:Ae,body:String(J.body||""),responseTime:typeof J.responseTime=="number"?J.responseTime:f()-z,...se?{cookies:se}:{}}}else{const w=vf(p);_=w.method,R=w.url,a.onRequestBuilt?.(w);let U={...w.init,url:w.url,credentials:a.credentials||"same-origin",...a.signal?{signal:a.signal}:{}};a.requestInterceptor&&(U=await a.requestInterceptor(U)),a.signal&&(U.signal=a.signal);const{url:Y,...$}=U;if(R=Y,z=f(),M=!0,!u)throw new Error("Fetch API is not available");const q=await u(Y,$),J=await q.text();T={status:q.status,statusText:q.statusText,headers:[...q.headers.entries()],body:J,responseTime:f()-z}}if(o.tests.trim()){const w=await Jd({script:o.tests,phase:"tests",draft:p,variables:g,collectionVariables:x,externalVariables:b,environmentVariables:m,response:T});v=[...v,...w.logs],S=w.tests.map(U=>({...U})),w.collectionChanges.length>0&&a.onCollectionChanges?.(w.collectionChanges),w.environmentChanges.length>0&&a.onEnvironmentChanges?.(w.environmentChanges),w.error&&(N=`Test script: ${w.error}`)}return{result:{request:r,scripts:o,executedMethod:_,resolvedUrl:R,status:T.status,statusText:T.statusText,responseTime:T.responseTime,responseHeaders:T.headers.map(([w,U])=>[w,U]),responseBody:T.body,...S.length?{scriptTests:S}:{},...v.length?{scriptLogs:[...v]}:{},...N?{scriptError:N}:{}},response:T,scriptTests:S,scriptLogs:v,...N?{scriptError:N}:{}}}catch(B){const T=sx(B),E={error:T,scriptTests:S,scriptLogs:v};return M&&(E.result={request:r,scripts:o,executedMethod:_,resolvedUrl:R,responseTime:z?f()-z:void 0,error:T,...v.length?{scriptLogs:[...v]}:{}}),E}}function so(a){let r=a.url;for(const[o,u]of Object.entries(a.variables||{}))r=r.split(`{${o}}`).join(u.default);return r}function oo(a){return a.replace(/\/+$/,"")}function Ef(a,r){const o=oo(r);return o?a===o||a.startsWith(`${o}/`)||a.startsWith(`${o}?`):!1}function dx(a,r,o){const u=oo(o);if(!u)return a;const f=oo(r);if(f&&Ef(a,f))return`${u}${a.slice(f.length)}`;try{const p=new URL(a),g=`${p.pathname==="/"?"":p.pathname}${p.search}${p.hash}`;return`${u}${g}`}catch{return u}}const co=()=>({key:"",value:"",enabled:!0});function fx(a){return{method:a?.method||"GET",url:a?.url||"",query:a?.query?.length?a.query:[co()],headers:a?.headers?.length?a.headers:[co()],body:a?.body||"",contentType:a?.contentType||"application/json",bodyMode:a?.bodyMode||Sf(a||{}),urlencoded:a?.urlencoded?.length?a.urlencoded.map(r=>({...r})):void 0,formData:a?.formData?.length?a.formData.map(r=>({...r})):void 0,binary:a?.binary?{...a.binary}:void 0,graphql:a?.graphql?{...a.graphql}:void 0,auth:a?.auth||{type:"none"},hostExecution:a?.hostExecution?{...a.hostExecution}:void 0}}function px(a){const r=a.auth?a.auth.type==="oauth2"?{...a.auth,scopes:a.auth.scopes?[...a.auth.scopes]:void 0}:{...a.auth}:void 0;return{...a,query:a.query?.map(o=>({...o})),headers:a.headers?.map(o=>({...o})),urlencoded:a.urlencoded?.map(o=>({...o})),formData:a.formData?.map(o=>({...o})),binary:a.binary?{...a.binary}:void 0,graphql:a.graphql?{...a.graphql}:void 0,auth:r,hostExecution:a.hostExecution?{...a.hostExecution}:void 0}}function mx(a){try{return new URL(a).origin}catch{return""}}function Cf({label:a,entries:r,onChange:o,inputClass:u}){const f=(p,g)=>o(r.map((x,b)=>b===p?{...x,...g}:x));return s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm font-medium",children:a}),s.jsxs("button",{type:"button",className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-md border px-3 py-2 text-sm",onClick:()=>o([...r,co()]),children:[s.jsx(Ra,{className:"h-4 w-4"})," Add"]})]}),r.map((p,g)=>s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{"aria-label":`${a} ${g+1} enabled`,type:"checkbox",checked:p.enabled!==!1,onChange:x=>f(g,{enabled:x.target.checked})}),s.jsx("input",{"aria-label":`${a} ${g+1} key`,className:`w-full rounded-md border px-3 py-2 text-sm ${u}`,placeholder:"Key",value:p.key,onChange:x=>f(g,{key:x.target.value})}),s.jsx("input",{"aria-label":`${a} ${g+1} value`,className:`w-full rounded-md border px-3 py-2 text-sm ${u}`,placeholder:"Value",value:p.value,onChange:x=>f(g,{value:x.target.value})}),s.jsx("button",{type:"button","aria-label":`Remove ${a.toLowerCase()} ${g+1}`,className:"inline-flex min-h-11 items-center justify-center rounded-md border px-3 py-2",onClick:()=>o(r.filter((x,b)=>b!==g)),children:s.jsx(dn,{className:"h-4 w-4"})})]},g))]})}const hx=({initialRequest:a,initialScripts:r,theme:o="light",credentials:u="same-origin",requestInterceptor:f,onRequestChange:p,onDraftChange:g,onScriptsChange:x,onExecutionStart:b,onExecutionComplete:m,resolveAuth:v,variables:S={},collectionVariables:N={},externalVariables:_={},environmentVariables:R={},onCollectionChanges:z,onEnvironmentChanges:M,serverOptions:B=[],initialServerUrl:T,hostExecution:E})=>{const w=fx(a),U=fn(r),Y=B.map(h=>({server:h,url:so(h)})),$=Y.map(h=>h.url),q=T||$.find(h=>Ef(w.url,h))||"",J=$.includes(q)?q:$[0]||"",Se=q&&!$.includes(q)?q:"",Ae=q||J||mx(w.url),[se,he]=W.useState(w),[xe,Ne]=W.useState(U),[O,ee]=W.useState(J),[oe,K]=W.useState(Se),ge=W.useRef(Ae),C=W.useRef(Ae),[G,pe]=W.useState(null),[de,be]=W.useState(null),[Ee,ce]=W.useState(null),[Ce,Le]=W.useState([]),[Be,rt]=W.useState([]),[P,ve]=W.useState(!1),je=W.useRef(p),ke=W.useRef(g),Pe=W.useRef(x),at=W.useRef(null);W.useEffect(()=>{je.current=p},[p]),W.useEffect(()=>{ke.current=g},[g]),W.useEffect(()=>{Pe.current=x},[x]),W.useEffect(()=>{ke.current?.(px(se))},[se]),W.useEffect(()=>{Pe.current?.(fn(xe))},[xe]),W.useEffect(()=>{try{const h=v?{...se,auth:v(se.auth)}:se,A=vf(h,{variables:S}),I=JSON.stringify([A.method,A.url,A.headerEntries,A.body,A.bodyKind]);if(I===at.current)return;at.current=I,je.current?.(A)}catch{}},[se,v,S]);const yt=(se.method||"GET").toUpperCase(),He=o==="dark"?"bg-gray-900 border-gray-700 text-gray-100":"bg-white border-gray-300 text-gray-900",Ft=o==="dark"?"border-gray-700 bg-gray-800/60 text-gray-100":"border-gray-200 bg-gray-50 text-gray-900",Vt=o==="dark"?"text-gray-400":"text-gray-600",wn=h=>{if(!h)return;const A=ge.current;ge.current=h,he(I=>({...I,url:dx(I.url,A,h)}))},Rn=h=>{const A=h==="inherit"?{type:"inherit"}:h==="bearer"?{type:h,token:""}:h==="oauth2"?{type:h,accessToken:""}:h==="basic"?{type:h,username:"",password:""}:h==="apiKey"?{type:h,key:"",value:"",in:"header"}:h==="digest"?{type:h,username:"",password:""}:h==="hawk"?{type:h,id:"",key:"",algorithm:"sha256"}:h==="ntlm"?{type:h,username:"",password:""}:h==="oauth1"?{type:h,consumerKey:"",consumerSecret:"",signatureMethod:"HMAC-SHA1"}:h==="awsv4"?{type:h,accessKey:"",secretKey:"",region:"",service:""}:{type:"none"};he(I=>({...I,auth:A}))},Oe=v?v(se.auth):se.auth,it=to({...se,auth:Oe}),Rt=new Set(E?.capabilities||[]),Kt=it.filter(h=>!Rt.has(h)),Yt=it.length>0,d=E?.available===!0&&Kt.length===0,H=Yt?d?"The browser cannot send this request. FlexDoc will execute it from the API host.":E?.available?`The API host does not support the required capability${Kt.length===1?"":"ies"}: ${Kt.join(", ")}.`:"Host execution is disabled on this documentation server.":null,te=h=>E?.available===!0&&Rt.has(h),le=async()=>{b?.(),ve(!0),be(null),ce(null),Le([]),rt([]),pe(null);try{const h=await io({request:se,scripts:xe,credentials:u,requestInterceptor:f,resolveAuth:v,variables:S,collectionVariables:N,externalVariables:_,environmentVariables:R,hostExecution:E,onRequestBuilt:A=>je.current?.(A),onCollectionChanges:z,onEnvironmentChanges:M});be(h.error||null),ce(h.scriptError||null),Le(h.scriptTests),rt(h.scriptLogs),h.response&&pe({status:h.response.status,statusText:h.response.statusText,headers:h.response.headers.map(([A,I])=>[A,I]),body:h.response.body,responseTime:h.response.responseTime}),h.result&&m?.(h.result)}finally{ve(!1)}},Z=Ce.filter(h=>h.passed).length;return s.jsx("div",{className:`rounded-xl border p-4 md:p-5 ${Ft}`,children:s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[B.length>0&&s.jsxs("label",{className:"text-sm font-medium",children:["Server",s.jsx("select",{"aria-label":"API Client server",className:`mt-1 w-full rounded-md border px-3 py-2 text-sm ${He}`,value:O,onChange:h=>{ee(h.target.value),K(""),wn(h.target.value)},children:Y.map(({server:h,url:A})=>s.jsxs("option",{value:A,children:[h.description?`${h.description} — `:"",h.url]},`${h.url}:${A}`))})]}),s.jsxs("label",{className:"text-sm font-medium",children:["Custom server URL ",s.jsx("span",{className:"text-xs font-normal opacity-70",children:"(optional override)"}),s.jsx("input",{"aria-label":"API Client custom server URL",className:`mt-1 w-full rounded-md border px-3 py-2 font-mono text-sm ${He}`,value:oe,onChange:h=>{const A=h.target.value;K(A);const I=O||C.current;(A.trim()||I)&&wn(A.trim()||I)},placeholder:"http://localhost:8080"})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("select",{"aria-label":"HTTP method",className:`rounded-md border px-3 py-2 font-medium ${He}`,value:yt,onChange:h=>{const A=h.target.value;he(I=>({...I,method:A}))},children:["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"].map(h=>s.jsx("option",{children:h},h))}),s.jsx("input",{"aria-label":"Request URL",className:`w-full rounded-md border px-3 py-2 font-mono text-sm ${He}`,placeholder:"https://api.example.com/resource or {{baseUrl}}/resource",value:se.url,onChange:h=>{const A=h.target.value;he(I=>({...I,url:A}))}})]}),s.jsx(Cf,{label:"Query parameters",entries:se.query||[],onChange:h=>he(A=>({...A,query:h})),inputClass:He}),s.jsx(Cf,{label:"Headers",entries:se.headers||[],onChange:h=>he(A=>({...A,headers:h})),inputClass:He}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("label",{className:"text-sm font-medium",children:["Authorization",s.jsxs("select",{"aria-label":"Authorization type",className:`rounded-md border px-3 py-2 text-sm ${He}`,value:se.auth?.type||"none",onChange:h=>Rn(h.target.value),children:[v&&s.jsx("option",{value:"inherit",children:"Inherit from parent"}),s.jsx("option",{value:"none",children:"None"}),s.jsx("option",{value:"bearer",children:"Bearer token"}),s.jsx("option",{value:"oauth2",children:"OAuth 2.0 access token"}),s.jsx("option",{value:"basic",children:"Basic auth"}),s.jsx("option",{value:"apiKey",children:"API key"}),s.jsx("option",{value:"digest",disabled:!te("digest"),children:"Digest (API host)"}),s.jsx("option",{value:"hawk",disabled:!te("hawk"),children:"Hawk (API host)"}),s.jsx("option",{value:"ntlm",disabled:!te("ntlm"),children:"NTLM / Negotiate (API host)"}),s.jsx("option",{value:"oauth1",disabled:!te("oauth1"),children:"OAuth 1.0 (API host)"}),s.jsx("option",{value:"awsv4",disabled:!te("awsv4"),children:"AWS Signature v4 (API host)"})]})]}),se.auth?.type==="bearer"&&s.jsx("input",{"aria-label":"Bearer token",type:"password",autoComplete:"off",className:`w-full rounded-md border px-3 py-2 ${He}`,value:se.auth.token,onChange:h=>{const A=h.target.value;he(I=>({...I,auth:{type:"bearer",token:A}}))}}),se.auth?.type==="oauth2"&&s.jsx(hf,{auth:se.auth,fieldClass:`w-full rounded-md border px-3 py-2 text-sm ${He}`,label:"",onChange:h=>he(A=>({...A,auth:h}))}),se.auth?.type==="basic"&&s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{"aria-label":"Basic auth username",className:`w-full rounded-md border px-3 py-2 ${He}`,placeholder:"Username",value:se.auth.username,onChange:h=>he(A=>({...A,auth:{...A.auth,username:h.target.value}}))}),s.jsx("input",{"aria-label":"Basic auth password",type:"password",autoComplete:"off",className:`w-full rounded-md border px-3 py-2 ${He}`,placeholder:"Password",value:se.auth.password,onChange:h=>he(A=>({...A,auth:{...A.auth,password:h.target.value}}))})]}),se.auth?.type==="apiKey"&&s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{"aria-label":"API key name",className:`w-full rounded-md border px-3 py-2 ${He}`,placeholder:"Key name",value:se.auth.key,onChange:h=>he(A=>({...A,auth:{...A.auth,key:h.target.value}}))}),s.jsx("input",{"aria-label":"API key value",type:"password",autoComplete:"off",className:`w-full rounded-md border px-3 py-2 ${He}`,placeholder:"Value",value:se.auth.value,onChange:h=>he(A=>({...A,auth:{...A.auth,value:h.target.value}}))}),s.jsxs("select",{"aria-label":"API key location",className:`rounded-md border px-3 py-2 text-sm ${He}`,value:se.auth.in,onChange:h=>he(A=>({...A,auth:{...A.auth,in:h.target.value}})),children:[s.jsx("option",{value:"header",children:"Header"}),s.jsx("option",{value:"query",children:"Query"}),s.jsx("option",{value:"cookie",disabled:!te("cookies"),children:"Cookie (API host)"})]})]}),se.auth?.type==="digest"&&s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsx("input",{"aria-label":"Digest username",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Username",value:se.auth.username,onChange:h=>he(A=>({...A,auth:{...A.auth,username:h.target.value}}))}),s.jsx("input",{"aria-label":"Digest password",type:"password",autoComplete:"off",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Password",value:se.auth.password,onChange:h=>he(A=>({...A,auth:{...A.auth,password:h.target.value}}))})]}),se.auth?.type==="hawk"&&s.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[s.jsx("input",{"aria-label":"Hawk id",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"ID",value:se.auth.id,onChange:h=>he(A=>({...A,auth:{...A.auth,id:h.target.value}}))}),s.jsx("input",{"aria-label":"Hawk key",type:"password",autoComplete:"off",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Key",value:se.auth.key,onChange:h=>he(A=>({...A,auth:{...A.auth,key:h.target.value}}))}),s.jsxs("select",{"aria-label":"Hawk algorithm",className:`rounded-md border px-3 py-2 ${He}`,value:se.auth.algorithm||"sha256",onChange:h=>he(A=>({...A,auth:{...A.auth,algorithm:h.target.value}})),children:[s.jsx("option",{value:"sha256",children:"SHA-256"}),s.jsx("option",{value:"sha1",children:"SHA-1"})]}),s.jsx("input",{"aria-label":"Hawk ext",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"ext (optional)",value:se.auth.ext||"",onChange:h=>he(A=>({...A,auth:{...A.auth,ext:h.target.value}}))})]}),se.auth?.type==="ntlm"&&s.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[s.jsx("input",{"aria-label":"NTLM username",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Username",value:se.auth.username,onChange:h=>he(A=>({...A,auth:{...A.auth,username:h.target.value}}))}),s.jsx("input",{"aria-label":"NTLM password",type:"password",autoComplete:"off",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Password",value:se.auth.password,onChange:h=>he(A=>({...A,auth:{...A.auth,password:h.target.value}}))}),s.jsx("input",{"aria-label":"NTLM domain",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Domain (optional)",value:se.auth.domain||"",onChange:h=>he(A=>({...A,auth:{...A.auth,domain:h.target.value}}))}),s.jsx("input",{"aria-label":"NTLM workstation",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Workstation (optional)",value:se.auth.workstation||"",onChange:h=>he(A=>({...A,auth:{...A.auth,workstation:h.target.value}}))})]}),se.auth?.type==="oauth1"&&s.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[s.jsx("input",{"aria-label":"OAuth1 consumer key",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Consumer key",value:se.auth.consumerKey,onChange:h=>he(A=>({...A,auth:{...A.auth,consumerKey:h.target.value}}))}),s.jsx("input",{"aria-label":"OAuth1 consumer secret",type:"password",autoComplete:"off",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Consumer secret",value:se.auth.consumerSecret,onChange:h=>he(A=>({...A,auth:{...A.auth,consumerSecret:h.target.value}}))}),s.jsx("input",{"aria-label":"OAuth1 token",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Token (optional)",value:se.auth.token||"",onChange:h=>he(A=>({...A,auth:{...A.auth,token:h.target.value}}))}),s.jsx("input",{"aria-label":"OAuth1 token secret",type:"password",autoComplete:"off",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Token secret (optional)",value:se.auth.tokenSecret||"",onChange:h=>he(A=>({...A,auth:{...A.auth,tokenSecret:h.target.value}}))}),s.jsxs("select",{"aria-label":"OAuth1 signature method",className:`rounded-md border px-3 py-2 ${He}`,value:se.auth.signatureMethod||"HMAC-SHA1",onChange:h=>he(A=>({...A,auth:{...A.auth,signatureMethod:h.target.value}})),children:[s.jsx("option",{children:"HMAC-SHA1"}),s.jsx("option",{children:"HMAC-SHA256"}),s.jsx("option",{children:"PLAINTEXT"})]}),s.jsx("input",{"aria-label":"OAuth1 realm",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Realm (optional)",value:se.auth.realm||"",onChange:h=>he(A=>({...A,auth:{...A.auth,realm:h.target.value}}))})]}),se.auth?.type==="awsv4"&&s.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[s.jsx("input",{"aria-label":"AWS access key",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Access key",value:se.auth.accessKey,onChange:h=>he(A=>({...A,auth:{...A.auth,accessKey:h.target.value}}))}),s.jsx("input",{"aria-label":"AWS secret key",type:"password",autoComplete:"off",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Secret key",value:se.auth.secretKey,onChange:h=>he(A=>({...A,auth:{...A.auth,secretKey:h.target.value}}))}),s.jsx("input",{"aria-label":"AWS session token",type:"password",autoComplete:"off",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Session token (optional)",value:se.auth.sessionToken||"",onChange:h=>he(A=>({...A,auth:{...A.auth,sessionToken:h.target.value}}))}),s.jsx("input",{"aria-label":"AWS region",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Region",value:se.auth.region,onChange:h=>he(A=>({...A,auth:{...A.auth,region:h.target.value}}))}),s.jsx("input",{"aria-label":"AWS service",className:`rounded-md border px-3 py-2 ${He}`,placeholder:"Service",value:se.auth.service,onChange:h=>he(A=>({...A,auth:{...A.auth,service:h.target.value}}))})]}),E?.available&&s.jsxs("div",{className:"grid gap-2 rounded-md border p-3 sm:grid-cols-2",children:[E.clientCertificates?.length?s.jsxs("label",{className:"text-xs font-medium",children:["Client certificate",s.jsxs("select",{"aria-label":"Client certificate",className:`mt-1 w-full rounded-md border px-2 py-1.5 ${He}`,value:se.hostExecution?.certificateId||"",onChange:h=>he(A=>({...A,hostExecution:{...A.hostExecution||{},certificateId:h.target.value||void 0}})),children:[s.jsx("option",{value:"",children:"None"}),E.clientCertificates.map(h=>s.jsx("option",{value:h.id,children:h.name},h.id))]})]}):null,te("cookies")&&s.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-medium",children:[s.jsx("input",{"aria-label":"Use API host cookie jar",type:"checkbox",checked:se.hostExecution?.cookieJar==="session",onChange:h=>he(A=>({...A,hostExecution:{...A.hostExecution||{},cookieJar:h.target.checked?"session":void 0}}))}),"Use API host cookie jar"]})]}),H&&s.jsx("div",{role:d?"status":"alert",className:`rounded-md border p-3 text-sm ${d?"border-blue-300 bg-blue-50 text-blue-800":"border-amber-300 bg-amber-50 text-amber-800"}`,children:H})]}),!["GET","HEAD"].includes(yt)&&s.jsx(Z0,{draft:se,onChange:he,theme:o}),s.jsxs("section",{className:"space-y-3 border-t pt-4","aria-labelledby":"api-client-scripts-heading",children:[s.jsxs("div",{children:[s.jsx("h3",{id:"api-client-scripts-heading",className:"font-semibold",children:"Scripts"}),s.jsx("p",{className:`text-xs ${Vt}`,children:"Trusted local JavaScript. Scripts are not sandboxed; only run code you trust."})]}),s.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[s.jsxs("label",{className:"text-sm font-medium",children:["Pre-request script",s.jsx("div",{className:"mt-1",children:s.jsx(Tf,{ariaLabel:"Pre-request script",phase:"pre-request",theme:o,value:xe.preRequest,onChange:h=>Ne(A=>({...A,preRequest:h})),variableKeys:{environment:Object.keys(R),collection:Object.keys(N),variables:Object.keys(S)}})})]}),s.jsxs("label",{className:"text-sm font-medium",children:["Tests",s.jsx("div",{className:"mt-1",children:s.jsx(Tf,{ariaLabel:"Tests script",phase:"tests",theme:o,value:xe.tests,onChange:h=>Ne(A=>({...A,tests:h})),variableKeys:{environment:Object.keys(R),collection:Object.keys(N),variables:Object.keys(S)}})})]})]})]}),s.jsxs("button",{onClick:le,disabled:P||Yt&&!d,className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-md bg-blue-600 px-4 py-2 font-medium text-white hover:bg-blue-700 disabled:opacity-60",children:[P?s.jsx(Ss,{className:"h-4 w-4 animate-spin"}):s.jsx(Pa,{className:"h-4 w-4"})," ",P?"Sending…":"Send request"]}),de&&s.jsxs("div",{role:"alert",className:"flex gap-2 rounded-md border border-red-300 bg-red-50 p-3 text-sm text-red-700",children:[s.jsx(Ur,{className:"mt-0.5 h-4 w-4 shrink-0"}),de]}),Ee&&s.jsxs("div",{role:"alert",className:"flex gap-2 rounded-md border border-amber-300 bg-amber-50 p-3 text-sm text-amber-800",children:[s.jsx(Ur,{className:"mt-0.5 h-4 w-4 shrink-0"}),Ee]}),G&&s.jsx(Nf,{response:G,theme:o}),Ce.length>0&&s.jsxs("section",{className:"space-y-2","aria-labelledby":"api-client-test-results-heading",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{id:"api-client-test-results-heading",className:"font-semibold",children:"Test results"}),s.jsxs("span",{className:`text-xs ${Vt}`,children:[Z,"/",Ce.length," passed"]})]}),s.jsx("div",{className:"space-y-2",children:Ce.map((h,A)=>s.jsxs("div",{className:`rounded-md border px-3 py-2 text-sm ${h.passed?"border-green-300 bg-green-50 text-green-800":"border-red-300 bg-red-50 text-red-800"}`,children:[s.jsxs("div",{className:"font-medium",children:[h.passed?"PASS":"FAIL"," — ",h.name]}),h.error&&s.jsx("div",{className:"mt-1 text-xs",children:h.error})]},`${h.name}:${A}`))})]}),Be.length>0&&s.jsx(zn,{code:Be.join(`
68
+ `),language:"text",title:"Script console",theme:o,wrap:!0})]})})};function yx(a,r,o){if(!o)return null;const u=a.folders.find(g=>g.id===o&&g.collectionId===r);if(!u)return new Set;const f=new Set([u.id]);let p=!0;for(;p;){p=!1;for(const g of a.folders)g.collectionId!==r||!g.parentFolderId||f.has(g.id)||f.has(g.parentFolderId)&&(f.add(g.id),p=!0)}return f}function Xr(a,r,o){const u=yx(a,r,o);return a.requests.filter(f=>f.collectionId!==r?!1:u?!!f.folderId&&u.has(f.folderId):!0)}function gx(a,r){const o=new Map(a.map(g=>[g.id,g])),u=[],f=new Set;let p=o.get(r);for(;p&&!f.has(p.id);)f.add(p.id),u.unshift(p.name),p=p.parentFolderId?o.get(p.parentFolderId):void 0;return u.join(" / ")}function kf(a,r,o){const u=a.collections.find(p=>p.id===r)?.name||"Deleted collection";if(!o)return u;const f=gx(a.folders.filter(p=>p.collectionId===r),o);return f?`${u} / ${f}`:`${u} / Deleted folder`}function xx(a){return!a.error&&!a.scriptError&&a.scriptTests.every(r=>r.passed)}async function bx(a){const r=Xr(a.workspace,a.collectionId,a.folderId),o=a.runId||Lt("run"),u=a.runName||kf(a.workspace,a.collectionId,a.folderId);let f=a.workspace;const p=[];let g=a.signal?.aborted===!0;for(let v=0;v<r.length&&!g;v+=1){if(a.signal?.aborted){g=!0;break}const S=r[v];a.onRequestStart?.(S,v,r.length);const N=sf(f,a.collectionId),_=of(f),R={...a.externalEnvironmentVariables||{},..._},z={...N,...a.externalVariables||{},...R},M=await io({request:S.request,scripts:S.scripts,credentials:a.credentials,requestInterceptor:a.requestInterceptor,hostExecution:a.hostExecution,resolveAuth:U=>rf(f,S.collectionId,S.folderId,U||{type:"none"}),variables:z,collectionVariables:N,externalVariables:a.externalVariables,environmentVariables:R,signal:a.signal,fetcher:a.fetcher,now:a.now,onCollectionChanges:U=>{f=uf(f,S.collectionId,U),a.onCollectionChanges?.(U)},onEnvironmentChanges:U=>{f=cf(f,U),a.onEnvironmentChanges?.(U)}}),B=a.signal?.aborted===!0,T=!B&&xx(M);let E;M.result&&!B&&(f=lf(f,{...M.result,collectionId:S.collectionId,folderId:S.folderId,runId:o,runName:u,runIndex:v+1,runTotal:r.length,runPassed:T}),E=f.history[0]?.id);const w={requestId:S.id,requestName:S.name,collectionId:S.collectionId,folderId:S.folderId,passed:T,cancelled:B,historyEntryId:E,outcome:M};if(p.push(w),a.onRequestComplete?.(w,v,r.length),B){g=!0;break}if(!w.passed&&a.stopOnFailure&&v<r.length-1){g=!0;break}}const x=p.filter(v=>v.passed).length,b=p.filter(v=>v.cancelled).length,m=p.filter(v=>!v.passed&&!v.cancelled).length;return{runId:o,runName:u,collectionId:a.collectionId,folderId:a.folderId,total:r.length,completed:p.length,passed:x,failed:m,cancelled:b,stopped:g,items:p,workspace:f}}function ia(){return new Date().toISOString()}const vx=({request:a,scripts:r,onLoadRequest:o,onSelectedCollectionChange:u,onSelectedFolderChange:f,onRunCollection:p,onRunFolder:g,selectedCollectionId:x,selectedFolderId:b="",workspace:m,onWorkspaceChange:v,hostExecution:S,theme:N})=>{const[_,R]=W.useState(""),[z,M]=W.useState(""),[B,T]=W.useState(""),[E,w]=W.useState(null),U=m.collections.find(P=>P.id===x)||m.collections[0],Y=W.useMemo(()=>m.folders.filter(P=>P.collectionId===U?.id),[U?.id,m.folders]),$=W.useMemo(()=>m.requests.filter(P=>P.collectionId===U?.id),[U?.id,m.requests]),q=Y.find(P=>P.id===b),J=W.useMemo(()=>new Map(Y.map(P=>[P.id,P])),[Y]),Se=W.useMemo(()=>{const P=[],ve=new Set,je=(ke,Pe)=>{Y.filter(at=>at.parentFolderId===ke).forEach(at=>{ve.has(at.id)||(ve.add(at.id),P.push({folder:at,depth:Pe}),je(at.id,Pe+1))})};return je(void 0,0),Y.forEach(ke=>{ve.has(ke.id)||(ve.add(ke.id),P.push({folder:ke,depth:0}),je(ke.id,1))}),P},[Y]),Ae=P=>{const ve=[],je=new Set;let ke=J.get(P);for(;ke&&!je.has(ke.id);)je.add(ke.id),ve.unshift(ke.name),ke=ke.parentFolderId?J.get(ke.parentFolderId):void 0;return ve.join(" / ")};W.useEffect(()=>{u?.(U?.id)},[u,U?.id]);const se=()=>{const P=_.trim();if(!P)return;const ve=ia(),je=Lt("collection");v(ke=>({...ke,collections:[...ke.collections,{id:je,name:P,auth:{type:"none"},variables:[],createdAt:ve,updatedAt:ve}]})),u?.(je),f?.(""),R(""),w(null)},he=P=>{if(!U)return;const ve=ia();v(je=>({...je,collections:je.collections.map(ke=>ke.id===U.id?{...ke,auth:P,updatedAt:ve}:ke)}))},xe=P=>{if(!q)return;const ve=ia();v(je=>({...je,folders:je.folders.map(ke=>ke.id===q.id?{...ke,auth:P,updatedAt:ve}:ke)}))},Ne=()=>{if(!U)return;const P=ia();v(ve=>({...ve,collections:ve.collections.map(je=>je.id===U.id?{...je,variables:[...je.variables,{id:Lt("variable"),key:"",value:"",enabled:!0}],updatedAt:P}:je)}))},O=(P,ve)=>{if(!U)return;const je=ia();v(ke=>({...ke,collections:ke.collections.map(Pe=>Pe.id===U.id?{...Pe,variables:Pe.variables.map(at=>at.id===P?{...at,...ve}:at),updatedAt:je}:Pe)}))},ee=P=>{if(!U)return;const ve=ia();v(je=>({...je,collections:je.collections.map(ke=>ke.id===U.id?{...ke,variables:ke.variables.filter(Pe=>Pe.id!==P),updatedAt:ve}:ke)}))},oe=()=>{const P=z.trim();if(!P||!U)return;const ve=ia(),je=Lt("folder");v(ke=>({...ke,folders:[...ke.folders,{id:je,collectionId:U.id,parentFolderId:b||void 0,name:P,auth:{type:"inherit"},createdAt:ve,updatedAt:ve}]})),f?.(je),M("")},K=()=>{if(!U)return;const P=B.trim()||a.url||"Untitled request",ve=ia();if(E){v(ke=>({...ke,requests:ke.requests.map(Pe=>Pe.id===E?{...Pe,collectionId:U.id,folderId:b||void 0,name:P,request:Nn(a),scripts:fn(r),updatedAt:ve}:Pe)}));return}const je={id:Lt("request"),collectionId:U.id,folderId:b||void 0,name:P,request:Nn(a),scripts:fn(r),createdAt:ve,updatedAt:ve};v(ke=>({...ke,requests:[...ke.requests,je]})),w(je.id),T(P)},ge=P=>{const ve=m.requests.find(je=>je.id===P);ve&&(w(ve.id),u?.(ve.collectionId),f?.(ve.folderId||""),T(ve.name),o(Nn(ve.request),ve.scripts?fn(ve.scripts):void 0,ve.collectionId,ve.folderId))},C=P=>{v(ve=>({...ve,requests:ve.requests.filter(je=>je.id!==P)})),E===P&&(w(null),T(""))},G=P=>{const ve=m.folders.find(je=>je.id===P);v(je=>v0(je,P)),b===P&&f?.(ve?.parentFolderId||"")},pe=P=>{const ve=S0(m,P);v(ve),x===P&&(u?.(ve.collections[0]?.id||""),f?.(""),w(null),T(""))},de=N==="dark"?"bg-gray-900 border-gray-700 text-gray-100":"bg-white border-gray-300 text-gray-900",be=N==="dark"?"text-gray-400":"text-gray-500",Ee=N==="dark"?"bg-blue-500/10 text-blue-300":"bg-blue-500/10 text-blue-700",ce=P=>s.jsxs("div",{className:`group flex items-center gap-1 rounded-md ${E===P.id?"bg-blue-500/10":""}`,children:[s.jsxs("button",{type:"button",className:"min-w-0 flex-1 rounded-md px-2 py-2 text-left text-sm hover:bg-blue-500/10","aria-label":`Load saved request ${P.name}`,onClick:()=>ge(P.id),children:[s.jsx("span",{className:"mr-2 font-mono text-xs font-semibold text-blue-600",children:P.request.method.toUpperCase()}),s.jsx("span",{className:"truncate",children:P.name})]}),s.jsx("button",{type:"button",className:"rounded-md p-2 opacity-70 hover:opacity-100","aria-label":`Delete saved request ${P.name}`,onClick:()=>C(P.id),children:s.jsx(dn,{className:"h-4 w-4"})})]},P.id),Ce=(P,ve,je=new Set)=>{if(je.has(P.id))return null;const ke=new Set(je);ke.add(P.id);const Pe=Ae(P.id),at=Y.filter(yt=>yt.parentFolderId===P.id);return s.jsxs(gs.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button","aria-label":`Select folder ${Pe}`,className:`min-w-0 flex-1 rounded-md py-2 pr-2 text-left text-sm ${b===P.id?"bg-blue-500/10":""}`,style:{paddingLeft:`${8+ve*16}px`},onClick:()=>f?.(P.id),children:P.name}),s.jsx("button",{type:"button",disabled:Xr(m,P.collectionId,P.id).length===0,"aria-label":`Run folder ${Pe}`,className:"rounded-md p-2 opacity-70 hover:opacity-100 disabled:cursor-not-allowed disabled:opacity-30",onClick:()=>g?.(P.collectionId,P.id),children:s.jsx(Pa,{className:"h-4 w-4"})}),s.jsx("button",{type:"button","aria-label":`Delete folder ${Pe}`,className:"rounded-md p-2 opacity-70 hover:opacity-100",onClick:()=>G(P.id),children:s.jsx(dn,{className:"h-4 w-4"})})]}),at.map(yt=>Ce(yt,ve+1,ke))]},P.id)},Le=(P,ve,je=new Set)=>{if(je.has(P.id))return null;const ke=new Set(je);ke.add(P.id);const Pe=$.filter(yt=>yt.folderId===P.id),at=Y.filter(yt=>yt.parentFolderId===P.id);return Pe.length===0&&at.length===0?null:s.jsxs("div",{className:"space-y-1",children:[Pe.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:`mb-1 text-xs font-semibold uppercase tracking-wide ${be}`,style:{paddingLeft:`${8+ve*12}px`},children:P.name}),s.jsx("div",{style:{paddingLeft:`${ve*12}px`},children:Pe.map(ce)})]}),at.map(yt=>Le(yt,ve+1,ke))]},P.id)},Be=Y.filter(P=>!P.parentFolderId),rt=b?Ae(b):"";return s.jsxs("section",{className:"space-y-4","aria-labelledby":"api-client-collections-heading",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ug,{className:"h-4 w-4"}),s.jsx("h3",{id:"api-client-collections-heading",className:"font-semibold",children:"Collections"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{"aria-label":"New collection name",className:`min-w-0 flex-1 rounded-md border px-2 py-2 text-sm ${de}`,value:_,onChange:P=>R(P.target.value),placeholder:"New collection"}),s.jsx("button",{type:"button","aria-label":"Add collection",className:"rounded-md border px-3 py-2",onClick:se,children:s.jsx(Ra,{className:"h-4 w-4"})})]}),s.jsx("div",{className:"space-y-2",children:m.collections.map(P=>s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",className:`min-w-0 flex-1 rounded-md px-2 py-2 text-left text-sm font-medium ${P.id===U?.id?Ee:""}`,onClick:()=>{u?.(P.id),f?.(""),w(null),T("")},children:P.name}),s.jsx("button",{type:"button",disabled:Xr(m,P.id).length===0,"aria-label":`Run collection ${P.name}`,className:"rounded-md p-2 opacity-70 hover:opacity-100 disabled:cursor-not-allowed disabled:opacity-30",onClick:()=>p?.(P.id),children:s.jsx(Pa,{className:"h-4 w-4"})}),m.collections.length>1&&s.jsx("button",{type:"button","aria-label":`Delete collection ${P.name}`,className:"rounded-md p-2 opacity-70 hover:opacity-100",onClick:()=>pe(P.id),children:s.jsx(dn,{className:"h-4 w-4"})})]},P.id))}),U&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-2 border-t pt-3",children:[s.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide",children:"Collection authorization"}),s.jsx(yf,{auth:U.auth,label:"Collection",hostExecution:S,onChange:he,theme:N}),s.jsx("p",{className:`text-xs ${be}`,children:"Requests set to inherit use the nearest folder override, then this collection authorization."})]}),s.jsxs("div",{className:"space-y-2 border-t pt-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide",children:"Collection variables"}),s.jsxs("button",{type:"button","aria-label":"Add collection variable",className:"inline-flex items-center gap-1 rounded-md border px-2 py-1 text-xs",onClick:Ne,children:[s.jsx(Ra,{className:"h-3.5 w-3.5"})," Add"]})]}),s.jsxs("div",{className:"space-y-2",children:[U.variables.map((P,ve)=>s.jsxs("div",{className:"grid grid-cols-[auto_minmax(0,1fr)_minmax(0,1fr)_auto] items-center gap-1",children:[s.jsx("input",{"aria-label":`Collection variable ${ve+1} enabled`,type:"checkbox",checked:P.enabled!==!1,onChange:je=>O(P.id,{enabled:je.target.checked})}),s.jsx("input",{"aria-label":`Collection variable ${ve+1} key`,className:`min-w-0 rounded-md border px-2 py-1.5 font-mono text-xs ${de}`,placeholder:"baseUrl",value:P.key,onChange:je=>O(P.id,{key:je.target.value})}),s.jsx("input",{"aria-label":`Collection variable ${ve+1} value`,className:`min-w-0 rounded-md border px-2 py-1.5 font-mono text-xs ${de}`,placeholder:"https://api.example.com",value:P.value,onChange:je=>O(P.id,{value:je.target.value})}),s.jsx("button",{type:"button","aria-label":`Remove collection variable ${ve+1}`,className:"rounded-md p-1.5 opacity-70 hover:opacity-100",onClick:()=>ee(P.id),children:s.jsx(dn,{className:"h-3.5 w-3.5"})})]},P.id)),U.variables.length===0&&s.jsxs("p",{className:`text-xs ${be}`,children:["Collection variables provide reusable defaults such as ",s.jsx("code",{children:"{{baseUrl}}"}),". Active environment values override matching collection keys."]})]})]}),s.jsxs("div",{className:"space-y-1 border-t pt-3",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{"aria-label":"New folder name",className:`min-w-0 flex-1 rounded-md border px-2 py-2 text-sm ${de}`,value:z,onChange:P=>M(P.target.value),placeholder:"Folder"}),s.jsx("button",{type:"button","aria-label":"Add folder",className:"rounded-md border px-3 py-2",onClick:oe,children:s.jsx(og,{className:"h-4 w-4"})})]}),s.jsx("p",{className:`text-xs ${be}`,children:rt?`New folders are created inside ${rt}.`:"New folders are created at the collection root."})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("button",{type:"button","aria-label":"Select collection root",className:`w-full rounded-md px-2 py-2 text-left text-sm ${b===""?"bg-blue-500/10":""}`,onClick:()=>f?.(""),children:"Unfiled / collection root"}),Be.map(P=>Ce(P,0))]}),q&&s.jsxs("div",{className:"space-y-2 border-t pt-3",children:[s.jsxs("div",{className:"text-xs font-semibold uppercase tracking-wide",children:["Folder authorization — ",rt]}),s.jsx(yf,{auth:q.auth,label:"Folder",allowInherit:!0,hostExecution:S,onChange:xe,theme:N})]}),s.jsxs("div",{className:"space-y-2 border-t pt-3",children:[s.jsx("input",{"aria-label":"Saved request name",className:`w-full rounded-md border px-2 py-2 text-sm ${de}`,value:B,onChange:P=>T(P.target.value),placeholder:"Request name"}),s.jsxs("select",{"aria-label":"Saved request folder",className:`w-full rounded-md border px-2 py-2 text-sm ${de}`,value:b,onChange:P=>f?.(P.target.value),children:[s.jsx("option",{value:"",children:"Unfiled"}),Se.map(({folder:P,depth:ve})=>s.jsx("option",{value:P.id,children:`${"— ".repeat(ve)}${P.name}`},P.id))]}),s.jsxs("button",{type:"button",className:"inline-flex w-full items-center justify-center gap-2 rounded-md border px-3 py-2 text-sm font-medium",onClick:K,children:[s.jsx(hg,{className:"h-4 w-4"})," ",E?"Update request":"Save request"]})]}),s.jsxs("div",{className:"space-y-3 border-t pt-3",children:[$.filter(P=>!P.folderId).map(ce),Be.map(P=>Le(P,0)),$.length===0&&s.jsx("p",{className:`px-2 text-xs ${be}`,children:"Save the current request to build a reusable collection."})]})]})]})};function Xl(){return new Date().toISOString()}const Sx=({workspace:a,onWorkspaceChange:r,theme:o})=>{const[u,f]=W.useState(""),p=a.environments.find(_=>_.id===a.activeEnvironmentId),g=o==="dark"?"bg-gray-900 border-gray-700 text-gray-100":"bg-white border-gray-300 text-gray-900",x=o==="dark"?"text-gray-400":"text-gray-500",b=()=>{const _=u.trim();if(!_)return;const R=Xl(),z=Lt("environment");r(M=>({...M,environments:[...M.environments,{id:z,name:_,variables:[],createdAt:R,updatedAt:R}],activeEnvironmentId:z})),f("")},m=_=>{if(!p)return;const R=Xl();r(z=>({...z,environments:z.environments.map(M=>M.id===p.id?{...M,name:_,updatedAt:R}:M)}))},v=()=>{if(!p)return;const _=Xl();r(R=>({...R,environments:R.environments.map(z=>z.id===p.id?{...z,variables:[...z.variables,{id:Lt("variable"),key:"",value:"",enabled:!0}],updatedAt:_}:z)}))},S=(_,R)=>{if(!p)return;const z=Xl();r(M=>({...M,environments:M.environments.map(B=>B.id===p.id?{...B,variables:B.variables.map(T=>T.id===_?{...T,...R}:T),updatedAt:z}:B)}))},N=_=>{if(!p)return;const R=Xl();r(z=>({...z,environments:z.environments.map(M=>M.id===p.id?{...M,variables:M.variables.filter(B=>B.id!==_),updatedAt:R}:M)}))};return s.jsxs("section",{className:"space-y-3","aria-labelledby":"api-client-environment-heading",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("h3",{id:"api-client-environment-heading",className:"font-semibold",children:"Environment"}),p&&s.jsx("button",{type:"button","aria-label":`Delete environment ${p.name}`,className:"rounded-md p-2 opacity-70 hover:opacity-100",onClick:()=>r(_=>b0(_,p.id)),children:s.jsx(dn,{className:"h-4 w-4"})})]}),s.jsxs("select",{"aria-label":"Active environment",className:`w-full rounded-md border px-2 py-2 text-sm ${g}`,value:a.activeEnvironmentId||"",onChange:_=>r(R=>({...R,activeEnvironmentId:_.target.value||void 0})),children:[s.jsx("option",{value:"",children:"No environment"}),a.environments.map(_=>s.jsx("option",{value:_.id,children:_.name},_.id))]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{"aria-label":"New environment name",className:`min-w-0 flex-1 rounded-md border px-2 py-2 text-sm ${g}`,value:u,onChange:_=>f(_.target.value),placeholder:"New environment"}),s.jsx("button",{type:"button","aria-label":"Add environment",className:"rounded-md border px-3 py-2",onClick:b,children:s.jsx(Ra,{className:"h-4 w-4"})})]}),p&&s.jsxs("div",{className:"space-y-3",children:[s.jsx("input",{"aria-label":"Environment name",className:`w-full rounded-md border px-2 py-2 text-sm font-medium ${g}`,value:p.name,onChange:_=>m(_.target.value)}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide",children:"Variables"}),s.jsxs("button",{type:"button","aria-label":"Add environment variable",className:"inline-flex items-center gap-1 rounded-md border px-2 py-1 text-xs",onClick:v,children:[s.jsx(Ra,{className:"h-3.5 w-3.5"})," Add"]})]}),s.jsxs("div",{className:"space-y-2",children:[p.variables.map((_,R)=>s.jsxs("div",{className:"grid grid-cols-[auto_minmax(0,1fr)_minmax(0,1fr)_auto] items-center gap-1",children:[s.jsx("input",{"aria-label":`Environment variable ${R+1} enabled`,type:"checkbox",checked:_.enabled!==!1,onChange:z=>S(_.id,{enabled:z.target.checked})}),s.jsx("input",{"aria-label":`Environment variable ${R+1} key`,className:`min-w-0 rounded-md border px-2 py-1.5 font-mono text-xs ${g}`,placeholder:"baseUrl",value:_.key,onChange:z=>S(_.id,{key:z.target.value})}),s.jsx("input",{"aria-label":`Environment variable ${R+1} value`,className:`min-w-0 rounded-md border px-2 py-1.5 font-mono text-xs ${g}`,placeholder:"https://api.example.com",value:_.value,onChange:z=>S(_.id,{value:z.target.value})}),s.jsx("button",{type:"button","aria-label":`Remove environment variable ${R+1}`,className:"rounded-md p-1.5 opacity-70 hover:opacity-100",onClick:()=>N(_.id),children:s.jsx(dn,{className:"h-3.5 w-3.5"})})]},_.id)),p.variables.length===0&&s.jsxs("p",{className:`text-xs ${x}`,children:["Add variables such as ",s.jsx("code",{children:"{{baseUrl}}"})," or ",s.jsx("code",{children:"{{token}}"}),"."]})]})]})]})};function jx(a){const r=new Date(a);return Number.isNaN(r.getTime())?a:r.toLocaleString()}const Ax=({workspace:a,onWorkspaceChange:r,onLoadRequest:o,onViewAll:u,theme:f})=>{const p=f==="dark"?"text-gray-400":"text-gray-500",g=b=>{const m=a.history.find(v=>v.id===b);m&&o(Nn(m.request),m.scripts?fn(m.scripts):void 0,m.collectionId,m.folderId)},x=b=>{r(m=>({...m,history:m.history.filter(v=>v.id!==b)}))};return s.jsxs("section",{className:"space-y-3","aria-labelledby":"api-client-history-heading",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xs,{className:"h-4 w-4"}),s.jsx("h3",{id:"api-client-history-heading",className:"font-semibold",children:"Recent history"})]}),a.history.length>0&&u&&s.jsx("button",{type:"button",className:`text-xs underline underline-offset-2 ${p}`,onClick:u,children:"View all"})]}),s.jsxs("div",{className:"space-y-1",children:[a.history.slice(0,5).map(b=>{const m=b.status!==void 0?`${b.status}${b.statusText?` ${b.statusText}`:""}`:b.error?"Error":"Sent",v=b.responseTime!==void 0?` · ${b.responseTime} ms`:"",S=b.scriptTests?.filter(_=>_.passed).length||0,N=b.scriptTests?.length?`${S}/${b.scriptTests.length} tests passed`:b.scriptError?"Script error":void 0;return s.jsxs("div",{className:"group flex items-start gap-1 rounded-md",children:[s.jsxs("button",{type:"button",className:"min-w-0 flex-1 rounded-md px-2 py-2 text-left hover:bg-blue-500/10","aria-label":`Load history request ${b.executedMethod.toUpperCase()} ${b.resolvedUrl}`,onClick:()=>g(b.id),children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[s.jsx("span",{className:"font-mono font-semibold text-blue-600",children:b.executedMethod.toUpperCase()}),s.jsxs("span",{className:b.error?"text-red-600":p,children:[m,v]})]}),s.jsx("div",{className:"truncate font-mono text-xs",title:b.resolvedUrl,children:b.resolvedUrl}),N&&s.jsx("div",{className:`mt-1 text-[11px] ${b.scriptError?"text-red-600":p}`,children:N}),s.jsx("div",{className:`mt-1 text-[11px] ${p}`,children:jx(b.createdAt)})]}),s.jsx("button",{type:"button",className:"rounded-md p-2 opacity-70 hover:opacity-100","aria-label":`Delete history request ${b.executedMethod.toUpperCase()} ${b.resolvedUrl}`,onClick:()=>x(b.id),children:s.jsx(dn,{className:"h-4 w-4"})})]},b.id)}),a.history.length===0&&s.jsx("p",{className:`px-2 text-xs ${p}`,children:"Sent requests appear here for quick replay."})]}),a.history.length>0&&u&&s.jsxs("button",{type:"button",className:"w-full rounded-md border px-3 py-2 text-xs font-medium hover:bg-blue-500/10",onClick:u,children:["Open full history · ",a.history.length]})]})};function Nx(a){return!!a.error||!!a.scriptError||a.status!==void 0&&a.status>=400||!!a.scriptTests?.some(r=>!r.passed)}function wx(a,r){const o=r.query.trim().toLowerCase();return a.history.filter(u=>{const f=u.collectionId?a.collections.find(v=>v.id===u.collectionId)?.name||"Deleted collection":"",p=u.folderId?a.folders.find(v=>v.id===u.folderId)?.name||"Deleted folder":"",g=!o||[u.executedMethod,u.resolvedUrl,u.status,u.statusText,f,p,u.runName].filter(v=>v!==void 0).some(v=>String(v).toLowerCase().includes(o)),x=r.method==="all"||u.executedMethod.toUpperCase()===r.method,b=Nx(u),m=r.outcome==="all"||r.outcome==="success"&&!b||r.outcome==="failed"&&b||r.outcome==="tests"&&!!u.scriptTests?.length;return g&&x&&m})}function Tx(a){const r=new Set,o=[];for(const u of a){if(!u.runId){o.push({kind:"entry",entry:u});continue}if(r.has(u.runId))continue;r.add(u.runId);const f=a.filter(g=>g.runId===u.runId).sort((g,x)=>(g.runIndex||Number.MAX_SAFE_INTEGER)-(x.runIndex||Number.MAX_SAFE_INTEGER)),p=Math.max(f.length,...f.map(g=>g.runTotal||0));o.push({kind:"run",group:{runId:u.runId,runName:u.runName||"Collection run",entries:f,total:p,captured:f.length,passed:f.filter(g=>g.runPassed===!0).length,failed:f.filter(g=>g.runPassed===!1).length,cancelled:0}})}return o}function _f(a){const r=new Date(a);return Number.isNaN(r.getTime())?a:r.toLocaleString()}function uo(a){return!!a.error||!!a.scriptError||a.status!==void 0&&a.status>=400||!!a.scriptTests?.some(r=>!r.passed)}function fo(a){return a.error?"Request failed":a.status!==void 0?`${a.status}${a.statusText?` ${a.statusText}`:""}`:"Sent"}function Ex(a){return(a||[]).filter(r=>r.enabled!==!1&&(r.key.trim()||r.value.trim()))}function Of({title:a,values:r,mutedClass:o}){const u=Ex(r);return u.length===0?null:s.jsxs("section",{className:"space-y-2",children:[s.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide",children:a}),s.jsx("div",{className:"overflow-hidden rounded-md border",children:u.map((f,p)=>s.jsxs("div",{className:"grid grid-cols-[minmax(8rem,0.35fr)_minmax(0,1fr)] gap-3 border-b px-3 py-2 text-xs last:border-b-0",children:[s.jsx("span",{className:"break-all font-mono font-medium",children:f.key||"—"}),s.jsx("span",{className:`break-all font-mono ${o}`,children:f.value})]},`${f.key}:${p}`))})]})}function Rf(a){const r=[`${a.passed} runner passed`,`${a.failed} runner failed`];return a.cancelled&&r.push(`${a.cancelled} cancelled`),r.join(" · ")}const Cx=({workspace:a,onWorkspaceChange:r,onLoadRequest:o,onBack:u,theme:f,initialEntryId:p,initialRunId:g})=>{const[x,b]=W.useState(""),[m,v]=W.useState("all"),[S,N]=W.useState("all"),[_,R]=W.useState(g?void 0:p||a.history[0]?.id),[z,M]=W.useState(g),B=f==="dark"?"border-gray-700 bg-gray-900 text-gray-100":"border-gray-300 bg-white text-gray-900",T=f==="dark"?"border-gray-700 bg-gray-800/60 text-gray-100":"border-gray-200 bg-gray-50 text-gray-900",E=f==="dark"?"text-gray-400":"text-gray-500",w=f==="dark"?"border-gray-700 bg-gray-950 text-gray-100":"border-gray-200 bg-white text-gray-900",U=W.useMemo(()=>wx(a,{query:x,method:m,outcome:S}),[m,S,x,a]),Y=W.useMemo(()=>Tx(U),[U]),$=z&&Y.find(K=>K.kind==="run"&&K.group.runId===z)?.kind==="run"?Y.find(K=>K.kind==="run"&&K.group.runId===z).group:void 0,q=$?void 0:U.find(K=>K.id===_)||U[0],J=q?.collectionId?a.collections.find(K=>K.id===q.collectionId):void 0,Se=q?.folderId?a.folders.find(K=>K.id===q.folderId):void 0,Ae=()=>{R(void 0),M(void 0)},se=K=>{R(K),M(void 0)},he=K=>{M(K),R(void 0)},xe=K=>{o(Nn(K.request),K.scripts?fn(K.scripts):void 0,K.collectionId,K.folderId),u()},Ne=K=>{r(ge=>({...ge,history:ge.history.filter(C=>C.id!==K)})),_===K&&R(void 0)},O=()=>{r(K=>({...K,history:[]})),Ae()},ee=q?.responseHeaders||[],oe=q?.scriptTests?.filter(K=>K.passed).length||0;return s.jsx("section",{className:`rounded-xl border p-4 md:p-5 ${T}`,"aria-labelledby":"api-client-history-page-heading",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("header",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center gap-2 rounded-md border px-3 py-2 text-sm",onClick:u,children:[s.jsx(Bu,{className:"h-4 w-4"})," Client"]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xs,{className:"h-5 w-5"}),s.jsx("h2",{id:"api-client-history-page-heading",className:"text-lg font-semibold",children:"Request history"})]}),s.jsxs("p",{className:`text-xs ${E}`,children:[a.history.length," persisted request",a.history.length===1?"":"s"," · newest first"]})]})]}),a.history.length>0&&s.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center gap-2 self-start rounded-md border px-3 py-2 text-sm text-red-600",onClick:O,children:[s.jsx(dn,{className:"h-4 w-4"})," Clear history"]})]}),s.jsxs("div",{className:"grid gap-2 md:grid-cols-[minmax(0,1fr)_10rem_12rem]",children:[s.jsxs("label",{className:"relative",children:[s.jsx("span",{className:"sr-only",children:"Search history"}),s.jsx(Fu,{className:`pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 ${E}`}),s.jsx("input",{"aria-label":"Search history",className:`w-full rounded-md border py-2 pl-9 pr-3 text-sm ${B}`,value:x,onChange:K=>{b(K.target.value),Ae()},placeholder:"Search URL, status, collection or run…"})]}),s.jsxs("select",{"aria-label":"History method filter",className:`rounded-md border px-3 py-2 text-sm ${B}`,value:m,onChange:K=>{v(K.target.value),Ae()},children:[s.jsx("option",{value:"all",children:"All methods"}),["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"].map(K=>s.jsx("option",{value:K,children:K},K))]}),s.jsxs("select",{"aria-label":"History outcome filter",className:`rounded-md border px-3 py-2 text-sm ${B}`,value:S,onChange:K=>{N(K.target.value),Ae()},children:[s.jsx("option",{value:"all",children:"All outcomes"}),s.jsx("option",{value:"success",children:"Successful HTTP"}),s.jsx("option",{value:"failed",children:"HTTP / script failures"}),s.jsx("option",{value:"tests",children:"With tests"})]})]}),s.jsxs("div",{className:"grid min-h-[32rem] gap-4 lg:grid-cols-[minmax(18rem,0.85fr)_minmax(0,1.35fr)]",children:[s.jsxs("div",{className:"max-h-[48rem] space-y-2 overflow-auto rounded-lg border p-2",children:[Y.map(K=>{if(K.kind==="entry"){const G=K.entry,pe=q?.id===G.id,de=uo(G),be=G.collectionId?a.collections.find(Ee=>Ee.id===G.collectionId)?.name||"Deleted collection":void 0;return s.jsxs("button",{type:"button",className:`w-full rounded-md border px-3 py-3 text-left transition ${pe?"border-blue-500 bg-blue-500/10":"border-transparent hover:bg-blue-500/5"}`,onClick:()=>se(G.id),children:[s.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs",children:[s.jsx("span",{className:"font-mono font-semibold text-blue-600",children:G.executedMethod.toUpperCase()}),s.jsxs("span",{className:de?"text-red-600":E,children:[fo(G),G.responseTime!==void 0?` · ${G.responseTime} ms`:""]})]}),s.jsx("div",{className:"mt-1 truncate font-mono text-xs",title:G.resolvedUrl,children:G.resolvedUrl}),s.jsxs("div",{className:`mt-1 flex items-center justify-between gap-2 text-[11px] ${E}`,children:[s.jsx("span",{className:"truncate",children:be||"Unsaved request"}),s.jsx("span",{children:_f(G.createdAt)})]})]},G.id)}const ge=K.group,C=$?.runId===ge.runId;return s.jsxs("div",{className:`rounded-lg border ${C?"border-blue-500 bg-blue-500/5":""}`,children:[s.jsxs("button",{type:"button","aria-label":`Open collection run ${ge.runName}`,className:"w-full px-3 py-3 text-left",onClick:()=>he(ge.runId),children:[s.jsx("div",{className:"text-xs font-semibold text-blue-600",children:"Collection run"}),s.jsx("div",{className:"mt-1 truncate text-sm font-medium",children:ge.runName}),s.jsxs("div",{className:`mt-1 text-[11px] ${E}`,children:[ge.captured,"/",ge.total," history entries · ",Rf(ge)]})]}),s.jsx("div",{className:"border-t px-2 py-1",children:ge.entries.map(G=>s.jsxs("button",{type:"button",className:`w-full rounded-md px-2 py-2 text-left text-xs hover:bg-blue-500/10 ${q?.id===G.id?"bg-blue-500/10":""}`,onClick:()=>se(G.id),children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("span",{children:[s.jsx("span",{className:"mr-2 text-[10px] text-gray-500",children:G.runIndex||"–"}),s.jsx("span",{className:"font-mono font-semibold text-blue-600",children:G.executedMethod.toUpperCase()})]}),s.jsx("span",{className:uo(G)?"text-red-600":E,children:fo(G)})]}),s.jsx("div",{className:"mt-1 truncate font-mono",title:G.resolvedUrl,children:G.resolvedUrl})]},G.id))})]},ge.runId)}),U.length===0&&s.jsx("div",{className:`px-3 py-8 text-center text-sm ${E}`,children:a.history.length===0?"Send a request to start building history.":"No history entries match these filters."})]}),s.jsxs("div",{className:"min-w-0 rounded-lg border p-4",children:[$&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"border-b pb-4",children:[s.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-blue-600",children:"Collection run"}),s.jsx("h3",{className:"mt-1 text-lg font-semibold",children:$.runName}),s.jsxs("p",{className:`mt-1 text-sm ${E}`,children:[$.captured," / ",$.total," history entries captured · ",Rf($)]}),s.jsx("p",{className:`mt-2 text-xs ${E}`,children:"Runner pass/fail is based on transport, scripts, and tests. An HTTP 4xx/5xx can therefore be a runner pass while still appearing as an HTTP failure in the request inspector."})]}),s.jsx("div",{className:"space-y-2",children:$.entries.map(K=>s.jsxs("button",{type:"button","aria-label":`Inspect history ${K.runIndex||""}`,className:"w-full rounded-md border px-3 py-3 text-left hover:bg-blue-500/5",onClick:()=>se(K.id),children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-sm",children:[s.jsxs("span",{children:[s.jsx("span",{className:`mr-2 text-xs ${E}`,children:K.runIndex||"–"}),s.jsx("span",{className:"font-mono font-bold text-blue-600",children:K.executedMethod.toUpperCase()})]}),s.jsxs("span",{className:K.runPassed===!1?"text-red-600":K.runPassed===!0?"text-green-600":E,children:[K.runPassed===!0?"Runner pass":K.runPassed===!1?"Runner fail":"Recorded",K.status!==void 0?` · HTTP ${K.status}`:""]})]}),s.jsx("div",{className:"mt-1 truncate font-mono text-xs",children:K.resolvedUrl})]},K.id))})]}),!$&&!q&&s.jsx("div",{className:`flex min-h-[20rem] items-center justify-center text-sm ${E}`,children:"Select a history entry or collection run to inspect it."}),q&&s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"space-y-2 border-b pb-4",children:[s.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[s.jsx("span",{className:"font-mono font-bold text-blue-600",children:q.executedMethod.toUpperCase()}),s.jsx("span",{className:uo(q)?"text-red-600":E,children:fo(q)}),q.responseTime!==void 0&&s.jsxs("span",{className:E,children:[q.responseTime," ms"]}),q.runPassed!==void 0&&s.jsx("span",{className:q.runPassed?"text-green-600":"text-red-600",children:q.runPassed?"Runner pass":"Runner fail"})]}),s.jsx("div",{className:"mt-1 break-all font-mono text-sm",children:q.resolvedUrl}),s.jsxs("div",{className:`mt-1 text-xs ${E}`,children:[_f(q.createdAt),q.collectionId?` · ${J?.name||"Deleted collection"}`:"",q.folderId?` / ${Se?.name||"Deleted folder"}`:"",q.runName?` · Run: ${q.runName}`:""]})]}),s.jsxs("div",{className:"flex shrink-0 gap-2",children:[s.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center gap-2 rounded-md border px-3 py-2 text-sm font-medium hover:bg-blue-500/10",onClick:()=>xe(q),children:[s.jsx(mg,{className:"h-4 w-4"})," Open in client"]}),s.jsx("button",{type:"button","aria-label":"Delete selected history entry",className:"inline-flex min-h-10 items-center rounded-md border px-3 py-2 text-red-600",onClick:()=>Ne(q.id),children:s.jsx(dn,{className:"h-4 w-4"})})]})]}),q.error&&s.jsx("div",{className:"rounded-md border border-red-300 bg-red-500/10 px-3 py-2 text-sm text-red-700",children:q.error})]}),s.jsxs("section",{className:"space-y-3",children:[s.jsx("h3",{className:"font-semibold",children:"Request"}),s.jsxs("div",{className:"grid gap-3 text-xs sm:grid-cols-2",children:[s.jsxs("div",{children:[s.jsx("span",{className:E,children:"Original URL"}),s.jsx("div",{className:"mt-1 break-all font-mono",children:q.request.url})]}),s.jsxs("div",{children:[s.jsx("span",{className:E,children:"Content type"}),s.jsx("div",{className:"mt-1 font-mono",children:q.request.contentType||"—"})]})]}),s.jsx(Of,{title:"Query parameters",values:q.request.query,mutedClass:E}),s.jsx(Of,{title:"Headers",values:q.request.headers,mutedClass:E}),q.request.body&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide",children:"Body"}),s.jsx("pre",{className:`max-h-72 overflow-auto whitespace-pre-wrap break-words rounded-md border p-3 text-xs ${w}`,children:q.request.body})]})]}),s.jsxs("section",{className:"space-y-3 border-t pt-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("h3",{className:"font-semibold",children:"Response"}),q.responseBodyTruncated&&s.jsx("span",{className:"text-xs text-amber-600",children:"Body truncated in history"})]}),ee.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide",children:"Headers"}),s.jsx("div",{className:"overflow-hidden rounded-md border",children:ee.map(([K,ge],C)=>s.jsxs("div",{className:"grid grid-cols-[minmax(8rem,0.35fr)_minmax(0,1fr)] gap-3 border-b px-3 py-2 text-xs last:border-b-0",children:[s.jsx("span",{className:"break-all font-mono font-medium",children:K}),s.jsx("span",{className:`break-all font-mono ${E}`,children:ge})]},`${K}:${C}`))})]}),q.responseBody!==void 0?s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide",children:"Body"}),s.jsx("pre",{className:`max-h-96 overflow-auto whitespace-pre-wrap break-words rounded-md border p-3 text-xs ${w}`,children:q.responseBody||"(empty response body)"})]}):s.jsx("p",{className:`text-sm ${E}`,children:"Response payload was not captured for this older history entry."})]}),(q.scriptTests?.length||q.scriptError||q.scriptLogs?.length)&&s.jsxs("section",{className:"space-y-3 border-t pt-4",children:[s.jsx("h3",{className:"font-semibold",children:"Tests & console"}),q.scriptTests?.length?s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:`text-xs ${E}`,children:[oe,"/",q.scriptTests.length," tests passed"]}),q.scriptTests.map((K,ge)=>s.jsxs("div",{className:`rounded-md border px-3 py-2 text-sm ${K.passed?"":"border-red-300 bg-red-500/10 text-red-700"}`,children:[s.jsxs("span",{className:"font-medium",children:[K.passed?"✓":"✕"," ",K.name]}),K.error&&s.jsx("div",{className:"mt-1 text-xs",children:K.error})]},`${K.name}:${ge}`))]}):null,q.scriptError&&s.jsx("div",{className:"rounded-md border border-red-300 bg-red-500/10 px-3 py-2 text-sm text-red-700",children:q.scriptError}),q.scriptLogs?.length?s.jsx("pre",{className:`max-h-56 overflow-auto whitespace-pre-wrap rounded-md border p-3 text-xs ${w}`,children:q.scriptLogs.join(`
69
+ `)}):null]}),(q.scripts?.preRequest.trim()||q.scripts?.tests.trim())&&s.jsxs("section",{className:"space-y-3 border-t pt-4",children:[s.jsx("h3",{className:"font-semibold",children:"Scripts used"}),q.scripts?.preRequest.trim()&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide",children:"Pre-request"}),s.jsx("pre",{className:`max-h-56 overflow-auto whitespace-pre-wrap rounded-md border p-3 text-xs ${w}`,children:q.scripts.preRequest})]}),q.scripts?.tests.trim()&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wide",children:"Tests"}),s.jsx("pre",{className:`max-h-56 overflow-auto whitespace-pre-wrap rounded-md border p-3 text-xs ${w}`,children:q.scripts.tests})]})]})]})]})]})]})})};function Ot(a){return!!a&&typeof a=="object"&&!Array.isArray(a)}function Ke(a){if(a==null)return"";if(typeof a=="string")return a;if(typeof a=="number"||typeof a=="boolean")return String(a);try{return JSON.stringify(a)}catch{return String(a)}}function nn(a,r,o,u){a.push({code:r,path:o,message:u})}function sa(a){return Array.isArray(a)?a.filter(Ot):[]}function Ye(a,r,o){const u=sa(a[r]).find(f=>f.key===o);return u?Ke(u.value):""}function kx(a){switch(a){case"authorization_code":return"authorizationCode";case"client_credentials":return"clientCredentials";case"password_credentials":case"password":return"password";case"implicit":return"implicit";case"access_token":return"accessToken";default:return}}function po(a,r,o,u){if(!Ot(a)||typeof a.type!="string")return{...r};const f=a.type.toLowerCase();if(f==="inherit")return{...r};if(f==="noauth")return{type:"none"};if(f==="bearer")return{type:"bearer",token:Ye(a,"bearer","token")};if(f==="basic")return{type:"basic",username:Ye(a,"basic","username"),password:Ye(a,"basic","password")};if(f==="apikey"){const g=Ye(a,"apikey","in").toLowerCase();return g==="cookie"?nn(u,"postman-auth-host-execution",o,"Imported Postman cookie API key requires FlexDoc API host execution; the browser will not send this auth mode directly."):g&&g!=="header"&&g!=="query"&&nn(u,"postman-auth-apikey-location",o,`Unsupported Postman API-key location "${g}"; imported as a header API key.`),{type:"apiKey",key:Ye(a,"apikey","key"),value:Ye(a,"apikey","value"),in:g==="query"?"query":g==="cookie"?"cookie":"header"}}if(f==="oauth2"){const g=Ye(a,"oauth2","scope"),x=kx(Ye(a,"oauth2","grant_type")),b=Ye(a,"oauth2","client_authentication").toLowerCase();return{type:"oauth2",accessToken:Ye(a,"oauth2","accessToken"),...x?{grantType:x}:{},authorizationUrl:Ye(a,"oauth2","authUrl")||void 0,tokenUrl:Ye(a,"oauth2","accessTokenUrl")||void 0,clientId:Ye(a,"oauth2","clientId")||void 0,clientSecret:Ye(a,"oauth2","clientSecret")||void 0,clientAuthentication:b==="header"||b==="basic"?"basic":"body",redirectUri:Ye(a,"oauth2","redirect_uri")||void 0,scopes:g?g.split(/[\s,]+/).filter(Boolean):void 0,username:Ye(a,"oauth2","username")||void 0,password:Ye(a,"oauth2","password")||void 0,refreshToken:Ye(a,"oauth2","refreshToken")||void 0}}const p=g=>nn(u,"postman-auth-host-execution",o,`Imported Postman ${g} auth requires FlexDoc API host execution; the browser will not send this auth mode directly.`);if(f==="digest")return p("Digest"),{type:"digest",username:Ye(a,"digest","username"),password:Ye(a,"digest","password")};if(f==="hawk"){p("Hawk");const g=Ye(a,"hawk","algorithm").toLowerCase();return{type:"hawk",id:Ye(a,"hawk","authId")||Ye(a,"hawk","id"),key:Ye(a,"hawk","authKey")||Ye(a,"hawk","key"),algorithm:g==="sha1"?"sha1":"sha256",ext:Ye(a,"hawk","extraData")||Ye(a,"hawk","ext")||void 0}}if(f==="ntlm")return p("NTLM/Negotiate"),{type:"ntlm",username:Ye(a,"ntlm","username"),password:Ye(a,"ntlm","password"),domain:Ye(a,"ntlm","domain")||void 0,workstation:Ye(a,"ntlm","workstation")||void 0};if(f==="oauth1"){p("OAuth 1.0");const g=Ye(a,"oauth1","signatureMethod").toUpperCase();return{type:"oauth1",consumerKey:Ye(a,"oauth1","consumerKey"),consumerSecret:Ye(a,"oauth1","consumerSecret"),token:Ye(a,"oauth1","token")||void 0,tokenSecret:Ye(a,"oauth1","tokenSecret")||void 0,signatureMethod:g==="HMAC-SHA256"||g==="PLAINTEXT"?g:"HMAC-SHA1",realm:Ye(a,"oauth1","realm")||void 0}}return f==="awsv4"?(p("AWS Signature V4"),{type:"awsv4",accessKey:Ye(a,"awsv4","accessKey"),secretKey:Ye(a,"awsv4","secretKey"),sessionToken:Ye(a,"awsv4","sessionToken")||void 0,region:Ye(a,"awsv4","region"),service:Ye(a,"awsv4","service")}):(nn(u,"postman-auth-unsupported",o,`Postman auth type "${a.type}" is not supported by FlexDoc and was left to inherited/default auth.`),{...r})}function $f(a,r,o){return sa(a).flatMap((u,f)=>{const p=Ke(u.key).trim();return p?[{id:Lt("variable"),key:p,value:Ke(u.value),enabled:u.disabled!==!0&&u.enabled!==!1}]:(nn(o,"postman-variable-empty-key",`${r}[${f}]`,"Skipped a Postman variable with an empty key."),[])})}function _x(a,r,o){const u=["pm.sendRequest","pm.globals","pm.iterationData","pm.cookies","pm.vault","pm.require","pm.execution","postman."].filter(p=>a.includes(p));let f=a.replace(/\bpm\.response\.to\.have\.status\(([^)\n]+)\)\s*;?/g,"flex.expect(flex.response?.code).to.equal($1);").replace(/\bpm\.response\.to\.have\.header\(([^)\n]+)\)\s*;?/g,"flex.expect(flex.response?.headers.has($1)).to.equal(true);").replace(/\bpm\.collectionVariables\b/g,"flex.collection").replace(/\bpm\.environment\b/g,"flex.environment").replace(/\bpm\.variables\b/g,"flex.variables").replace(/\bpm\.request\b/g,"flex.request").replace(/\bpm\.response\b/g,"flex.response").replace(/\bpm\.expect\b/g,"flex.expect").replace(/\bpm\.test\b/g,"flex.test").replace(/\bflex\.request\.headers\.add\s*\(/g,"flex.request.headers.upsert(");return/\bpm\./.test(f)&&u.push("other pm.* APIs"),u.length>0&&(nn(o,"postman-script-partial-compatibility",r,`Imported script uses unsupported Postman APIs (${[...new Set(u)].join(", ")}); review the script before relying on it.`),f=`// Imported from Postman. Review unsupported API usage before relying on this script.
70
+ ${f}`),f}function Ox(a,r,o){return Ot(a)?(a.src!==void 0&&nn(o,"postman-script-src",r,"External Postman script sources are not fetched; only inline script.exec content is imported."),Array.isArray(a.exec)?a.exec.map(Ke).join(`
71
+ `):Ke(a.exec)):""}function Mf(a,r,o){const u={preRequest:[],tests:[]};return sa(a).forEach((f,p)=>{const g=Ke(f.listen).toLowerCase();if(g!=="prerequest"&&g!=="test")return;const x=`${r}[${p}]`,b=Ox(f.script,`${x}.script`,o).trim();if(!b)return;const m=_x(b,`${x}.script`,o);g==="prerequest"?u.preRequest.push(m):u.tests.push(m)}),u}function Rx(a,r){return{preRequest:[...a.preRequest,...r.preRequest],tests:[...a.tests,...r.tests]}}function $x(a){const r=a.preRequest.filter(Boolean).join(`
54
72
 
55
- `).trim(),c=a.tests.filter(Boolean).join(`
73
+ `).trim(),o=a.tests.filter(Boolean).join(`
56
74
 
57
- `).trim();return i||c?{preRequest:i,tests:c}:void 0}function jf(a){try{return decodeURIComponent(a.replace(/\+/g," "))}catch{return a}}function Nf(a){const i=a.split("#",1)[0],c=i.indexOf("?");if(c<0)return{url:i,query:[]};const u=i.slice(c+1),f=u?u.split("&").map(p=>{const g=p.indexOf("=");return{key:jf(g>=0?p.slice(0,g):p),value:jf(g>=0?p.slice(g+1):""),enabled:!0}}):[];return{url:i.slice(0,c),query:f}}function cx(a){return sl(a).map(i=>({key:Pe(i.key),value:Pe(i.value),enabled:i.disabled!==!0}))}function ux(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wf(a,i){let c=a;for(const u of sl(i)){const f=Pe(u.key).trim();f&&(c=c.replace(new RegExp(`:${ux(f)}(?=/|$)`,"g"),`{{${f}}}`))}return c}function dx(a){if(typeof a=="string")return Nf(a);if(!Lt(a))return{url:"",query:[]};const i=cx(a.query),c=Pe(a.raw);if(c){const h=Nf(c);return{url:wf(h.url,a.variable),query:i.length>0?i:h.query}}const u=Pe(a.protocol).replace(/:$/,""),f=Array.isArray(a.host)?a.host.map(Pe).join("."):Pe(a.host),p=Pe(a.port),g=Array.isArray(a.path)?a.path.map(Pe).join("/"):Pe(a.path).replace(/^\//,""),y=f?`${u?`${u}://`:""}${f}${p?`:${p}`:""}`:"",x=y?`${y}${g?`/${g}`:""}`:g;return{url:wf(x,a.variable),query:i}}function fx(a){return sl(a).map(i=>({key:Pe(i.key),value:Pe(i.value),enabled:i.disabled!==!0}))}function px(a){return a.find(i=>i.enabled!==!1&&i.key.toLowerCase()==="content-type")?.value}function mx(a){switch(a.toLowerCase()){case"json":return"application/json";case"xml":return"application/xml";case"html":return"text/html";case"javascript":return"application/javascript";case"text":return"text/plain";default:return}}function hx(a,i,c,u){const f=px(i);if(!Lt(a)||!a.mode)return{body:"",contentType:f||"application/json"};const p=Pe(a.mode);if(p==="raw"){const g=Lt(a.options)&&Lt(a.options.raw)?a.options.raw:void 0,y=g?Pe(g.language):"";return{body:Pe(a.raw),contentType:f||mx(y)||"text/plain"}}if(p==="urlencoded")return{body:sl(a.urlencoded).filter(y=>y.disabled!==!0).map(y=>`${Pe(y.key)}=${Pe(y.value)}`).join("&"),contentType:f||"application/x-www-form-urlencoded"};if(p==="graphql"){const g=Lt(a.graphql)?a.graphql:{},y=Pe(g.variables);let x=y;if(y)try{x=JSON.parse(y)}catch{x=y}return{body:JSON.stringify({query:Pe(g.query),variables:x}),contentType:f||"application/json"}}if(p==="formdata"){const g=sl(a.formdata).filter(x=>x.disabled!==!0),y=g.filter(x=>Pe(x.type)==="file");return An(u,"postman-body-formdata",c,y.length>0?"Multipart form-data was imported as a readable text body; file attachments cannot be imported into the current FlexDoc request model.":"Multipart form-data was imported as a readable text body and should be reviewed before sending because browser multipart boundaries are not reconstructed."),{body:g.filter(x=>Pe(x.type)!=="file").map(x=>`${Pe(x.key)}=${Pe(x.value)}`).join(`
58
- `),contentType:f||"multipart/form-data"}}return p==="file"?(An(u,"postman-body-file",c,"Postman file bodies cannot be imported into the current FlexDoc request model; the request body was left empty."),{body:"",contentType:f||"application/octet-stream"}):(An(u,"postman-body-unsupported",c,`Postman body mode "${p}" is not supported; the request body was left empty.`),{body:"",contentType:f||"application/octet-stream"})}function yx(a,i,c,u,f,p,g,y){const x=typeof a=="string"?{method:"GET",url:a}:a;if(!Lt(x))return An(y,"postman-request-invalid",g,"Skipped an invalid Postman request entry."),null;const h=Pe(x.method).trim().toUpperCase()||"GET",S=dx(x.url),A=fx(x.header),C=hx(x.body,A,`${g}.body`,y),M={method:h,url:S.url,query:S.query,headers:A,body:C.body,contentType:C.contentType,auth:no(x.auth,{type:"inherit"},`${g}.auth`,y)},k=ox(f);return{id:Ht("request"),collectionId:c,folderId:u,name:i.trim()||`${h} ${S.url||"request"}`,request:M,...k?{scripts:k}:{},createdAt:p,updatedAt:p}}function Tf(a){Array.isArray(a.items)&&a.items.forEach((i,c)=>{const u=`${a.path}[${c}]`;if(!Lt(i)){An(a.warnings,"postman-item-invalid",u,"Skipped an invalid Postman item.");return}const f=Pe(i.name)||"Untitled",p=Af(i.event,`${u}.event`,a.warnings),g=sx(a.inheritedScripts,p);if(Array.isArray(i.item)){const x=Ht("folder");a.folders.push({id:x,collectionId:a.collectionId,parentFolderId:a.parentFolderId,name:f,auth:no(i.auth,{type:"inherit"},`${u}.auth`,a.warnings),createdAt:a.timestamp,updatedAt:a.timestamp}),Tf({...a,items:i.item,parentFolderId:x,inheritedScripts:g,path:`${u}.item`});return}const y=yx(i.request,f,a.collectionId,a.parentFolderId,g,a.timestamp,`${u}.request`,a.warnings);y&&a.requests.push(y)})}function gx(a){if(!Lt(a)||!Lt(a.info)||!Array.isArray(a.item))throw new Error("This JSON is not a Postman collection. Expected info and item fields.");const i=Pe(a.info.name).trim();if(!i)throw new Error("Postman collection info.name is required.");const c=[],u=Pe(a.info.schema);u&&!u.includes("/v2.1.0/")&&An(c,"postman-schema-version","info.schema",`Collection schema "${u}" is not Postman v2.1; FlexDoc imported the compatible fields it recognized.`);const f=new Date().toISOString(),p=Ht("collection"),g={id:p,name:i,auth:no(a.auth,{type:"none"},"auth",c),variables:Sf(a.variable,"variable",c),createdAt:f,updatedAt:f},y=[],x=[];return Tf({items:a.item,collectionId:p,inheritedScripts:Af(a.event,"event",c),timestamp:f,path:"item",folders:y,requests:x,warnings:c}),{collection:g,folders:y,requests:x,warnings:c}}function xx(a){if(!Lt(a)||!Array.isArray(a.values)||typeof a.name!="string")throw new Error("This JSON is not a Postman environment. Expected name and values fields.");const i=Pe(a._postman_variable_scope).toLowerCase();if(i&&i!=="environment")throw new Error(`Postman variable scope "${i}" is not an environment.`);const c=[],u=new Date().toISOString();return{environment:{id:Ht("environment"),name:a.name.trim()||"Imported environment",variables:Sf(a.values,"values",c),createdAt:u,updatedAt:u},warnings:c}}function bx(a){if(Lt(a)&&Lt(a.info)&&Array.isArray(a.item))return{kind:"collection",result:gx(a)};if(Lt(a)&&Array.isArray(a.values)&&typeof a.name=="string")return{kind:"environment",result:xx(a)};throw new Error("Unsupported Postman JSON. Import a collection v2.1 JSON file or an exported environment JSON file.")}function vx(a){if(a.collections.length!==1||a.folders.length!==0||a.requests.length!==0)return!1;const i=a.collections[0];return i.name==="My Collection"&&i.auth.type==="none"&&i.variables.length===0}function Sx(a,i){const c=vx(a)?[]:a.collections;return{...a,collections:[...c,i.collection],folders:[...a.folders,...i.folders],requests:[...a.requests,...i.requests]}}function Ax(a,i){return{...a,environments:[...a.environments,i.environment],activeEnvironmentId:a.activeEnvironmentId||i.environment.id}}function Ef(a,i){return`${a} ${a===1?i:`${i}s`}`}const jx=({onWorkspaceChange:a,onSelectedCollectionChange:i,theme:c})=>{const u=le.useRef(null),[f,p]=le.useState(null),[g,y]=le.useState([]),x=async k=>{if(k.length===0)return;const G=[],U=[],I=[];for(const Y of k)try{const D=JSON.parse(await Y.text()),X=bx(D);G.push(X),U.push(...X.result.warnings.map(me=>({...me,path:`${Y.name}:${me.path}`})))}catch(D){I.push(`${Y.name}: ${D instanceof Error?D.message:String(D)}`)}G.length>0&&a(Y=>{let D=Y;for(const X of G)D=X.kind==="collection"?Sx(D,X.result):Ax(D,X.result);return D});const _=G.filter(Y=>Y.kind==="collection"),N=G.length-_.length,j=_[_.length-1];j?.kind==="collection"&&i?.(j.result.collection.id),y(U);const R=[_.length>0?Ef(_.length,"collection"):"",N>0?Ef(N,"environment"):""].filter(Boolean);G.length===0?p({tone:"error",text:I.join(" ")||"No Postman documents were imported."}):I.length>0||U.length>0?p({tone:"warning",text:`Imported ${R.join(" and ")}. ${I.length>0?`${I.length} file${I.length===1?"":"s"} failed to import.`:`${U.length} compatibility warning${U.length===1?"":"s"} need review.`}`}):p({tone:"success",text:`Imported ${R.join(" and ")}.`})},h=c==="dark"?"border-gray-700 bg-gray-900 text-gray-100":"border-gray-300 bg-white text-gray-900",S=c==="dark"?"text-gray-400":"text-gray-500",A=c==="dark"?"text-amber-300":"text-amber-700",C=c==="dark"?"text-emerald-300":"text-emerald-700",M=c==="dark"?"text-red-300":"text-red-700";return o.jsxs("section",{className:"space-y-3","aria-labelledby":"api-client-import-heading",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Uu,{className:"h-4 w-4"}),o.jsx("h3",{id:"api-client-import-heading",className:"font-semibold",children:"Import"})]}),o.jsx("input",{ref:u,type:"file",accept:".json,application/json",multiple:!0,className:"hidden","aria-label":"Import Postman JSON",onChange:k=>{const G=Array.from(k.currentTarget.files||[]);k.currentTarget.value="",x(G)}}),o.jsxs("button",{type:"button",className:`flex w-full items-center justify-center gap-2 rounded-md border px-3 py-2 text-sm font-medium ${h}`,onClick:()=>u.current?.click(),children:[o.jsx(Uu,{className:"h-4 w-4"}),"Import Postman"]}),o.jsx("p",{className:`text-xs ${S}`,children:"Import Postman Collection v2.1 and exported environment JSON files. Multiple files can be selected together."}),f&&o.jsxs("div",{className:`flex items-start gap-2 text-xs ${f.tone==="success"?C:f.tone==="warning"?A:M}`,role:"status",children:[f.tone==="success"?o.jsx(Mu,{className:"mt-0.5 h-4 w-4 shrink-0"}):o.jsx(sg,{className:"mt-0.5 h-4 w-4 shrink-0"}),o.jsx("span",{children:f.text})]}),g.length>0&&o.jsxs("details",{className:`text-xs ${A}`,children:[o.jsxs("summary",{className:"cursor-pointer font-medium",children:["Review import warnings (",g.length,")"]}),o.jsxs("ul",{className:"mt-2 space-y-2 pl-4",children:[g.slice(0,5).map((k,G)=>o.jsxs("li",{children:[o.jsx("span",{className:"font-mono",children:k.path}),": ",k.message]},`${k.code}-${k.path}-${G}`)),g.length>5&&o.jsxs("li",{children:[g.length-5," more warning",g.length-5===1?"":"s"," not shown."]})]})]})]})};function Nx(a,i){if(!i.folderId)return"Collection root";const c=new Map(a.folders.map(g=>[g.id,g])),u=[],f=new Set;let p=c.get(i.folderId);for(;p&&!f.has(p.id);)f.add(p.id),u.unshift(p.name),p=p.parentFolderId?c.get(p.parentFolderId):void 0;return u.join(" / ")||"Deleted folder"}function wx(a){return a.status==="running"?"Running":a.status==="passed"?"Runner pass":a.status==="failed"?"Runner fail":a.status==="cancelled"?"Cancelled":a.status==="skipped"?"Not run":"Pending"}const Tx=({workspace:a,onWorkspaceChange:i,collectionId:c,folderId:u,theme:f,credentials:p,requestInterceptor:g,externalVariables:y,externalEnvironmentVariables:x,onCollectionChanges:h,onEnvironmentChanges:S,onOpenHistory:A,onBack:C,fetcher:M})=>{const k=le.useMemo(()=>Fr(a,c,u),[c,u,a]),G=le.useMemo(()=>gf(a,c,u),[c,u,a]),U=a.environments.find(T=>T.id===a.activeEnvironmentId),[I,_]=le.useState(!1),[N,j]=le.useState(!1),[R,Y]=le.useState(),[D,X]=le.useState({}),me=le.useRef(void 0),xe=le.useRef(!0);le.useEffect(()=>(xe.current=!0,()=>{xe.current=!1,me.current?.abort()}),[]);const ge=async()=>{if(N||k.length===0)return;const T=new AbortController;me.current=T,j(!0),Y(void 0),X(Object.fromEntries(k.map(W=>[W.id,{status:"pending"}])));const ne=await Z0({workspace:a,collectionId:c,folderId:u,runName:G,credentials:p,requestInterceptor:g,externalVariables:y,externalEnvironmentVariables:x,stopOnFailure:I,signal:T.signal,fetcher:M,onCollectionChanges:h,onEnvironmentChanges:S,onRequestStart:W=>{xe.current&&X(K=>({...K,[W.id]:{status:"running"}}))},onRequestComplete:W=>{xe.current&&X(K=>({...K,[W.requestId]:{status:W.cancelled?"cancelled":W.passed?"passed":"failed",item:W}}))}});xe.current&&(i(ne.workspace),X(W=>Object.fromEntries(k.map(K=>{const P=W[K.id]||{status:"pending"};return[K.id,P.status==="pending"&&ne.stopped?{status:"skipped"}:P]}))),Y(ne),j(!1),me.current=void 0)},Ee=()=>me.current?.abort(),He=f==="dark"?"border-gray-700 bg-gray-800/60 text-gray-100":"border-gray-200 bg-gray-50 text-gray-900",he=f==="dark"?"text-gray-400":"text-gray-500",ke=f==="dark"?"border-gray-700 bg-gray-900/40":"border-gray-200 bg-white";return o.jsx("section",{className:`rounded-xl border p-4 md:p-5 ${He}`,"aria-labelledby":"api-client-runner-heading",children:o.jsxs("div",{className:"space-y-5",children:[o.jsxs("header",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center gap-2 rounded-md border px-3 py-2 text-sm",onClick:C,children:[o.jsx(ku,{className:"h-4 w-4"})," Client"]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Jl,{className:"h-5 w-5"}),o.jsx("h2",{id:"api-client-runner-heading",className:"text-lg font-semibold",children:"Collection runner"})]}),o.jsx("p",{className:"mt-1 text-sm font-medium",children:G}),o.jsxs("p",{className:`mt-1 text-xs ${he}`,children:[k.length," saved request",k.length===1?"":"s"," · Environment: ",U?.name||"None"]})]})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[R?.runId&&o.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center gap-2 rounded-md border px-3 py-2 text-sm",onClick:()=>A(void 0,R.runId),children:[o.jsx(Jy,{className:"h-4 w-4"})," Open run history"]}),N?o.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center gap-2 rounded-md border border-red-300 px-3 py-2 text-sm text-red-700",onClick:Ee,children:[o.jsx(ig,{className:"h-4 w-4"})," Stop run"]}):o.jsxs("button",{type:"button",disabled:k.length===0,className:"inline-flex min-h-10 items-center gap-2 rounded-md border px-3 py-2 text-sm font-medium disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>{ge()},children:[o.jsx(Jl,{className:"h-4 w-4"})," ",R?"Run again":"Start run"]})]})]}),o.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border p-3 sm:flex-row sm:items-center sm:justify-between",children:[o.jsxs("label",{className:"inline-flex items-center gap-2 text-sm",children:[o.jsx("input",{type:"checkbox",checked:I,disabled:N,onChange:T=>_(T.target.checked)}),"Stop on runner failure"]}),o.jsx("p",{className:`text-xs ${he}`,children:"Runner failure means transport/script/test failure. HTTP 4xx/5xx alone does not fail an item."})]}),R&&o.jsxs("div",{className:"grid gap-2 sm:grid-cols-5",children:[o.jsxs("div",{className:"rounded-md border px-3 py-2 text-sm",children:[o.jsx("div",{className:he,children:"Progress"}),o.jsxs("strong",{children:[R.completed," / ",R.total]})]}),o.jsxs("div",{className:"rounded-md border px-3 py-2 text-sm",children:[o.jsx("div",{className:he,children:"Passed"}),o.jsx("strong",{className:"text-green-600",children:R.passed})]}),o.jsxs("div",{className:"rounded-md border px-3 py-2 text-sm",children:[o.jsx("div",{className:he,children:"Failed"}),o.jsx("strong",{className:"text-red-600",children:R.failed})]}),o.jsxs("div",{className:"rounded-md border px-3 py-2 text-sm",children:[o.jsx("div",{className:he,children:"Cancelled"}),o.jsx("strong",{children:R.cancelled})]}),o.jsxs("div",{className:"rounded-md border px-3 py-2 text-sm",children:[o.jsx("div",{className:he,children:"Run"}),o.jsx("strong",{children:R.stopped?"Stopped":"Complete"})]})]}),o.jsxs("section",{className:"space-y-3","aria-labelledby":"api-client-runner-order-heading",children:[o.jsxs("div",{children:[o.jsx("h3",{id:"api-client-runner-order-heading",className:"font-semibold",children:"Execution order"}),o.jsx("p",{className:`text-xs ${he}`,children:"Requests execute sequentially in saved-request order. Folder runs include descendant folders; this list is the exact order that will run."})]}),k.map((T,ne)=>{const W=D[T.id]||{status:"pending"},K=W.item?.outcome.result,P=W.item?.outcome.scriptTests||[],w=P.filter(ce=>ce.passed).length,$=K?.status!==void 0&&K.status>=400;return o.jsxs("div",{"data-runner-request-id":T.id,className:`rounded-lg border p-3 ${ke}`,children:[o.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[o.jsx("span",{className:`text-xs ${he}`,children:ne+1}),o.jsx("span",{className:"font-mono font-bold text-blue-600",children:T.request.method.toUpperCase()}),o.jsx("span",{className:"font-medium",children:T.name})]}),o.jsx("div",{className:`mt-1 text-xs ${he}`,children:Nx(a,T)}),o.jsx("div",{className:"mt-1 truncate font-mono text-xs",title:T.request.url,children:T.request.url})]}),o.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2 text-xs",children:[W.status==="running"&&o.jsx(xs,{className:"h-4 w-4 animate-spin"}),W.status==="passed"&&o.jsx(Mu,{className:"h-4 w-4 text-green-600"}),W.status==="failed"&&o.jsx(Zy,{className:"h-4 w-4 text-red-600"}),o.jsx("span",{children:wx(W)}),K?.status!==void 0&&o.jsxs("span",{className:$?"text-amber-600":he,children:["HTTP ",K.status]}),K?.responseTime!==void 0&&o.jsxs("span",{className:he,children:[o.jsx(hs,{className:"mr-1 inline h-3.5 w-3.5"}),K.responseTime," ms"]})]})]}),P.length>0&&o.jsxs("div",{className:`mt-2 text-xs ${P.some(ce=>!ce.passed)?"text-red-600":he}`,children:[w,"/",P.length," tests passed"]}),W.item?.outcome.scriptError&&o.jsx("div",{className:"mt-2 text-xs text-red-600",children:W.item.outcome.scriptError}),W.item?.outcome.error&&!W.item.cancelled&&o.jsx("div",{className:"mt-2 text-xs text-red-600",children:W.item.outcome.error}),W.item?.historyEntryId&&o.jsx("button",{type:"button",className:"mt-2 text-xs font-medium text-blue-600 underline underline-offset-2","aria-label":`Open history for ${T.name}`,onClick:()=>A(W.item?.historyEntryId,W.item?.outcome.result?R?.runId:void 0),children:"Inspect history"})]},T.id)}),k.length===0&&o.jsx("div",{className:`rounded-lg border px-4 py-8 text-center text-sm ${he}`,children:"There are no saved requests in this run scope yet."})]})]})})};function Ex(a){return{method:a?.method||"GET",url:a?.url||"",query:a?.query?.map(i=>({...i}))||[],headers:a?.headers?.map(i=>({...i}))||[],body:a?.body||"",contentType:a?.contentType||"application/json",auth:a?.auth?{...a.auth}:{type:"inherit"}}}const Cx=({initialRequest:a,initialScripts:i,theme:c="light",persistenceKey:u="default",onRequestChange:f,onDraftChange:p,onScriptsChange:g,onExecutionStart:y,onExecutionComplete:x,variables:h={},environmentVariables:S={},onCollectionChanges:A,onEnvironmentChanges:C,...M})=>{const k=Ex(a),G=sn(i),U=Fa(),[I,_]=le.useState(k),[N,j]=le.useState(k),[R,Y]=le.useState(G),[D,X]=le.useState(G),[me,xe]=le.useState(0),[ge,Ee]=le.useState("request"),[He,he]=le.useState({}),[ke,T]=le.useState(),[ne,W]=le.useState(U),[K,P]=le.useState(U.collections[0]?.id),[w,$]=le.useState(""),ce=le.useRef(U.collections[0]?.id),pe=le.useRef(void 0),[ve,Te]=le.useState(u===!1);le.useEffect(()=>{if(u===!1)return;let _e=!1;return c0(u).then(se=>{_e||(W(se),P(se.collections[0]?.id),$(""),Te(!0))}).catch(()=>{_e||Te(!0)}),()=>{_e=!0}},[u]),le.useEffect(()=>{!ve||u===!1||u0(u,ne).catch(()=>{})},[ve,u,ne]);const Re=le.useMemo(()=>Jd(ne,K),[K,ne]),Ve=le.useMemo(()=>Wd(ne),[ne]),Ie=le.useMemo(()=>({...S,...Ve}),[S,Ve]),Be=le.useMemo(()=>({...Re,...h,...Ie}),[Re,Ie,h]),Z=le.useCallback(_e=>Kd(ne,K,w||void 0,_e||{type:"none"}),[K,w,ne]),be=le.useCallback(_e=>{P(_e),$("")},[]),Se=_e=>{f?.(_e)},Ne=_e=>{j(Dn(_e)),p?.(Dn(_e))},Je=_e=>{const se=sn(_e);X(se),g?.(se)},at=_e=>{const se=ce.current||K;W(Ae=>ef(Ae,se,_e)),A?.(_e)},ft=_e=>{W(se=>Pd(se,_e)),C?.(_e)},dt=()=>{ce.current=K,pe.current=w||void 0,y?.()},un=_e=>{W(se=>Qd(se,{..._e,collectionId:ce.current,folderId:pe.current})),x?.(_e)},Yt=(_e,se,Ae,De)=>{Ee("request");const dn=Ae&&ne.collections.some(Q=>Q.id===Ae)?Ae:void 0;dn&&P(dn);const d=dn||K,q=De&&ne.folders.some(Q=>Q.id===De&&Q.collectionId===d)?De:"";$(q);const ae=Dn(_e),ie=sn(se);_(ae),j(ae),Y(ie),X(ie),xe(Q=>Q+1)},It=(_e,se)=>{P(_e),$(se||""),T({collectionId:_e,folderId:se}),Ee("runner")},kn=(_e,se)=>{he({entryId:_e,runId:se}),Ee("history")},Rn=c==="dark"?"border-gray-700 bg-gray-900/40 text-gray-100":"border-gray-200 bg-white text-gray-900";return o.jsxs("div",{className:"grid gap-4 lg:grid-cols-[19rem_minmax(0,1fr)]",children:[o.jsxs("aside",{className:`space-y-5 rounded-xl border p-4 ${Rn}`,children:[o.jsx(jx,{onWorkspaceChange:W,onSelectedCollectionChange:be,theme:c}),o.jsx("div",{className:"border-t pt-4",children:o.jsx(K0,{workspace:ne,onWorkspaceChange:W,theme:c})}),o.jsx("div",{className:"border-t pt-4",children:o.jsx(Q0,{request:N,scripts:D,onLoadRequest:Yt,onSelectedCollectionChange:be,onSelectedFolderChange:$,onRunCollection:_e=>It(_e),onRunFolder:(_e,se)=>It(_e,se),selectedCollectionId:K,selectedFolderId:w,workspace:ne,onWorkspaceChange:W,theme:c})}),o.jsx("div",{className:"border-t pt-4",children:o.jsx(W0,{workspace:ne,onWorkspaceChange:W,onLoadRequest:Yt,onViewAll:()=>kn(),theme:c})})]}),ge==="history"?o.jsx(lx,{workspace:ne,onWorkspaceChange:W,onLoadRequest:Yt,onBack:()=>Ee("request"),initialEntryId:He.entryId,initialRunId:He.runId,theme:c},`${He.runId||""}:${He.entryId||""}`):ge==="runner"&&ke?o.jsx(Tx,{workspace:ne,onWorkspaceChange:W,collectionId:ke.collectionId,folderId:ke.folderId,theme:c,credentials:M.credentials,requestInterceptor:M.requestInterceptor,externalVariables:h,externalEnvironmentVariables:S,onCollectionChanges:A,onEnvironmentChanges:C,onOpenHistory:kn,onBack:()=>Ee("request")}):o.jsx(I0,{...M,initialRequest:I,initialScripts:R,theme:c,resolveAuth:Z,variables:Be,collectionVariables:Re,externalVariables:h,environmentVariables:Ie,onCollectionChanges:at,onEnvironmentChanges:ft,onDraftChange:Ne,onScriptsChange:Je,onExecutionStart:dt,onExecutionComplete:un,onRequestChange:Se},me)]})};function _x(a,i,c){return a.paths[i]?.[c.toLowerCase()]}function Ox(a,i){const c=a.components?.securitySchemes?.[i];if(!c)return;if(!("$ref"in c))return c;const u=c.$ref,f="#/components/securitySchemes/";if(!u.startsWith(f))return;const p=a.components?.securitySchemes?.[decodeURIComponent(u.slice(f.length))];return p&&!("$ref"in p)?p:void 0}function kx(a,i,c,u){const p=_x(a,i,c)?.security??a.security??[];if(!p.length)return;const g=p.find(x=>{const h=Object.keys(x);return h.length===1&&!!u[h[0]]});if(g)return g;const y=p.find(x=>{const h=Object.keys(x);return h.length>0&&h.every(S=>!!u[S])});return y||(p.find(x=>Object.keys(x).length===0)??p[0])}function Rx(a,i,c=[]){if(i){if(a.type==="http"&&a.scheme?.toLowerCase()==="bearer")return{type:"bearer",token:i};if(a.type==="http"&&a.scheme?.toLowerCase()==="basic"){const u=i.indexOf(":");return u>=0?{type:"basic",username:i.slice(0,u),password:i.slice(u+1)}:{type:"basic",username:i,password:""}}if(a.type==="apiKey"&&(a.in==="header"||a.in==="query")&&a.name)return{type:"apiKey",key:a.name,value:i,in:a.in};if(a.type==="openIdConnect")return{type:"oauth2",accessToken:i,grantType:"accessToken",scopes:c};if(a.type==="oauth2"){const u=a.flows,f=u?.authorizationCode?["authorizationCode",u.authorizationCode]:u?.clientCredentials?["clientCredentials",u.clientCredentials]:u?.password?["password",u.password]:u?.implicit?["implicit",u.implicit]:void 0,p=f?.[1];return{type:"oauth2",accessToken:i,grantType:f?.[0]||"accessToken",authorizationUrl:p?.authorizationUrl,tokenUrl:p?.tokenUrl,scopes:c.length?c:Object.keys(p?.scopes||{})}}}}function Cf(a,i){return{...a,headers:a.headers?.filter(c=>c.key.toLowerCase()!==i.toLowerCase())}}function qx(a,i){return{...a,query:a.query?.filter(c=>c.key!==i)}}function Mx(a,i,c,u,f){let p=U0(f);const g=kx(a,i,c,u.auth||{});if(!g||Object.keys(g).length!==1)return p;const y=Object.keys(g)[0],x=Ox(a,y),h=u.auth?.[y]||"";if(!x)return p;if(!h)return{...p,auth:{type:"inherit"}};const S=Rx(x,h,g[y]||[]);return S?(S.type==="bearer"||S.type==="oauth2"||S.type==="basic"?p=Cf(p,"Authorization"):S.type==="apiKey"&&S.in==="header"?p=Cf(p,S.key):S.type==="apiKey"&&S.in==="query"&&(p=qx(p,S.key)),{...p,auth:S}):p}function zx(a,i,c,u,f){const p=Ur(a,i,c,u);return{request:Mx(a,i,c,u,p),serverUrl:u.serverUrl||f}}function $x(a){return a==null?"":Array.isArray(a)?a.map(String):typeof a=="object"?JSON.stringify(a):typeof a=="boolean"?String(a):a}function Dx({spec:a,path:i,method:c,options:u}){const f=a.paths[i],g=f?.[c.toLowerCase()]?.servers||f?.servers||a.servers||[];return JSON.stringify({path:i,method:c.toLowerCase(),defaultServer:u?.tryIt?.defaultServer??null,servers:g.map(Js),defaults:Vs(a,i,c)})}const Ux=({spec:a,path:i,method:c,theme:u,options:f,onRequestChange:p,onOpenInApiClient:g})=>{const y=a.paths[i],x=y?.[c.toLowerCase()],h=le.useMemo(()=>x?.servers||y?.servers||a.servers||[],[x?.servers,y?.servers,a.servers]),S=le.useMemo(()=>h.map(P=>({server:P,url:Js(P)})),[h]),A=le.useMemo(()=>S.map(P=>P.url),[S]),C=le.useMemo(()=>({...Vs(a,i,c),serverUrl:f?.tryIt?.defaultServer}),[a,i,c,f?.tryIt?.defaultServer]),M=C.serverUrl&&A.includes(C.serverUrl)?C.serverUrl:A[0]||"",k=C.serverUrl&&!A.includes(C.serverUrl)?C.serverUrl:"",[G,U]=le.useState(C),I=le.useRef(C),_=le.useRef(M),N=le.useRef(null),j=le.useRef(p),[R,Y]=le.useState(null),[D,X]=le.useState(null),[me,xe]=le.useState(!1),ge=le.useMemo(()=>Md(a,i,c),[a,i,c]),Ee=f?.noAutoAuth?[]:Object.keys((x?.security??a.security??[])[0]||{}),He=P=>{I.current=P,U(P)};le.useEffect(()=>{j.current=p},[p]),le.useEffect(()=>{try{j.current?.(Ur(a,i,c,G))}catch{}},[a,i,c,G]);const he=(P,w,$)=>{const ce=I.current;He({...ce,[P]:{...ce[P]||{},[w]:$}})},ke=async()=>{xe(!0),X(null),Y(null);try{const P=Ur(a,i,c,I.current);let w={...P.init,url:P.url,credentials:f?.tryIt?.credentials||"same-origin"};f?.tryIt?.requestInterceptor&&(w=await f.tryIt.requestInterceptor(w));const{url:$,...ce}=w,pe=await fetch($,ce),ve=await pe.text();Y({status:pe.status,statusText:pe.statusText,headers:[...pe.headers.entries()].map(([Te,Re])=>`${Te}: ${Re}`).join(`
59
- `),body:ve})}catch(P){X(P instanceof Error?P.message:"Request failed")}finally{xe(!1)}},T=()=>{try{g?.(zx(a,i,c,I.current,M||void 0))}catch(P){X(P instanceof Error?P.message:"Request is incomplete")}},ne=u==="dark"?"bg-gray-900 border-gray-700 text-gray-100":"bg-white border-gray-300 text-gray-900",W=u==="dark"?"text-gray-300":"text-gray-700",K=`${i}:${c}:${M}:${k}`;return o.jsx("div",{className:`rounded-xl border p-4 md:p-5 ${u==="dark"?"border-gray-700 bg-gray-800/60":"border-gray-200 bg-gray-50"}`,children:o.jsxs("div",{className:"flex flex-col gap-4",children:[h.length>0&&o.jsxs("label",{className:W,children:["Server",o.jsx("select",{"aria-label":"Server",className:`mt-1 w-full rounded-md border px-3 py-2 text-sm ${ne}`,defaultValue:M,onChange:P=>{_.current=P.target.value,N.current&&(N.current.value=""),He({...I.current,serverUrl:P.target.value})},children:S.map(({server:P,url:w})=>o.jsxs("option",{value:w,children:[P.description?`${P.description} — `:"",P.url]},`${P.url}:${w}`))},`server:${K}`)]}),o.jsxs("label",{className:W,children:["Custom server URL ",o.jsx("span",{className:"text-xs opacity-70",children:"(optional override)"}),o.jsx("input",{ref:N,"aria-label":"Custom server URL",className:`mt-1 w-full rounded-md border px-3 py-2 font-mono text-sm ${ne}`,defaultValue:k,onChange:P=>{const w=P.target.value.trim()||_.current;He({...I.current,serverUrl:w||void 0})},placeholder:"http://localhost:8080"},`custom:${K}`)]}),ge.map(P=>{const w=P.in==="header"?G.headers?.[P.name]:P.in==="cookie"?G.cookies?.[P.name]:G.parameters?.[P.name];return o.jsxs("label",{className:W,children:[o.jsxs("span",{className:"text-sm font-medium",children:[P.name," ",o.jsxs("span",{className:"text-xs opacity-70",children:["(",P.in,")"]}),P.required?" *":""]}),o.jsx("input",{"aria-label":`${P.in} ${P.name}`,className:`mt-1 w-full rounded-md border px-3 py-2 text-sm ${ne}`,value:$x(w),onChange:$=>he(P.in==="header"?"headers":P.in==="cookie"?"cookies":"parameters",P.name,$.target.value),placeholder:P.description||P.name})]},`${P.in}:${P.name}`)}),Ee.map(P=>o.jsxs("label",{className:W,children:[o.jsxs("span",{className:"text-sm font-medium",children:[P," credential"]}),o.jsx("input",{type:"password",autoComplete:"off",className:`mt-1 w-full rounded-md border px-3 py-2 text-sm ${ne}`,value:G.auth?.[P]||"",onChange:w=>he("auth",P,w.target.value),placeholder:"Token / API key"})]},P)),C.contentType&&o.jsxs(o.Fragment,{children:[o.jsxs("label",{className:W,children:["Content type",o.jsx("input",{className:`mt-1 w-full rounded-md border px-3 py-2 text-sm ${ne}`,value:G.contentType||"",onChange:P=>He({...I.current,contentType:P.target.value})})]}),o.jsxs("label",{className:W,children:["Request body",o.jsx("textarea",{"aria-label":"Request body",rows:8,className:`mt-1 w-full rounded-md border px-3 py-2 font-mono text-sm ${ne}`,value:G.body||"",onChange:P=>He({...I.current,body:P.target.value})})]})]}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsxs("button",{onClick:ke,disabled:me,className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-md bg-blue-600 px-4 py-2 font-medium text-white hover:bg-blue-700 disabled:opacity-60",children:[me?o.jsx(xs,{className:"h-4 w-4 animate-spin"}):o.jsx(Jl,{className:"h-4 w-4"})," ",me?"Sending…":"Send request"]}),g&&o.jsxs("button",{type:"button",onClick:T,className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-md border px-4 py-2 font-medium",children:[o.jsx(ys,{className:"h-4 w-4"})," Open in API Client"]})]}),D&&o.jsxs("div",{role:"alert",className:"flex gap-2 rounded-md border border-red-300 bg-red-50 p-3 text-sm text-red-700",children:[o.jsx($r,{className:"mt-0.5 h-4 w-4 shrink-0"}),D]}),R&&o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"font-semibold",children:["Response ",o.jsxs("span",{className:R.status>=400?"text-red-600":"text-green-600",children:[R.status," ",R.statusText]})]}),R.headers&&o.jsx(On,{code:R.headers,language:"text",title:"Headers",theme:u,wrap:!0}),o.jsx(On,{code:R.body||"(empty response)",language:"json",title:"Body",theme:u,wrap:!0})]})]})})},Hx=a=>o.jsx(Ux,{...a},Dx(a)),Lx=({spec:a,path:i,method:c,theme:u,options:f,onRequestChange:p})=>{const[g,y]=le.useState(null),x=le.useRef(0),h=a.paths[i],A=h?.[c.toLowerCase()]?.servers||h?.servers||a.servers||[],C=f?.tryIt?.apiClientPersistenceKey??a0(a.info?.title,typeof window>"u"?void 0:window.location.host),M=k=>{x.current+=1,y({id:x.current,...k})};return o.jsxs(o.Fragment,{children:[o.jsx(Hx,{spec:a,path:i,method:c,theme:u,options:f,onRequestChange:p,onOpenInApiClient:M}),g&&o.jsxs("section",{className:"mt-6","aria-labelledby":"api-client-heading",children:[o.jsx("h2",{id:"api-client-heading",className:"mb-2 text-base font-semibold sm:text-lg",children:"API Client"}),o.jsx("p",{className:`mb-4 text-xs ${u==="dark"?"text-gray-400":"text-gray-600"}`,children:"Changes in Try It do not refresh this client automatically. Reopen it to load the latest Try It values. Saved collections stay local to this browser."}),o.jsx(Cx,{initialRequest:g.request,theme:u,credentials:f?.tryIt?.credentials||"same-origin",requestInterceptor:f?.tryIt?.requestInterceptor,onRequestChange:p,serverOptions:A,initialServerUrl:g.serverUrl,persistenceKey:C},g.id)]})]})},Bx=["curl","javascript","python","go","java"],Yx=({spec:a,path:i,method:c,theme:u="light",options:f={},defaultExpandedSections:p})=>{const g=p??Gs(f.expand,f.expand===void 0?f.expandResponses:void 0),y=`${c}:${i}:${g.join("|")}`,[x,h]=le.useState(()=>({key:y,sections:new Set(g)})),S=x.key===y?x.sections:new Set(g),[A,C]=le.useState(f.codeSamples?.languages?.[0]||"curl"),M=le.useMemo(()=>Ur(a,i,c,Vs(a,i,c)),[a,i,c]),[k,G]=le.useState(M),I=a.paths[i]?.[c.toLowerCase()],_=le.useMemo(()=>Md(a,i,c),[a,i,c]);if(!I)return o.jsx("div",{className:"p-6",children:"Operation not found."});const N=u==="dark"?"text-gray-400":"text-gray-600",j=u==="dark"?"border-gray-700 bg-gray-800/60":"border-gray-200 bg-white",R=u==="dark"?"bg-gray-900 text-gray-100":"bg-white text-gray-900",Y=f.codeSamples?.languages?.length?f.codeSamples.languages:Bx,D=I.security??a.security,X={requiredPropsFirst:f.requiredPropsFirst,sortPropsAlphabetically:f.sortPropsAlphabetically},me=he=>h(ke=>{const T=new Set(ke.key===y?ke.sections:g);return T.has(he)?T.delete(he):T.add(he),{key:y,sections:T}}),xe=(he,ke,T)=>o.jsxs("section",{className:"mb-8","aria-labelledby":`${ke}-heading`,children:[o.jsxs("button",{id:`${ke}-heading`,"aria-expanded":S.has(ke),onClick:()=>me(ke),className:"mb-4 flex min-h-10 w-full items-center gap-2 text-left text-base font-semibold sm:text-lg",children:[S.has(ke)?o.jsx(Ru,{className:"h-5 w-5 shrink-0"}):o.jsx(qu,{className:"h-5 w-5 shrink-0"}),he]}),S.has(ke)&&T]}),ge=I.requestBody?Wt.isReference(I.requestBody)?Wt.resolveReference(a,I.requestBody.$ref):I.requestBody:void 0,Ee=Object.entries(I).filter(([he])=>he.startsWith("x-")),He=typeof f.theme=="object"?f.theme.methodColors?.[c.toLowerCase()]:void 0;return o.jsx("div",{className:`h-full overflow-y-auto ${R}`,children:o.jsxs("article",{className:"mx-auto w-full max-w-6xl p-4 sm:p-6 lg:p-8",children:[o.jsxs("header",{className:"mb-8",children:[o.jsxs("div",{className:"mb-4 flex min-w-0 flex-wrap items-center gap-2 sm:gap-3",children:[o.jsx("span",{className:`shrink-0 rounded border px-2.5 py-1 text-xs font-bold sm:text-sm ${Wt.getMethodColor(c,u)}`,style:{background:He?.bg,borderColor:He?.border},children:c.toUpperCase()}),o.jsx("code",{className:`min-w-0 max-w-full overflow-x-auto rounded px-2.5 py-1 font-mono text-sm sm:text-base ${u==="dark"?"bg-gray-800 text-blue-300":"bg-gray-100 text-gray-900"}`,children:i})]}),I.summary&&o.jsx("h1",{className:"mb-2 text-2xl font-bold tracking-tight sm:text-3xl",children:I.summary}),I.description&&o.jsx("p",{className:`max-w-3xl whitespace-pre-wrap leading-relaxed ${N}`,children:I.description}),o.jsxs("div",{className:"mt-4 flex flex-wrap gap-3 text-sm",children:[I.deprecated&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-orange-600",children:[o.jsx($r,{className:"h-4 w-4"}),"Deprecated"]}),D?.length?o.jsxs("span",{className:"inline-flex items-center gap-1 text-red-600",children:[o.jsx(eg,{className:"h-4 w-4"}),"Authentication required"]}):o.jsxs("span",{className:"inline-flex items-center gap-1 text-green-600",children:[o.jsx(Py,{className:"h-4 w-4"}),"No authentication required"]}),I.operationId&&o.jsxs("span",{className:N,children:["operationId: ",o.jsx("code",{children:I.operationId})]})]}),(f.showExtensions||f.showCommonExtensions)&&Ee.length>0&&o.jsx("div",{className:`mt-4 rounded-lg border p-3 text-xs ${j}`,children:Ee.map(([he,ke])=>o.jsxs("div",{children:[o.jsx("code",{children:he}),": ",typeof ke=="string"?ke:JSON.stringify(ke)]},he))})]}),_.length>0&&xe("Parameters","parameters",o.jsx("div",{className:"space-y-3",children:_.map(he=>o.jsxs("div",{className:`rounded-lg border p-4 ${j}`,children:[o.jsxs("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[o.jsx("code",{className:"font-medium",children:he.name}),o.jsx("span",{className:"rounded bg-blue-100 px-2 py-0.5 text-xs text-blue-700",children:he.in}),he.required&&o.jsx("span",{className:"rounded bg-red-100 px-2 py-0.5 text-xs text-red-700",children:"required"}),he.deprecated&&o.jsx("span",{className:"rounded bg-orange-100 px-2 py-0.5 text-xs text-orange-700",children:"deprecated"})]}),he.description&&o.jsx("p",{className:`mb-3 text-sm ${N}`,children:he.description}),he.schema&&o.jsx(rl,{spec:a,schema:he.schema,theme:u,required:he.required,...X})]},`${he.in}:${he.name}`))})),ge&&xe("Request Body","requestBody",o.jsxs("div",{className:"space-y-4",children:[ge.description&&o.jsx("p",{className:N,children:ge.description}),Object.entries(ge.content||{}).map(([he,ke])=>o.jsxs("div",{className:`rounded-lg border p-4 ${j}`,children:[o.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[o.jsx("code",{className:"rounded bg-gray-100 px-2 py-1 text-xs text-gray-700",children:he}),ge.required&&o.jsx("span",{className:"rounded bg-red-100 px-2 py-0.5 text-xs text-red-700",children:"required"})]}),ke.schema&&o.jsx(rl,{spec:a,schema:ke.schema,theme:u,...X}),ke.example!==void 0&&o.jsx("div",{className:"mt-3",children:o.jsx(On,{code:JSON.stringify(ke.example,null,2),language:"json",title:"Example payload",theme:u,wrap:!0})})]},he))]})),xe("Responses","responses",o.jsx("div",{className:"space-y-4",children:Object.entries(I.responses||{}).map(([he,ke])=>{const T=Wt.isReference(ke)?Wt.resolveReference(a,ke.$ref):ke;return o.jsxs("div",{className:`rounded-lg border p-4 ${j}`,children:[o.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[o.jsx("span",{className:"rounded border px-2.5 py-1 text-sm font-bold",children:he}),o.jsx("span",{className:`text-sm ${N}`,children:T.description})]}),T.headers&&f.showRequestHeaders&&o.jsxs("div",{className:"mb-3 text-sm",children:[o.jsx("span",{className:"font-medium",children:"Headers:"})," ",Object.keys(T.headers).join(", ")]}),T.content&&Object.entries(T.content).map(([ne,W])=>o.jsxs("div",{className:"mt-3",children:[o.jsx("code",{className:"text-xs opacity-70",children:ne}),W.schema&&o.jsx("div",{className:"mt-2",children:o.jsx(rl,{spec:a,schema:W.schema,theme:u,...X})}),W.example!==void 0&&o.jsx("div",{className:"mt-3",children:o.jsx(On,{code:JSON.stringify(W.example,null,2),language:"json",title:"Example response",theme:u,wrap:!0})}),W.examples&&Object.values(W.examples)[f.payloadSampleIdx||0]&&o.jsx("div",{className:"mt-3",children:o.jsx(On,{code:JSON.stringify(Object.values(W.examples)[f.payloadSampleIdx||0].value??Object.values(W.examples)[f.payloadSampleIdx||0],null,2),language:"json",title:"Example response",theme:u,wrap:!0})})]},ne))]},he)})})),f.tryIt?.enabled!==!1&&xe("Try It","tryIt",o.jsx(Lx,{spec:a,path:i,method:c,theme:u,options:f,onRequestChange:G},`${c}:${i}:${f.tryIt?.defaultServer||""}`)),f.codeSamples?.enabled!==!1&&xe("Code Examples","codeSamples",o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"mb-3 flex max-w-full gap-1 overflow-x-auto pb-1",role:"tablist","aria-label":"Code example language",children:Y.map(he=>o.jsx("button",{role:"tab","aria-selected":A===he,onClick:()=>C(he),className:`shrink-0 rounded-md px-3 py-2 text-sm ${A===he?"bg-blue-600 text-white":u==="dark"?"bg-gray-800 text-gray-200":"bg-gray-100 text-gray-700"}`,children:zd(he)},he))}),o.jsx(On,{code:$g(k,A),language:A==="curl"?"bash":A,title:zd(A),theme:u,wrap:!!(typeof f.theme=="object"&&f.theme.typography?.code?.wrap)})]})),I.externalDocs&&o.jsx("p",{className:"pb-4 text-sm",children:o.jsx("a",{className:"text-blue-600 underline",href:I.externalDocs.url,target:"_blank",rel:"noopener noreferrer",children:I.externalDocs.description||"External documentation"})})]})})},Gx=({spec:a,onEndpointSelect:i,theme:c="light"})=>{const u=c==="dark"?"bg-gray-800 border-gray-700 shadow-lg text-white":"bg-white border-gray-200 shadow-sm text-gray-900",f=c==="dark"?"text-gray-300":"text-gray-600",p=c==="dark"?"hover:bg-gray-700 hover:border-gray-600":"hover:border-blue-300 hover:bg-blue-50",g=Object.values(a.paths).reduce((h,S)=>(Wt.getHttpMethods(S).forEach(C=>{h[C]=(h[C]||0)+1,h.total++}),h),{total:0}),y=Object.entries(a.paths).slice(0,6).flatMap(([h,S])=>Wt.getHttpMethods(S).map(A=>({path:h,method:A,operation:S[A]}))),x=[{icon:o.jsx(gs,{className:"w-5 h-5"}),iconBg:c==="dark"?"bg-blue-900":"bg-blue-100",iconColor:c==="dark"?"text-blue-300":"text-blue-600",title:"Total Endpoints",value:g.total},{icon:o.jsx($u,{className:"w-5 h-5"}),iconBg:c==="dark"?"bg-green-900":"bg-green-100",iconColor:c==="dark"?"text-green-300":"text-green-600",title:"Servers",value:a.servers?.length||0},{icon:o.jsx(Du,{className:"w-5 h-5"}),iconBg:c==="dark"?"bg-purple-900":"bg-purple-100",iconColor:c==="dark"?"text-purple-300":"text-purple-600",title:"Tags",value:a.tags?.length||0},{icon:o.jsx(rg,{className:"w-5 h-5"}),iconBg:c==="dark"?"bg-orange-900":"bg-orange-100",iconColor:c==="dark"?"text-orange-300":"text-orange-600",title:"Security Schemes",value:a.components?.securitySchemes?Object.keys(a.components.securitySchemes).length:0}];return o.jsx("div",{className:`flex-1 overflow-y-auto ${c==="dark"?"bg-gray-900":"bg-gray-50"}`,children:o.jsxs("div",{className:"p-4 md:p-8",children:[o.jsxs("div",{className:"mb-8",children:[o.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[o.jsx("div",{className:`w-12 h-12 rounded-xl flex items-center justify-center ${c==="dark"?"bg-blue-700":"bg-gradient-to-br from-blue-500 to-blue-600"}`,children:o.jsx(gs,{className:"w-6 h-6 text-white"})}),o.jsxs("div",{children:[o.jsx("h1",{className:`text-2xl md:text-3xl font-bold ${c==="dark"?"text-white":"text-gray-900"}`,children:a.info.title}),o.jsxs("p",{className:`${c==="dark"?"text-gray-300":"text-gray-600"}`,children:["Version ",a.info.version]})]})]}),a.info.description&&o.jsx("p",{className:`text-lg leading-relaxed max-w-4xl ${c==="dark"?"text-white":"text-gray-600"}`,children:a.info.description})]}),o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-8",children:x.map((h,S)=>o.jsx("div",{className:`p-4 rounded-xl border transition-colors ${u}`,children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:`w-10 h-10 ${h.iconBg} rounded-lg flex items-center justify-center`,children:ms.cloneElement(h.icon,{className:`${h.iconColor} w-5 h-5`})}),o.jsxs("div",{children:[o.jsx("p",{className:`text-sm font-medium ${f}`,children:h.title}),o.jsx("p",{className:`text-xl font-bold ${c==="dark"?"text-white":"text-gray-900"}`,children:h.value})]})]})},S))}),o.jsxs("div",{className:`rounded-xl border p-4 md:p-6 mb-8 ${u}`,children:[o.jsx("h2",{className:`text-lg md:text-xl font-semibold mb-4 ${c==="dark"?"text-white":"text-gray-900"}`,children:"HTTP Methods Distribution"}),o.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4",children:["get","post","put","delete","patch","options"].map(h=>o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:`px-3 py-1.5 mx-auto rounded-lg flex items-center justify-center mb-2 ${Wt.getMethodColor(h,c)}`,children:o.jsx("span",{className:"text-sm font-medium",children:h.toUpperCase()})}),o.jsx("p",{className:`font-bold ${c==="dark"?"text-white":"text-gray-900"}`,children:g[h]||0}),o.jsx("p",{className:"text-xs text-gray-400",children:h.toUpperCase()})]},h))})]}),o.jsxs("div",{className:`rounded-xl border p-4 md:p-6 mb-8 ${u}`,children:[o.jsx("h2",{className:`text-lg md:text-xl font-semibold mb-4 ${c==="dark"?"text-white":"text-gray-900"}`,children:"Available Endpoints"}),o.jsx("div",{className:"space-y-3",children:y.map(({path:h,method:S,operation:A})=>o.jsxs("button",{onClick:()=>i(h,S),className:`w-full text-left p-3 border rounded-lg transition-colors ${p} ${c==="dark"?"border-gray-700":"border-gray-200"}`,children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:`text-xs font-bold px-2 py-1 rounded border ${Wt.getMethodColor(S,c)}`,children:S.toUpperCase()}),o.jsx("code",{className:`font-mono text-sm break-all ${c==="dark"?"text-blue-300 group-hover:text-blue-200":"text-blue-600 group-hover:text-blue-700"}`,children:h})]}),A?.summary&&o.jsx("p",{className:`text-sm mt-2 ml-14 ${c==="dark"?"text-gray-300":"text-gray-600"}`,children:A.summary})]},`${S}-${h}`))})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(a.info.contact||a.info.license)&&o.jsxs("div",{className:`rounded-xl border p-4 md:p-6 ${u}`,children:[o.jsx("h2",{className:`text-lg md:text-xl font-semibold mb-4 ${c==="dark"?"text-white":"text-gray-900"}`,children:"Information"}),o.jsxs("div",{className:"space-y-4",children:[a.info.contact&&o.jsxs("div",{children:[o.jsx("h3",{className:`font-medium mb-2 ${c==="dark"?"text-gray-100":"text-gray-900"}`,children:"Contact"}),a.info.contact.name&&o.jsx("p",{className:`text-sm ${f}`,children:a.info.contact.name}),a.info.contact.email&&o.jsx("p",{className:`text-sm ${f}`,children:a.info.contact.email}),a.info.contact.url&&o.jsxs("a",{href:a.info.contact.url,target:"_blank",rel:"noopener noreferrer",className:`text-sm flex items-center gap-1 ${c==="dark"?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-700"}`,children:["Website ",o.jsx(ys,{className:"w-3 h-3"})]})]}),a.info.license&&o.jsxs("div",{children:[o.jsx("h3",{className:`font-medium mb-2 ${c==="dark"?"text-gray-100":"text-gray-900"}`,children:"License"}),a.info.license.url?o.jsxs("a",{href:a.info.license.url,target:"_blank",rel:"noopener noreferrer",className:`text-sm flex items-center gap-1 ${c==="dark"?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-700"}`,children:[a.info.license.name,o.jsx(ys,{className:"w-3 h-3"})]}):o.jsx("p",{className:`text-sm ${f}`,children:a.info.license.name})]})]})]}),a.servers&&a.servers.length>0&&o.jsxs("div",{className:`rounded-xl border p-4 md:p-6 ${u}`,children:[o.jsx("h2",{className:`text-lg md:text-xl font-semibold mb-4 ${c==="dark"?"text-white":"text-gray-900"}`,children:"Servers"}),o.jsx("div",{className:"space-y-3",children:a.servers.map((h,S)=>o.jsxs("div",{className:`p-3 rounded-lg ${c==="dark"?"bg-gray-700/50":"bg-gray-50"}`,children:[o.jsx("code",{className:`text-sm font-mono ${c==="dark"?"text-blue-300":"text-blue-600"}`,children:h.url}),h.description&&o.jsx("p",{className:`text-sm mt-1 ${f}`,children:h.description})]},S))})]})]})]})})},Ix=({footerClasses:a,footer:i})=>{const c=i?.copyright,u=i?.link||[];return o.jsx("footer",{className:`${a} w-full border-t`,children:o.jsxs("div",{className:"mx-auto flex min-h-12 w-full max-w-[1600px] flex-col gap-2 px-4 py-3 text-xs sm:flex-row sm:items-center sm:justify-between sm:px-6 sm:text-sm",children:[o.jsx("p",{children:c||o.jsxs(o.Fragment,{children:["Powered by ",o.jsx("a",{href:"https://prauga.github.io/flexdoc",target:"_blank",rel:"noopener noreferrer",className:"font-semibold hover:opacity-80 transition-opacity",children:"FlexDoc"})]})}),u.length>0&&o.jsx("nav",{"aria-label":"Footer links",className:"flex flex-wrap gap-x-4 gap-y-2",children:u.map(f=>o.jsx("a",{href:f.url,target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-80",children:f.text},`${f.text}:${f.url}`))})]})})},Fx=(a,i,c)=>a==="dark"?c:i,Vx={parameters:"Parameters",requestBody:"Request body",responses:"Responses",tryIt:"Try It",codeSamples:"Code examples"};function Xx(a){return a===void 0?"host":Array.isArray(a)?"custom":a==="none"?"minimal":a}function Zx(a){return Array.from(a.querySelectorAll('button:not([disabled]), select:not([disabled]), input:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')).filter(i=>i.getAttribute("aria-hidden")!=="true")}const Qx=({open:a,theme:i,viewerExpand:c,effectiveExpandedSections:u,onExpandChange:f,onClose:p})=>{const g=le.useRef(null),y=le.useRef(null);if(le.useEffect(()=>{if(!a||typeof document>"u")return;const C=document.activeElement instanceof HTMLElement?document.activeElement:null;y.current?.focus();const M=k=>{if(k.key==="Escape"){k.preventDefault(),p();return}if(k.key!=="Tab"||!g.current)return;const G=Zx(g.current);if(G.length===0){k.preventDefault(),g.current.focus();return}const U=G[0],I=G[G.length-1],_=document.activeElement;k.shiftKey&&(_===U||!g.current.contains(_))?(k.preventDefault(),I.focus()):!k.shiftKey&&(_===I||!g.current.contains(_))&&(k.preventDefault(),U.focus())};return document.addEventListener("keydown",M),()=>{document.removeEventListener("keydown",M),C?.isConnected&&C.focus()}},[a,p]),!a)return null;const x=i==="dark",h=x?"border-gray-700 bg-gray-900 text-gray-100":"border-gray-200 bg-white text-gray-900",S=x?"border-gray-700 bg-gray-800 text-gray-100":"border-gray-300 bg-white text-gray-900",A=Array.isArray(c)?c.filter(C=>Rl.includes(C)):[];return o.jsxs("div",{className:"fixed inset-0 z-[70]",children:[o.jsx("button",{"aria-label":"Close settings backdrop",className:"absolute inset-0 bg-black/40",onClick:p}),o.jsxs("aside",{ref:g,role:"dialog","aria-modal":"true","aria-label":"Viewer settings",tabIndex:-1,className:`absolute inset-y-0 right-0 flex w-[min(92vw,24rem)] flex-col border-l shadow-2xl ${h}`,children:[o.jsxs("div",{className:"flex min-h-14 items-center justify-between border-b px-4",children:[o.jsxs("div",{children:[o.jsx("div",{className:"font-semibold",children:"Settings"}),o.jsx("div",{className:"text-xs opacity-65",children:"Preferences are saved for this documentation."})]}),o.jsx("button",{type:"button","aria-label":"Close settings",className:"inline-flex h-11 w-11 items-center justify-center rounded-md",onClick:p,children:o.jsx(Hu,{className:"h-5 w-5"})})]}),o.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:o.jsxs("section",{"aria-labelledby":"expansion-settings-heading",children:[o.jsx("h2",{id:"expansion-settings-heading",className:"mb-1 text-sm font-semibold",children:"Default expanded sections"}),o.jsx("p",{className:"mb-3 text-xs opacity-65",children:"This preference overrides the documentation author's default. Opening or closing a section manually remains temporary."}),o.jsxs("select",{ref:y,"aria-label":"Default expanded sections",className:`w-full rounded-md border px-3 py-2 text-sm ${S}`,value:Xx(c),onChange:C=>{const M=C.target.value;f(M==="host"?void 0:M==="custom"?[...u]:M)},children:[o.jsx("option",{value:"host",children:"Use documentation default"}),o.jsx("option",{value:"minimal",children:"Minimal"}),o.jsx("option",{value:"documentation",children:"Documentation"}),o.jsx("option",{value:"interactive",children:"Interactive"}),o.jsx("option",{value:"all",children:"All sections"}),o.jsx("option",{value:"custom",children:"Custom sections"})]}),Array.isArray(c)&&o.jsxs("fieldset",{className:"mt-4 space-y-2",children:[o.jsx("legend",{className:"mb-2 text-xs font-medium uppercase tracking-wide opacity-65",children:"Custom sections"}),Rl.map(C=>o.jsxs("label",{className:"flex min-h-9 items-center gap-2 text-sm",children:[o.jsx("input",{type:"checkbox",checked:A.includes(C),onChange:M=>{const k=new Set(A);M.target.checked?k.add(C):k.delete(C),f(Rl.filter(G=>k.has(G)))}}),Vx[C]]},C))]}),c!==void 0&&o.jsx("button",{type:"button",className:"mt-5 rounded-md border px-3 py-2 text-sm",onClick:()=>f(void 0),children:"Reset to documentation defaults"})]})})]})]})};function Vr(a){if(a!==void 0)return typeof a=="number"?`${a}px`:a}function Kx(a,i){if(!i)return{};const c=i.colors||{},u=i.typography||{},f=i.sidebar||{};return{"--flexdoc-primary":c.primary?.main,"--flexdoc-text":c.text?.primary,"--flexdoc-text-muted":c.text?.secondary,"--flexdoc-border":a==="dark"?c.border?.dark:c.border?.light,"--flexdoc-sidebar-bg":a==="dark"?f.backgroundColorDark:f.backgroundColor,"--flexdoc-sidebar-text":a==="dark"?f.textColorDark:f.textColor,"--flexdoc-sidebar-active-text":a==="dark"?f.activeTextColorDark:f.activeTextColor,"--flexdoc-heading-font":u.headings?.fontFamily,"--flexdoc-heading-weight":u.headings?.fontWeight,"--flexdoc-code-font":u.code?.fontFamily,"--flexdoc-code-size":u.code?.fontSize,"--flexdoc-code-line-height":u.code?.lineHeight,"--flexdoc-code-color":u.code?.color,"--flexdoc-code-bg":u.code?.backgroundColor,fontFamily:u.fontFamily,fontSize:u.fontSize,lineHeight:u.lineHeight}}function _f(a,i){return`${i.toLowerCase()}-${a.replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-|-$/g,"")}`}function Of(a,i){const c=i.replace(/^#/,"");if(!c)return null;for(const[u,f]of Object.entries(a.paths))for(const p of Wt.getHttpMethods(f))if(_f(u,p)===c)return{path:u,method:p};return null}function Jx({logo:a}){const i=typeof a=="string"?{url:a}:a,c=typeof i.padding=="object"?`${Vr(i.padding.vertical)||"0"} ${Vr(i.padding.horizontal)||"0"}`:i.padding,u=o.jsx("img",{src:i.url,alt:i.alt||"API documentation logo",style:{maxHeight:Vr(i.maxHeight)||"32px",maxWidth:Vr(i.maxWidth)||"180px"}});return o.jsx("div",{className:`flex items-center ${i.containerClass||""}`,style:{backgroundColor:i.backgroundColor,padding:c},children:i.clickable===!1?u:o.jsx("a",{href:"#","aria-label":"Documentation home",children:u})})}const Wx=({spec:a,theme:i="light",customStyles:c={},options:u={}})=>{const[f,p]=le.useState(()=>typeof window>"u"?null:Of(a,window.location.hash)),[g,y]=le.useState(!1),[x,h]=le.useState(!1),S=vg(a.info.title,typeof window>"u"?void 0:window.location.host),[A,C]=le.useState(()=>({key:S,expand:Od(S).expand})),M=A.key===S?A.expand:Od(S).expand,k=typeof u.theme=="object"?u.theme:void 0,G=le.useMemo(()=>({...Kx(i,k),...c}),[i,k,c]);le.useEffect(()=>{if(!u.customCss)return;const D=document.createElement("style");return D.dataset.flexdocCustomCss="true",D.textContent=u.customCss,document.head.appendChild(D),()=>D.remove()},[u.customCss]),le.useEffect(()=>{if(typeof window>"u")return;const D=()=>p(Of(a,window.location.hash));return D(),window.addEventListener("hashchange",D),()=>window.removeEventListener("hashchange",D)},[a]),le.useEffect(()=>{if(!g||typeof document>"u")return;const D=document.body.style.overflow;document.body.style.overflow="hidden";const X=me=>{me.key==="Escape"&&y(!1)};return document.addEventListener("keydown",X),()=>{document.body.style.overflow=D,document.removeEventListener("keydown",X)}},[g]);const U=(D,X)=>{p({path:D,method:X}),y(!1),typeof window<"u"&&(window.location.hash=_f(D,X))},I=Gs(u.expand,u.expand===void 0?u.expandResponses:void 0),_=M===void 0?I:Gs(M),N=D=>{C({key:S,expand:D}),Sg(S,D)},j=Fx(i,"border-gray-200 bg-white text-gray-600","border-gray-700 bg-gray-800 text-gray-300"),R=i==="dark"?"bg-gray-900 text-gray-100":"bg-gray-50 text-gray-900",Y=(D=!1)=>o.jsx("button",{type:"button",className:D?`fixed bottom-4 right-4 z-40 inline-flex h-11 w-11 items-center justify-center rounded-full border shadow-lg ${i==="dark"?"border-gray-700 bg-gray-900 text-gray-100":"border-gray-200 bg-white text-gray-900"}`:"inline-flex h-11 w-11 items-center justify-center rounded-md border","aria-label":"Open settings","aria-expanded":x,onClick:()=>h(!0),children:o.jsx(ag,{className:"h-5 w-5"})});return o.jsxs("div",{className:`flexdoc-root flex min-h-screen flex-col ${R}`,style:G,children:[!u.hideTopbar&&o.jsxs("header",{className:`sticky top-0 z-30 flex min-h-14 items-center gap-3 border-b px-3 sm:px-5 ${i==="dark"?"border-gray-700 bg-gray-900":"border-gray-200 bg-white"}`,children:[o.jsx("button",{className:"inline-flex h-11 w-11 items-center justify-center rounded-md lg:hidden","aria-label":"Open API navigation","aria-expanded":g,onClick:()=>y(!0),children:o.jsx(tg,{className:"h-5 w-5"})}),u.logo&&o.jsx(Jx,{logo:u.logo}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("div",{className:"truncate font-semibold",children:a.info.title}),!u.hideHostname&&a.servers?.[0]?.url&&o.jsx("div",{className:"truncate text-xs opacity-60",children:a.servers[0].url})]}),!u.hideDownloadButton&&o.jsx("a",{className:"hidden rounded-md border px-3 py-2 text-sm sm:inline-flex",href:`data:application/json;charset=utf-8,${encodeURIComponent(JSON.stringify(a,null,2))}`,download:"openapi.json",children:"Download spec"}),Y()]}),u.hideTopbar&&Y(!0),o.jsxs("div",{className:"relative flex min-h-0 flex-1 overflow-hidden",children:[o.jsx("aside",{className:"hidden w-80 shrink-0 lg:block",style:{background:"var(--flexdoc-sidebar-bg)",color:"var(--flexdoc-sidebar-text)"},children:o.jsx(Cd,{spec:a,onEndpointSelect:U,theme:i,selectedEndpoint:f||void 0})}),g&&o.jsxs("div",{className:"fixed inset-0 z-50 lg:hidden",role:"dialog","aria-modal":"true","aria-label":"API navigation",children:[o.jsx("button",{"aria-label":"Close navigation backdrop",className:"absolute inset-0 bg-black/40",onClick:()=>y(!1)}),o.jsxs("aside",{className:`absolute inset-y-0 left-0 flex w-[min(88vw,22rem)] flex-col shadow-2xl ${i==="dark"?"bg-gray-900":"bg-white"}`,children:[o.jsxs("div",{className:"flex h-14 items-center justify-between border-b px-4",children:[o.jsx("span",{className:"font-semibold",children:"API navigation"}),o.jsx("button",{className:"inline-flex h-11 w-11 items-center justify-center rounded-md","aria-label":"Close API navigation",onClick:()=>y(!1),children:o.jsx(Hu,{className:"h-5 w-5"})})]}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o.jsx(Cd,{spec:a,onEndpointSelect:U,theme:i,selectedEndpoint:f||void 0})})]})]}),o.jsx("main",{className:"min-w-0 flex-1 overflow-hidden",children:f?o.jsx(Yx,{spec:a,path:f.path,method:f.method,theme:i,options:u,defaultExpandedSections:_}):o.jsx(Gx,{spec:a,onEndpointSelect:U,theme:i})})]}),o.jsx(Ix,{footerClasses:j,footer:u.footer}),o.jsx(Qx,{open:x,theme:i,viewerExpand:M,effectiveExpandedSections:_,onExpandChange:N,onClose:()=>h(!1)})]})},lo="x-flexdoc-external-documents";function Px(a){if(typeof fetch!="function")throw new Error("No document loader is available in this environment");return fetch(a).then(async i=>{if(!i.ok)throw new Error(`Failed to load OpenAPI reference ${a}: ${i.status}`);const c=await i.text();return _n.parseSpec(c).catch(()=>{try{return JSON.parse(c)}catch{throw new Error(`Reference document is not valid JSON/YAML: ${a}`)}})})}function eb(a,i){if(a.startsWith("#"))return{documentUri:i,pointer:a};const c=new URL(a,i),u=c.hash||"#";return c.hash="",{documentUri:c.toString(),pointer:u}}function kf(a,i){const c=_n.encodePointerToken(a);if(i==="#"||i==="")return`#/${lo}/${c}`;if(!i.startsWith("#/"))throw new Error(`Unsupported JSON Pointer reference: ${i}`);return`#/${lo}/${c}/${i.slice(2)}`}function Rf(a){return JSON.parse(JSON.stringify(a))}async function tb(a,i){const c=i.load||Px,u=new URL(i.baseUri).toString().replace(/#.*$/,""),f=Rf(a),p={},g=new Map;async function y(S){if(S===u)return f;if(p[S])return p[S];if(g.has(S))return g.get(S);const A=Promise.resolve(c(S)).then(M=>Rf(M));g.set(S,A);const C=await A;return p[S]=C,C}const x=new Set;async function h(S,A){if(x.has(A))return;x.add(A);async function C(M){if(!(!M||typeof M!="object")){if(Array.isArray(M)){for(const k of M)await C(k);return}if(typeof M.$ref=="string"){const k=eb(M.$ref,A);if(k.documentUri!==A){const G=await y(k.documentUri);M.$ref=k.documentUri===u?k.pointer:kf(k.documentUri,k.pointer),await h(G,k.documentUri)}else A!==u&&(M.$ref=kf(A,k.pointer))}for(const[k,G]of Object.entries(M))k!=="$ref"&&await C(G)}}await C(S)}return await h(f,u),Object.keys(p).length&&(f[lo]=p),f}async function nb(a,i){return tb(a,i)}const Xr="1",Zr=new WeakMap;function lb(a){return JSON.parse(JSON.stringify(a))}function ao(a,i={}){const c=lb(a);if(i.title&&(c.info.title=i.title),i.description&&(c.info.description=i.description),i.altDescription&&!c.info.description&&(c.info.description=i.altDescription),i.version&&(c.info.version=i.version),!i.tagGroups?.length)return c;const u=new Map;for(const g of i.tagGroups)for(const y of g.tags)u.set(y,g.name);const f={},p=new Set(["get","post","put","delete","patch","options","head","trace"]);for(const[g,y]of Object.entries(c.paths)){const x={};let h=!1;for(const[S,A]of Object.entries(y)){if(!p.has(S)){x[S]=A;continue}const C=A,M=(C?.tags||[]).filter(k=>u.has(k)).map(k=>u.get(k));!M.length||!C||(x[S]={...C,tags:Array.from(new Set(M))},h=!0)}h&&(f[g]=x)}return c.paths=f,c.tags=i.tagGroups.map(g=>({name:g.name})),c}function ab(a){return typeof a.theme=="string"?a.theme:typeof document<"u"&&document.documentElement.classList.contains("dark")?"dark":"light"}function qf(a,i,c){const u=ao(i,c),f=Zr.get(a);f&&f.unmount();const p=By.createRoot(a);return Zr.set(a,p),p.render(o.jsx(Wx,{spec:u,theme:ab(c),options:c})),()=>{Zr.get(a)===p&&Zr.delete(a),p.unmount()}}function Mf(a,i){const c={contractVersion:Xr,...i.options||{}};return qf(a,i.spec,c)}async function zf(a,i){const c={contractVersion:Xr,...i.options||{}},u=i.baseUri?await nb(i.spec,{baseUri:i.baseUri,load:i.documentLoader}):i.spec;return qf(a,u,c)}return typeof window<"u"&&(window.FlexDocStandalone={mount:Mf,mountAsync:zf,prepareSpec:ao,contractVersion:Xr}),Kl.FLEXDOC_CONTRACT_VERSION=Xr,Kl.mountFlexDoc=Mf,Kl.mountFlexDocAsync=zf,Kl.prepareSpec=ao,Object.defineProperty(Kl,Symbol.toStringTag,{value:"Module"}),Kl})({});
75
+ `).trim();return r||o?{preRequest:r,tests:o}:void 0}function qf(a){try{return decodeURIComponent(a.replace(/\+/g," "))}catch{return a}}function Df(a){const r=a.split("#",1)[0],o=r.indexOf("?");if(o<0)return{url:r,query:[]};const u=r.slice(o+1),f=u?u.split("&").map(p=>{const g=p.indexOf("=");return{key:qf(g>=0?p.slice(0,g):p),value:qf(g>=0?p.slice(g+1):""),enabled:!0}}):[];return{url:r.slice(0,o),query:f}}function Mx(a){return sa(a).map(r=>({key:Ke(r.key),value:Ke(r.value),enabled:r.disabled!==!0}))}function qx(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function zf(a,r){let o=a;for(const u of sa(r)){const f=Ke(u.key).trim();f&&(o=o.replace(new RegExp(`:${qx(f)}(?=/|$)`,"g"),`{{${f}}}`))}return o}function Dx(a){if(typeof a=="string")return Df(a);if(!Ot(a))return{url:"",query:[]};const r=Mx(a.query),o=Ke(a.raw);if(o){const m=Df(o);return{url:zf(m.url,a.variable),query:r.length>0?r:m.query}}const u=Ke(a.protocol).replace(/:$/,""),f=Array.isArray(a.host)?a.host.map(Ke).join("."):Ke(a.host),p=Ke(a.port),g=Array.isArray(a.path)?a.path.map(Ke).join("/"):Ke(a.path).replace(/^\//,""),x=f?`${u?`${u}://`:""}${f}${p?`:${p}`:""}`:"",b=x?`${x}${g?`/${g}`:""}`:g;return{url:zf(b,a.variable),query:r}}function zx(a){return sa(a).map(r=>({key:Ke(r.key),value:Ke(r.value),enabled:r.disabled!==!0}))}function Ux(a){return a.find(r=>r.enabled!==!1&&r.key.toLowerCase()==="content-type")?.value}function Hx(a){switch(a.toLowerCase()){case"json":return"application/json";case"xml":return"application/xml";case"html":return"text/html";case"javascript":return"application/javascript";case"text":return"text/plain";default:return}}function Lx(a,r,o,u){const f=Ux(r);if(!Ot(a)||!a.mode)return{body:"",contentType:f||"application/json",bodyMode:"none"};const p=Ke(a.mode);if(p==="raw"){const g=Ot(a.options)&&Ot(a.options.raw)?a.options.raw:void 0,x=g?Ke(g.language):"";return{body:Ke(a.raw),contentType:f||Hx(x)||"text/plain",bodyMode:x.toLowerCase()==="json"?"json":"raw"}}if(p==="urlencoded")return{body:"",bodyMode:"urlencoded",urlencoded:sa(a.urlencoded).map(x=>({key:Ke(x.key),value:Ke(x.value),enabled:x.disabled!==!0})),contentType:f||"application/x-www-form-urlencoded"};if(p==="graphql"){const g=Ot(a.graphql)?a.graphql:{},x=Ke(g.variables);return{body:"",bodyMode:"graphql",graphql:{query:Ke(g.query),variables:x},contentType:f||"application/json"}}if(p==="formdata"){const g=sa(a.formdata).map(b=>{const m=Ke(b.type)==="file"?"file":"text",v=Array.isArray(b.src)?b.src.map(Ke).filter(Boolean).join(", "):Ke(b.src);return{key:Ke(b.key),value:m==="text"?Ke(b.value):"",enabled:b.disabled!==!0,type:m,...m==="file"&&v?{fileName:v}:{},...typeof b.contentType=="string"?{contentType:b.contentType}:{}}});return g.filter(b=>b.type==="file").length>0&&nn(u,"postman-body-formdata-files",o,"Multipart file fields were preserved, but exported local file paths cannot be reopened by the browser. Re-select those files before sending."),{body:"",bodyMode:"formdata",formData:g,contentType:f}}if(p==="file"){const g=Ot(a.file)?Ke(a.file.src):Ke(a.src);return nn(u,"postman-body-file",o,g?`Postman binary file body "${g}" was preserved as intent, but browser security requires re-selecting the file before sending.`:"Postman binary file body requires selecting the file again in FlexDoc before sending."),{body:"",contentType:f||"application/octet-stream",bodyMode:"binary",binary:{fileName:g||void 0,contentType:f||"application/octet-stream"}}}return nn(u,"postman-body-unsupported",o,`Postman body mode "${p}" is not supported; the request body was left empty.`),{body:"",contentType:f||"application/octet-stream",bodyMode:"none"}}function Bx(a,r,o,u,f,p,g,x){const b=typeof a=="string"?{method:"GET",url:a}:a;if(!Ot(b))return nn(x,"postman-request-invalid",g,"Skipped an invalid Postman request entry."),null;const m=Ke(b.method).trim().toUpperCase()||"GET",v=Dx(b.url),S=zx(b.header),N=Lx(b.body,S,`${g}.body`,x),_={method:m,url:v.url,query:v.query,headers:S,body:N.body,contentType:N.contentType,bodyMode:N.bodyMode,urlencoded:N.urlencoded,formData:N.formData,binary:N.binary,graphql:N.graphql,auth:po(b.auth,{type:"inherit"},`${g}.auth`,x)},R=$x(f);return{id:Lt("request"),collectionId:o,folderId:u,name:r.trim()||`${m} ${v.url||"request"}`,request:_,...R?{scripts:R}:{},createdAt:p,updatedAt:p}}function Uf(a){Array.isArray(a.items)&&a.items.forEach((r,o)=>{const u=`${a.path}[${o}]`;if(!Ot(r)){nn(a.warnings,"postman-item-invalid",u,"Skipped an invalid Postman item.");return}const f=Ke(r.name)||"Untitled",p=Mf(r.event,`${u}.event`,a.warnings),g=Rx(a.inheritedScripts,p);if(Array.isArray(r.item)){const b=Lt("folder");a.folders.push({id:b,collectionId:a.collectionId,parentFolderId:a.parentFolderId,name:f,auth:po(r.auth,{type:"inherit"},`${u}.auth`,a.warnings),createdAt:a.timestamp,updatedAt:a.timestamp}),Uf({...a,items:r.item,parentFolderId:b,inheritedScripts:g,path:`${u}.item`});return}const x=Bx(r.request,f,a.collectionId,a.parentFolderId,g,a.timestamp,`${u}.request`,a.warnings);x&&a.requests.push(x)})}function Ix(a){if(!Ot(a)||!Ot(a.info)||!Array.isArray(a.item))throw new Error("This JSON is not a Postman collection. Expected info and item fields.");const r=Ke(a.info.name).trim();if(!r)throw new Error("Postman collection info.name is required.");const o=[],u=Ke(a.info.schema);u&&!u.includes("/v2.1.0/")&&nn(o,"postman-schema-version","info.schema",`Collection schema "${u}" is not Postman v2.1; FlexDoc imported the compatible fields it recognized.`);const f=new Date().toISOString(),p=Lt("collection"),g={id:p,name:r,auth:po(a.auth,{type:"none"},"auth",o),variables:$f(a.variable,"variable",o),createdAt:f,updatedAt:f},x=[],b=[];return Uf({items:a.item,collectionId:p,inheritedScripts:Mf(a.event,"event",o),timestamp:f,path:"item",folders:x,requests:b,warnings:o}),{collection:g,folders:x,requests:b,warnings:o}}function Yx(a){if(!Ot(a)||!Array.isArray(a.values)||typeof a.name!="string")throw new Error("This JSON is not a Postman environment. Expected name and values fields.");const r=Ke(a._postman_variable_scope).toLowerCase();if(r&&r!=="environment")throw new Error(`Postman variable scope "${r}" is not an environment.`);const o=[],u=new Date().toISOString();return{environment:{id:Lt("environment"),name:a.name.trim()||"Imported environment",variables:$f(a.values,"values",o),createdAt:u,updatedAt:u},warnings:o}}function Gx(a){if(Ot(a)&&Ot(a.info)&&Array.isArray(a.item))return{kind:"collection",result:Ix(a)};if(Ot(a)&&Array.isArray(a.values)&&typeof a.name=="string")return{kind:"environment",result:Yx(a)};throw new Error("Unsupported Postman JSON. Import a collection v2.1 JSON file or an exported environment JSON file.")}function Fx(a){if(a.collections.length!==1||a.folders.length!==0||a.requests.length!==0)return!1;const r=a.collections[0];return r.name==="My Collection"&&r.auth.type==="none"&&r.variables.length===0}function Vx(a,r){const o=Fx(a)?[]:a.collections;return{...a,collections:[...o,r.collection],folders:[...a.folders,...r.folders],requests:[...a.requests,...r.requests]}}function Kx(a,r){return{...a,environments:[...a.environments,r.environment],activeEnvironmentId:a.activeEnvironmentId||r.environment.id}}function Hf(a,r){return`${a} ${a===1?r:`${r}s`}`}const Xx=({onWorkspaceChange:a,onSelectedCollectionChange:r,theme:o})=>{const u=W.useRef(null),[f,p]=W.useState(null),[g,x]=W.useState([]),b=async R=>{if(R.length===0)return;const z=[],M=[],B=[];for(const Y of R)try{const $=JSON.parse(await Y.text()),q=Gx($);z.push(q),M.push(...q.result.warnings.map(J=>({...J,path:`${Y.name}:${J.path}`})))}catch($){B.push(`${Y.name}: ${$ instanceof Error?$.message:String($)}`)}z.length>0&&a(Y=>{let $=Y;for(const q of z)$=q.kind==="collection"?Vx($,q.result):Kx($,q.result);return $});const T=z.filter(Y=>Y.kind==="collection"),E=z.length-T.length,w=T[T.length-1];w?.kind==="collection"&&r?.(w.result.collection.id),x(M);const U=[T.length>0?Hf(T.length,"collection"):"",E>0?Hf(E,"environment"):""].filter(Boolean);z.length===0?p({tone:"error",text:B.join(" ")||"No Postman documents were imported."}):B.length>0||M.length>0?p({tone:"warning",text:`Imported ${U.join(" and ")}. ${B.length>0?`${B.length} file${B.length===1?"":"s"} failed to import.`:`${M.length} compatibility warning${M.length===1?"":"s"} need review.`}`}):p({tone:"success",text:`Imported ${U.join(" and ")}.`})},m=o==="dark"?"border-gray-700 bg-gray-900 text-gray-100":"border-gray-300 bg-white text-gray-900",v=o==="dark"?"text-gray-400":"text-gray-500",S=o==="dark"?"text-amber-300":"text-amber-700",N=o==="dark"?"text-emerald-300":"text-emerald-700",_=o==="dark"?"text-red-300":"text-red-700";return s.jsxs("section",{className:"space-y-3","aria-labelledby":"api-client-import-heading",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Xu,{className:"h-4 w-4"}),s.jsx("h3",{id:"api-client-import-heading",className:"font-semibold",children:"Import"})]}),s.jsx("input",{ref:u,type:"file",accept:".json,application/json",multiple:!0,className:"hidden","aria-label":"Import Postman JSON",onChange:R=>{const z=Array.from(R.currentTarget.files||[]);R.currentTarget.value="",b(z)}}),s.jsxs("button",{type:"button",className:`flex w-full items-center justify-center gap-2 rounded-md border px-3 py-2 text-sm font-medium ${m}`,onClick:()=>u.current?.click(),children:[s.jsx(Xu,{className:"h-4 w-4"}),"Import Postman"]}),s.jsx("p",{className:`text-xs ${v}`,children:"Import Postman Collection v2.1 and exported environment JSON files. Multiple files can be selected together."}),f&&s.jsxs("div",{className:`flex items-start gap-2 text-xs ${f.tone==="success"?N:f.tone==="warning"?S:_}`,role:"status",children:[f.tone==="success"?s.jsx(Gu,{className:"mt-0.5 h-4 w-4 shrink-0"}):s.jsx(bg,{className:"mt-0.5 h-4 w-4 shrink-0"}),s.jsx("span",{children:f.text})]}),g.length>0&&s.jsxs("details",{className:`text-xs ${S}`,children:[s.jsxs("summary",{className:"cursor-pointer font-medium",children:["Review import warnings (",g.length,")"]}),s.jsxs("ul",{className:"mt-2 space-y-2 pl-4",children:[g.slice(0,5).map((R,z)=>s.jsxs("li",{children:[s.jsx("span",{className:"font-mono",children:R.path}),": ",R.message]},`${R.code}-${R.path}-${z}`)),g.length>5&&s.jsxs("li",{children:[g.length-5," more warning",g.length-5===1?"":"s"," not shown."]})]})]})]})};function Zx(a,r){if(!r.folderId)return"Collection root";const o=new Map(a.folders.map(g=>[g.id,g])),u=[],f=new Set;let p=o.get(r.folderId);for(;p&&!f.has(p.id);)f.add(p.id),u.unshift(p.name),p=p.parentFolderId?o.get(p.parentFolderId):void 0;return u.join(" / ")||"Deleted folder"}function Qx(a){return a.status==="running"?"Running":a.status==="passed"?"Runner pass":a.status==="failed"?"Runner fail":a.status==="cancelled"?"Cancelled":a.status==="skipped"?"Not run":"Pending"}const Jx=({workspace:a,onWorkspaceChange:r,collectionId:o,folderId:u,theme:f,credentials:p,requestInterceptor:g,hostExecution:x,externalVariables:b,externalEnvironmentVariables:m,onCollectionChanges:v,onEnvironmentChanges:S,onOpenHistory:N,onBack:_,fetcher:R})=>{const z=W.useMemo(()=>Xr(a,o,u),[o,u,a]),M=W.useMemo(()=>kf(a,o,u),[o,u,a]),B=a.environments.find(ee=>ee.id===a.activeEnvironmentId),[T,E]=W.useState(!1),[w,U]=W.useState(!1),[Y,$]=W.useState(),[q,J]=W.useState({}),Se=W.useRef(void 0),Ae=W.useRef(!0);W.useEffect(()=>(Ae.current=!0,()=>{Ae.current=!1,Se.current?.abort()}),[]);const se=async()=>{if(w||z.length===0)return;const ee=new AbortController;Se.current=ee,U(!0),$(void 0),J(Object.fromEntries(z.map(K=>[K.id,{status:"pending"}])));const oe=await bx({workspace:a,collectionId:o,folderId:u,runName:M,credentials:p,requestInterceptor:g,hostExecution:x,externalVariables:b,externalEnvironmentVariables:m,stopOnFailure:T,signal:ee.signal,fetcher:R,onCollectionChanges:v,onEnvironmentChanges:S,onRequestStart:K=>{Ae.current&&J(ge=>({...ge,[K.id]:{status:"running"}}))},onRequestComplete:K=>{Ae.current&&J(ge=>({...ge,[K.requestId]:{status:K.cancelled?"cancelled":K.passed?"passed":"failed",item:K}}))}});Ae.current&&(r(oe.workspace),J(K=>Object.fromEntries(z.map(ge=>{const C=K[ge.id]||{status:"pending"};return[ge.id,C.status==="pending"&&oe.stopped?{status:"skipped"}:C]}))),$(oe),U(!1),Se.current=void 0)},he=()=>Se.current?.abort(),xe=f==="dark"?"border-gray-700 bg-gray-800/60 text-gray-100":"border-gray-200 bg-gray-50 text-gray-900",Ne=f==="dark"?"text-gray-400":"text-gray-500",O=f==="dark"?"border-gray-700 bg-gray-900/40":"border-gray-200 bg-white";return s.jsx("section",{className:`rounded-xl border p-4 md:p-5 ${xe}`,"aria-labelledby":"api-client-runner-heading",children:s.jsxs("div",{className:"space-y-5",children:[s.jsxs("header",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center gap-2 rounded-md border px-3 py-2 text-sm",onClick:_,children:[s.jsx(Bu,{className:"h-4 w-4"})," Client"]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Pa,{className:"h-5 w-5"}),s.jsx("h2",{id:"api-client-runner-heading",className:"text-lg font-semibold",children:"Collection runner"})]}),s.jsx("p",{className:"mt-1 text-sm font-medium",children:M}),s.jsxs("p",{className:`mt-1 text-xs ${Ne}`,children:[z.length," saved request",z.length===1?"":"s"," · Environment: ",B?.name||"None"]})]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Y?.runId&&s.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center gap-2 rounded-md border px-3 py-2 text-sm",onClick:()=>N(void 0,Y.runId),children:[s.jsx(cg,{className:"h-4 w-4"})," Open run history"]}),w?s.jsxs("button",{type:"button",className:"inline-flex min-h-10 items-center gap-2 rounded-md border border-red-300 px-3 py-2 text-sm text-red-700",onClick:he,children:[s.jsx(xg,{className:"h-4 w-4"})," Stop run"]}):s.jsxs("button",{type:"button",disabled:z.length===0,className:"inline-flex min-h-10 items-center gap-2 rounded-md border px-3 py-2 text-sm font-medium disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>{se()},children:[s.jsx(Pa,{className:"h-4 w-4"})," ",Y?"Run again":"Start run"]})]})]}),s.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border p-3 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("label",{className:"inline-flex items-center gap-2 text-sm",children:[s.jsx("input",{type:"checkbox",checked:T,disabled:w,onChange:ee=>E(ee.target.checked)}),"Stop on runner failure"]}),s.jsx("p",{className:`text-xs ${Ne}`,children:"Runner failure means transport/script/test failure. HTTP 4xx/5xx alone does not fail an item."})]}),Y&&s.jsxs("div",{className:"grid gap-2 sm:grid-cols-5",children:[s.jsxs("div",{className:"rounded-md border px-3 py-2 text-sm",children:[s.jsx("div",{className:Ne,children:"Progress"}),s.jsxs("strong",{children:[Y.completed," / ",Y.total]})]}),s.jsxs("div",{className:"rounded-md border px-3 py-2 text-sm",children:[s.jsx("div",{className:Ne,children:"Passed"}),s.jsx("strong",{className:"text-green-600",children:Y.passed})]}),s.jsxs("div",{className:"rounded-md border px-3 py-2 text-sm",children:[s.jsx("div",{className:Ne,children:"Failed"}),s.jsx("strong",{className:"text-red-600",children:Y.failed})]}),s.jsxs("div",{className:"rounded-md border px-3 py-2 text-sm",children:[s.jsx("div",{className:Ne,children:"Cancelled"}),s.jsx("strong",{children:Y.cancelled})]}),s.jsxs("div",{className:"rounded-md border px-3 py-2 text-sm",children:[s.jsx("div",{className:Ne,children:"Run"}),s.jsx("strong",{children:Y.stopped?"Stopped":"Complete"})]})]}),s.jsxs("section",{className:"space-y-3","aria-labelledby":"api-client-runner-order-heading",children:[s.jsxs("div",{children:[s.jsx("h3",{id:"api-client-runner-order-heading",className:"font-semibold",children:"Execution order"}),s.jsx("p",{className:`text-xs ${Ne}`,children:"Requests execute sequentially in saved-request order. Folder runs include descendant folders; this list is the exact order that will run."})]}),z.map((ee,oe)=>{const K=q[ee.id]||{status:"pending"},ge=K.item?.outcome.result,C=K.item?.outcome.scriptTests||[],G=C.filter(de=>de.passed).length,pe=ge?.status!==void 0&&ge.status>=400;return s.jsxs("div",{"data-runner-request-id":ee.id,className:`rounded-lg border p-3 ${O}`,children:[s.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[s.jsx("span",{className:`text-xs ${Ne}`,children:oe+1}),s.jsx("span",{className:"font-mono font-bold text-blue-600",children:ee.request.method.toUpperCase()}),s.jsx("span",{className:"font-medium",children:ee.name})]}),s.jsx("div",{className:`mt-1 text-xs ${Ne}`,children:Zx(a,ee)}),s.jsx("div",{className:"mt-1 truncate font-mono text-xs",title:ee.request.url,children:ee.request.url})]}),s.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2 text-xs",children:[K.status==="running"&&s.jsx(Ss,{className:"h-4 w-4 animate-spin"}),K.status==="passed"&&s.jsx(Gu,{className:"h-4 w-4 text-green-600"}),K.status==="failed"&&s.jsx(ig,{className:"h-4 w-4 text-red-600"}),s.jsx("span",{children:Qx(K)}),ge?.status!==void 0&&s.jsxs("span",{className:pe?"text-amber-600":Ne,children:["HTTP ",ge.status]}),ge?.responseTime!==void 0&&s.jsxs("span",{className:Ne,children:[s.jsx(xs,{className:"mr-1 inline h-3.5 w-3.5"}),ge.responseTime," ms"]})]})]}),C.length>0&&s.jsxs("div",{className:`mt-2 text-xs ${C.some(de=>!de.passed)?"text-red-600":Ne}`,children:[G,"/",C.length," tests passed"]}),K.item?.outcome.scriptError&&s.jsx("div",{className:"mt-2 text-xs text-red-600",children:K.item.outcome.scriptError}),K.item?.outcome.error&&!K.item.cancelled&&s.jsx("div",{className:"mt-2 text-xs text-red-600",children:K.item.outcome.error}),K.item?.historyEntryId&&s.jsx("button",{type:"button",className:"mt-2 text-xs font-medium text-blue-600 underline underline-offset-2","aria-label":`Open history for ${ee.name}`,onClick:()=>N(K.item?.historyEntryId,K.item?.outcome.result?Y?.runId:void 0),children:"Inspect history"})]},ee.id)}),z.length===0&&s.jsx("div",{className:`rounded-lg border px-4 py-8 text-center text-sm ${Ne}`,children:"There are no saved requests in this run scope yet."})]})]})})};function Px(a){return{method:a?.method||"GET",url:a?.url||"",query:a?.query?.map(r=>({...r}))||[],headers:a?.headers?.map(r=>({...r}))||[],body:a?.body||"",contentType:a?.contentType||"application/json",bodyMode:a?.bodyMode,urlencoded:a?.urlencoded?.map(r=>({...r})),formData:a?.formData?.map(r=>({...r})),binary:a?.binary?{...a.binary}:void 0,graphql:a?.graphql?{...a.graphql}:void 0,hostExecution:a?.hostExecution?{...a.hostExecution}:void 0,auth:a?.auth?a.auth.type==="oauth2"?{...a.auth,scopes:a.auth.scopes?[...a.auth.scopes]:void 0}:{...a.auth}:{type:"inherit"}}}const Wx=({initialRequest:a,initialScripts:r,theme:o="light",persistenceKey:u="default",onRequestChange:f,onDraftChange:p,onScriptsChange:g,onExecutionStart:x,onExecutionComplete:b,variables:m={},environmentVariables:v={},onCollectionChanges:S,onEnvironmentChanges:N,..._})=>{const R=Px(a),z=fn(r),M=Vl(),[B,T]=W.useState(R),[E,w]=W.useState(R),[U,Y]=W.useState(z),[$,q]=W.useState(z),[J,Se]=W.useState(0),[Ae,se]=W.useState("request"),[he,xe]=W.useState({}),[Ne,O]=W.useState(),[ee,oe]=W.useState(M),[K,ge]=W.useState(M.collections[0]?.id),[C,G]=W.useState(""),pe=W.useRef(M.collections[0]?.id),de=W.useRef(void 0),[be,Ee]=W.useState(u===!1);W.useEffect(()=>{if(u===!1)return;let Oe=!1;return j0(u).then(it=>{Oe||(oe(it),ge(it.collections[0]?.id),G(""),Ee(!0))}).catch(()=>{Oe||Ee(!0)}),()=>{Oe=!0}},[u]),W.useEffect(()=>{!be||u===!1||A0(u,ee).catch(()=>{})},[be,u,ee]);const ce=W.useMemo(()=>sf(ee,K),[K,ee]),Ce=W.useMemo(()=>of(ee),[ee]),Le=W.useMemo(()=>({...v,...Ce}),[v,Ce]),Be=W.useMemo(()=>({...ce,...m,...Le}),[ce,Le,m]),rt=W.useCallback(Oe=>rf(ee,K,C||void 0,Oe||{type:"none"}),[K,C,ee]),P=W.useCallback(Oe=>{ge(Oe),G("")},[]),ve=Oe=>{f?.(Oe)},je=Oe=>{w(Nn(Oe)),p?.(Nn(Oe))},ke=Oe=>{const it=fn(Oe);q(it),g?.(it)},Pe=Oe=>{const it=pe.current||K;oe(Rt=>uf(Rt,it,Oe)),S?.(Oe)},at=Oe=>{oe(it=>cf(it,Oe)),N?.(Oe)},yt=()=>{pe.current=K,de.current=C||void 0,x?.()},He=Oe=>{oe(it=>lf(it,{...Oe,collectionId:pe.current,folderId:de.current})),b?.(Oe)},Ft=(Oe,it,Rt,Kt)=>{se("request");const Yt=Rt&&ee.collections.some(Z=>Z.id===Rt)?Rt:void 0;Yt&&ge(Yt);const d=Yt||K,H=Kt&&ee.folders.some(Z=>Z.id===Kt&&Z.collectionId===d)?Kt:"";G(H);const te=Nn(Oe),le=fn(it);T(te),w(te),Y(le),q(le),Se(Z=>Z+1)},Vt=(Oe,it)=>{ge(Oe),G(it||""),O({collectionId:Oe,folderId:it}),se("runner")},wn=(Oe,it)=>{xe({entryId:Oe,runId:it}),se("history")},Rn=o==="dark"?"border-gray-700 bg-gray-900/40 text-gray-100":"border-gray-200 bg-white text-gray-900";return s.jsxs("div",{className:"grid gap-4 lg:grid-cols-[19rem_minmax(0,1fr)]",children:[s.jsxs("aside",{className:`space-y-5 rounded-xl border p-4 ${Rn}`,children:[s.jsx(Xx,{onWorkspaceChange:oe,onSelectedCollectionChange:P,theme:o}),s.jsx("div",{className:"border-t pt-4",children:s.jsx(Sx,{workspace:ee,onWorkspaceChange:oe,theme:o})}),s.jsx("div",{className:"border-t pt-4",children:s.jsx(vx,{request:E,scripts:$,onLoadRequest:Ft,onSelectedCollectionChange:P,onSelectedFolderChange:G,onRunCollection:Oe=>Vt(Oe),onRunFolder:(Oe,it)=>Vt(Oe,it),selectedCollectionId:K,selectedFolderId:C,workspace:ee,onWorkspaceChange:oe,hostExecution:_.hostExecution,theme:o})}),s.jsx("div",{className:"border-t pt-4",children:s.jsx(Ax,{workspace:ee,onWorkspaceChange:oe,onLoadRequest:Ft,onViewAll:()=>wn(),theme:o})})]}),Ae==="history"?s.jsx(Cx,{workspace:ee,onWorkspaceChange:oe,onLoadRequest:Ft,onBack:()=>se("request"),initialEntryId:he.entryId,initialRunId:he.runId,theme:o},`${he.runId||""}:${he.entryId||""}`):Ae==="runner"&&Ne?s.jsx(Jx,{workspace:ee,onWorkspaceChange:oe,collectionId:Ne.collectionId,folderId:Ne.folderId,theme:o,credentials:_.credentials,requestInterceptor:_.requestInterceptor,hostExecution:_.hostExecution,externalVariables:m,externalEnvironmentVariables:v,onCollectionChanges:S,onEnvironmentChanges:N,onOpenHistory:wn,onBack:()=>se("request")}):s.jsx(hx,{..._,initialRequest:B,initialScripts:U,theme:o,resolveAuth:rt,variables:Be,collectionVariables:ce,externalVariables:m,environmentVariables:Le,onCollectionChanges:Pe,onEnvironmentChanges:at,onDraftChange:je,onScriptsChange:ke,onExecutionStart:yt,onExecutionComplete:He,onRequestChange:ve},J)]})};function eb(a,r,o){return a.paths[r]?.[o.toLowerCase()]}function tb(a,r){const o=a.components?.securitySchemes?.[r];if(!o)return;if(!("$ref"in o))return o;const u=o.$ref,f="#/components/securitySchemes/";if(!u.startsWith(f))return;const p=a.components?.securitySchemes?.[decodeURIComponent(u.slice(f.length))];return p&&!("$ref"in p)?p:void 0}function nb(a,r,o,u){const p=eb(a,r,o)?.security??a.security??[];if(!p.length)return;const g=p.find(b=>{const m=Object.keys(b);return m.length===1&&!!u[m[0]]});if(g)return g;const x=p.find(b=>{const m=Object.keys(b);return m.length>0&&m.every(v=>!!u[v])});return x||(p.find(b=>Object.keys(b).length===0)??p[0])}function ab(a,r,o=[]){if(r){if(a.type==="http"&&a.scheme?.toLowerCase()==="bearer")return{type:"bearer",token:r};if(a.type==="http"&&a.scheme?.toLowerCase()==="basic"){const u=r.indexOf(":");return u>=0?{type:"basic",username:r.slice(0,u),password:r.slice(u+1)}:{type:"basic",username:r,password:""}}if(a.type==="apiKey"&&(a.in==="header"||a.in==="query")&&a.name)return{type:"apiKey",key:a.name,value:r,in:a.in};if(a.type==="openIdConnect")return{type:"oauth2",accessToken:r,grantType:"accessToken",scopes:o};if(a.type==="oauth2"){const u=a.flows,f=u?.authorizationCode?["authorizationCode",u.authorizationCode]:u?.clientCredentials?["clientCredentials",u.clientCredentials]:u?.password?["password",u.password]:u?.implicit?["implicit",u.implicit]:void 0,p=f?.[1];return{type:"oauth2",accessToken:r,grantType:f?.[0]||"accessToken",authorizationUrl:p?.authorizationUrl,tokenUrl:p?.tokenUrl,scopes:o.length?o:Object.keys(p?.scopes||{})}}}}function Lf(a,r){return{...a,headers:a.headers?.filter(o=>o.key.toLowerCase()!==r.toLowerCase())}}function lb(a,r){return{...a,query:a.query?.filter(o=>o.key!==r)}}function rb(a,r,o,u,f){let p=no(f);const g=nb(a,r,o,u.auth||{});if(!g||Object.keys(g).length!==1)return p;const x=Object.keys(g)[0],b=tb(a,x),m=u.auth?.[x]||"";if(!b)return p;if(!m)return{...p,auth:{type:"inherit"}};const v=ab(b,m,g[x]||[]);return v?(v.type==="bearer"||v.type==="oauth2"||v.type==="basic"?p=Lf(p,"Authorization"):v.type==="apiKey"&&v.in==="header"?p=Lf(p,v.key):v.type==="apiKey"&&v.in==="query"&&(p=lb(p,v.key)),{...p,auth:v}):p}function ib(a,r,o,u,f){const p=Gl(a,r,o,u);return{request:rb(a,r,o,u,p),serverUrl:u.serverUrl||f}}function sb(a){return a==null?"":Array.isArray(a)?a.map(String):typeof a=="object"?JSON.stringify(a):typeof a=="boolean"?String(a):a}function ob({spec:a,path:r,method:o,options:u}){const f=a.paths[r],g=f?.[o.toLowerCase()]?.servers||f?.servers||a.servers||[];return JSON.stringify({path:r,method:o.toLowerCase(),defaultServer:u?.tryIt?.defaultServer??null,servers:g.map(so),defaults:Zs(a,r,o)})}const cb=({spec:a,path:r,method:o,theme:u,options:f,onRequestChange:p,onOpenInApiClient:g})=>{const x=a.paths[r],b=x?.[o.toLowerCase()],m=W.useMemo(()=>b?.servers||x?.servers||a.servers||[],[b?.servers,x?.servers,a.servers]),v=W.useMemo(()=>m.map(ce=>({server:ce,url:so(ce)})),[m]),S=W.useMemo(()=>v.map(ce=>ce.url),[v]),N=W.useMemo(()=>({...Zs(a,r,o),serverUrl:f?.tryIt?.defaultServer}),[a,r,o,f?.tryIt?.defaultServer]),_=N.serverUrl&&S.includes(N.serverUrl)?N.serverUrl:S[0]||"",R=N.serverUrl&&!S.includes(N.serverUrl)?N.serverUrl:"",[z,M]=W.useState(N),B=W.useRef(N),T=W.useRef(_),E=W.useRef(null),w=W.useRef(p),[U,Y]=W.useState(null),[$,q]=W.useState(null),[J,Se]=W.useState(!1),Ae=W.useMemo(()=>Gd(a,r,o),[a,r,o]),se=f?.noAutoAuth?[]:Object.keys((b?.security??a.security??[])[0]||{}),he=W.useMemo(()=>{try{return no(Gl(a,r,o,z))}catch{return null}},[a,r,o,z]),xe=(()=>{const ce=new Set(he?to(he):[]);return Object.values(z.cookies||{}).some(Ce=>Ce!=null&&String(Ce)!=="")&&ce.add("cookies"),[...ce]})(),Ne=new Set(f?.tryIt?.hostExecution?.capabilities||[]),O=xe.filter(ce=>!Ne.has(ce)),ee=xe.length>0,oe=f?.tryIt?.hostExecution?.available===!0&&O.length===0,K=ee?oe?"The browser cannot send this request. FlexDoc will execute it from the API host.":f?.tryIt?.hostExecution?.available?`The API host does not support the required capability${O.length===1?"":"ies"}: ${O.join(", ")}.`:"Host execution is disabled on this documentation server.":null,ge=ce=>{B.current=ce,M(ce)};W.useEffect(()=>{w.current=p},[p]),W.useEffect(()=>{try{w.current?.(Gl(a,r,o,z))}catch{}},[a,r,o,z]);const C=(ce,Ce,Le)=>{const Be=B.current;ge({...Be,[ce]:{...Be[ce]||{},[Ce]:Le}})},G=async()=>{Se(!0),q(null),Y(null);try{const ce=Gl(a,r,o,B.current),Ce=await io({request:no(ce),credentials:f?.tryIt?.credentials||"same-origin",requestInterceptor:f?.tryIt?.requestInterceptor,hostExecution:f?.tryIt?.hostExecution});Ce.error&&q(Ce.error),Ce.response&&Y({status:Ce.response.status,statusText:Ce.response.statusText,headers:Ce.response.headers.map(([Le,Be])=>[Le,Be]),body:Ce.response.body,responseTime:Ce.response.responseTime})}catch(ce){q(ce instanceof Error?ce.message:"Request failed")}finally{Se(!1)}},pe=()=>{try{g?.(ib(a,r,o,B.current,_||void 0))}catch(ce){q(ce instanceof Error?ce.message:"Request is incomplete")}},de=u==="dark"?"bg-gray-900 border-gray-700 text-gray-100":"bg-white border-gray-300 text-gray-900",be=u==="dark"?"text-gray-300":"text-gray-700",Ee=`${r}:${o}:${_}:${R}`;return s.jsx("div",{className:`rounded-xl border p-4 md:p-5 ${u==="dark"?"border-gray-700 bg-gray-800/60":"border-gray-200 bg-gray-50"}`,children:s.jsxs("div",{className:"flex flex-col gap-4",children:[m.length>0&&s.jsxs("label",{className:be,children:["Server",s.jsx("select",{"aria-label":"Server",className:`mt-1 w-full rounded-md border px-3 py-2 text-sm ${de}`,defaultValue:_,onChange:ce=>{T.current=ce.target.value,E.current&&(E.current.value=""),ge({...B.current,serverUrl:ce.target.value})},children:v.map(({server:ce,url:Ce})=>s.jsxs("option",{value:Ce,children:[ce.description?`${ce.description} — `:"",ce.url]},`${ce.url}:${Ce}`))},`server:${Ee}`)]}),s.jsxs("label",{className:be,children:["Custom server URL ",s.jsx("span",{className:"text-xs opacity-70",children:"(optional override)"}),s.jsx("input",{ref:E,"aria-label":"Custom server URL",className:`mt-1 w-full rounded-md border px-3 py-2 font-mono text-sm ${de}`,defaultValue:R,onChange:ce=>{const Ce=ce.target.value.trim()||T.current;ge({...B.current,serverUrl:Ce||void 0})},placeholder:"http://localhost:8080"},`custom:${Ee}`)]}),Ae.map(ce=>{const Ce=ce.in==="header"?z.headers?.[ce.name]:ce.in==="cookie"?z.cookies?.[ce.name]:z.parameters?.[ce.name];return s.jsxs("label",{className:be,children:[s.jsxs("span",{className:"text-sm font-medium",children:[ce.name," ",s.jsxs("span",{className:"text-xs opacity-70",children:["(",ce.in,")"]}),ce.required?" *":""]}),s.jsx("input",{"aria-label":`${ce.in} ${ce.name}`,className:`mt-1 w-full rounded-md border px-3 py-2 text-sm ${de}`,value:sb(Ce),onChange:Le=>C(ce.in==="header"?"headers":ce.in==="cookie"?"cookies":"parameters",ce.name,Le.target.value),placeholder:ce.description||ce.name})]},`${ce.in}:${ce.name}`)}),se.map(ce=>s.jsxs("label",{className:be,children:[s.jsxs("span",{className:"text-sm font-medium",children:[ce," credential"]}),s.jsx("input",{type:"password",autoComplete:"off",className:`mt-1 w-full rounded-md border px-3 py-2 text-sm ${de}`,value:z.auth?.[ce]||"",onChange:Ce=>C("auth",ce,Ce.target.value),placeholder:"Token / API key"})]},ce)),N.contentType&&s.jsxs(s.Fragment,{children:[s.jsxs("label",{className:be,children:["Content type",s.jsx("input",{className:`mt-1 w-full rounded-md border px-3 py-2 text-sm ${de}`,value:z.contentType||"",onChange:ce=>ge({...B.current,contentType:ce.target.value})})]}),s.jsxs("label",{className:be,children:["Request body",s.jsx("textarea",{"aria-label":"Request body",rows:8,className:`mt-1 w-full rounded-md border px-3 py-2 font-mono text-sm ${de}`,value:z.body||"",onChange:ce=>ge({...B.current,body:ce.target.value})})]})]}),K&&s.jsx("div",{role:oe?"status":"alert",className:`rounded-md border p-3 text-sm ${oe?"border-blue-300 bg-blue-50 text-blue-800":"border-amber-300 bg-amber-50 text-amber-800"}`,children:K}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs("button",{onClick:G,disabled:J||ee&&!oe,className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-md bg-blue-600 px-4 py-2 font-medium text-white hover:bg-blue-700 disabled:opacity-60",children:[J?s.jsx(Ss,{className:"h-4 w-4 animate-spin"}):s.jsx(Pa,{className:"h-4 w-4"})," ",J?"Sending…":ee&&oe?"Send via API host":"Send request"]}),g&&s.jsxs("button",{type:"button",onClick:pe,className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-md border px-4 py-2 font-medium",children:[s.jsx(bs,{className:"h-4 w-4"})," Open in API Client"]})]}),$&&s.jsxs("div",{role:"alert",className:"flex gap-2 rounded-md border border-red-300 bg-red-50 p-3 text-sm text-red-700",children:[s.jsx(Ur,{className:"mt-0.5 h-4 w-4 shrink-0"}),$]}),U&&s.jsx(Nf,{response:U,theme:u})]})})},ub=a=>s.jsx(cb,{...a},ob(a)),db=({spec:a,path:r,method:o,theme:u,options:f,onRequestChange:p})=>{const[g,x]=W.useState(null),b=W.useRef(0),m=a.paths[r],S=m?.[o.toLowerCase()]?.servers||m?.servers||a.servers||[],N=f?.tryIt?.apiClientPersistenceKey??g0(a.info?.title,typeof window>"u"?void 0:window.location.host),_=R=>{b.current+=1,x({id:b.current,...R})};return s.jsxs(s.Fragment,{children:[s.jsx(ub,{spec:a,path:r,method:o,theme:u,options:f,onRequestChange:p,onOpenInApiClient:_}),g&&s.jsxs("section",{className:"mt-6","aria-labelledby":"api-client-heading",children:[s.jsx("h2",{id:"api-client-heading",className:"mb-2 text-base font-semibold sm:text-lg",children:"API Client"}),s.jsx("p",{className:`mb-4 text-xs ${u==="dark"?"text-gray-400":"text-gray-600"}`,children:"Changes in Try It do not refresh this client automatically. Reopen it to load the latest Try It values. Saved collections stay local to this browser."}),s.jsx(Wx,{initialRequest:g.request,theme:u,credentials:f?.tryIt?.credentials||"same-origin",requestInterceptor:f?.tryIt?.requestInterceptor,hostExecution:f?.tryIt?.hostExecution,onRequestChange:p,serverOptions:S,initialServerUrl:g.serverUrl,persistenceKey:N},g.id)]})]})},fb=["curl","javascript","python","go","java"],pb=({spec:a,path:r,method:o,theme:u="light",options:f={},defaultExpandedSections:p})=>{const g=p??Vs(f.expand,f.expand===void 0?f.expandResponses:void 0),x=`${o}:${r}:${g.join("|")}`,[b,m]=W.useState(()=>({key:x,sections:new Set(g)})),v=b.key===x?b.sections:new Set(g),[S,N]=W.useState(f.codeSamples?.languages?.[0]||"curl"),_=W.useMemo(()=>Gl(a,r,o,Zs(a,r,o)),[a,r,o]),[R,z]=W.useState(_),B=a.paths[r]?.[o.toLowerCase()],T=W.useMemo(()=>Gd(a,r,o),[a,r,o]);if(!B)return s.jsx("div",{className:"p-6",children:"Operation not found."});const E=u==="dark"?"text-gray-400":"text-gray-600",w=u==="dark"?"border-gray-700 bg-gray-800/60":"border-gray-200 bg-white",U=u==="dark"?"bg-gray-900 text-gray-100":"bg-white text-gray-900",Y=f.codeSamples?.languages?.length?f.codeSamples.languages:fb,$=B.security??a.security,q={requiredPropsFirst:f.requiredPropsFirst,sortPropsAlphabetically:f.sortPropsAlphabetically},J=xe=>m(Ne=>{const O=new Set(Ne.key===x?Ne.sections:g);return O.has(xe)?O.delete(xe):O.add(xe),{key:x,sections:O}}),Se=(xe,Ne,O)=>s.jsxs("section",{className:"mb-8","aria-labelledby":`${Ne}-heading`,children:[s.jsxs("button",{id:`${Ne}-heading`,"aria-expanded":v.has(Ne),onClick:()=>J(Ne),className:"mb-4 flex min-h-10 w-full items-center gap-2 text-left text-base font-semibold sm:text-lg",children:[v.has(Ne)?s.jsx(Iu,{className:"h-5 w-5 shrink-0"}):s.jsx(Yu,{className:"h-5 w-5 shrink-0"}),xe]}),v.has(Ne)&&O]}),Ae=B.requestBody?tn.isReference(B.requestBody)?tn.resolveReference(a,B.requestBody.$ref):B.requestBody:void 0,se=Object.entries(B).filter(([xe])=>xe.startsWith("x-")),he=typeof f.theme=="object"?f.theme.methodColors?.[o.toLowerCase()]:void 0;return s.jsx("div",{className:`h-full overflow-y-auto ${U}`,children:s.jsxs("article",{className:"mx-auto w-full max-w-6xl p-4 sm:p-6 lg:p-8",children:[s.jsxs("header",{className:"mb-8",children:[s.jsxs("div",{className:"mb-4 flex min-w-0 flex-wrap items-center gap-2 sm:gap-3",children:[s.jsx("span",{className:`shrink-0 rounded border px-2.5 py-1 text-xs font-bold sm:text-sm ${tn.getMethodColor(o,u)}`,style:{background:he?.bg,borderColor:he?.border},children:o.toUpperCase()}),s.jsx("code",{className:`min-w-0 max-w-full overflow-x-auto rounded px-2.5 py-1 font-mono text-sm sm:text-base ${u==="dark"?"bg-gray-800 text-blue-300":"bg-gray-100 text-gray-900"}`,children:r})]}),B.summary&&s.jsx("h1",{className:"mb-2 text-2xl font-bold tracking-tight sm:text-3xl",children:B.summary}),B.description&&s.jsx("p",{className:`max-w-3xl whitespace-pre-wrap leading-relaxed ${E}`,children:B.description}),s.jsxs("div",{className:"mt-4 flex flex-wrap gap-3 text-sm",children:[B.deprecated&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-orange-600",children:[s.jsx(Ur,{className:"h-4 w-4"}),"Deprecated"]}),$?.length?s.jsxs("span",{className:"inline-flex items-center gap-1 text-red-600",children:[s.jsx(fg,{className:"h-4 w-4"}),"Authentication required"]}):s.jsxs("span",{className:"inline-flex items-center gap-1 text-green-600",children:[s.jsx(dg,{className:"h-4 w-4"}),"No authentication required"]}),B.operationId&&s.jsxs("span",{className:E,children:["operationId: ",s.jsx("code",{children:B.operationId})]})]}),(f.showExtensions||f.showCommonExtensions)&&se.length>0&&s.jsx("div",{className:`mt-4 rounded-lg border p-3 text-xs ${w}`,children:se.map(([xe,Ne])=>s.jsxs("div",{children:[s.jsx("code",{children:xe}),": ",typeof Ne=="string"?Ne:JSON.stringify(Ne)]},xe))})]}),T.length>0&&Se("Parameters","parameters",s.jsx("div",{className:"space-y-3",children:T.map(xe=>s.jsxs("div",{className:`rounded-lg border p-4 ${w}`,children:[s.jsxs("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[s.jsx("code",{className:"font-medium",children:xe.name}),s.jsx("span",{className:"rounded bg-blue-100 px-2 py-0.5 text-xs text-blue-700",children:xe.in}),xe.required&&s.jsx("span",{className:"rounded bg-red-100 px-2 py-0.5 text-xs text-red-700",children:"required"}),xe.deprecated&&s.jsx("span",{className:"rounded bg-orange-100 px-2 py-0.5 text-xs text-orange-700",children:"deprecated"})]}),xe.description&&s.jsx("p",{className:`mb-3 text-sm ${E}`,children:xe.description}),xe.schema&&s.jsx(ra,{spec:a,schema:xe.schema,theme:u,required:xe.required,...q})]},`${xe.in}:${xe.name}`))})),Ae&&Se("Request Body","requestBody",s.jsxs("div",{className:"space-y-4",children:[Ae.description&&s.jsx("p",{className:E,children:Ae.description}),Object.entries(Ae.content||{}).map(([xe,Ne])=>s.jsxs("div",{className:`rounded-lg border p-4 ${w}`,children:[s.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[s.jsx("code",{className:"rounded bg-gray-100 px-2 py-1 text-xs text-gray-700",children:xe}),Ae.required&&s.jsx("span",{className:"rounded bg-red-100 px-2 py-0.5 text-xs text-red-700",children:"required"})]}),Ne.schema&&s.jsx(ra,{spec:a,schema:Ne.schema,theme:u,...q}),Ne.example!==void 0&&s.jsx("div",{className:"mt-3",children:s.jsx(zn,{code:JSON.stringify(Ne.example,null,2),language:"json",title:"Example payload",theme:u,wrap:!0})})]},xe))]})),Se("Responses","responses",s.jsx("div",{className:"space-y-4",children:Object.entries(B.responses||{}).map(([xe,Ne])=>{const O=tn.isReference(Ne)?tn.resolveReference(a,Ne.$ref):Ne;return s.jsxs("div",{className:`rounded-lg border p-4 ${w}`,children:[s.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[s.jsx("span",{className:"rounded border px-2.5 py-1 text-sm font-bold",children:xe}),s.jsx("span",{className:`text-sm ${E}`,children:O.description})]}),O.headers&&f.showRequestHeaders&&s.jsxs("div",{className:"mb-3 text-sm",children:[s.jsx("span",{className:"font-medium",children:"Headers:"})," ",Object.keys(O.headers).join(", ")]}),O.content&&Object.entries(O.content).map(([ee,oe])=>s.jsxs("div",{className:"mt-3",children:[s.jsx("code",{className:"text-xs opacity-70",children:ee}),oe.schema&&s.jsx("div",{className:"mt-2",children:s.jsx(ra,{spec:a,schema:oe.schema,theme:u,...q})}),oe.example!==void 0&&s.jsx("div",{className:"mt-3",children:s.jsx(zn,{code:JSON.stringify(oe.example,null,2),language:"json",title:"Example response",theme:u,wrap:!0})}),oe.examples&&Object.values(oe.examples)[f.payloadSampleIdx||0]&&s.jsx("div",{className:"mt-3",children:s.jsx(zn,{code:JSON.stringify(Object.values(oe.examples)[f.payloadSampleIdx||0].value??Object.values(oe.examples)[f.payloadSampleIdx||0],null,2),language:"json",title:"Example response",theme:u,wrap:!0})})]},ee))]},xe)})})),f.tryIt?.enabled!==!1&&Se("Try It","tryIt",s.jsx(db,{spec:a,path:r,method:o,theme:u,options:f,onRequestChange:z},`${o}:${r}:${f.tryIt?.defaultServer||""}`)),f.codeSamples?.enabled!==!1&&Se("Code Examples","codeSamples",s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"mb-3 flex max-w-full gap-1 overflow-x-auto pb-1",role:"tablist","aria-label":"Code example language",children:Y.map(xe=>s.jsx("button",{role:"tab","aria-selected":S===xe,onClick:()=>N(xe),className:`shrink-0 rounded-md px-3 py-2 text-sm ${S===xe?"bg-blue-600 text-white":u==="dark"?"bg-gray-800 text-gray-200":"bg-gray-100 text-gray-700"}`,children:Fd(xe)},xe))}),s.jsx(zn,{code:Xg(R,S),language:S==="curl"?"bash":S,title:Fd(S),theme:u,wrap:!!(typeof f.theme=="object"&&f.theme.typography?.code?.wrap)})]})),B.externalDocs&&s.jsx("p",{className:"pb-4 text-sm",children:s.jsx("a",{className:"text-blue-600 underline",href:B.externalDocs.url,target:"_blank",rel:"noopener noreferrer",children:B.externalDocs.description||"External documentation"})})]})})},mb=({spec:a,onEndpointSelect:r,theme:o="light"})=>{const u=o==="dark"?"bg-gray-800 border-gray-700 shadow-lg text-white":"bg-white border-gray-200 shadow-sm text-gray-900",f=o==="dark"?"text-gray-300":"text-gray-600",p=o==="dark"?"hover:bg-gray-700 hover:border-gray-600":"hover:border-blue-300 hover:bg-blue-50",g=Object.values(a.paths).reduce((m,v)=>(tn.getHttpMethods(v).forEach(N=>{m[N]=(m[N]||0)+1,m.total++}),m),{total:0}),x=Object.entries(a.paths).slice(0,6).flatMap(([m,v])=>tn.getHttpMethods(v).map(S=>({path:m,method:S,operation:v[S]}))),b=[{icon:s.jsx(vs,{className:"w-5 h-5"}),iconBg:o==="dark"?"bg-blue-900":"bg-blue-100",iconColor:o==="dark"?"text-blue-300":"text-blue-600",title:"Total Endpoints",value:g.total},{icon:s.jsx(Vu,{className:"w-5 h-5"}),iconBg:o==="dark"?"bg-green-900":"bg-green-100",iconColor:o==="dark"?"text-green-300":"text-green-600",title:"Servers",value:a.servers?.length||0},{icon:s.jsx(Ku,{className:"w-5 h-5"}),iconBg:o==="dark"?"bg-purple-900":"bg-purple-100",iconColor:o==="dark"?"text-purple-300":"text-purple-600",title:"Tags",value:a.tags?.length||0},{icon:s.jsx(gg,{className:"w-5 h-5"}),iconBg:o==="dark"?"bg-orange-900":"bg-orange-100",iconColor:o==="dark"?"text-orange-300":"text-orange-600",title:"Security Schemes",value:a.components?.securitySchemes?Object.keys(a.components.securitySchemes).length:0}];return s.jsx("div",{className:`flex-1 overflow-y-auto ${o==="dark"?"bg-gray-900":"bg-gray-50"}`,children:s.jsxs("div",{className:"p-4 md:p-8",children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[s.jsx("div",{className:`w-12 h-12 rounded-xl flex items-center justify-center ${o==="dark"?"bg-blue-700":"bg-gradient-to-br from-blue-500 to-blue-600"}`,children:s.jsx(vs,{className:"w-6 h-6 text-white"})}),s.jsxs("div",{children:[s.jsx("h1",{className:`text-2xl md:text-3xl font-bold ${o==="dark"?"text-white":"text-gray-900"}`,children:a.info.title}),s.jsxs("p",{className:`${o==="dark"?"text-gray-300":"text-gray-600"}`,children:["Version ",a.info.version]})]})]}),a.info.description&&s.jsx("p",{className:`text-lg leading-relaxed max-w-4xl ${o==="dark"?"text-white":"text-gray-600"}`,children:a.info.description})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-8",children:b.map((m,v)=>s.jsx("div",{className:`p-4 rounded-xl border transition-colors ${u}`,children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:`w-10 h-10 ${m.iconBg} rounded-lg flex items-center justify-center`,children:gs.cloneElement(m.icon,{className:`${m.iconColor} w-5 h-5`})}),s.jsxs("div",{children:[s.jsx("p",{className:`text-sm font-medium ${f}`,children:m.title}),s.jsx("p",{className:`text-xl font-bold ${o==="dark"?"text-white":"text-gray-900"}`,children:m.value})]})]})},v))}),s.jsxs("div",{className:`rounded-xl border p-4 md:p-6 mb-8 ${u}`,children:[s.jsx("h2",{className:`text-lg md:text-xl font-semibold mb-4 ${o==="dark"?"text-white":"text-gray-900"}`,children:"HTTP Methods Distribution"}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4",children:["get","post","put","delete","patch","options"].map(m=>s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:`px-3 py-1.5 mx-auto rounded-lg flex items-center justify-center mb-2 ${tn.getMethodColor(m,o)}`,children:s.jsx("span",{className:"text-sm font-medium",children:m.toUpperCase()})}),s.jsx("p",{className:`font-bold ${o==="dark"?"text-white":"text-gray-900"}`,children:g[m]||0}),s.jsx("p",{className:"text-xs text-gray-400",children:m.toUpperCase()})]},m))})]}),s.jsxs("div",{className:`rounded-xl border p-4 md:p-6 mb-8 ${u}`,children:[s.jsx("h2",{className:`text-lg md:text-xl font-semibold mb-4 ${o==="dark"?"text-white":"text-gray-900"}`,children:"Available Endpoints"}),s.jsx("div",{className:"space-y-3",children:x.map(({path:m,method:v,operation:S})=>s.jsxs("button",{onClick:()=>r(m,v),className:`w-full text-left p-3 border rounded-lg transition-colors ${p} ${o==="dark"?"border-gray-700":"border-gray-200"}`,children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:`text-xs font-bold px-2 py-1 rounded border ${tn.getMethodColor(v,o)}`,children:v.toUpperCase()}),s.jsx("code",{className:`font-mono text-sm break-all ${o==="dark"?"text-blue-300 group-hover:text-blue-200":"text-blue-600 group-hover:text-blue-700"}`,children:m})]}),S?.summary&&s.jsx("p",{className:`text-sm mt-2 ml-14 ${o==="dark"?"text-gray-300":"text-gray-600"}`,children:S.summary})]},`${v}-${m}`))})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(a.info.contact||a.info.license)&&s.jsxs("div",{className:`rounded-xl border p-4 md:p-6 ${u}`,children:[s.jsx("h2",{className:`text-lg md:text-xl font-semibold mb-4 ${o==="dark"?"text-white":"text-gray-900"}`,children:"Information"}),s.jsxs("div",{className:"space-y-4",children:[a.info.contact&&s.jsxs("div",{children:[s.jsx("h3",{className:`font-medium mb-2 ${o==="dark"?"text-gray-100":"text-gray-900"}`,children:"Contact"}),a.info.contact.name&&s.jsx("p",{className:`text-sm ${f}`,children:a.info.contact.name}),a.info.contact.email&&s.jsx("p",{className:`text-sm ${f}`,children:a.info.contact.email}),a.info.contact.url&&s.jsxs("a",{href:a.info.contact.url,target:"_blank",rel:"noopener noreferrer",className:`text-sm flex items-center gap-1 ${o==="dark"?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-700"}`,children:["Website ",s.jsx(bs,{className:"w-3 h-3"})]})]}),a.info.license&&s.jsxs("div",{children:[s.jsx("h3",{className:`font-medium mb-2 ${o==="dark"?"text-gray-100":"text-gray-900"}`,children:"License"}),a.info.license.url?s.jsxs("a",{href:a.info.license.url,target:"_blank",rel:"noopener noreferrer",className:`text-sm flex items-center gap-1 ${o==="dark"?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-700"}`,children:[a.info.license.name,s.jsx(bs,{className:"w-3 h-3"})]}):s.jsx("p",{className:`text-sm ${f}`,children:a.info.license.name})]})]})]}),a.servers&&a.servers.length>0&&s.jsxs("div",{className:`rounded-xl border p-4 md:p-6 ${u}`,children:[s.jsx("h2",{className:`text-lg md:text-xl font-semibold mb-4 ${o==="dark"?"text-white":"text-gray-900"}`,children:"Servers"}),s.jsx("div",{className:"space-y-3",children:a.servers.map((m,v)=>s.jsxs("div",{className:`p-3 rounded-lg ${o==="dark"?"bg-gray-700/50":"bg-gray-50"}`,children:[s.jsx("code",{className:`text-sm font-mono ${o==="dark"?"text-blue-300":"text-blue-600"}`,children:m.url}),m.description&&s.jsx("p",{className:`text-sm mt-1 ${f}`,children:m.description})]},v))})]})]})]})})},hb=({footerClasses:a,footer:r})=>{const o=r?.copyright,u=r?.link||[];return s.jsx("footer",{className:`${a} w-full border-t`,children:s.jsxs("div",{className:"mx-auto flex min-h-12 w-full max-w-[1600px] flex-col gap-2 px-4 py-3 text-xs sm:flex-row sm:items-center sm:justify-between sm:px-6 sm:text-sm",children:[s.jsx("p",{children:o||s.jsxs(s.Fragment,{children:["Powered by ",s.jsx("a",{href:"https://prauga.github.io/flexdoc",target:"_blank",rel:"noopener noreferrer",className:"font-semibold hover:opacity-80 transition-opacity",children:"FlexDoc"})]})}),u.length>0&&s.jsx("nav",{"aria-label":"Footer links",className:"flex flex-wrap gap-x-4 gap-y-2",children:u.map(f=>s.jsx("a",{href:f.url,target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-80",children:f.text},`${f.text}:${f.url}`))})]})})},yb=(a,r,o)=>a==="dark"?o:r,gb={parameters:"Parameters",requestBody:"Request body",responses:"Responses",tryIt:"Try It",codeSamples:"Code examples"};function xb(a){return a===void 0?"host":Array.isArray(a)?"custom":a==="none"?"minimal":a}function bb(a){return Array.from(a.querySelectorAll('button:not([disabled]), select:not([disabled]), input:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')).filter(r=>r.getAttribute("aria-hidden")!=="true")}const vb=({open:a,theme:r,viewerExpand:o,effectiveExpandedSections:u,onExpandChange:f,onClose:p})=>{const g=W.useRef(null),x=W.useRef(null);if(W.useEffect(()=>{if(!a||typeof document>"u")return;const N=document.activeElement instanceof HTMLElement?document.activeElement:null;x.current?.focus();const _=R=>{if(R.key==="Escape"){R.preventDefault(),p();return}if(R.key!=="Tab"||!g.current)return;const z=bb(g.current);if(z.length===0){R.preventDefault(),g.current.focus();return}const M=z[0],B=z[z.length-1],T=document.activeElement;R.shiftKey&&(T===M||!g.current.contains(T))?(R.preventDefault(),B.focus()):!R.shiftKey&&(T===B||!g.current.contains(T))&&(R.preventDefault(),M.focus())};return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_),N?.isConnected&&N.focus()}},[a,p]),!a)return null;const b=r==="dark",m=b?"border-gray-700 bg-gray-900 text-gray-100":"border-gray-200 bg-white text-gray-900",v=b?"border-gray-700 bg-gray-800 text-gray-100":"border-gray-300 bg-white text-gray-900",S=Array.isArray(o)?o.filter(N=>$a.includes(N)):[];return s.jsxs("div",{className:"fixed inset-0 z-[70]",children:[s.jsx("button",{"aria-label":"Close settings backdrop",className:"absolute inset-0 bg-black/40",onClick:p}),s.jsxs("aside",{ref:g,role:"dialog","aria-modal":"true","aria-label":"Viewer settings",tabIndex:-1,className:`absolute inset-y-0 right-0 flex w-[min(92vw,24rem)] flex-col border-l shadow-2xl ${m}`,children:[s.jsxs("div",{className:"flex min-h-14 items-center justify-between border-b px-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold",children:"Settings"}),s.jsx("div",{className:"text-xs opacity-65",children:"Preferences are saved for this documentation."})]}),s.jsx("button",{type:"button","aria-label":"Close settings",className:"inline-flex h-11 w-11 items-center justify-center rounded-md",onClick:p,children:s.jsx(Zu,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:s.jsxs("section",{"aria-labelledby":"expansion-settings-heading",children:[s.jsx("h2",{id:"expansion-settings-heading",className:"mb-1 text-sm font-semibold",children:"Default expanded sections"}),s.jsx("p",{className:"mb-3 text-xs opacity-65",children:"This preference overrides the documentation author's default. Opening or closing a section manually remains temporary."}),s.jsxs("select",{ref:x,"aria-label":"Default expanded sections",className:`w-full rounded-md border px-3 py-2 text-sm ${v}`,value:xb(o),onChange:N=>{const _=N.target.value;f(_==="host"?void 0:_==="custom"?[...u]:_)},children:[s.jsx("option",{value:"host",children:"Use documentation default"}),s.jsx("option",{value:"minimal",children:"Minimal"}),s.jsx("option",{value:"documentation",children:"Documentation"}),s.jsx("option",{value:"interactive",children:"Interactive"}),s.jsx("option",{value:"all",children:"All sections"}),s.jsx("option",{value:"custom",children:"Custom sections"})]}),Array.isArray(o)&&s.jsxs("fieldset",{className:"mt-4 space-y-2",children:[s.jsx("legend",{className:"mb-2 text-xs font-medium uppercase tracking-wide opacity-65",children:"Custom sections"}),$a.map(N=>s.jsxs("label",{className:"flex min-h-9 items-center gap-2 text-sm",children:[s.jsx("input",{type:"checkbox",checked:S.includes(N),onChange:_=>{const R=new Set(S);_.target.checked?R.add(N):R.delete(N),f($a.filter(z=>R.has(z)))}}),gb[N]]},N))]}),o!==void 0&&s.jsx("button",{type:"button",className:"mt-5 rounded-md border px-3 py-2 text-sm",onClick:()=>f(void 0),children:"Reset to documentation defaults"})]})})]})]})};function Zr(a){if(a!==void 0)return typeof a=="number"?`${a}px`:a}function Sb(a,r){if(!r)return{};const o=r.colors||{},u=r.typography||{},f=r.sidebar||{};return{"--flexdoc-primary":o.primary?.main,"--flexdoc-text":o.text?.primary,"--flexdoc-text-muted":o.text?.secondary,"--flexdoc-border":a==="dark"?o.border?.dark:o.border?.light,"--flexdoc-sidebar-bg":a==="dark"?f.backgroundColorDark:f.backgroundColor,"--flexdoc-sidebar-text":a==="dark"?f.textColorDark:f.textColor,"--flexdoc-sidebar-active-text":a==="dark"?f.activeTextColorDark:f.activeTextColor,"--flexdoc-heading-font":u.headings?.fontFamily,"--flexdoc-heading-weight":u.headings?.fontWeight,"--flexdoc-code-font":u.code?.fontFamily,"--flexdoc-code-size":u.code?.fontSize,"--flexdoc-code-line-height":u.code?.lineHeight,"--flexdoc-code-color":u.code?.color,"--flexdoc-code-bg":u.code?.backgroundColor,fontFamily:u.fontFamily,fontSize:u.fontSize,lineHeight:u.lineHeight}}function Bf(a,r){return`${r.toLowerCase()}-${a.replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-|-$/g,"")}`}function If(a,r){const o=r.replace(/^#/,"");if(!o)return null;for(const[u,f]of Object.entries(a.paths))for(const p of tn.getHttpMethods(f))if(Bf(u,p)===o)return{path:u,method:p};return null}function jb({logo:a}){const r=typeof a=="string"?{url:a}:a,o=typeof r.padding=="object"?`${Zr(r.padding.vertical)||"0"} ${Zr(r.padding.horizontal)||"0"}`:r.padding,u=s.jsx("img",{src:r.url,alt:r.alt||"API documentation logo",style:{maxHeight:Zr(r.maxHeight)||"32px",maxWidth:Zr(r.maxWidth)||"180px"}});return s.jsx("div",{className:`flex items-center ${r.containerClass||""}`,style:{backgroundColor:r.backgroundColor,padding:o},children:r.clickable===!1?u:s.jsx("a",{href:"#","aria-label":"Documentation home",children:u})})}const Ab=({spec:a,theme:r="light",customStyles:o={},options:u={}})=>{const[f,p]=W.useState(()=>typeof window>"u"?null:If(a,window.location.hash)),[g,x]=W.useState(!1),[b,m]=W.useState(!1),v=Rg(a.info.title,typeof window>"u"?void 0:window.location.host),[S,N]=W.useState(()=>({key:v,expand:Ld(v).expand})),_=S.key===v?S.expand:Ld(v).expand,R=typeof u.theme=="object"?u.theme:void 0,z=W.useMemo(()=>({...Sb(r,R),...o}),[r,R,o]);W.useEffect(()=>{if(!u.customCss)return;const $=document.createElement("style");return $.dataset.flexdocCustomCss="true",$.textContent=u.customCss,document.head.appendChild($),()=>$.remove()},[u.customCss]),W.useEffect(()=>{if(typeof window>"u")return;const $=()=>p(If(a,window.location.hash));return $(),window.addEventListener("hashchange",$),()=>window.removeEventListener("hashchange",$)},[a]),W.useEffect(()=>{if(!g||typeof document>"u")return;const $=document.body.style.overflow;document.body.style.overflow="hidden";const q=J=>{J.key==="Escape"&&x(!1)};return document.addEventListener("keydown",q),()=>{document.body.style.overflow=$,document.removeEventListener("keydown",q)}},[g]);const M=($,q)=>{p({path:$,method:q}),x(!1),typeof window<"u"&&(window.location.hash=Bf($,q))},B=Vs(u.expand,u.expand===void 0?u.expandResponses:void 0),T=_===void 0?B:Vs(_),E=$=>{N({key:v,expand:$}),$g(v,$)},w=yb(r,"border-gray-200 bg-white text-gray-600","border-gray-700 bg-gray-800 text-gray-300"),U=r==="dark"?"bg-gray-900 text-gray-100":"bg-gray-50 text-gray-900",Y=($=!1)=>s.jsx("button",{type:"button",className:$?`fixed bottom-4 right-4 z-40 inline-flex h-11 w-11 items-center justify-center rounded-full border shadow-lg ${r==="dark"?"border-gray-700 bg-gray-900 text-gray-100":"border-gray-200 bg-white text-gray-900"}`:"inline-flex h-11 w-11 items-center justify-center rounded-md border","aria-label":"Open settings","aria-expanded":b,onClick:()=>m(!0),children:s.jsx(yg,{className:"h-5 w-5"})});return s.jsxs("div",{className:`flexdoc-root flex min-h-screen flex-col ${U}`,style:z,children:[!u.hideTopbar&&s.jsxs("header",{className:`sticky top-0 z-30 flex min-h-14 items-center gap-3 border-b px-3 sm:px-5 ${r==="dark"?"border-gray-700 bg-gray-900":"border-gray-200 bg-white"}`,children:[s.jsx("button",{className:"inline-flex h-11 w-11 items-center justify-center rounded-md lg:hidden","aria-label":"Open API navigation","aria-expanded":g,onClick:()=>x(!0),children:s.jsx(pg,{className:"h-5 w-5"})}),u.logo&&s.jsx(jb,{logo:u.logo}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("div",{className:"truncate font-semibold",children:a.info.title}),!u.hideHostname&&a.servers?.[0]?.url&&s.jsx("div",{className:"truncate text-xs opacity-60",children:a.servers[0].url})]}),!u.hideDownloadButton&&s.jsx("a",{className:"hidden rounded-md border px-3 py-2 text-sm sm:inline-flex",href:`data:application/json;charset=utf-8,${encodeURIComponent(JSON.stringify(a,null,2))}`,download:"openapi.json",children:"Download spec"}),Y()]}),u.hideTopbar&&Y(!0),s.jsxs("div",{className:"relative flex min-h-0 flex-1 overflow-hidden",children:[s.jsx("aside",{className:"hidden w-80 shrink-0 lg:block",style:{background:"var(--flexdoc-sidebar-bg)",color:"var(--flexdoc-sidebar-text)"},children:s.jsx(Ud,{spec:a,onEndpointSelect:M,theme:r,selectedEndpoint:f||void 0})}),g&&s.jsxs("div",{className:"fixed inset-0 z-50 lg:hidden",role:"dialog","aria-modal":"true","aria-label":"API navigation",children:[s.jsx("button",{"aria-label":"Close navigation backdrop",className:"absolute inset-0 bg-black/40",onClick:()=>x(!1)}),s.jsxs("aside",{className:`absolute inset-y-0 left-0 flex w-[min(88vw,22rem)] flex-col shadow-2xl ${r==="dark"?"bg-gray-900":"bg-white"}`,children:[s.jsxs("div",{className:"flex h-14 items-center justify-between border-b px-4",children:[s.jsx("span",{className:"font-semibold",children:"API navigation"}),s.jsx("button",{className:"inline-flex h-11 w-11 items-center justify-center rounded-md","aria-label":"Close API navigation",onClick:()=>x(!1),children:s.jsx(Zu,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s.jsx(Ud,{spec:a,onEndpointSelect:M,theme:r,selectedEndpoint:f||void 0})})]})]}),s.jsx("main",{className:"min-w-0 flex-1 overflow-hidden",children:f?s.jsx(pb,{spec:a,path:f.path,method:f.method,theme:r,options:u,defaultExpandedSections:T}):s.jsx(mb,{spec:a,onEndpointSelect:M,theme:r})})]}),s.jsx(hb,{footerClasses:w,footer:u.footer}),s.jsx(vb,{open:b,theme:r,viewerExpand:_,effectiveExpandedSections:T,onExpandChange:E,onClose:()=>m(!1)})]})},mo="x-flexdoc-external-documents";function Nb(a){if(typeof fetch!="function")throw new Error("No document loader is available in this environment");return fetch(a).then(async r=>{if(!r.ok)throw new Error(`Failed to load OpenAPI reference ${a}: ${r.status}`);const o=await r.text();return On.parseSpec(o).catch(()=>{try{return JSON.parse(o)}catch{throw new Error(`Reference document is not valid JSON/YAML: ${a}`)}})})}function wb(a,r){if(a.startsWith("#"))return{documentUri:r,pointer:a};const o=new URL(a,r),u=o.hash||"#";return o.hash="",{documentUri:o.toString(),pointer:u}}function Yf(a,r){const o=On.encodePointerToken(a);if(r==="#"||r==="")return`#/${mo}/${o}`;if(!r.startsWith("#/"))throw new Error(`Unsupported JSON Pointer reference: ${r}`);return`#/${mo}/${o}/${r.slice(2)}`}function Gf(a){return JSON.parse(JSON.stringify(a))}async function Tb(a,r){const o=r.load||Nb,u=new URL(r.baseUri).toString().replace(/#.*$/,""),f=Gf(a),p={},g=new Map;async function x(v){if(v===u)return f;if(p[v])return p[v];if(g.has(v))return g.get(v);const S=Promise.resolve(o(v)).then(_=>Gf(_));g.set(v,S);const N=await S;return p[v]=N,N}const b=new Set;async function m(v,S){if(b.has(S))return;b.add(S);async function N(_){if(!(!_||typeof _!="object")){if(Array.isArray(_)){for(const R of _)await N(R);return}if(typeof _.$ref=="string"){const R=wb(_.$ref,S);if(R.documentUri!==S){const z=await x(R.documentUri);_.$ref=R.documentUri===u?R.pointer:Yf(R.documentUri,R.pointer),await m(z,R.documentUri)}else S!==u&&(_.$ref=Yf(S,R.pointer))}for(const[R,z]of Object.entries(_))R!=="$ref"&&await N(z)}}await N(v)}return await m(f,u),Object.keys(p).length&&(f[mo]=p),f}async function Eb(a,r){return Tb(a,r)}const Qr="1",Jr=new WeakMap;function Cb(a){return JSON.parse(JSON.stringify(a))}function ho(a,r={}){const o=Cb(a);if(r.title&&(o.info.title=r.title),r.description&&(o.info.description=r.description),r.altDescription&&!o.info.description&&(o.info.description=r.altDescription),r.version&&(o.info.version=r.version),!r.tagGroups?.length)return o;const u=new Map;for(const g of r.tagGroups)for(const x of g.tags)u.set(x,g.name);const f={},p=new Set(["get","post","put","delete","patch","options","head","trace"]);for(const[g,x]of Object.entries(o.paths)){const b={};let m=!1;for(const[v,S]of Object.entries(x)){if(!p.has(v)){b[v]=S;continue}const N=S,_=(N?.tags||[]).filter(R=>u.has(R)).map(R=>u.get(R));!_.length||!N||(b[v]={...N,tags:Array.from(new Set(_))},m=!0)}m&&(f[g]=b)}return o.paths=f,o.tags=r.tagGroups.map(g=>({name:g.name})),o}function kb(a){return typeof a.theme=="string"?a.theme:typeof document<"u"&&document.documentElement.classList.contains("dark")?"dark":"light"}function Ff(a,r,o){const u=ho(r,o),f=Jr.get(a);f&&f.unmount();const p=Wy.createRoot(a);return Jr.set(a,p),p.render(s.jsx(Ab,{spec:u,theme:kb(o),options:o})),()=>{Jr.get(a)===p&&Jr.delete(a),p.unmount()}}function Vf(a,r){const o={contractVersion:Qr,...r.options||{}};return Ff(a,r.spec,o)}async function Kf(a,r){const o={contractVersion:Qr,...r.options||{}},u=r.baseUri?await Eb(r.spec,{baseUri:r.baseUri,load:r.documentLoader}):r.spec;return Ff(a,u,o)}return typeof window<"u"&&(window.FlexDocStandalone={mount:Vf,mountAsync:Kf,prepareSpec:ho,contractVersion:Qr}),Ja.FLEXDOC_CONTRACT_VERSION=Qr,Ja.mountFlexDoc=Vf,Ja.mountFlexDocAsync=Kf,Ja.prepareSpec=ho,Object.defineProperty(Ja,Symbol.toStringTag,{value:"Module"}),Ja})({});
60
76
  //# sourceMappingURL=flexdoc.standalone.js.map