apiskill 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,324 @@
1
+ (function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const p of u.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&l(p)}).observe(document,{childList:!0,subtree:!0});function r(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(a){if(a.ep)return;a.ep=!0;const u=r(a);fetch(a.href,u)}})();function Hd(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var ru={exports:{}},mi={},su={exports:{}},Ce={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var wd;function km(){if(wd)return Ce;wd=1;var i=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),w=Symbol.iterator;function O(C){return C===null||typeof C!="object"?null:(C=w&&C[w]||C["@@iterator"],typeof C=="function"?C:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,S={};function I(C,M,he){this.props=C,this.context=M,this.refs=S,this.updater=he||E}I.prototype.isReactComponent={},I.prototype.setState=function(C,M){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,M,"setState")},I.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function R(){}R.prototype=I.prototype;function J(C,M,he){this.props=C,this.context=M,this.refs=S,this.updater=he||E}var K=J.prototype=new R;K.constructor=J,b(K,I.prototype),K.isPureReactComponent=!0;var W=Array.isArray,q=Object.prototype.hasOwnProperty,F={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function U(C,M,he){var Q,ye={},pe=null,Ee=null;if(M!=null)for(Q in M.ref!==void 0&&(Ee=M.ref),M.key!==void 0&&(pe=""+M.key),M)q.call(M,Q)&&!H.hasOwnProperty(Q)&&(ye[Q]=M[Q]);var je=arguments.length-2;if(je===1)ye.children=he;else if(1<je){for(var _e=Array(je),Ye=0;Ye<je;Ye++)_e[Ye]=arguments[Ye+2];ye.children=_e}if(C&&C.defaultProps)for(Q in je=C.defaultProps,je)ye[Q]===void 0&&(ye[Q]=je[Q]);return{$$typeof:i,type:C,key:pe,ref:Ee,props:ye,_owner:F.current}}function ue(C,M){return{$$typeof:i,type:C.type,key:M,ref:C.ref,props:C.props,_owner:C._owner}}function Z(C){return typeof C=="object"&&C!==null&&C.$$typeof===i}function we(C){var M={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(he){return M[he]})}var ie=/\/+/g;function G(C,M){return typeof C=="object"&&C!==null&&C.key!=null?we(""+C.key):M.toString(36)}function oe(C,M,he,Q,ye){var pe=typeof C;(pe==="undefined"||pe==="boolean")&&(C=null);var Ee=!1;if(C===null)Ee=!0;else switch(pe){case"string":case"number":Ee=!0;break;case"object":switch(C.$$typeof){case i:case n:Ee=!0}}if(Ee)return Ee=C,ye=ye(Ee),C=Q===""?"."+G(Ee,0):Q,W(ye)?(he="",C!=null&&(he=C.replace(ie,"$&/")+"/"),oe(ye,M,he,"",function(Ye){return Ye})):ye!=null&&(Z(ye)&&(ye=ue(ye,he+(!ye.key||Ee&&Ee.key===ye.key?"":(""+ye.key).replace(ie,"$&/")+"/")+C)),M.push(ye)),1;if(Ee=0,Q=Q===""?".":Q+":",W(C))for(var je=0;je<C.length;je++){pe=C[je];var _e=Q+G(pe,je);Ee+=oe(pe,M,he,_e,ye)}else if(_e=O(C),typeof _e=="function")for(C=_e.call(C),je=0;!(pe=C.next()).done;)pe=pe.value,_e=Q+G(pe,je++),Ee+=oe(pe,M,he,_e,ye);else if(pe==="object")throw M=String(C),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.");return Ee}function xe(C,M,he){if(C==null)return C;var Q=[],ye=0;return oe(C,Q,"","",function(pe){return M.call(he,pe,ye++)}),Q}function Te(C){if(C._status===-1){var M=C._result;M=M(),M.then(function(he){(C._status===0||C._status===-1)&&(C._status=1,C._result=he)},function(he){(C._status===0||C._status===-1)&&(C._status=2,C._result=he)}),C._status===-1&&(C._status=0,C._result=M)}if(C._status===1)return C._result.default;throw C._result}var Se={current:null},B={transition:null},te={ReactCurrentDispatcher:Se,ReactCurrentBatchConfig:B,ReactCurrentOwner:F};function X(){throw Error("act(...) is not supported in production builds of React.")}return Ce.Children={map:xe,forEach:function(C,M,he){xe(C,function(){M.apply(this,arguments)},he)},count:function(C){var M=0;return xe(C,function(){M++}),M},toArray:function(C){return xe(C,function(M){return M})||[]},only:function(C){if(!Z(C))throw Error("React.Children.only expected to receive a single React element child.");return C}},Ce.Component=I,Ce.Fragment=r,Ce.Profiler=a,Ce.PureComponent=J,Ce.StrictMode=l,Ce.Suspense=y,Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,Ce.act=X,Ce.cloneElement=function(C,M,he){if(C==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+C+".");var Q=b({},C.props),ye=C.key,pe=C.ref,Ee=C._owner;if(M!=null){if(M.ref!==void 0&&(pe=M.ref,Ee=F.current),M.key!==void 0&&(ye=""+M.key),C.type&&C.type.defaultProps)var je=C.type.defaultProps;for(_e in M)q.call(M,_e)&&!H.hasOwnProperty(_e)&&(Q[_e]=M[_e]===void 0&&je!==void 0?je[_e]:M[_e])}var _e=arguments.length-2;if(_e===1)Q.children=he;else if(1<_e){je=Array(_e);for(var Ye=0;Ye<_e;Ye++)je[Ye]=arguments[Ye+2];Q.children=je}return{$$typeof:i,type:C.type,key:ye,ref:pe,props:Q,_owner:Ee}},Ce.createContext=function(C){return C={$$typeof:p,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},C.Provider={$$typeof:u,_context:C},C.Consumer=C},Ce.createElement=U,Ce.createFactory=function(C){var M=U.bind(null,C);return M.type=C,M},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(C){return{$$typeof:h,render:C}},Ce.isValidElement=Z,Ce.lazy=function(C){return{$$typeof:x,_payload:{_status:-1,_result:C},_init:Te}},Ce.memo=function(C,M){return{$$typeof:g,type:C,compare:M===void 0?null:M}},Ce.startTransition=function(C){var M=B.transition;B.transition={};try{C()}finally{B.transition=M}},Ce.unstable_act=X,Ce.useCallback=function(C,M){return Se.current.useCallback(C,M)},Ce.useContext=function(C){return Se.current.useContext(C)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(C){return Se.current.useDeferredValue(C)},Ce.useEffect=function(C,M){return Se.current.useEffect(C,M)},Ce.useId=function(){return Se.current.useId()},Ce.useImperativeHandle=function(C,M,he){return Se.current.useImperativeHandle(C,M,he)},Ce.useInsertionEffect=function(C,M){return Se.current.useInsertionEffect(C,M)},Ce.useLayoutEffect=function(C,M){return Se.current.useLayoutEffect(C,M)},Ce.useMemo=function(C,M){return Se.current.useMemo(C,M)},Ce.useReducer=function(C,M,he){return Se.current.useReducer(C,M,he)},Ce.useRef=function(C){return Se.current.useRef(C)},Ce.useState=function(C){return Se.current.useState(C)},Ce.useSyncExternalStore=function(C,M,he){return Se.current.useSyncExternalStore(C,M,he)},Ce.useTransition=function(){return Se.current.useTransition()},Ce.version="18.3.1",Ce}var kd;function Iu(){return kd||(kd=1,su.exports=km()),su.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Sd;function Sm(){if(Sd)return mi;Sd=1;var i=Iu(),n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function p(h,y,g){var x,w={},O=null,E=null;g!==void 0&&(O=""+g),y.key!==void 0&&(O=""+y.key),y.ref!==void 0&&(E=y.ref);for(x in y)l.call(y,x)&&!u.hasOwnProperty(x)&&(w[x]=y[x]);if(h&&h.defaultProps)for(x in y=h.defaultProps,y)w[x]===void 0&&(w[x]=y[x]);return{$$typeof:n,type:h,key:O,ref:E,props:w,_owner:a.current}}return mi.Fragment=r,mi.jsx=p,mi.jsxs=p,mi}var jd;function jm(){return jd||(jd=1,ru.exports=Sm()),ru.exports}var d=jm(),A=Iu();const xm=Hd(A);var Vl={},iu={exports:{}},_t={},lu={exports:{}},ou={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var xd;function Nm(){return xd||(xd=1,(function(i){function n(B,te){var X=B.length;B.push(te);e:for(;0<X;){var C=X-1>>>1,M=B[C];if(0<a(M,te))B[C]=te,B[X]=M,X=C;else break e}}function r(B){return B.length===0?null:B[0]}function l(B){if(B.length===0)return null;var te=B[0],X=B.pop();if(X!==te){B[0]=X;e:for(var C=0,M=B.length,he=M>>>1;C<he;){var Q=2*(C+1)-1,ye=B[Q],pe=Q+1,Ee=B[pe];if(0>a(ye,X))pe<M&&0>a(Ee,ye)?(B[C]=Ee,B[pe]=X,C=pe):(B[C]=ye,B[Q]=X,C=Q);else if(pe<M&&0>a(Ee,X))B[C]=Ee,B[pe]=X,C=pe;else break e}}return te}function a(B,te){var X=B.sortIndex-te.sortIndex;return X!==0?X:B.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;i.unstable_now=function(){return u.now()}}else{var p=Date,h=p.now();i.unstable_now=function(){return p.now()-h}}var y=[],g=[],x=1,w=null,O=3,E=!1,b=!1,S=!1,I=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,J=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function K(B){for(var te=r(g);te!==null;){if(te.callback===null)l(g);else if(te.startTime<=B)l(g),te.sortIndex=te.expirationTime,n(y,te);else break;te=r(g)}}function W(B){if(S=!1,K(B),!b)if(r(y)!==null)b=!0,Te(q);else{var te=r(g);te!==null&&Se(W,te.startTime-B)}}function q(B,te){b=!1,S&&(S=!1,R(U),U=-1),E=!0;var X=O;try{for(K(te),w=r(y);w!==null&&(!(w.expirationTime>te)||B&&!we());){var C=w.callback;if(typeof C=="function"){w.callback=null,O=w.priorityLevel;var M=C(w.expirationTime<=te);te=i.unstable_now(),typeof M=="function"?w.callback=M:w===r(y)&&l(y),K(te)}else l(y);w=r(y)}if(w!==null)var he=!0;else{var Q=r(g);Q!==null&&Se(W,Q.startTime-te),he=!1}return he}finally{w=null,O=X,E=!1}}var F=!1,H=null,U=-1,ue=5,Z=-1;function we(){return!(i.unstable_now()-Z<ue)}function ie(){if(H!==null){var B=i.unstable_now();Z=B;var te=!0;try{te=H(!0,B)}finally{te?G():(F=!1,H=null)}}else F=!1}var G;if(typeof J=="function")G=function(){J(ie)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,xe=oe.port2;oe.port1.onmessage=ie,G=function(){xe.postMessage(null)}}else G=function(){I(ie,0)};function Te(B){H=B,F||(F=!0,G())}function Se(B,te){U=I(function(){B(i.unstable_now())},te)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(B){B.callback=null},i.unstable_continueExecution=function(){b||E||(b=!0,Te(q))},i.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<B?Math.floor(1e3/B):5},i.unstable_getCurrentPriorityLevel=function(){return O},i.unstable_getFirstCallbackNode=function(){return r(y)},i.unstable_next=function(B){switch(O){case 1:case 2:case 3:var te=3;break;default:te=O}var X=O;O=te;try{return B()}finally{O=X}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(B,te){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var X=O;O=B;try{return te()}finally{O=X}},i.unstable_scheduleCallback=function(B,te,X){var C=i.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?C+X:C):X=C,B){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=X+M,B={id:x++,callback:te,priorityLevel:B,startTime:X,expirationTime:M,sortIndex:-1},X>C?(B.sortIndex=X,n(g,B),r(y)===null&&B===r(g)&&(S?(R(U),U=-1):S=!0,Se(W,X-C))):(B.sortIndex=M,n(y,B),b||E||(b=!0,Te(q))),B},i.unstable_shouldYield=we,i.unstable_wrapCallback=function(B){var te=O;return function(){var X=O;O=te;try{return B.apply(this,arguments)}finally{O=X}}}})(ou)),ou}var Nd;function Cm(){return Nd||(Nd=1,lu.exports=Nm()),lu.exports}/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Cd;function Em(){if(Cd)return _t;Cd=1;var i=Iu(),n=Cm();function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s]);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."}var l=new Set,a={};function u(e,t){p(e,t),p(e+"Capture",t)}function p(e,t){for(a[e]=t,e=0;e<t.length;e++)l.add(t[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y=Object.prototype.hasOwnProperty,g=/^[: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]*$/,x={},w={};function O(e){return y.call(w,e)?!0:y.call(x,e)?!1:g.test(e)?w[e]=!0:(x[e]=!0,!1)}function E(e,t,s,o){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function b(e,t,s,o){if(t===null||typeof t>"u"||E(e,t,s,o))return!0;if(o)return!1;if(s!==null)switch(s.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function S(e,t,s,o,c,f,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=c,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=f,this.removeEmptyString=m}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){I[e]=new S(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];I[t]=new S(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){I[e]=new S(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){I[e]=new S(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){I[e]=new S(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){I[e]=new S(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){I[e]=new S(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){I[e]=new S(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){I[e]=new S(e,5,!1,e.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function J(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(R,J);I[t]=new S(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(R,J);I[t]=new S(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(R,J);I[t]=new S(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){I[e]=new S(e,1,!1,e.toLowerCase(),null,!1,!1)}),I.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){I[e]=new S(e,1,!1,e.toLowerCase(),null,!0,!0)});function K(e,t,s,o){var c=I.hasOwnProperty(t)?I[t]:null;(c!==null?c.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(b(t,s,c,o)&&(s=null),o||c===null?O(t)&&(s===null?e.removeAttribute(t):e.setAttribute(t,""+s)):c.mustUseProperty?e[c.propertyName]=s===null?c.type===3?!1:"":s:(t=c.attributeName,o=c.attributeNamespace,s===null?e.removeAttribute(t):(c=c.type,s=c===3||c===4&&s===!0?"":""+s,o?e.setAttributeNS(o,t,s):e.setAttribute(t,s))))}var W=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),F=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),ue=Symbol.for("react.profiler"),Z=Symbol.for("react.provider"),we=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),xe=Symbol.for("react.memo"),Te=Symbol.for("react.lazy"),Se=Symbol.for("react.offscreen"),B=Symbol.iterator;function te(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var X=Object.assign,C;function M(e){if(C===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);C=t&&t[1]||""}return`
34
+ `+C+e}var he=!1;function Q(e,t){if(!e||he)return"";he=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(L){var o=L}Reflect.construct(e,[],t)}else{try{t.call()}catch(L){o=L}e.call(t.prototype)}else{try{throw Error()}catch(L){o=L}e()}}catch(L){if(L&&o&&typeof L.stack=="string"){for(var c=L.stack.split(`
35
+ `),f=o.stack.split(`
36
+ `),m=c.length-1,v=f.length-1;1<=m&&0<=v&&c[m]!==f[v];)v--;for(;1<=m&&0<=v;m--,v--)if(c[m]!==f[v]){if(m!==1||v!==1)do if(m--,v--,0>v||c[m]!==f[v]){var k=`
37
+ `+c[m].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=m&&0<=v);break}}}finally{he=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?M(e):""}function ye(e){switch(e.tag){case 5:return M(e.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return e=Q(e.type,!1),e;case 11:return e=Q(e.type.render,!1),e;case 1:return e=Q(e.type,!0),e;default:return""}}function pe(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case F:return"Portal";case ue:return"Profiler";case U:return"StrictMode";case G:return"Suspense";case oe:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case we:return(e.displayName||"Context")+".Consumer";case Z:return(e._context.displayName||"Context")+".Provider";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xe:return t=e.displayName||null,t!==null?t:pe(e.type)||"Memo";case Te:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}function Ee(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(t);case 8:return t===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function je(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _e(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ye(e){var t=_e(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,f=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(m){o=""+m,f.call(this,m)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(m){o=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ln(e){e._valueTracker||(e._valueTracker=Ye(e))}function nr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),o="";return e&&(o=_e(e)?e.checked?"true":"false":e.value),e=o,e!==s?(t.setValue(e),!0):!1}function Y(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}}function Ne(e,t){var s=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function it(e,t){var s=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;s=je(t.value!=null?t.value:s),e._wrapperState={initialChecked:o,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Qe(e,t){t=t.checked,t!=null&&K(e,"checked",t,!1)}function lt(e,t){Qe(e,t);var s=je(t.value),o=t.type;if(s!=null)o==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tn(e,t.type,s):t.hasOwnProperty("defaultValue")&&Tn(e,t.type,je(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function on(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function Tn(e,t,s){(t!=="number"||Y(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var _n=Array.isArray;function hn(e,t,s,o){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&o&&(e[s].defaultSelected=!0)}else{for(s=""+je(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Cs(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return X({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Es(e,t){var s=t.value;if(s==null){if(s=t.children,t=t.defaultValue,s!=null){if(t!=null)throw Error(r(92));if(_n(s)){if(1<s.length)throw Error(r(93));s=s[0]}t=s}t==null&&(t=""),s=t}e._wrapperState={initialValue:je(s)}}function ut(e,t){var s=je(t.value),o=je(t.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),t.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),o!=null&&(e.defaultValue=""+o)}function kt(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function It(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function rr(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?It(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ir,sr=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,s,o,c){MSApp.execUnsafeLocalFunction(function(){return e(t,s,o,c)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ir=Ir||document.createElement("div"),Ir.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ir.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rt(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var In={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Lr=["Webkit","ms","Moz","O"];Object.keys(In).forEach(function(e){Lr.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),In[t]=In[e]})});function ir(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||In.hasOwnProperty(e)&&In[e]?(""+t).trim():t+"px"}function Ar(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var o=s.indexOf("--")===0,c=ir(s,t[s],o);s==="float"&&(s="cssFloat"),o?e.setProperty(s,c):e[s]=c}}var Ri=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Os(e,t){if(t){if(Ri[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!="object")throw Error(r(62))}}function Ln(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Ts=null;function An(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _s=null,mn=null,bn=null;function lr(e){if(e=ei(e)){if(typeof _s!="function")throw Error(r(280));var t=e.stateNode;t&&(t=sl(t),_s(e.stateNode,e.type,t))}}function Is(e){mn?bn?bn.push(e):bn=[e]:mn=e}function Ls(){if(mn){var e=mn,t=bn;if(bn=mn=null,lr(e),t)for(e=0;e<t.length;e++)lr(t[e])}}function br(e,t){return e(t)}function Dt(){}var $t=!1;function Pr(e,t,s){if($t)return e(t,s);$t=!0;try{return br(e,t,s)}finally{$t=!1,(mn!==null||bn!==null)&&(Dt(),Ls())}}function Jt(e,t){var s=e.stateNode;if(s===null)return null;var o=sl(s);if(o===null)return null;s=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(r(231,t,typeof s));return s}var Ae=!1;if(h)try{var St={};Object.defineProperty(St,"passive",{get:function(){Ae=!0}}),window.addEventListener("test",St,St),window.removeEventListener("test",St,St)}catch{Ae=!1}function wo(e,t,s,o,c,f,m,v,k){var L=Array.prototype.slice.call(arguments,3);try{t.apply(s,L)}catch($){this.onError($)}}var or=!1,yn=null,Yt=!1,ar=null,ko={onError:function(e){or=!0,yn=e}};function Mr(e,t,s,o,c,f,m,v,k){or=!1,yn=null,wo.apply(ko,arguments)}function As(e,t,s,o,c,f,m,v,k){if(Mr.apply(this,arguments),or){if(or){var L=yn;or=!1,yn=null}else throw Error(r(198));Yt||(Yt=!0,ar=L)}}function gn(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function Rr(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 Di(e){if(gn(e)!==e)throw Error(r(188))}function So(e){var t=e.alternate;if(!t){if(t=gn(e),t===null)throw Error(r(188));return t!==e?null:e}for(var s=e,o=t;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(o=c.return,o!==null){s=o;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return Di(c),e;if(f===o)return Di(c),t;f=f.sibling}throw Error(r(188))}if(s.return!==o.return)s=c,o=f;else{for(var m=!1,v=c.child;v;){if(v===s){m=!0,s=c,o=f;break}if(v===o){m=!0,o=c,s=f;break}v=v.sibling}if(!m){for(v=f.child;v;){if(v===s){m=!0,s=f,o=c;break}if(v===o){m=!0,o=f,s=c;break}v=v.sibling}if(!m)throw Error(r(189))}}if(s.alternate!==o)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?e:t}function bs(e){return e=So(e),e!==null?$i(e):null}function $i(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=$i(e);if(t!==null)return t;e=e.sibling}return null}var zi=n.unstable_scheduleCallback,Bi=n.unstable_cancelCallback,jo=n.unstable_shouldYield,Ps=n.unstable_requestPaint,Be=n.unstable_now,xo=n.unstable_getCurrentPriorityLevel,Ms=n.unstable_ImmediatePriority,Ui=n.unstable_UserBlockingPriority,Dr=n.unstable_NormalPriority,No=n.unstable_LowPriority,Rs=n.unstable_IdlePriority,$r=null,zt=null;function Co(e){if(zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot($r,e,void 0,(e.current.flags&128)===128)}catch{}}var ct=Math.clz32?Math.clz32:P,Eo=Math.log,N=Math.LN2;function P(e){return e>>>=0,e===0?32:31-(Eo(e)/N|0)|0}var ne=64,ge=4194304;function ve(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function de(e,t){var s=e.pendingLanes;if(s===0)return 0;var o=0,c=e.suspendedLanes,f=e.pingedLanes,m=s&268435455;if(m!==0){var v=m&~c;v!==0?o=ve(v):(f&=m,f!==0&&(o=ve(f)))}else m=s&~c,m!==0?o=ve(m):f!==0&&(o=ve(f));if(o===0)return 0;if(t!==0&&t!==o&&(t&c)===0&&(c=o&-o,f=t&-t,c>=f||c===16&&(f&4194240)!==0))return t;if((o&4)!==0&&(o|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)s=31-ct(t),c=1<<s,o|=e[s],t&=~c;return o}function Ze(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function be(e,t){for(var s=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes;0<f;){var m=31-ct(f),v=1<<m,k=c[m];k===-1?((v&s)===0||(v&o)!==0)&&(c[m]=Ze(v,t)):k<=t&&(e.expiredLanes|=v),f&=~v}}function jt(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ds(){var e=ne;return ne<<=1,(ne&4194240)===0&&(ne=64),e}function et(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function xt(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ct(t),e[t]=s}function Fi(e,t){var s=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<s;){var c=31-ct(s),f=1<<c;t[c]=0,o[c]=-1,e[c]=-1,s&=~f}}function zr(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var o=31-ct(s),c=1<<o;c&t|e[o]&t&&(e[o]|=t),s&=~c}}var Oe=0;function Yu(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Gu,Oo,Xu,Zu,ec,To=!1,Vi=[],Pn=null,Mn=null,Rn=null,$s=new Map,zs=new Map,Dn=[],Fp="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 submit".split(" ");function tc(e,t){switch(e){case"focusin":case"focusout":Pn=null;break;case"dragenter":case"dragleave":Mn=null;break;case"mouseover":case"mouseout":Rn=null;break;case"pointerover":case"pointerout":$s.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zs.delete(t.pointerId)}}function Bs(e,t,s,o,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:s,eventSystemFlags:o,nativeEvent:f,targetContainers:[c]},t!==null&&(t=ei(t),t!==null&&Oo(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Vp(e,t,s,o,c){switch(t){case"focusin":return Pn=Bs(Pn,e,t,s,o,c),!0;case"dragenter":return Mn=Bs(Mn,e,t,s,o,c),!0;case"mouseover":return Rn=Bs(Rn,e,t,s,o,c),!0;case"pointerover":var f=c.pointerId;return $s.set(f,Bs($s.get(f)||null,e,t,s,o,c)),!0;case"gotpointercapture":return f=c.pointerId,zs.set(f,Bs(zs.get(f)||null,e,t,s,o,c)),!0}return!1}function nc(e){var t=ur(e.target);if(t!==null){var s=gn(t);if(s!==null){if(t=s.tag,t===13){if(t=Rr(s),t!==null){e.blockedOn=t,ec(e.priority,function(){Xu(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ki(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=Io(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s);Ts=o,s.target.dispatchEvent(o),Ts=null}else return t=ei(s),t!==null&&Oo(t),e.blockedOn=s,!1;t.shift()}return!0}function rc(e,t,s){Ki(e)&&s.delete(t)}function Kp(){To=!1,Pn!==null&&Ki(Pn)&&(Pn=null),Mn!==null&&Ki(Mn)&&(Mn=null),Rn!==null&&Ki(Rn)&&(Rn=null),$s.forEach(rc),zs.forEach(rc)}function Us(e,t){e.blockedOn===t&&(e.blockedOn=null,To||(To=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Kp)))}function Fs(e){function t(c){return Us(c,e)}if(0<Vi.length){Us(Vi[0],e);for(var s=1;s<Vi.length;s++){var o=Vi[s];o.blockedOn===e&&(o.blockedOn=null)}}for(Pn!==null&&Us(Pn,e),Mn!==null&&Us(Mn,e),Rn!==null&&Us(Rn,e),$s.forEach(t),zs.forEach(t),s=0;s<Dn.length;s++)o=Dn[s],o.blockedOn===e&&(o.blockedOn=null);for(;0<Dn.length&&(s=Dn[0],s.blockedOn===null);)nc(s),s.blockedOn===null&&Dn.shift()}var Br=W.ReactCurrentBatchConfig,qi=!0;function qp(e,t,s,o){var c=Oe,f=Br.transition;Br.transition=null;try{Oe=1,_o(e,t,s,o)}finally{Oe=c,Br.transition=f}}function Hp(e,t,s,o){var c=Oe,f=Br.transition;Br.transition=null;try{Oe=4,_o(e,t,s,o)}finally{Oe=c,Br.transition=f}}function _o(e,t,s,o){if(qi){var c=Io(e,t,s,o);if(c===null)Wo(e,t,o,Hi,s),tc(e,o);else if(Vp(c,e,t,s,o))o.stopPropagation();else if(tc(e,o),t&4&&-1<Fp.indexOf(e)){for(;c!==null;){var f=ei(c);if(f!==null&&Gu(f),f=Io(e,t,s,o),f===null&&Wo(e,t,o,Hi,s),f===c)break;c=f}c!==null&&o.stopPropagation()}else Wo(e,t,o,null,s)}}var Hi=null;function Io(e,t,s,o){if(Hi=null,e=An(o),e=ur(e),e!==null)if(t=gn(e),t===null)e=null;else if(s=t.tag,s===13){if(e=Rr(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Hi=e,null}function sc(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(xo()){case Ms:return 1;case Ui:return 4;case Dr:case No:return 16;case Rs:return 536870912;default:return 16}default:return 16}}var $n=null,Lo=null,Wi=null;function ic(){if(Wi)return Wi;var e,t=Lo,s=t.length,o,c="value"in $n?$n.value:$n.textContent,f=c.length;for(e=0;e<s&&t[e]===c[e];e++);var m=s-e;for(o=1;o<=m&&t[s-o]===c[f-o];o++);return Wi=c.slice(e,1<o?1-o:void 0)}function Qi(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 Ji(){return!0}function lc(){return!1}function Lt(e){function t(s,o,c,f,m){this._reactName=s,this._targetInst=c,this.type=o,this.nativeEvent=f,this.target=m,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(s=e[v],this[v]=s?s(f):f[v]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Ji:lc,this.isPropagationStopped=lc,this}return X(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Ji)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Ji)},persist:function(){},isPersistent:Ji}),t}var Ur={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ao=Lt(Ur),Vs=X({},Ur,{view:0,detail:0}),Wp=Lt(Vs),bo,Po,Ks,Yi=X({},Vs,{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!==Ks&&(Ks&&e.type==="mousemove"?(bo=e.screenX-Ks.screenX,Po=e.screenY-Ks.screenY):Po=bo=0,Ks=e),bo)},movementY:function(e){return"movementY"in e?e.movementY:Po}}),oc=Lt(Yi),Qp=X({},Yi,{dataTransfer:0}),Jp=Lt(Qp),Yp=X({},Vs,{relatedTarget:0}),Mo=Lt(Yp),Gp=X({},Ur,{animationName:0,elapsedTime:0,pseudoElement:0}),Xp=Lt(Gp),Zp=X({},Ur,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),eh=Lt(Zp),th=X({},Ur,{data:0}),ac=Lt(th),nh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rh={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"},sh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ih(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sh[e])?!!t[e]:!1}function Ro(){return ih}var lh=X({},Vs,{key:function(e){if(e.key){var t=nh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rh[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"?Qi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),oh=Lt(lh),ah=X({},Yi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uc=Lt(ah),uh=X({},Vs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ro}),ch=Lt(uh),fh=X({},Ur,{propertyName:0,elapsedTime:0,pseudoElement:0}),dh=Lt(fh),ph=X({},Yi,{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}),hh=Lt(ph),mh=[9,13,27,32],Do=h&&"CompositionEvent"in window,qs=null;h&&"documentMode"in document&&(qs=document.documentMode);var yh=h&&"TextEvent"in window&&!qs,cc=h&&(!Do||qs&&8<qs&&11>=qs),fc=" ",dc=!1;function pc(e,t){switch(e){case"keyup":return mh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fr=!1;function gh(e,t){switch(e){case"compositionend":return hc(t);case"keypress":return t.which!==32?null:(dc=!0,fc);case"textInput":return e=t.data,e===fc&&dc?null:e;default:return null}}function vh(e,t){if(Fr)return e==="compositionend"||!Do&&pc(e,t)?(e=ic(),Wi=Lo=$n=null,Fr=!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 cc&&t.locale!=="ko"?null:t.data;default:return null}}var wh={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 mc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wh[e.type]:t==="textarea"}function yc(e,t,s,o){Is(o),t=tl(t,"onChange"),0<t.length&&(s=new Ao("onChange","change",null,s,o),e.push({event:s,listeners:t}))}var Hs=null,Ws=null;function kh(e){Pc(e,0)}function Gi(e){var t=Wr(e);if(nr(t))return e}function Sh(e,t){if(e==="change")return t}var gc=!1;if(h){var $o;if(h){var zo="oninput"in document;if(!zo){var vc=document.createElement("div");vc.setAttribute("oninput","return;"),zo=typeof vc.oninput=="function"}$o=zo}else $o=!1;gc=$o&&(!document.documentMode||9<document.documentMode)}function wc(){Hs&&(Hs.detachEvent("onpropertychange",kc),Ws=Hs=null)}function kc(e){if(e.propertyName==="value"&&Gi(Ws)){var t=[];yc(t,Ws,e,An(e)),Pr(kh,t)}}function jh(e,t,s){e==="focusin"?(wc(),Hs=t,Ws=s,Hs.attachEvent("onpropertychange",kc)):e==="focusout"&&wc()}function xh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gi(Ws)}function Nh(e,t){if(e==="click")return Gi(t)}function Ch(e,t){if(e==="input"||e==="change")return Gi(t)}function Eh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gt=typeof Object.is=="function"?Object.is:Eh;function Qs(e,t){if(Gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var c=s[o];if(!y.call(t,c)||!Gt(e[c],t[c]))return!1}return!0}function Sc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jc(e,t){var s=Sc(e);e=0;for(var o;s;){if(s.nodeType===3){if(o=e+s.textContent.length,e<=t&&o>=t)return{node:s,offset:t-e};e=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Sc(s)}}function xc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nc(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=Y(e.document)}return t}function Bo(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")}function Oh(e){var t=Nc(),s=e.focusedElem,o=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&xc(s.ownerDocument.documentElement,s)){if(o!==null&&Bo(s)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if(e=(t=s.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=s.textContent.length,f=Math.min(o.start,c);o=o.end===void 0?f:Math.min(o.end,c),!e.extend&&f>o&&(c=o,o=f,f=c),c=jc(s,f);var m=jc(s,o);c&&m&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),f>o?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=s;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<t.length;s++)e=t[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Th=h&&"documentMode"in document&&11>=document.documentMode,Vr=null,Uo=null,Js=null,Fo=!1;function Cc(e,t,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Fo||Vr==null||Vr!==Y(o)||(o=Vr,"selectionStart"in o&&Bo(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Js&&Qs(Js,o)||(Js=o,o=tl(Uo,"onSelect"),0<o.length&&(t=new Ao("onSelect","select",null,t,s),e.push({event:t,listeners:o}),t.target=Vr)))}function Xi(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Kr={animationend:Xi("Animation","AnimationEnd"),animationiteration:Xi("Animation","AnimationIteration"),animationstart:Xi("Animation","AnimationStart"),transitionend:Xi("Transition","TransitionEnd")},Vo={},Ec={};h&&(Ec=document.createElement("div").style,"AnimationEvent"in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),"TransitionEvent"in window||delete Kr.transitionend.transition);function Zi(e){if(Vo[e])return Vo[e];if(!Kr[e])return e;var t=Kr[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in Ec)return Vo[e]=t[s];return e}var Oc=Zi("animationend"),Tc=Zi("animationiteration"),_c=Zi("animationstart"),Ic=Zi("transitionend"),Lc=new Map,Ac="abort auxClick 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(" ");function zn(e,t){Lc.set(e,t),u(t,[e])}for(var Ko=0;Ko<Ac.length;Ko++){var qo=Ac[Ko],_h=qo.toLowerCase(),Ih=qo[0].toUpperCase()+qo.slice(1);zn(_h,"on"+Ih)}zn(Oc,"onAnimationEnd"),zn(Tc,"onAnimationIteration"),zn(_c,"onAnimationStart"),zn("dblclick","onDoubleClick"),zn("focusin","onFocus"),zn("focusout","onBlur"),zn(Ic,"onTransitionEnd"),p("onMouseEnter",["mouseout","mouseover"]),p("onMouseLeave",["mouseout","mouseover"]),p("onPointerEnter",["pointerout","pointerover"]),p("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="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(" "),Lh=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ys));function bc(e,t,s){var o=e.type||"unknown-event";e.currentTarget=s,As(o,t,void 0,e),e.currentTarget=null}function Pc(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var o=e[s],c=o.event;o=o.listeners;e:{var f=void 0;if(t)for(var m=o.length-1;0<=m;m--){var v=o[m],k=v.instance,L=v.currentTarget;if(v=v.listener,k!==f&&c.isPropagationStopped())break e;bc(c,v,L),f=k}else for(m=0;m<o.length;m++){if(v=o[m],k=v.instance,L=v.currentTarget,v=v.listener,k!==f&&c.isPropagationStopped())break e;bc(c,v,L),f=k}}}if(Yt)throw e=ar,Yt=!1,ar=null,e}function Re(e,t){var s=t[Zo];s===void 0&&(s=t[Zo]=new Set);var o=e+"__bubble";s.has(o)||(Mc(t,e,2,!1),s.add(o))}function Ho(e,t,s){var o=0;t&&(o|=4),Mc(s,e,o,t)}var el="_reactListening"+Math.random().toString(36).slice(2);function Gs(e){if(!e[el]){e[el]=!0,l.forEach(function(s){s!=="selectionchange"&&(Lh.has(s)||Ho(s,!1,e),Ho(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[el]||(t[el]=!0,Ho("selectionchange",!1,t))}}function Mc(e,t,s,o){switch(sc(t)){case 1:var c=qp;break;case 4:c=Hp;break;default:c=_o}s=c.bind(null,t,s,e),c=void 0,!Ae||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(t,s,{capture:!0,passive:c}):e.addEventListener(t,s,!0):c!==void 0?e.addEventListener(t,s,{passive:c}):e.addEventListener(t,s,!1)}function Wo(e,t,s,o,c){var f=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var m=o.tag;if(m===3||m===4){var v=o.stateNode.containerInfo;if(v===c||v.nodeType===8&&v.parentNode===c)break;if(m===4)for(m=o.return;m!==null;){var k=m.tag;if((k===3||k===4)&&(k=m.stateNode.containerInfo,k===c||k.nodeType===8&&k.parentNode===c))return;m=m.return}for(;v!==null;){if(m=ur(v),m===null)return;if(k=m.tag,k===5||k===6){o=f=m;continue e}v=v.parentNode}}o=o.return}Pr(function(){var L=f,$=An(s),z=[];e:{var D=Lc.get(e);if(D!==void 0){var ee=Ao,se=e;switch(e){case"keypress":if(Qi(s)===0)break e;case"keydown":case"keyup":ee=oh;break;case"focusin":se="focus",ee=Mo;break;case"focusout":se="blur",ee=Mo;break;case"beforeblur":case"afterblur":ee=Mo;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=oc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=Jp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=ch;break;case Oc:case Tc:case _c:ee=Xp;break;case Ic:ee=dh;break;case"scroll":ee=Wp;break;case"wheel":ee=hh;break;case"copy":case"cut":case"paste":ee=eh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=uc}var le=(t&4)!==0,Ke=!le&&e==="scroll",T=le?D!==null?D+"Capture":null:D;le=[];for(var j=L,_;j!==null;){_=j;var V=_.stateNode;if(_.tag===5&&V!==null&&(_=V,T!==null&&(V=Jt(j,T),V!=null&&le.push(Xs(j,V,_)))),Ke)break;j=j.return}0<le.length&&(D=new ee(D,se,null,s,$),z.push({event:D,listeners:le}))}}if((t&7)===0){e:{if(D=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",D&&s!==Ts&&(se=s.relatedTarget||s.fromElement)&&(ur(se)||se[vn]))break e;if((ee||D)&&(D=$.window===$?$:(D=$.ownerDocument)?D.defaultView||D.parentWindow:window,ee?(se=s.relatedTarget||s.toElement,ee=L,se=se?ur(se):null,se!==null&&(Ke=gn(se),se!==Ke||se.tag!==5&&se.tag!==6)&&(se=null)):(ee=null,se=L),ee!==se)){if(le=oc,V="onMouseLeave",T="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(le=uc,V="onPointerLeave",T="onPointerEnter",j="pointer"),Ke=ee==null?D:Wr(ee),_=se==null?D:Wr(se),D=new le(V,j+"leave",ee,s,$),D.target=Ke,D.relatedTarget=_,V=null,ur($)===L&&(le=new le(T,j+"enter",se,s,$),le.target=_,le.relatedTarget=Ke,V=le),Ke=V,ee&&se)t:{for(le=ee,T=se,j=0,_=le;_;_=qr(_))j++;for(_=0,V=T;V;V=qr(V))_++;for(;0<j-_;)le=qr(le),j--;for(;0<_-j;)T=qr(T),_--;for(;j--;){if(le===T||T!==null&&le===T.alternate)break t;le=qr(le),T=qr(T)}le=null}else le=null;ee!==null&&Rc(z,D,ee,le,!1),se!==null&&Ke!==null&&Rc(z,Ke,se,le,!0)}}e:{if(D=L?Wr(L):window,ee=D.nodeName&&D.nodeName.toLowerCase(),ee==="select"||ee==="input"&&D.type==="file")var ae=Sh;else if(mc(D))if(gc)ae=Ch;else{ae=xh;var ce=jh}else(ee=D.nodeName)&&ee.toLowerCase()==="input"&&(D.type==="checkbox"||D.type==="radio")&&(ae=Nh);if(ae&&(ae=ae(e,L))){yc(z,ae,s,$);break e}ce&&ce(e,D,L),e==="focusout"&&(ce=D._wrapperState)&&ce.controlled&&D.type==="number"&&Tn(D,"number",D.value)}switch(ce=L?Wr(L):window,e){case"focusin":(mc(ce)||ce.contentEditable==="true")&&(Vr=ce,Uo=L,Js=null);break;case"focusout":Js=Uo=Vr=null;break;case"mousedown":Fo=!0;break;case"contextmenu":case"mouseup":case"dragend":Fo=!1,Cc(z,s,$);break;case"selectionchange":if(Th)break;case"keydown":case"keyup":Cc(z,s,$)}var fe;if(Do)e:{switch(e){case"compositionstart":var me="onCompositionStart";break e;case"compositionend":me="onCompositionEnd";break e;case"compositionupdate":me="onCompositionUpdate";break e}me=void 0}else Fr?pc(e,s)&&(me="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(me="onCompositionStart");me&&(cc&&s.locale!=="ko"&&(Fr||me!=="onCompositionStart"?me==="onCompositionEnd"&&Fr&&(fe=ic()):($n=$,Lo="value"in $n?$n.value:$n.textContent,Fr=!0)),ce=tl(L,me),0<ce.length&&(me=new ac(me,e,null,s,$),z.push({event:me,listeners:ce}),fe?me.data=fe:(fe=hc(s),fe!==null&&(me.data=fe)))),(fe=yh?gh(e,s):vh(e,s))&&(L=tl(L,"onBeforeInput"),0<L.length&&($=new ac("onBeforeInput","beforeinput",null,s,$),z.push({event:$,listeners:L}),$.data=fe))}Pc(z,t)})}function Xs(e,t,s){return{instance:e,listener:t,currentTarget:s}}function tl(e,t){for(var s=t+"Capture",o=[];e!==null;){var c=e,f=c.stateNode;c.tag===5&&f!==null&&(c=f,f=Jt(e,s),f!=null&&o.unshift(Xs(e,f,c)),f=Jt(e,t),f!=null&&o.push(Xs(e,f,c))),e=e.return}return o}function qr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Rc(e,t,s,o,c){for(var f=t._reactName,m=[];s!==null&&s!==o;){var v=s,k=v.alternate,L=v.stateNode;if(k!==null&&k===o)break;v.tag===5&&L!==null&&(v=L,c?(k=Jt(s,f),k!=null&&m.unshift(Xs(s,k,v))):c||(k=Jt(s,f),k!=null&&m.push(Xs(s,k,v)))),s=s.return}m.length!==0&&e.push({event:t,listeners:m})}var Ah=/\r\n?/g,bh=/\u0000|\uFFFD/g;function Dc(e){return(typeof e=="string"?e:""+e).replace(Ah,`
38
+ `).replace(bh,"")}function nl(e,t,s){if(t=Dc(t),Dc(e)!==t&&s)throw Error(r(425))}function rl(){}var Qo=null,Jo=null;function Yo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Go=typeof setTimeout=="function"?setTimeout:void 0,Ph=typeof clearTimeout=="function"?clearTimeout:void 0,$c=typeof Promise=="function"?Promise:void 0,Mh=typeof queueMicrotask=="function"?queueMicrotask:typeof $c<"u"?function(e){return $c.resolve(null).then(e).catch(Rh)}:Go;function Rh(e){setTimeout(function(){throw e})}function Xo(e,t){var s=t,o=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(o===0){e.removeChild(c),Fs(t);return}o--}else s!=="$"&&s!=="$?"&&s!=="$!"||o++;s=c}while(s);Fs(t)}function Bn(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==="$?")break;if(t==="/$")return null}}return e}function zc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(t===0)return e;t--}else s==="/$"&&t++}e=e.previousSibling}return null}var Hr=Math.random().toString(36).slice(2),an="__reactFiber$"+Hr,Zs="__reactProps$"+Hr,vn="__reactContainer$"+Hr,Zo="__reactEvents$"+Hr,Dh="__reactListeners$"+Hr,$h="__reactHandles$"+Hr;function ur(e){var t=e[an];if(t)return t;for(var s=e.parentNode;s;){if(t=s[vn]||s[an]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=zc(e);e!==null;){if(s=e[an])return s;e=zc(e)}return t}e=s,s=e.parentNode}return null}function ei(e){return e=e[an]||e[vn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function sl(e){return e[Zs]||null}var ea=[],Qr=-1;function Un(e){return{current:e}}function De(e){0>Qr||(e.current=ea[Qr],ea[Qr]=null,Qr--)}function Pe(e,t){Qr++,ea[Qr]=e.current,e.current=t}var Fn={},ft=Un(Fn),Nt=Un(!1),cr=Fn;function Jr(e,t){var s=e.type.contextTypes;if(!s)return Fn;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in s)c[f]=t[f];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function Ct(e){return e=e.childContextTypes,e!=null}function il(){De(Nt),De(ft)}function Bc(e,t,s){if(ft.current!==Fn)throw Error(r(168));Pe(ft,t),Pe(Nt,s)}function Uc(e,t,s){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return s;o=o.getChildContext();for(var c in o)if(!(c in t))throw Error(r(108,Ee(e)||"Unknown",c));return X({},s,o)}function ll(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fn,cr=ft.current,Pe(ft,e),Pe(Nt,Nt.current),!0}function Fc(e,t,s){var o=e.stateNode;if(!o)throw Error(r(169));s?(e=Uc(e,t,cr),o.__reactInternalMemoizedMergedChildContext=e,De(Nt),De(ft),Pe(ft,e)):De(Nt),Pe(Nt,s)}var wn=null,ol=!1,ta=!1;function Vc(e){wn===null?wn=[e]:wn.push(e)}function zh(e){ol=!0,Vc(e)}function Vn(){if(!ta&&wn!==null){ta=!0;var e=0,t=Oe;try{var s=wn;for(Oe=1;e<s.length;e++){var o=s[e];do o=o(!0);while(o!==null)}wn=null,ol=!1}catch(c){throw wn!==null&&(wn=wn.slice(e+1)),zi(Ms,Vn),c}finally{Oe=t,ta=!1}}return null}var Yr=[],Gr=0,al=null,ul=0,Bt=[],Ut=0,fr=null,kn=1,Sn="";function dr(e,t){Yr[Gr++]=ul,Yr[Gr++]=al,al=e,ul=t}function Kc(e,t,s){Bt[Ut++]=kn,Bt[Ut++]=Sn,Bt[Ut++]=fr,fr=e;var o=kn;e=Sn;var c=32-ct(o)-1;o&=~(1<<c),s+=1;var f=32-ct(t)+c;if(30<f){var m=c-c%5;f=(o&(1<<m)-1).toString(32),o>>=m,c-=m,kn=1<<32-ct(t)+c|s<<c|o,Sn=f+e}else kn=1<<f|s<<c|o,Sn=e}function na(e){e.return!==null&&(dr(e,1),Kc(e,1,0))}function ra(e){for(;e===al;)al=Yr[--Gr],Yr[Gr]=null,ul=Yr[--Gr],Yr[Gr]=null;for(;e===fr;)fr=Bt[--Ut],Bt[Ut]=null,Sn=Bt[--Ut],Bt[Ut]=null,kn=Bt[--Ut],Bt[Ut]=null}var At=null,bt=null,$e=!1,Xt=null;function qc(e,t){var s=qt(5,null,null,0);s.elementType="DELETED",s.stateNode=t,s.return=e,t=e.deletions,t===null?(e.deletions=[s],e.flags|=16):t.push(s)}function Hc(e,t){switch(e.tag){case 5:var s=e.type;return t=t.nodeType!==1||s.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,At=e,bt=Bn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,At=e,bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(s=fr!==null?{id:kn,overflow:Sn}:null,e.memoizedState={dehydrated:t,treeContext:s,retryLane:1073741824},s=qt(18,null,null,0),s.stateNode=t,s.return=e,e.child=s,At=e,bt=null,!0):!1;default:return!1}}function sa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ia(e){if($e){var t=bt;if(t){var s=t;if(!Hc(e,t)){if(sa(e))throw Error(r(418));t=Bn(s.nextSibling);var o=At;t&&Hc(e,t)?qc(o,s):(e.flags=e.flags&-4097|2,$e=!1,At=e)}}else{if(sa(e))throw Error(r(418));e.flags=e.flags&-4097|2,$e=!1,At=e}}}function Wc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;At=e}function cl(e){if(e!==At)return!1;if(!$e)return Wc(e),$e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Yo(e.type,e.memoizedProps)),t&&(t=bt)){if(sa(e))throw Qc(),Error(r(418));for(;t;)qc(e,t),t=Bn(t.nextSibling)}if(Wc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(t===0){bt=Bn(e.nextSibling);break e}t--}else s!=="$"&&s!=="$!"&&s!=="$?"||t++}e=e.nextSibling}bt=null}}else bt=At?Bn(e.stateNode.nextSibling):null;return!0}function Qc(){for(var e=bt;e;)e=Bn(e.nextSibling)}function Xr(){bt=At=null,$e=!1}function la(e){Xt===null?Xt=[e]:Xt.push(e)}var Bh=W.ReactCurrentBatchConfig;function ti(e,t,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(r(309));var o=s.stateNode}if(!o)throw Error(r(147,e));var c=o,f=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===f?t.ref:(t=function(m){var v=c.refs;m===null?delete v[f]:v[f]=m},t._stringRef=f,t)}if(typeof e!="string")throw Error(r(284));if(!s._owner)throw Error(r(290,e))}return e}function fl(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Jc(e){var t=e._init;return t(e._payload)}function Yc(e){function t(T,j){if(e){var _=T.deletions;_===null?(T.deletions=[j],T.flags|=16):_.push(j)}}function s(T,j){if(!e)return null;for(;j!==null;)t(T,j),j=j.sibling;return null}function o(T,j){for(T=new Map;j!==null;)j.key!==null?T.set(j.key,j):T.set(j.index,j),j=j.sibling;return T}function c(T,j){return T=Gn(T,j),T.index=0,T.sibling=null,T}function f(T,j,_){return T.index=_,e?(_=T.alternate,_!==null?(_=_.index,_<j?(T.flags|=2,j):_):(T.flags|=2,j)):(T.flags|=1048576,j)}function m(T){return e&&T.alternate===null&&(T.flags|=2),T}function v(T,j,_,V){return j===null||j.tag!==6?(j=Ga(_,T.mode,V),j.return=T,j):(j=c(j,_),j.return=T,j)}function k(T,j,_,V){var ae=_.type;return ae===H?$(T,j,_.props.children,V,_.key):j!==null&&(j.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Te&&Jc(ae)===j.type)?(V=c(j,_.props),V.ref=ti(T,j,_),V.return=T,V):(V=Ml(_.type,_.key,_.props,null,T.mode,V),V.ref=ti(T,j,_),V.return=T,V)}function L(T,j,_,V){return j===null||j.tag!==4||j.stateNode.containerInfo!==_.containerInfo||j.stateNode.implementation!==_.implementation?(j=Xa(_,T.mode,V),j.return=T,j):(j=c(j,_.children||[]),j.return=T,j)}function $(T,j,_,V,ae){return j===null||j.tag!==7?(j=kr(_,T.mode,V,ae),j.return=T,j):(j=c(j,_),j.return=T,j)}function z(T,j,_){if(typeof j=="string"&&j!==""||typeof j=="number")return j=Ga(""+j,T.mode,_),j.return=T,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case q:return _=Ml(j.type,j.key,j.props,null,T.mode,_),_.ref=ti(T,null,j),_.return=T,_;case F:return j=Xa(j,T.mode,_),j.return=T,j;case Te:var V=j._init;return z(T,V(j._payload),_)}if(_n(j)||te(j))return j=kr(j,T.mode,_,null),j.return=T,j;fl(T,j)}return null}function D(T,j,_,V){var ae=j!==null?j.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return ae!==null?null:v(T,j,""+_,V);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case q:return _.key===ae?k(T,j,_,V):null;case F:return _.key===ae?L(T,j,_,V):null;case Te:return ae=_._init,D(T,j,ae(_._payload),V)}if(_n(_)||te(_))return ae!==null?null:$(T,j,_,V,null);fl(T,_)}return null}function ee(T,j,_,V,ae){if(typeof V=="string"&&V!==""||typeof V=="number")return T=T.get(_)||null,v(j,T,""+V,ae);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case q:return T=T.get(V.key===null?_:V.key)||null,k(j,T,V,ae);case F:return T=T.get(V.key===null?_:V.key)||null,L(j,T,V,ae);case Te:var ce=V._init;return ee(T,j,_,ce(V._payload),ae)}if(_n(V)||te(V))return T=T.get(_)||null,$(j,T,V,ae,null);fl(j,V)}return null}function se(T,j,_,V){for(var ae=null,ce=null,fe=j,me=j=0,rt=null;fe!==null&&me<_.length;me++){fe.index>me?(rt=fe,fe=null):rt=fe.sibling;var Le=D(T,fe,_[me],V);if(Le===null){fe===null&&(fe=rt);break}e&&fe&&Le.alternate===null&&t(T,fe),j=f(Le,j,me),ce===null?ae=Le:ce.sibling=Le,ce=Le,fe=rt}if(me===_.length)return s(T,fe),$e&&dr(T,me),ae;if(fe===null){for(;me<_.length;me++)fe=z(T,_[me],V),fe!==null&&(j=f(fe,j,me),ce===null?ae=fe:ce.sibling=fe,ce=fe);return $e&&dr(T,me),ae}for(fe=o(T,fe);me<_.length;me++)rt=ee(fe,T,me,_[me],V),rt!==null&&(e&&rt.alternate!==null&&fe.delete(rt.key===null?me:rt.key),j=f(rt,j,me),ce===null?ae=rt:ce.sibling=rt,ce=rt);return e&&fe.forEach(function(Xn){return t(T,Xn)}),$e&&dr(T,me),ae}function le(T,j,_,V){var ae=te(_);if(typeof ae!="function")throw Error(r(150));if(_=ae.call(_),_==null)throw Error(r(151));for(var ce=ae=null,fe=j,me=j=0,rt=null,Le=_.next();fe!==null&&!Le.done;me++,Le=_.next()){fe.index>me?(rt=fe,fe=null):rt=fe.sibling;var Xn=D(T,fe,Le.value,V);if(Xn===null){fe===null&&(fe=rt);break}e&&fe&&Xn.alternate===null&&t(T,fe),j=f(Xn,j,me),ce===null?ae=Xn:ce.sibling=Xn,ce=Xn,fe=rt}if(Le.done)return s(T,fe),$e&&dr(T,me),ae;if(fe===null){for(;!Le.done;me++,Le=_.next())Le=z(T,Le.value,V),Le!==null&&(j=f(Le,j,me),ce===null?ae=Le:ce.sibling=Le,ce=Le);return $e&&dr(T,me),ae}for(fe=o(T,fe);!Le.done;me++,Le=_.next())Le=ee(fe,T,me,Le.value,V),Le!==null&&(e&&Le.alternate!==null&&fe.delete(Le.key===null?me:Le.key),j=f(Le,j,me),ce===null?ae=Le:ce.sibling=Le,ce=Le);return e&&fe.forEach(function(wm){return t(T,wm)}),$e&&dr(T,me),ae}function Ke(T,j,_,V){if(typeof _=="object"&&_!==null&&_.type===H&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case q:e:{for(var ae=_.key,ce=j;ce!==null;){if(ce.key===ae){if(ae=_.type,ae===H){if(ce.tag===7){s(T,ce.sibling),j=c(ce,_.props.children),j.return=T,T=j;break e}}else if(ce.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Te&&Jc(ae)===ce.type){s(T,ce.sibling),j=c(ce,_.props),j.ref=ti(T,ce,_),j.return=T,T=j;break e}s(T,ce);break}else t(T,ce);ce=ce.sibling}_.type===H?(j=kr(_.props.children,T.mode,V,_.key),j.return=T,T=j):(V=Ml(_.type,_.key,_.props,null,T.mode,V),V.ref=ti(T,j,_),V.return=T,T=V)}return m(T);case F:e:{for(ce=_.key;j!==null;){if(j.key===ce)if(j.tag===4&&j.stateNode.containerInfo===_.containerInfo&&j.stateNode.implementation===_.implementation){s(T,j.sibling),j=c(j,_.children||[]),j.return=T,T=j;break e}else{s(T,j);break}else t(T,j);j=j.sibling}j=Xa(_,T.mode,V),j.return=T,T=j}return m(T);case Te:return ce=_._init,Ke(T,j,ce(_._payload),V)}if(_n(_))return se(T,j,_,V);if(te(_))return le(T,j,_,V);fl(T,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,j!==null&&j.tag===6?(s(T,j.sibling),j=c(j,_),j.return=T,T=j):(s(T,j),j=Ga(_,T.mode,V),j.return=T,T=j),m(T)):s(T,j)}return Ke}var Zr=Yc(!0),Gc=Yc(!1),dl=Un(null),pl=null,es=null,oa=null;function aa(){oa=es=pl=null}function ua(e){var t=dl.current;De(dl),e._currentValue=t}function ca(e,t,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===s)break;e=e.return}}function ts(e,t){pl=e,oa=es=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Et=!0),e.firstContext=null)}function Ft(e){var t=e._currentValue;if(oa!==e)if(e={context:e,memoizedValue:t,next:null},es===null){if(pl===null)throw Error(r(308));es=e,pl.dependencies={lanes:0,firstContext:e}}else es=es.next=e;return t}var pr=null;function fa(e){pr===null?pr=[e]:pr.push(e)}function Xc(e,t,s,o){var c=t.interleaved;return c===null?(s.next=s,fa(t)):(s.next=c.next,c.next=s),t.interleaved=s,jn(e,o)}function jn(e,t){e.lanes|=t;var s=e.alternate;for(s!==null&&(s.lanes|=t),s=e,e=e.return;e!==null;)e.childLanes|=t,s=e.alternate,s!==null&&(s.childLanes|=t),s=e,e=e.return;return s.tag===3?s.stateNode:null}var Kn=!1;function da(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function xn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qn(e,t,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ie&2)!==0){var c=o.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),o.pending=t,jn(e,s)}return c=o.interleaved,c===null?(t.next=t,fa(o)):(t.next=c.next,c.next=t),o.interleaved=t,jn(e,s)}function hl(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,zr(e,s)}}function ef(e,t){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var m={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};f===null?c=f=m:f=f.next=m,s=s.next}while(s!==null);f===null?c=f=t:f=f.next=t}else c=f=t;s={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:o.shared,effects:o.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function ml(e,t,s,o){var c=e.updateQueue;Kn=!1;var f=c.firstBaseUpdate,m=c.lastBaseUpdate,v=c.shared.pending;if(v!==null){c.shared.pending=null;var k=v,L=k.next;k.next=null,m===null?f=L:m.next=L,m=k;var $=e.alternate;$!==null&&($=$.updateQueue,v=$.lastBaseUpdate,v!==m&&(v===null?$.firstBaseUpdate=L:v.next=L,$.lastBaseUpdate=k))}if(f!==null){var z=c.baseState;m=0,$=L=k=null,v=f;do{var D=v.lane,ee=v.eventTime;if((o&D)===D){$!==null&&($=$.next={eventTime:ee,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var se=e,le=v;switch(D=t,ee=s,le.tag){case 1:if(se=le.payload,typeof se=="function"){z=se.call(ee,z,D);break e}z=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=le.payload,D=typeof se=="function"?se.call(ee,z,D):se,D==null)break e;z=X({},z,D);break e;case 2:Kn=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,D=c.effects,D===null?c.effects=[v]:D.push(v))}else ee={eventTime:ee,lane:D,tag:v.tag,payload:v.payload,callback:v.callback,next:null},$===null?(L=$=ee,k=z):$=$.next=ee,m|=D;if(v=v.next,v===null){if(v=c.shared.pending,v===null)break;D=v,v=D.next,D.next=null,c.lastBaseUpdate=D,c.shared.pending=null}}while(!0);if($===null&&(k=z),c.baseState=k,c.firstBaseUpdate=L,c.lastBaseUpdate=$,t=c.shared.interleaved,t!==null){c=t;do m|=c.lane,c=c.next;while(c!==t)}else f===null&&(c.shared.lanes=0);yr|=m,e.lanes=m,e.memoizedState=z}}function tf(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],c=o.callback;if(c!==null){if(o.callback=null,o=s,typeof c!="function")throw Error(r(191,c));c.call(o)}}}var ni={},un=Un(ni),ri=Un(ni),si=Un(ni);function hr(e){if(e===ni)throw Error(r(174));return e}function pa(e,t){switch(Pe(si,t),Pe(ri,e),Pe(un,ni),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:rr(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=rr(t,e)}De(un),Pe(un,t)}function ns(){De(un),De(ri),De(si)}function nf(e){hr(si.current);var t=hr(un.current),s=rr(t,e.type);t!==s&&(Pe(ri,e),Pe(un,s))}function ha(e){ri.current===e&&(De(un),De(ri))}var Ue=Un(0);function yl(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 ma=[];function ya(){for(var e=0;e<ma.length;e++)ma[e]._workInProgressVersionPrimary=null;ma.length=0}var gl=W.ReactCurrentDispatcher,ga=W.ReactCurrentBatchConfig,mr=0,Fe=null,Ge=null,tt=null,vl=!1,ii=!1,li=0,Uh=0;function dt(){throw Error(r(321))}function va(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!Gt(e[s],t[s]))return!1;return!0}function wa(e,t,s,o,c,f){if(mr=f,Fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,gl.current=e===null||e.memoizedState===null?qh:Hh,e=s(o,c),ii){f=0;do{if(ii=!1,li=0,25<=f)throw Error(r(301));f+=1,tt=Ge=null,t.updateQueue=null,gl.current=Wh,e=s(o,c)}while(ii)}if(gl.current=Sl,t=Ge!==null&&Ge.next!==null,mr=0,tt=Ge=Fe=null,vl=!1,t)throw Error(r(300));return e}function ka(){var e=li!==0;return li=0,e}function cn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?Fe.memoizedState=tt=e:tt=tt.next=e,tt}function Vt(){if(Ge===null){var e=Fe.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=tt===null?Fe.memoizedState:tt.next;if(t!==null)tt=t,Ge=e;else{if(e===null)throw Error(r(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},tt===null?Fe.memoizedState=tt=e:tt=tt.next=e}return tt}function oi(e,t){return typeof t=="function"?t(e):t}function Sa(e){var t=Vt(),s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=e;var o=Ge,c=o.baseQueue,f=s.pending;if(f!==null){if(c!==null){var m=c.next;c.next=f.next,f.next=m}o.baseQueue=c=f,s.pending=null}if(c!==null){f=c.next,o=o.baseState;var v=m=null,k=null,L=f;do{var $=L.lane;if((mr&$)===$)k!==null&&(k=k.next={lane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),o=L.hasEagerState?L.eagerState:e(o,L.action);else{var z={lane:$,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null};k===null?(v=k=z,m=o):k=k.next=z,Fe.lanes|=$,yr|=$}L=L.next}while(L!==null&&L!==f);k===null?m=o:k.next=v,Gt(o,t.memoizedState)||(Et=!0),t.memoizedState=o,t.baseState=m,t.baseQueue=k,s.lastRenderedState=o}if(e=s.interleaved,e!==null){c=e;do f=c.lane,Fe.lanes|=f,yr|=f,c=c.next;while(c!==e)}else c===null&&(s.lanes=0);return[t.memoizedState,s.dispatch]}function ja(e){var t=Vt(),s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=e;var o=s.dispatch,c=s.pending,f=t.memoizedState;if(c!==null){s.pending=null;var m=c=c.next;do f=e(f,m.action),m=m.next;while(m!==c);Gt(f,t.memoizedState)||(Et=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,o]}function rf(){}function sf(e,t){var s=Fe,o=Vt(),c=t(),f=!Gt(o.memoizedState,c);if(f&&(o.memoizedState=c,Et=!0),o=o.queue,xa(af.bind(null,s,o,e),[e]),o.getSnapshot!==t||f||tt!==null&&tt.memoizedState.tag&1){if(s.flags|=2048,ai(9,of.bind(null,s,o,c,t),void 0,null),nt===null)throw Error(r(349));(mr&30)!==0||lf(s,t,c)}return c}function lf(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Fe.updateQueue,t===null?(t={lastEffect:null,stores:null},Fe.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function of(e,t,s,o){t.value=s,t.getSnapshot=o,uf(t)&&cf(e)}function af(e,t,s){return s(function(){uf(t)&&cf(e)})}function uf(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!Gt(e,s)}catch{return!0}}function cf(e){var t=jn(e,1);t!==null&&nn(t,e,1,-1)}function ff(e){var t=cn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:e},t.queue=e,e=e.dispatch=Kh.bind(null,Fe,e),[t.memoizedState,e]}function ai(e,t,s,o){return e={tag:e,create:t,destroy:s,deps:o,next:null},t=Fe.updateQueue,t===null?(t={lastEffect:null,stores:null},Fe.updateQueue=t,t.lastEffect=e.next=e):(s=t.lastEffect,s===null?t.lastEffect=e.next=e:(o=s.next,s.next=e,e.next=o,t.lastEffect=e)),e}function df(){return Vt().memoizedState}function wl(e,t,s,o){var c=cn();Fe.flags|=e,c.memoizedState=ai(1|t,s,void 0,o===void 0?null:o)}function kl(e,t,s,o){var c=Vt();o=o===void 0?null:o;var f=void 0;if(Ge!==null){var m=Ge.memoizedState;if(f=m.destroy,o!==null&&va(o,m.deps)){c.memoizedState=ai(t,s,f,o);return}}Fe.flags|=e,c.memoizedState=ai(1|t,s,f,o)}function pf(e,t){return wl(8390656,8,e,t)}function xa(e,t){return kl(2048,8,e,t)}function hf(e,t){return kl(4,2,e,t)}function mf(e,t){return kl(4,4,e,t)}function yf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gf(e,t,s){return s=s!=null?s.concat([e]):null,kl(4,4,yf.bind(null,t,e),s)}function Na(){}function vf(e,t){var s=Vt();t=t===void 0?null:t;var o=s.memoizedState;return o!==null&&t!==null&&va(t,o[1])?o[0]:(s.memoizedState=[e,t],e)}function wf(e,t){var s=Vt();t=t===void 0?null:t;var o=s.memoizedState;return o!==null&&t!==null&&va(t,o[1])?o[0]:(e=e(),s.memoizedState=[e,t],e)}function kf(e,t,s){return(mr&21)===0?(e.baseState&&(e.baseState=!1,Et=!0),e.memoizedState=s):(Gt(s,t)||(s=Ds(),Fe.lanes|=s,yr|=s,e.baseState=!0),t)}function Fh(e,t){var s=Oe;Oe=s!==0&&4>s?s:4,e(!0);var o=ga.transition;ga.transition={};try{e(!1),t()}finally{Oe=s,ga.transition=o}}function Sf(){return Vt().memoizedState}function Vh(e,t,s){var o=Jn(e);if(s={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null},jf(e))xf(t,s);else if(s=Xc(e,t,s,o),s!==null){var c=gt();nn(s,e,o,c),Nf(s,t,o)}}function Kh(e,t,s){var o=Jn(e),c={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null};if(jf(e))xf(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var m=t.lastRenderedState,v=f(m,s);if(c.hasEagerState=!0,c.eagerState=v,Gt(v,m)){var k=t.interleaved;k===null?(c.next=c,fa(t)):(c.next=k.next,k.next=c),t.interleaved=c;return}}catch{}finally{}s=Xc(e,t,c,o),s!==null&&(c=gt(),nn(s,e,o,c),Nf(s,t,o))}}function jf(e){var t=e.alternate;return e===Fe||t!==null&&t===Fe}function xf(e,t){ii=vl=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Nf(e,t,s){if((s&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,zr(e,s)}}var Sl={readContext:Ft,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useInsertionEffect:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useSyncExternalStore:dt,useId:dt,unstable_isNewReconciler:!1},qh={readContext:Ft,useCallback:function(e,t){return cn().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:pf,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,wl(4194308,4,yf.bind(null,t,e),s)},useLayoutEffect:function(e,t){return wl(4194308,4,e,t)},useInsertionEffect:function(e,t){return wl(4,2,e,t)},useMemo:function(e,t){var s=cn();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var o=cn();return t=s!==void 0?s(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=Vh.bind(null,Fe,e),[o.memoizedState,e]},useRef:function(e){var t=cn();return e={current:e},t.memoizedState=e},useState:ff,useDebugValue:Na,useDeferredValue:function(e){return cn().memoizedState=e},useTransition:function(){var e=ff(!1),t=e[0];return e=Fh.bind(null,e[1]),cn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var o=Fe,c=cn();if($e){if(s===void 0)throw Error(r(407));s=s()}else{if(s=t(),nt===null)throw Error(r(349));(mr&30)!==0||lf(o,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,pf(af.bind(null,o,f,e),[e]),o.flags|=2048,ai(9,of.bind(null,o,f,s,t),void 0,null),s},useId:function(){var e=cn(),t=nt.identifierPrefix;if($e){var s=Sn,o=kn;s=(o&~(1<<32-ct(o)-1)).toString(32)+s,t=":"+t+"R"+s,s=li++,0<s&&(t+="H"+s.toString(32)),t+=":"}else s=Uh++,t=":"+t+"r"+s.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Hh={readContext:Ft,useCallback:vf,useContext:Ft,useEffect:xa,useImperativeHandle:gf,useInsertionEffect:hf,useLayoutEffect:mf,useMemo:wf,useReducer:Sa,useRef:df,useState:function(){return Sa(oi)},useDebugValue:Na,useDeferredValue:function(e){var t=Vt();return kf(t,Ge.memoizedState,e)},useTransition:function(){var e=Sa(oi)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:rf,useSyncExternalStore:sf,useId:Sf,unstable_isNewReconciler:!1},Wh={readContext:Ft,useCallback:vf,useContext:Ft,useEffect:xa,useImperativeHandle:gf,useInsertionEffect:hf,useLayoutEffect:mf,useMemo:wf,useReducer:ja,useRef:df,useState:function(){return ja(oi)},useDebugValue:Na,useDeferredValue:function(e){var t=Vt();return Ge===null?t.memoizedState=e:kf(t,Ge.memoizedState,e)},useTransition:function(){var e=ja(oi)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:rf,useSyncExternalStore:sf,useId:Sf,unstable_isNewReconciler:!1};function Zt(e,t){if(e&&e.defaultProps){t=X({},t),e=e.defaultProps;for(var s in e)t[s]===void 0&&(t[s]=e[s]);return t}return t}function Ca(e,t,s,o){t=e.memoizedState,s=s(o,t),s=s==null?t:X({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var jl={isMounted:function(e){return(e=e._reactInternals)?gn(e)===e:!1},enqueueSetState:function(e,t,s){e=e._reactInternals;var o=gt(),c=Jn(e),f=xn(o,c);f.payload=t,s!=null&&(f.callback=s),t=qn(e,f,c),t!==null&&(nn(t,e,c,o),hl(t,e,c))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var o=gt(),c=Jn(e),f=xn(o,c);f.tag=1,f.payload=t,s!=null&&(f.callback=s),t=qn(e,f,c),t!==null&&(nn(t,e,c,o),hl(t,e,c))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=gt(),o=Jn(e),c=xn(s,o);c.tag=2,t!=null&&(c.callback=t),t=qn(e,c,o),t!==null&&(nn(t,e,o,s),hl(t,e,o))}};function Cf(e,t,s,o,c,f,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,m):t.prototype&&t.prototype.isPureReactComponent?!Qs(s,o)||!Qs(c,f):!0}function Ef(e,t,s){var o=!1,c=Fn,f=t.contextType;return typeof f=="object"&&f!==null?f=Ft(f):(c=Ct(t)?cr:ft.current,o=t.contextTypes,f=(o=o!=null)?Jr(e,c):Fn),t=new t(s,f),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=jl,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=f),t}function Of(e,t,s,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,o),t.state!==e&&jl.enqueueReplaceState(t,t.state,null)}function Ea(e,t,s,o){var c=e.stateNode;c.props=s,c.state=e.memoizedState,c.refs={},da(e);var f=t.contextType;typeof f=="object"&&f!==null?c.context=Ft(f):(f=Ct(t)?cr:ft.current,c.context=Jr(e,f)),c.state=e.memoizedState,f=t.getDerivedStateFromProps,typeof f=="function"&&(Ca(e,t,f,s),c.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(t=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),t!==c.state&&jl.enqueueReplaceState(c,c.state,null),ml(e,s,c,o),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function rs(e,t){try{var s="",o=t;do s+=ye(o),o=o.return;while(o);var c=s}catch(f){c=`
39
+ Error generating stack: `+f.message+`
40
+ `+f.stack}return{value:e,source:t,stack:c,digest:null}}function Oa(e,t,s){return{value:e,source:null,stack:s??null,digest:t??null}}function Ta(e,t){try{console.error(t.value)}catch(s){setTimeout(function(){throw s})}}var Qh=typeof WeakMap=="function"?WeakMap:Map;function Tf(e,t,s){s=xn(-1,s),s.tag=3,s.payload={element:null};var o=t.value;return s.callback=function(){_l||(_l=!0,Va=o),Ta(e,t)},s}function _f(e,t,s){s=xn(-1,s),s.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var c=t.value;s.payload=function(){return o(c)},s.callback=function(){Ta(e,t)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(s.callback=function(){Ta(e,t),typeof o!="function"&&(Wn===null?Wn=new Set([this]):Wn.add(this));var m=t.stack;this.componentDidCatch(t.value,{componentStack:m!==null?m:""})}),s}function If(e,t,s){var o=e.pingCache;if(o===null){o=e.pingCache=new Qh;var c=new Set;o.set(t,c)}else c=o.get(t),c===void 0&&(c=new Set,o.set(t,c));c.has(s)||(c.add(s),e=am.bind(null,e,t,s),t.then(e,e))}function Lf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Af(e,t,s,o,c){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(t=xn(-1,1),t.tag=2,qn(s,t,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var Jh=W.ReactCurrentOwner,Et=!1;function yt(e,t,s,o){t.child=e===null?Gc(t,null,s,o):Zr(t,e.child,s,o)}function bf(e,t,s,o,c){s=s.render;var f=t.ref;return ts(t,c),o=wa(e,t,s,o,f,c),s=ka(),e!==null&&!Et?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Nn(e,t,c)):($e&&s&&na(t),t.flags|=1,yt(e,t,o,c),t.child)}function Pf(e,t,s,o,c){if(e===null){var f=s.type;return typeof f=="function"&&!Ya(f)&&f.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(t.tag=15,t.type=f,Mf(e,t,f,o,c)):(e=Ml(s.type,null,o,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,(e.lanes&c)===0){var m=f.memoizedProps;if(s=s.compare,s=s!==null?s:Qs,s(m,o)&&e.ref===t.ref)return Nn(e,t,c)}return t.flags|=1,e=Gn(f,o),e.ref=t.ref,e.return=t,t.child=e}function Mf(e,t,s,o,c){if(e!==null){var f=e.memoizedProps;if(Qs(f,o)&&e.ref===t.ref)if(Et=!1,t.pendingProps=o=f,(e.lanes&c)!==0)(e.flags&131072)!==0&&(Et=!0);else return t.lanes=e.lanes,Nn(e,t,c)}return _a(e,t,s,o,c)}function Rf(e,t,s){var o=t.pendingProps,c=o.children,f=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Pe(is,Pt),Pt|=s;else{if((s&1073741824)===0)return e=f!==null?f.baseLanes|s:s,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Pe(is,Pt),Pt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=f!==null?f.baseLanes:s,Pe(is,Pt),Pt|=o}else f!==null?(o=f.baseLanes|s,t.memoizedState=null):o=s,Pe(is,Pt),Pt|=o;return yt(e,t,c,s),t.child}function Df(e,t){var s=t.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(t.flags|=512,t.flags|=2097152)}function _a(e,t,s,o,c){var f=Ct(s)?cr:ft.current;return f=Jr(t,f),ts(t,c),s=wa(e,t,s,o,f,c),o=ka(),e!==null&&!Et?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Nn(e,t,c)):($e&&o&&na(t),t.flags|=1,yt(e,t,s,c),t.child)}function $f(e,t,s,o,c){if(Ct(s)){var f=!0;ll(t)}else f=!1;if(ts(t,c),t.stateNode===null)Nl(e,t),Ef(t,s,o),Ea(t,s,o,c),o=!0;else if(e===null){var m=t.stateNode,v=t.memoizedProps;m.props=v;var k=m.context,L=s.contextType;typeof L=="object"&&L!==null?L=Ft(L):(L=Ct(s)?cr:ft.current,L=Jr(t,L));var $=s.getDerivedStateFromProps,z=typeof $=="function"||typeof m.getSnapshotBeforeUpdate=="function";z||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(v!==o||k!==L)&&Of(t,m,o,L),Kn=!1;var D=t.memoizedState;m.state=D,ml(t,o,m,c),k=t.memoizedState,v!==o||D!==k||Nt.current||Kn?(typeof $=="function"&&(Ca(t,s,$,o),k=t.memoizedState),(v=Kn||Cf(t,s,v,o,D,k,L))?(z||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=k),m.props=o,m.state=k,m.context=L,o=v):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{m=t.stateNode,Zc(e,t),v=t.memoizedProps,L=t.type===t.elementType?v:Zt(t.type,v),m.props=L,z=t.pendingProps,D=m.context,k=s.contextType,typeof k=="object"&&k!==null?k=Ft(k):(k=Ct(s)?cr:ft.current,k=Jr(t,k));var ee=s.getDerivedStateFromProps;($=typeof ee=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(v!==z||D!==k)&&Of(t,m,o,k),Kn=!1,D=t.memoizedState,m.state=D,ml(t,o,m,c);var se=t.memoizedState;v!==z||D!==se||Nt.current||Kn?(typeof ee=="function"&&(Ca(t,s,ee,o),se=t.memoizedState),(L=Kn||Cf(t,s,L,o,D,se,k)||!1)?($||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(o,se,k),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(o,se,k)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||v===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=se),m.props=o,m.state=se,m.context=k,o=L):(typeof m.componentDidUpdate!="function"||v===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),o=!1)}return Ia(e,t,s,o,f,c)}function Ia(e,t,s,o,c,f){Df(e,t);var m=(t.flags&128)!==0;if(!o&&!m)return c&&Fc(t,s,!1),Nn(e,t,f);o=t.stateNode,Jh.current=t;var v=m&&typeof s.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&m?(t.child=Zr(t,e.child,null,f),t.child=Zr(t,null,v,f)):yt(e,t,v,f),t.memoizedState=o.state,c&&Fc(t,s,!0),t.child}function zf(e){var t=e.stateNode;t.pendingContext?Bc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Bc(e,t.context,!1),pa(e,t.containerInfo)}function Bf(e,t,s,o,c){return Xr(),la(c),t.flags|=256,yt(e,t,s,o),t.child}var La={dehydrated:null,treeContext:null,retryLane:0};function Aa(e){return{baseLanes:e,cachePool:null,transitions:null}}function Uf(e,t,s){var o=t.pendingProps,c=Ue.current,f=!1,m=(t.flags&128)!==0,v;if((v=m)||(v=e!==null&&e.memoizedState===null?!1:(c&2)!==0),v?(f=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),Pe(Ue,c&1),e===null)return ia(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(m=o.children,e=o.fallback,f?(o=t.mode,f=t.child,m={mode:"hidden",children:m},(o&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=m):f=Rl(m,o,0,null),e=kr(e,o,s,null),f.return=t,e.return=t,f.sibling=e,t.child=f,t.child.memoizedState=Aa(s),t.memoizedState=La,e):ba(t,m));if(c=e.memoizedState,c!==null&&(v=c.dehydrated,v!==null))return Yh(e,t,m,o,v,c,s);if(f){f=o.fallback,m=t.mode,c=e.child,v=c.sibling;var k={mode:"hidden",children:o.children};return(m&1)===0&&t.child!==c?(o=t.child,o.childLanes=0,o.pendingProps=k,t.deletions=null):(o=Gn(c,k),o.subtreeFlags=c.subtreeFlags&14680064),v!==null?f=Gn(v,f):(f=kr(f,m,s,null),f.flags|=2),f.return=t,o.return=t,o.sibling=f,t.child=o,o=f,f=t.child,m=e.child.memoizedState,m=m===null?Aa(s):{baseLanes:m.baseLanes|s,cachePool:null,transitions:m.transitions},f.memoizedState=m,f.childLanes=e.childLanes&~s,t.memoizedState=La,o}return f=e.child,e=f.sibling,o=Gn(f,{mode:"visible",children:o.children}),(t.mode&1)===0&&(o.lanes=s),o.return=t,o.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=o,t.memoizedState=null,o}function ba(e,t){return t=Rl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function xl(e,t,s,o){return o!==null&&la(o),Zr(t,e.child,null,s),e=ba(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yh(e,t,s,o,c,f,m){if(s)return t.flags&256?(t.flags&=-257,o=Oa(Error(r(422))),xl(e,t,m,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(f=o.fallback,c=t.mode,o=Rl({mode:"visible",children:o.children},c,0,null),f=kr(f,c,m,null),f.flags|=2,o.return=t,f.return=t,o.sibling=f,t.child=o,(t.mode&1)!==0&&Zr(t,e.child,null,m),t.child.memoizedState=Aa(m),t.memoizedState=La,f);if((t.mode&1)===0)return xl(e,t,m,null);if(c.data==="$!"){if(o=c.nextSibling&&c.nextSibling.dataset,o)var v=o.dgst;return o=v,f=Error(r(419)),o=Oa(f,o,void 0),xl(e,t,m,o)}if(v=(m&e.childLanes)!==0,Et||v){if(o=nt,o!==null){switch(m&-m){case 4:c=2;break;case 16:c=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(o.suspendedLanes|m))!==0?0:c,c!==0&&c!==f.retryLane&&(f.retryLane=c,jn(e,c),nn(o,e,c,-1))}return Ja(),o=Oa(Error(r(421))),xl(e,t,m,o)}return c.data==="$?"?(t.flags|=128,t.child=e.child,t=um.bind(null,e),c._reactRetry=t,null):(e=f.treeContext,bt=Bn(c.nextSibling),At=t,$e=!0,Xt=null,e!==null&&(Bt[Ut++]=kn,Bt[Ut++]=Sn,Bt[Ut++]=fr,kn=e.id,Sn=e.overflow,fr=t),t=ba(t,o.children),t.flags|=4096,t)}function Ff(e,t,s){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),ca(e.return,t,s)}function Pa(e,t,s,o,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=o,f.tail=s,f.tailMode=c)}function Vf(e,t,s){var o=t.pendingProps,c=o.revealOrder,f=o.tail;if(yt(e,t,o.children,s),o=Ue.current,(o&2)!==0)o=o&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ff(e,s,t);else if(e.tag===19)Ff(e,s,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}o&=1}if(Pe(Ue,o),(t.mode&1)===0)t.memoizedState=null;else switch(c){case"forwards":for(s=t.child,c=null;s!==null;)e=s.alternate,e!==null&&yl(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),Pa(t,!1,c,s,f);break;case"backwards":for(s=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&yl(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}Pa(t,!0,s,null,f);break;case"together":Pa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Nl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Nn(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),yr|=t.lanes,(s&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,s=Gn(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=Gn(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Gh(e,t,s){switch(t.tag){case 3:zf(t),Xr();break;case 5:nf(t);break;case 1:Ct(t.type)&&ll(t);break;case 4:pa(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,c=t.memoizedProps.value;Pe(dl,o._currentValue),o._currentValue=c;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Pe(Ue,Ue.current&1),t.flags|=128,null):(s&t.child.childLanes)!==0?Uf(e,t,s):(Pe(Ue,Ue.current&1),e=Nn(e,t,s),e!==null?e.sibling:null);Pe(Ue,Ue.current&1);break;case 19:if(o=(s&t.childLanes)!==0,(e.flags&128)!==0){if(o)return Vf(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Pe(Ue,Ue.current),o)break;return null;case 22:case 23:return t.lanes=0,Rf(e,t,s)}return Nn(e,t,s)}var Kf,Ma,qf,Hf;Kf=function(e,t){for(var s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Ma=function(){},qf=function(e,t,s,o){var c=e.memoizedProps;if(c!==o){e=t.stateNode,hr(un.current);var f=null;switch(s){case"input":c=Ne(e,c),o=Ne(e,o),f=[];break;case"select":c=X({},c,{value:void 0}),o=X({},o,{value:void 0}),f=[];break;case"textarea":c=Cs(e,c),o=Cs(e,o),f=[];break;default:typeof c.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=rl)}Os(s,o);var m;s=null;for(L in c)if(!o.hasOwnProperty(L)&&c.hasOwnProperty(L)&&c[L]!=null)if(L==="style"){var v=c[L];for(m in v)v.hasOwnProperty(m)&&(s||(s={}),s[m]="")}else L!=="dangerouslySetInnerHTML"&&L!=="children"&&L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&L!=="autoFocus"&&(a.hasOwnProperty(L)?f||(f=[]):(f=f||[]).push(L,null));for(L in o){var k=o[L];if(v=c!=null?c[L]:void 0,o.hasOwnProperty(L)&&k!==v&&(k!=null||v!=null))if(L==="style")if(v){for(m in v)!v.hasOwnProperty(m)||k&&k.hasOwnProperty(m)||(s||(s={}),s[m]="");for(m in k)k.hasOwnProperty(m)&&v[m]!==k[m]&&(s||(s={}),s[m]=k[m])}else s||(f||(f=[]),f.push(L,s)),s=k;else L==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,v=v?v.__html:void 0,k!=null&&v!==k&&(f=f||[]).push(L,k)):L==="children"?typeof k!="string"&&typeof k!="number"||(f=f||[]).push(L,""+k):L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&(a.hasOwnProperty(L)?(k!=null&&L==="onScroll"&&Re("scroll",e),f||v===k||(f=[])):(f=f||[]).push(L,k))}s&&(f=f||[]).push("style",s);var L=f;(t.updateQueue=L)&&(t.flags|=4)}},Hf=function(e,t,s,o){s!==o&&(t.flags|=4)};function ui(e,t){if(!$e)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function pt(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,o=0;if(t)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,o|=c.subtreeFlags&14680064,o|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=s,t}function Xh(e,t,s){var o=t.pendingProps;switch(ra(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(t),null;case 1:return Ct(t.type)&&il(),pt(t),null;case 3:return o=t.stateNode,ns(),De(Nt),De(ft),ya(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(cl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xt!==null&&(Ha(Xt),Xt=null))),Ma(e,t),pt(t),null;case 5:ha(t);var c=hr(si.current);if(s=t.type,e!==null&&t.stateNode!=null)qf(e,t,s,o,c),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(r(166));return pt(t),null}if(e=hr(un.current),cl(t)){o=t.stateNode,s=t.type;var f=t.memoizedProps;switch(o[an]=t,o[Zs]=f,e=(t.mode&1)!==0,s){case"dialog":Re("cancel",o),Re("close",o);break;case"iframe":case"object":case"embed":Re("load",o);break;case"video":case"audio":for(c=0;c<Ys.length;c++)Re(Ys[c],o);break;case"source":Re("error",o);break;case"img":case"image":case"link":Re("error",o),Re("load",o);break;case"details":Re("toggle",o);break;case"input":it(o,f),Re("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!f.multiple},Re("invalid",o);break;case"textarea":Es(o,f),Re("invalid",o)}Os(s,f),c=null;for(var m in f)if(f.hasOwnProperty(m)){var v=f[m];m==="children"?typeof v=="string"?o.textContent!==v&&(f.suppressHydrationWarning!==!0&&nl(o.textContent,v,e),c=["children",v]):typeof v=="number"&&o.textContent!==""+v&&(f.suppressHydrationWarning!==!0&&nl(o.textContent,v,e),c=["children",""+v]):a.hasOwnProperty(m)&&v!=null&&m==="onScroll"&&Re("scroll",o)}switch(s){case"input":ln(o),on(o,f,!0);break;case"textarea":ln(o),kt(o);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(o.onclick=rl)}o=c,t.updateQueue=o,o!==null&&(t.flags|=4)}else{m=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=It(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=m.createElement(s,{is:o.is}):(e=m.createElement(s),s==="select"&&(m=e,o.multiple?m.multiple=!0:o.size&&(m.size=o.size))):e=m.createElementNS(e,s),e[an]=t,e[Zs]=o,Kf(e,t,!1,!1),t.stateNode=e;e:{switch(m=Ln(s,o),s){case"dialog":Re("cancel",e),Re("close",e),c=o;break;case"iframe":case"object":case"embed":Re("load",e),c=o;break;case"video":case"audio":for(c=0;c<Ys.length;c++)Re(Ys[c],e);c=o;break;case"source":Re("error",e),c=o;break;case"img":case"image":case"link":Re("error",e),Re("load",e),c=o;break;case"details":Re("toggle",e),c=o;break;case"input":it(e,o),c=Ne(e,o),Re("invalid",e);break;case"option":c=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},c=X({},o,{value:void 0}),Re("invalid",e);break;case"textarea":Es(e,o),c=Cs(e,o),Re("invalid",e);break;default:c=o}Os(s,c),v=c;for(f in v)if(v.hasOwnProperty(f)){var k=v[f];f==="style"?Ar(e,k):f==="dangerouslySetInnerHTML"?(k=k?k.__html:void 0,k!=null&&sr(e,k)):f==="children"?typeof k=="string"?(s!=="textarea"||k!=="")&&Rt(e,k):typeof k=="number"&&Rt(e,""+k):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(a.hasOwnProperty(f)?k!=null&&f==="onScroll"&&Re("scroll",e):k!=null&&K(e,f,k,m))}switch(s){case"input":ln(e),on(e,o,!1);break;case"textarea":ln(e),kt(e);break;case"option":o.value!=null&&e.setAttribute("value",""+je(o.value));break;case"select":e.multiple=!!o.multiple,f=o.value,f!=null?hn(e,!!o.multiple,f,!1):o.defaultValue!=null&&hn(e,!!o.multiple,o.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=rl)}switch(s){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return pt(t),null;case 6:if(e&&t.stateNode!=null)Hf(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(r(166));if(s=hr(si.current),hr(un.current),cl(t)){if(o=t.stateNode,s=t.memoizedProps,o[an]=t,(f=o.nodeValue!==s)&&(e=At,e!==null))switch(e.tag){case 3:nl(o.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&nl(o.nodeValue,s,(e.mode&1)!==0)}f&&(t.flags|=4)}else o=(s.nodeType===9?s:s.ownerDocument).createTextNode(o),o[an]=t,t.stateNode=o}return pt(t),null;case 13:if(De(Ue),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if($e&&bt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Qc(),Xr(),t.flags|=98560,f=!1;else if(f=cl(t),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[an]=t}else Xr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),f=!1}else Xt!==null&&(Ha(Xt),Xt=null),f=!0;if(!f)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=s,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ue.current&1)!==0?Xe===0&&(Xe=3):Ja())),t.updateQueue!==null&&(t.flags|=4),pt(t),null);case 4:return ns(),Ma(e,t),e===null&&Gs(t.stateNode.containerInfo),pt(t),null;case 10:return ua(t.type._context),pt(t),null;case 17:return Ct(t.type)&&il(),pt(t),null;case 19:if(De(Ue),f=t.memoizedState,f===null)return pt(t),null;if(o=(t.flags&128)!==0,m=f.rendering,m===null)if(o)ui(f,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=yl(e),m!==null){for(t.flags|=128,ui(f,!1),o=m.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=s,s=t.child;s!==null;)f=s,e=o,f.flags&=14680066,m=f.alternate,m===null?(f.childLanes=0,f.lanes=e,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=m.childLanes,f.lanes=m.lanes,f.child=m.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=m.memoizedProps,f.memoizedState=m.memoizedState,f.updateQueue=m.updateQueue,f.type=m.type,e=m.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return Pe(Ue,Ue.current&1|2),t.child}e=e.sibling}f.tail!==null&&Be()>ls&&(t.flags|=128,o=!0,ui(f,!1),t.lanes=4194304)}else{if(!o)if(e=yl(m),e!==null){if(t.flags|=128,o=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),ui(f,!0),f.tail===null&&f.tailMode==="hidden"&&!m.alternate&&!$e)return pt(t),null}else 2*Be()-f.renderingStartTime>ls&&s!==1073741824&&(t.flags|=128,o=!0,ui(f,!1),t.lanes=4194304);f.isBackwards?(m.sibling=t.child,t.child=m):(s=f.last,s!==null?s.sibling=m:t.child=m,f.last=m)}return f.tail!==null?(t=f.tail,f.rendering=t,f.tail=t.sibling,f.renderingStartTime=Be(),t.sibling=null,s=Ue.current,Pe(Ue,o?s&1|2:s&1),t):(pt(t),null);case 22:case 23:return Qa(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(Pt&1073741824)!==0&&(pt(t),t.subtreeFlags&6&&(t.flags|=8192)):pt(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function Zh(e,t){switch(ra(t),t.tag){case 1:return Ct(t.type)&&il(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ns(),De(Nt),De(ft),ya(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ha(t),null;case 13:if(De(Ue),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Xr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return De(Ue),null;case 4:return ns(),null;case 10:return ua(t.type._context),null;case 22:case 23:return Qa(),null;case 24:return null;default:return null}}var Cl=!1,ht=!1,em=typeof WeakSet=="function"?WeakSet:Set,re=null;function ss(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(o){Ve(e,t,o)}else s.current=null}function Ra(e,t,s){try{s()}catch(o){Ve(e,t,o)}}var Wf=!1;function tm(e,t){if(Qo=qi,e=Nc(),Bo(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var c=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var m=0,v=-1,k=-1,L=0,$=0,z=e,D=null;t:for(;;){for(var ee;z!==s||c!==0&&z.nodeType!==3||(v=m+c),z!==f||o!==0&&z.nodeType!==3||(k=m+o),z.nodeType===3&&(m+=z.nodeValue.length),(ee=z.firstChild)!==null;)D=z,z=ee;for(;;){if(z===e)break t;if(D===s&&++L===c&&(v=m),D===f&&++$===o&&(k=m),(ee=z.nextSibling)!==null)break;z=D,D=z.parentNode}z=ee}s=v===-1||k===-1?null:{start:v,end:k}}else s=null}s=s||{start:0,end:0}}else s=null;for(Jo={focusedElem:e,selectionRange:s},qi=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var se=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var le=se.memoizedProps,Ke=se.memoizedState,T=t.stateNode,j=T.getSnapshotBeforeUpdate(t.elementType===t.type?le:Zt(t.type,le),Ke);T.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(V){Ve(t,t.return,V)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return se=Wf,Wf=!1,se}function ci(e,t,s){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var c=o=o.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&Ra(t,s,f)}c=c.next}while(c!==o)}}function El(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&e)===e){var o=s.create;s.destroy=o()}s=s.next}while(s!==t)}}function Da(e){var t=e.ref;if(t!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof t=="function"?t(e):t.current=e}}function Qf(e){var t=e.alternate;t!==null&&(e.alternate=null,Qf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[an],delete t[Zs],delete t[Zo],delete t[Dh],delete t[$h])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Jf(e){return e.tag===5||e.tag===3||e.tag===4}function Yf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jf(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.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 $a(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(e,s)):(t=s,t.appendChild(e)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=rl));else if(o!==4&&(e=e.child,e!==null))for($a(e,t,s),e=e.sibling;e!==null;)$a(e,t,s),e=e.sibling}function za(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(za(e,t,s),e=e.sibling;e!==null;)za(e,t,s),e=e.sibling}var ot=null,en=!1;function Hn(e,t,s){for(s=s.child;s!==null;)Gf(e,t,s),s=s.sibling}function Gf(e,t,s){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount($r,s)}catch{}switch(s.tag){case 5:ht||ss(s,t);case 6:var o=ot,c=en;ot=null,Hn(e,t,s),ot=o,en=c,ot!==null&&(en?(e=ot,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):ot.removeChild(s.stateNode));break;case 18:ot!==null&&(en?(e=ot,s=s.stateNode,e.nodeType===8?Xo(e.parentNode,s):e.nodeType===1&&Xo(e,s),Fs(e)):Xo(ot,s.stateNode));break;case 4:o=ot,c=en,ot=s.stateNode.containerInfo,en=!0,Hn(e,t,s),ot=o,en=c;break;case 0:case 11:case 14:case 15:if(!ht&&(o=s.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){c=o=o.next;do{var f=c,m=f.destroy;f=f.tag,m!==void 0&&((f&2)!==0||(f&4)!==0)&&Ra(s,t,m),c=c.next}while(c!==o)}Hn(e,t,s);break;case 1:if(!ht&&(ss(s,t),o=s.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=s.memoizedProps,o.state=s.memoizedState,o.componentWillUnmount()}catch(v){Ve(s,t,v)}Hn(e,t,s);break;case 21:Hn(e,t,s);break;case 22:s.mode&1?(ht=(o=ht)||s.memoizedState!==null,Hn(e,t,s),ht=o):Hn(e,t,s);break;default:Hn(e,t,s)}}function Xf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new em),t.forEach(function(o){var c=cm.bind(null,e,o);s.has(o)||(s.add(o),o.then(c,c))})}}function tn(e,t){var s=t.deletions;if(s!==null)for(var o=0;o<s.length;o++){var c=s[o];try{var f=e,m=t,v=m;e:for(;v!==null;){switch(v.tag){case 5:ot=v.stateNode,en=!1;break e;case 3:ot=v.stateNode.containerInfo,en=!0;break e;case 4:ot=v.stateNode.containerInfo,en=!0;break e}v=v.return}if(ot===null)throw Error(r(160));Gf(f,m,c),ot=null,en=!1;var k=c.alternate;k!==null&&(k.return=null),c.return=null}catch(L){Ve(c,t,L)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Zf(t,e),t=t.sibling}function Zf(e,t){var s=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(tn(t,e),fn(e),o&4){try{ci(3,e,e.return),El(3,e)}catch(le){Ve(e,e.return,le)}try{ci(5,e,e.return)}catch(le){Ve(e,e.return,le)}}break;case 1:tn(t,e),fn(e),o&512&&s!==null&&ss(s,s.return);break;case 5:if(tn(t,e),fn(e),o&512&&s!==null&&ss(s,s.return),e.flags&32){var c=e.stateNode;try{Rt(c,"")}catch(le){Ve(e,e.return,le)}}if(o&4&&(c=e.stateNode,c!=null)){var f=e.memoizedProps,m=s!==null?s.memoizedProps:f,v=e.type,k=e.updateQueue;if(e.updateQueue=null,k!==null)try{v==="input"&&f.type==="radio"&&f.name!=null&&Qe(c,f),Ln(v,m);var L=Ln(v,f);for(m=0;m<k.length;m+=2){var $=k[m],z=k[m+1];$==="style"?Ar(c,z):$==="dangerouslySetInnerHTML"?sr(c,z):$==="children"?Rt(c,z):K(c,$,z,L)}switch(v){case"input":lt(c,f);break;case"textarea":ut(c,f);break;case"select":var D=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!f.multiple;var ee=f.value;ee!=null?hn(c,!!f.multiple,ee,!1):D!==!!f.multiple&&(f.defaultValue!=null?hn(c,!!f.multiple,f.defaultValue,!0):hn(c,!!f.multiple,f.multiple?[]:"",!1))}c[Zs]=f}catch(le){Ve(e,e.return,le)}}break;case 6:if(tn(t,e),fn(e),o&4){if(e.stateNode===null)throw Error(r(162));c=e.stateNode,f=e.memoizedProps;try{c.nodeValue=f}catch(le){Ve(e,e.return,le)}}break;case 3:if(tn(t,e),fn(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{Fs(t.containerInfo)}catch(le){Ve(e,e.return,le)}break;case 4:tn(t,e),fn(e);break;case 13:tn(t,e),fn(e),c=e.child,c.flags&8192&&(f=c.memoizedState!==null,c.stateNode.isHidden=f,!f||c.alternate!==null&&c.alternate.memoizedState!==null||(Fa=Be())),o&4&&Xf(e);break;case 22:if($=s!==null&&s.memoizedState!==null,e.mode&1?(ht=(L=ht)||$,tn(t,e),ht=L):tn(t,e),fn(e),o&8192){if(L=e.memoizedState!==null,(e.stateNode.isHidden=L)&&!$&&(e.mode&1)!==0)for(re=e,$=e.child;$!==null;){for(z=re=$;re!==null;){switch(D=re,ee=D.child,D.tag){case 0:case 11:case 14:case 15:ci(4,D,D.return);break;case 1:ss(D,D.return);var se=D.stateNode;if(typeof se.componentWillUnmount=="function"){o=D,s=D.return;try{t=o,se.props=t.memoizedProps,se.state=t.memoizedState,se.componentWillUnmount()}catch(le){Ve(o,s,le)}}break;case 5:ss(D,D.return);break;case 22:if(D.memoizedState!==null){nd(z);continue}}ee!==null?(ee.return=D,re=ee):nd(z)}$=$.sibling}e:for($=null,z=e;;){if(z.tag===5){if($===null){$=z;try{c=z.stateNode,L?(f=c.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(v=z.stateNode,k=z.memoizedProps.style,m=k!=null&&k.hasOwnProperty("display")?k.display:null,v.style.display=ir("display",m))}catch(le){Ve(e,e.return,le)}}}else if(z.tag===6){if($===null)try{z.stateNode.nodeValue=L?"":z.memoizedProps}catch(le){Ve(e,e.return,le)}}else if((z.tag!==22&&z.tag!==23||z.memoizedState===null||z===e)&&z.child!==null){z.child.return=z,z=z.child;continue}if(z===e)break e;for(;z.sibling===null;){if(z.return===null||z.return===e)break e;$===z&&($=null),z=z.return}$===z&&($=null),z.sibling.return=z.return,z=z.sibling}}break;case 19:tn(t,e),fn(e),o&4&&Xf(e);break;case 21:break;default:tn(t,e),fn(e)}}function fn(e){var t=e.flags;if(t&2){try{e:{for(var s=e.return;s!==null;){if(Jf(s)){var o=s;break e}s=s.return}throw Error(r(160))}switch(o.tag){case 5:var c=o.stateNode;o.flags&32&&(Rt(c,""),o.flags&=-33);var f=Yf(e);za(e,f,c);break;case 3:case 4:var m=o.stateNode.containerInfo,v=Yf(e);$a(e,v,m);break;default:throw Error(r(161))}}catch(k){Ve(e,e.return,k)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function nm(e,t,s){re=e,ed(e)}function ed(e,t,s){for(var o=(e.mode&1)!==0;re!==null;){var c=re,f=c.child;if(c.tag===22&&o){var m=c.memoizedState!==null||Cl;if(!m){var v=c.alternate,k=v!==null&&v.memoizedState!==null||ht;v=Cl;var L=ht;if(Cl=m,(ht=k)&&!L)for(re=c;re!==null;)m=re,k=m.child,m.tag===22&&m.memoizedState!==null?rd(c):k!==null?(k.return=m,re=k):rd(c);for(;f!==null;)re=f,ed(f),f=f.sibling;re=c,Cl=v,ht=L}td(e)}else(c.subtreeFlags&8772)!==0&&f!==null?(f.return=c,re=f):td(e)}}function td(e){for(;re!==null;){var t=re;if((t.flags&8772)!==0){var s=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:ht||El(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!ht)if(s===null)o.componentDidMount();else{var c=t.elementType===t.type?s.memoizedProps:Zt(t.type,s.memoizedProps);o.componentDidUpdate(c,s.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var f=t.updateQueue;f!==null&&tf(t,f,o);break;case 3:var m=t.updateQueue;if(m!==null){if(s=null,t.child!==null)switch(t.child.tag){case 5:s=t.child.stateNode;break;case 1:s=t.child.stateNode}tf(t,m,s)}break;case 5:var v=t.stateNode;if(s===null&&t.flags&4){s=v;var k=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":k.autoFocus&&s.focus();break;case"img":k.src&&(s.src=k.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var L=t.alternate;if(L!==null){var $=L.memoizedState;if($!==null){var z=$.dehydrated;z!==null&&Fs(z)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}ht||t.flags&512&&Da(t)}catch(D){Ve(t,t.return,D)}}if(t===e){re=null;break}if(s=t.sibling,s!==null){s.return=t.return,re=s;break}re=t.return}}function nd(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var s=t.sibling;if(s!==null){s.return=t.return,re=s;break}re=t.return}}function rd(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var s=t.return;try{El(4,t)}catch(k){Ve(t,s,k)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var c=t.return;try{o.componentDidMount()}catch(k){Ve(t,c,k)}}var f=t.return;try{Da(t)}catch(k){Ve(t,f,k)}break;case 5:var m=t.return;try{Da(t)}catch(k){Ve(t,m,k)}}}catch(k){Ve(t,t.return,k)}if(t===e){re=null;break}var v=t.sibling;if(v!==null){v.return=t.return,re=v;break}re=t.return}}var rm=Math.ceil,Ol=W.ReactCurrentDispatcher,Ba=W.ReactCurrentOwner,Kt=W.ReactCurrentBatchConfig,Ie=0,nt=null,Je=null,at=0,Pt=0,is=Un(0),Xe=0,fi=null,yr=0,Tl=0,Ua=0,di=null,Ot=null,Fa=0,ls=1/0,Cn=null,_l=!1,Va=null,Wn=null,Il=!1,Qn=null,Ll=0,pi=0,Ka=null,Al=-1,bl=0;function gt(){return(Ie&6)!==0?Be():Al!==-1?Al:Al=Be()}function Jn(e){return(e.mode&1)===0?1:(Ie&2)!==0&&at!==0?at&-at:Bh.transition!==null?(bl===0&&(bl=Ds()),bl):(e=Oe,e!==0||(e=window.event,e=e===void 0?16:sc(e.type)),e)}function nn(e,t,s,o){if(50<pi)throw pi=0,Ka=null,Error(r(185));xt(e,s,o),((Ie&2)===0||e!==nt)&&(e===nt&&((Ie&2)===0&&(Tl|=s),Xe===4&&Yn(e,at)),Tt(e,o),s===1&&Ie===0&&(t.mode&1)===0&&(ls=Be()+500,ol&&Vn()))}function Tt(e,t){var s=e.callbackNode;be(e,t);var o=de(e,e===nt?at:0);if(o===0)s!==null&&Bi(s),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(s!=null&&Bi(s),t===1)e.tag===0?zh(id.bind(null,e)):Vc(id.bind(null,e)),Mh(function(){(Ie&6)===0&&Vn()}),s=null;else{switch(Yu(o)){case 1:s=Ms;break;case 4:s=Ui;break;case 16:s=Dr;break;case 536870912:s=Rs;break;default:s=Dr}s=pd(s,sd.bind(null,e))}e.callbackPriority=t,e.callbackNode=s}}function sd(e,t){if(Al=-1,bl=0,(Ie&6)!==0)throw Error(r(327));var s=e.callbackNode;if(os()&&e.callbackNode!==s)return null;var o=de(e,e===nt?at:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||t)t=Pl(e,o);else{t=o;var c=Ie;Ie|=2;var f=od();(nt!==e||at!==t)&&(Cn=null,ls=Be()+500,vr(e,t));do try{lm();break}catch(v){ld(e,v)}while(!0);aa(),Ol.current=f,Ie=c,Je!==null?t=0:(nt=null,at=0,t=Xe)}if(t!==0){if(t===2&&(c=jt(e),c!==0&&(o=c,t=qa(e,c))),t===1)throw s=fi,vr(e,0),Yn(e,o),Tt(e,Be()),s;if(t===6)Yn(e,o);else{if(c=e.current.alternate,(o&30)===0&&!sm(c)&&(t=Pl(e,o),t===2&&(f=jt(e),f!==0&&(o=f,t=qa(e,f))),t===1))throw s=fi,vr(e,0),Yn(e,o),Tt(e,Be()),s;switch(e.finishedWork=c,e.finishedLanes=o,t){case 0:case 1:throw Error(r(345));case 2:wr(e,Ot,Cn);break;case 3:if(Yn(e,o),(o&130023424)===o&&(t=Fa+500-Be(),10<t)){if(de(e,0)!==0)break;if(c=e.suspendedLanes,(c&o)!==o){gt(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=Go(wr.bind(null,e,Ot,Cn),t);break}wr(e,Ot,Cn);break;case 4:if(Yn(e,o),(o&4194240)===o)break;for(t=e.eventTimes,c=-1;0<o;){var m=31-ct(o);f=1<<m,m=t[m],m>c&&(c=m),o&=~f}if(o=c,o=Be()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*rm(o/1960))-o,10<o){e.timeoutHandle=Go(wr.bind(null,e,Ot,Cn),o);break}wr(e,Ot,Cn);break;case 5:wr(e,Ot,Cn);break;default:throw Error(r(329))}}}return Tt(e,Be()),e.callbackNode===s?sd.bind(null,e):null}function qa(e,t){var s=di;return e.current.memoizedState.isDehydrated&&(vr(e,t).flags|=256),e=Pl(e,t),e!==2&&(t=Ot,Ot=s,t!==null&&Ha(t)),e}function Ha(e){Ot===null?Ot=e:Ot.push.apply(Ot,e)}function sm(e){for(var t=e;;){if(t.flags&16384){var s=t.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var o=0;o<s.length;o++){var c=s[o],f=c.getSnapshot;c=c.value;try{if(!Gt(f(),c))return!1}catch{return!1}}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;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 Yn(e,t){for(t&=~Ua,t&=~Tl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var s=31-ct(t),o=1<<s;e[s]=-1,t&=~o}}function id(e){if((Ie&6)!==0)throw Error(r(327));os();var t=de(e,0);if((t&1)===0)return Tt(e,Be()),null;var s=Pl(e,t);if(e.tag!==0&&s===2){var o=jt(e);o!==0&&(t=o,s=qa(e,o))}if(s===1)throw s=fi,vr(e,0),Yn(e,t),Tt(e,Be()),s;if(s===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wr(e,Ot,Cn),Tt(e,Be()),null}function Wa(e,t){var s=Ie;Ie|=1;try{return e(t)}finally{Ie=s,Ie===0&&(ls=Be()+500,ol&&Vn())}}function gr(e){Qn!==null&&Qn.tag===0&&(Ie&6)===0&&os();var t=Ie;Ie|=1;var s=Kt.transition,o=Oe;try{if(Kt.transition=null,Oe=1,e)return e()}finally{Oe=o,Kt.transition=s,Ie=t,(Ie&6)===0&&Vn()}}function Qa(){Pt=is.current,De(is)}function vr(e,t){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,Ph(s)),Je!==null)for(s=Je.return;s!==null;){var o=s;switch(ra(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&il();break;case 3:ns(),De(Nt),De(ft),ya();break;case 5:ha(o);break;case 4:ns();break;case 13:De(Ue);break;case 19:De(Ue);break;case 10:ua(o.type._context);break;case 22:case 23:Qa()}s=s.return}if(nt=e,Je=e=Gn(e.current,null),at=Pt=t,Xe=0,fi=null,Ua=Tl=yr=0,Ot=di=null,pr!==null){for(t=0;t<pr.length;t++)if(s=pr[t],o=s.interleaved,o!==null){s.interleaved=null;var c=o.next,f=s.pending;if(f!==null){var m=f.next;f.next=c,o.next=m}s.pending=o}pr=null}return e}function ld(e,t){do{var s=Je;try{if(aa(),gl.current=Sl,vl){for(var o=Fe.memoizedState;o!==null;){var c=o.queue;c!==null&&(c.pending=null),o=o.next}vl=!1}if(mr=0,tt=Ge=Fe=null,ii=!1,li=0,Ba.current=null,s===null||s.return===null){Xe=1,fi=t,Je=null;break}e:{var f=e,m=s.return,v=s,k=t;if(t=at,v.flags|=32768,k!==null&&typeof k=="object"&&typeof k.then=="function"){var L=k,$=v,z=$.tag;if(($.mode&1)===0&&(z===0||z===11||z===15)){var D=$.alternate;D?($.updateQueue=D.updateQueue,$.memoizedState=D.memoizedState,$.lanes=D.lanes):($.updateQueue=null,$.memoizedState=null)}var ee=Lf(m);if(ee!==null){ee.flags&=-257,Af(ee,m,v,f,t),ee.mode&1&&If(f,L,t),t=ee,k=L;var se=t.updateQueue;if(se===null){var le=new Set;le.add(k),t.updateQueue=le}else se.add(k);break e}else{if((t&1)===0){If(f,L,t),Ja();break e}k=Error(r(426))}}else if($e&&v.mode&1){var Ke=Lf(m);if(Ke!==null){(Ke.flags&65536)===0&&(Ke.flags|=256),Af(Ke,m,v,f,t),la(rs(k,v));break e}}f=k=rs(k,v),Xe!==4&&(Xe=2),di===null?di=[f]:di.push(f),f=m;do{switch(f.tag){case 3:f.flags|=65536,t&=-t,f.lanes|=t;var T=Tf(f,k,t);ef(f,T);break e;case 1:v=k;var j=f.type,_=f.stateNode;if((f.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Wn===null||!Wn.has(_)))){f.flags|=65536,t&=-t,f.lanes|=t;var V=_f(f,v,t);ef(f,V);break e}}f=f.return}while(f!==null)}ud(s)}catch(ae){t=ae,Je===s&&s!==null&&(Je=s=s.return);continue}break}while(!0)}function od(){var e=Ol.current;return Ol.current=Sl,e===null?Sl:e}function Ja(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),nt===null||(yr&268435455)===0&&(Tl&268435455)===0||Yn(nt,at)}function Pl(e,t){var s=Ie;Ie|=2;var o=od();(nt!==e||at!==t)&&(Cn=null,vr(e,t));do try{im();break}catch(c){ld(e,c)}while(!0);if(aa(),Ie=s,Ol.current=o,Je!==null)throw Error(r(261));return nt=null,at=0,Xe}function im(){for(;Je!==null;)ad(Je)}function lm(){for(;Je!==null&&!jo();)ad(Je)}function ad(e){var t=dd(e.alternate,e,Pt);e.memoizedProps=e.pendingProps,t===null?ud(e):Je=t,Ba.current=null}function ud(e){var t=e;do{var s=t.alternate;if(e=t.return,(t.flags&32768)===0){if(s=Xh(s,t,Pt),s!==null){Je=s;return}}else{if(s=Zh(s,t),s!==null){s.flags&=32767,Je=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,Je=null;return}}if(t=t.sibling,t!==null){Je=t;return}Je=t=e}while(t!==null);Xe===0&&(Xe=5)}function wr(e,t,s){var o=Oe,c=Kt.transition;try{Kt.transition=null,Oe=1,om(e,t,s,o)}finally{Kt.transition=c,Oe=o}return null}function om(e,t,s,o){do os();while(Qn!==null);if((Ie&6)!==0)throw Error(r(327));s=e.finishedWork;var c=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var f=s.lanes|s.childLanes;if(Fi(e,f),e===nt&&(Je=nt=null,at=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||Il||(Il=!0,pd(Dr,function(){return os(),null})),f=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||f){f=Kt.transition,Kt.transition=null;var m=Oe;Oe=1;var v=Ie;Ie|=4,Ba.current=null,tm(e,s),Zf(s,e),Oh(Jo),qi=!!Qo,Jo=Qo=null,e.current=s,nm(s),Ps(),Ie=v,Oe=m,Kt.transition=f}else e.current=s;if(Il&&(Il=!1,Qn=e,Ll=c),f=e.pendingLanes,f===0&&(Wn=null),Co(s.stateNode),Tt(e,Be()),t!==null)for(o=e.onRecoverableError,s=0;s<t.length;s++)c=t[s],o(c.value,{componentStack:c.stack,digest:c.digest});if(_l)throw _l=!1,e=Va,Va=null,e;return(Ll&1)!==0&&e.tag!==0&&os(),f=e.pendingLanes,(f&1)!==0?e===Ka?pi++:(pi=0,Ka=e):pi=0,Vn(),null}function os(){if(Qn!==null){var e=Yu(Ll),t=Kt.transition,s=Oe;try{if(Kt.transition=null,Oe=16>e?16:e,Qn===null)var o=!1;else{if(e=Qn,Qn=null,Ll=0,(Ie&6)!==0)throw Error(r(331));var c=Ie;for(Ie|=4,re=e.current;re!==null;){var f=re,m=f.child;if((re.flags&16)!==0){var v=f.deletions;if(v!==null){for(var k=0;k<v.length;k++){var L=v[k];for(re=L;re!==null;){var $=re;switch($.tag){case 0:case 11:case 15:ci(8,$,f)}var z=$.child;if(z!==null)z.return=$,re=z;else for(;re!==null;){$=re;var D=$.sibling,ee=$.return;if(Qf($),$===L){re=null;break}if(D!==null){D.return=ee,re=D;break}re=ee}}}var se=f.alternate;if(se!==null){var le=se.child;if(le!==null){se.child=null;do{var Ke=le.sibling;le.sibling=null,le=Ke}while(le!==null)}}re=f}}if((f.subtreeFlags&2064)!==0&&m!==null)m.return=f,re=m;else e:for(;re!==null;){if(f=re,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:ci(9,f,f.return)}var T=f.sibling;if(T!==null){T.return=f.return,re=T;break e}re=f.return}}var j=e.current;for(re=j;re!==null;){m=re;var _=m.child;if((m.subtreeFlags&2064)!==0&&_!==null)_.return=m,re=_;else e:for(m=j;re!==null;){if(v=re,(v.flags&2048)!==0)try{switch(v.tag){case 0:case 11:case 15:El(9,v)}}catch(ae){Ve(v,v.return,ae)}if(v===m){re=null;break e}var V=v.sibling;if(V!==null){V.return=v.return,re=V;break e}re=v.return}}if(Ie=c,Vn(),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot($r,e)}catch{}o=!0}return o}finally{Oe=s,Kt.transition=t}}return!1}function cd(e,t,s){t=rs(s,t),t=Tf(e,t,1),e=qn(e,t,1),t=gt(),e!==null&&(xt(e,1,t),Tt(e,t))}function Ve(e,t,s){if(e.tag===3)cd(e,e,s);else for(;t!==null;){if(t.tag===3){cd(t,e,s);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Wn===null||!Wn.has(o))){e=rs(s,e),e=_f(t,e,1),t=qn(t,e,1),e=gt(),t!==null&&(xt(t,1,e),Tt(t,e));break}}t=t.return}}function am(e,t,s){var o=e.pingCache;o!==null&&o.delete(t),t=gt(),e.pingedLanes|=e.suspendedLanes&s,nt===e&&(at&s)===s&&(Xe===4||Xe===3&&(at&130023424)===at&&500>Be()-Fa?vr(e,0):Ua|=s),Tt(e,t)}function fd(e,t){t===0&&((e.mode&1)===0?t=1:(t=ge,ge<<=1,(ge&130023424)===0&&(ge=4194304)));var s=gt();e=jn(e,t),e!==null&&(xt(e,t,s),Tt(e,s))}function um(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),fd(e,s)}function cm(e,t){var s=0;switch(e.tag){case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(r(314))}o!==null&&o.delete(t),fd(e,s)}var dd;dd=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||Nt.current)Et=!0;else{if((e.lanes&s)===0&&(t.flags&128)===0)return Et=!1,Gh(e,t,s);Et=(e.flags&131072)!==0}else Et=!1,$e&&(t.flags&1048576)!==0&&Kc(t,ul,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Nl(e,t),e=t.pendingProps;var c=Jr(t,ft.current);ts(t,s),c=wa(null,t,o,e,c,s);var f=ka();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ct(o)?(f=!0,ll(t)):f=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,da(t),c.updater=jl,t.stateNode=c,c._reactInternals=t,Ea(t,o,e,s),t=Ia(null,t,o,!0,f,s)):(t.tag=0,$e&&f&&na(t),yt(null,t,c,s),t=t.child),t;case 16:o=t.elementType;e:{switch(Nl(e,t),e=t.pendingProps,c=o._init,o=c(o._payload),t.type=o,c=t.tag=dm(o),e=Zt(o,e),c){case 0:t=_a(null,t,o,e,s);break e;case 1:t=$f(null,t,o,e,s);break e;case 11:t=bf(null,t,o,e,s);break e;case 14:t=Pf(null,t,o,Zt(o.type,e),s);break e}throw Error(r(306,o,""))}return t;case 0:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:Zt(o,c),_a(e,t,o,c,s);case 1:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:Zt(o,c),$f(e,t,o,c,s);case 3:e:{if(zf(t),e===null)throw Error(r(387));o=t.pendingProps,f=t.memoizedState,c=f.element,Zc(e,t),ml(t,o,null,s);var m=t.memoizedState;if(o=m.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){c=rs(Error(r(423)),t),t=Bf(e,t,o,s,c);break e}else if(o!==c){c=rs(Error(r(424)),t),t=Bf(e,t,o,s,c);break e}else for(bt=Bn(t.stateNode.containerInfo.firstChild),At=t,$e=!0,Xt=null,s=Gc(t,null,o,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Xr(),o===c){t=Nn(e,t,s);break e}yt(e,t,o,s)}t=t.child}return t;case 5:return nf(t),e===null&&ia(t),o=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,m=c.children,Yo(o,c)?m=null:f!==null&&Yo(o,f)&&(t.flags|=32),Df(e,t),yt(e,t,m,s),t.child;case 6:return e===null&&ia(t),null;case 13:return Uf(e,t,s);case 4:return pa(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Zr(t,null,o,s):yt(e,t,o,s),t.child;case 11:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:Zt(o,c),bf(e,t,o,c,s);case 7:return yt(e,t,t.pendingProps,s),t.child;case 8:return yt(e,t,t.pendingProps.children,s),t.child;case 12:return yt(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(o=t.type._context,c=t.pendingProps,f=t.memoizedProps,m=c.value,Pe(dl,o._currentValue),o._currentValue=m,f!==null)if(Gt(f.value,m)){if(f.children===c.children&&!Nt.current){t=Nn(e,t,s);break e}}else for(f=t.child,f!==null&&(f.return=t);f!==null;){var v=f.dependencies;if(v!==null){m=f.child;for(var k=v.firstContext;k!==null;){if(k.context===o){if(f.tag===1){k=xn(-1,s&-s),k.tag=2;var L=f.updateQueue;if(L!==null){L=L.shared;var $=L.pending;$===null?k.next=k:(k.next=$.next,$.next=k),L.pending=k}}f.lanes|=s,k=f.alternate,k!==null&&(k.lanes|=s),ca(f.return,s,t),v.lanes|=s;break}k=k.next}}else if(f.tag===10)m=f.type===t.type?null:f.child;else if(f.tag===18){if(m=f.return,m===null)throw Error(r(341));m.lanes|=s,v=m.alternate,v!==null&&(v.lanes|=s),ca(m,s,t),m=f.sibling}else m=f.child;if(m!==null)m.return=f;else for(m=f;m!==null;){if(m===t){m=null;break}if(f=m.sibling,f!==null){f.return=m.return,m=f;break}m=m.return}f=m}yt(e,t,c.children,s),t=t.child}return t;case 9:return c=t.type,o=t.pendingProps.children,ts(t,s),c=Ft(c),o=o(c),t.flags|=1,yt(e,t,o,s),t.child;case 14:return o=t.type,c=Zt(o,t.pendingProps),c=Zt(o.type,c),Pf(e,t,o,c,s);case 15:return Mf(e,t,t.type,t.pendingProps,s);case 17:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:Zt(o,c),Nl(e,t),t.tag=1,Ct(o)?(e=!0,ll(t)):e=!1,ts(t,s),Ef(t,o,c),Ea(t,o,c,s),Ia(null,t,o,!0,e,s);case 19:return Vf(e,t,s);case 22:return Rf(e,t,s)}throw Error(r(156,t.tag))};function pd(e,t){return zi(e,t)}function fm(e,t,s,o){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qt(e,t,s,o){return new fm(e,t,s,o)}function Ya(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dm(e){if(typeof e=="function")return Ya(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===xe)return 14}return 2}function Gn(e,t){var s=e.alternate;return s===null?(s=qt(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function Ml(e,t,s,o,c,f){var m=2;if(o=e,typeof e=="function")Ya(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case H:return kr(s.children,c,f,t);case U:m=8,c|=8;break;case ue:return e=qt(12,s,t,c|2),e.elementType=ue,e.lanes=f,e;case G:return e=qt(13,s,t,c),e.elementType=G,e.lanes=f,e;case oe:return e=qt(19,s,t,c),e.elementType=oe,e.lanes=f,e;case Se:return Rl(s,c,f,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z:m=10;break e;case we:m=9;break e;case ie:m=11;break e;case xe:m=14;break e;case Te:m=16,o=null;break e}throw Error(r(130,e==null?e:typeof e,""))}return t=qt(m,s,t,c),t.elementType=e,t.type=o,t.lanes=f,t}function kr(e,t,s,o){return e=qt(7,e,o,t),e.lanes=s,e}function Rl(e,t,s,o){return e=qt(22,e,o,t),e.elementType=Se,e.lanes=s,e.stateNode={isHidden:!1},e}function Ga(e,t,s){return e=qt(6,e,null,t),e.lanes=s,e}function Xa(e,t,s){return t=qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pm(e,t,s,o,c){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=et(0),this.expirationTimes=et(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=et(0),this.identifierPrefix=o,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Za(e,t,s,o,c,f,m,v,k){return e=new pm(e,t,s,v,k),t===1?(t=1,f===!0&&(t|=8)):t=0,f=qt(3,null,null,t),e.current=f,f.stateNode=e,f.memoizedState={element:o,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},da(f),e}function hm(e,t,s){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F,key:o==null?null:""+o,children:e,containerInfo:t,implementation:s}}function hd(e){if(!e)return Fn;e=e._reactInternals;e:{if(gn(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ct(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var s=e.type;if(Ct(s))return Uc(e,s,t)}return t}function md(e,t,s,o,c,f,m,v,k){return e=Za(s,o,!0,e,c,f,m,v,k),e.context=hd(null),s=e.current,o=gt(),c=Jn(s),f=xn(o,c),f.callback=t??null,qn(s,f,c),e.current.lanes=c,xt(e,c,o),Tt(e,o),e}function Dl(e,t,s,o){var c=t.current,f=gt(),m=Jn(c);return s=hd(s),t.context===null?t.context=s:t.pendingContext=s,t=xn(f,m),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=qn(c,t,m),e!==null&&(nn(e,c,m,f),hl(e,c,m)),m}function $l(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function yd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function eu(e,t){yd(e,t),(e=e.alternate)&&yd(e,t)}function mm(){return null}var gd=typeof reportError=="function"?reportError:function(e){console.error(e)};function tu(e){this._internalRoot=e}zl.prototype.render=tu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));Dl(e,t,null,null)},zl.prototype.unmount=tu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gr(function(){Dl(null,e,null,null)}),t[vn]=null}};function zl(e){this._internalRoot=e}zl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Zu();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Dn.length&&t!==0&&t<Dn[s].priority;s++);Dn.splice(s,0,e),s===0&&nc(e)}};function nu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function vd(){}function ym(e,t,s,o,c){if(c){if(typeof o=="function"){var f=o;o=function(){var L=$l(m);f.call(L)}}var m=md(t,o,e,0,null,!1,!1,"",vd);return e._reactRootContainer=m,e[vn]=m.current,Gs(e.nodeType===8?e.parentNode:e),gr(),m}for(;c=e.lastChild;)e.removeChild(c);if(typeof o=="function"){var v=o;o=function(){var L=$l(k);v.call(L)}}var k=Za(e,0,!1,null,null,!1,!1,"",vd);return e._reactRootContainer=k,e[vn]=k.current,Gs(e.nodeType===8?e.parentNode:e),gr(function(){Dl(t,k,s,o)}),k}function Ul(e,t,s,o,c){var f=s._reactRootContainer;if(f){var m=f;if(typeof c=="function"){var v=c;c=function(){var k=$l(m);v.call(k)}}Dl(t,m,e,c)}else m=ym(s,t,e,c,o);return $l(m)}Gu=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var s=ve(t.pendingLanes);s!==0&&(zr(t,s|1),Tt(t,Be()),(Ie&6)===0&&(ls=Be()+500,Vn()))}break;case 13:gr(function(){var o=jn(e,1);if(o!==null){var c=gt();nn(o,e,1,c)}}),eu(e,1)}},Oo=function(e){if(e.tag===13){var t=jn(e,134217728);if(t!==null){var s=gt();nn(t,e,134217728,s)}eu(e,134217728)}},Xu=function(e){if(e.tag===13){var t=Jn(e),s=jn(e,t);if(s!==null){var o=gt();nn(s,e,t,o)}eu(e,t)}},Zu=function(){return Oe},ec=function(e,t){var s=Oe;try{return Oe=e,t()}finally{Oe=s}},_s=function(e,t,s){switch(t){case"input":if(lt(e,s),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<s.length;t++){var o=s[t];if(o!==e&&o.form===e.form){var c=sl(o);if(!c)throw Error(r(90));nr(o),lt(o,c)}}}break;case"textarea":ut(e,s);break;case"select":t=s.value,t!=null&&hn(e,!!s.multiple,t,!1)}},br=Wa,Dt=gr;var gm={usingClientEntryPoint:!1,Events:[ei,Wr,sl,Is,Ls,Wa]},hi={findFiberByHostInstance:ur,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vm={bundleType:hi.bundleType,version:hi.version,rendererPackageName:hi.rendererPackageName,rendererConfig:hi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:W.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=bs(e),e===null?null:e.stateNode},findFiberByHostInstance:hi.findFiberByHostInstance||mm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fl.isDisabled&&Fl.supportsFiber)try{$r=Fl.inject(vm),zt=Fl}catch{}}return _t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gm,_t.createPortal=function(e,t){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nu(t))throw Error(r(200));return hm(e,t,null,s)},_t.createRoot=function(e,t){if(!nu(e))throw Error(r(299));var s=!1,o="",c=gd;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Za(e,1,!1,null,null,s,!1,o,c),e[vn]=t.current,Gs(e.nodeType===8?e.parentNode:e),new tu(t)},_t.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=bs(t),e=e===null?null:e.stateNode,e},_t.flushSync=function(e){return gr(e)},_t.hydrate=function(e,t,s){if(!Bl(t))throw Error(r(200));return Ul(null,e,t,!0,s)},_t.hydrateRoot=function(e,t,s){if(!nu(e))throw Error(r(405));var o=s!=null&&s.hydratedSources||null,c=!1,f="",m=gd;if(s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(m=s.onRecoverableError)),t=md(t,null,e,1,s??null,c,!1,f,m),e[vn]=t.current,Gs(e),o)for(e=0;e<o.length;e++)s=o[e],c=s._getVersion,c=c(s._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[s,c]:t.mutableSourceEagerHydrationData.push(s,c);return new zl(t)},_t.render=function(e,t,s){if(!Bl(t))throw Error(r(200));return Ul(null,e,t,!1,s)},_t.unmountComponentAtNode=function(e){if(!Bl(e))throw Error(r(40));return e._reactRootContainer?(gr(function(){Ul(null,null,e,!1,function(){e._reactRootContainer=null,e[vn]=null})}),!0):!1},_t.unstable_batchedUpdates=Wa,_t.unstable_renderSubtreeIntoContainer=function(e,t,s,o){if(!Bl(s))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Ul(e,t,s,!1,o)},_t.version="18.3.1-next-f1338f8080-20240426",_t}var Ed;function Om(){if(Ed)return iu.exports;Ed=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(n){console.error(n)}}return i(),iu.exports=Em(),iu.exports}var Od;function Tm(){if(Od)return Vl;Od=1;var i=Om();return Vl.createRoot=i.createRoot,Vl.hydrateRoot=i.hydrateRoot,Vl}var _m=Tm();const Im=Hd(_m);/**
41
+ * @license lucide-react v0.468.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const Lm=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wd=(...i)=>i.filter((n,r,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===r).join(" ").trim();/**
46
+ * @license lucide-react v0.468.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */var Am={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"};/**
51
+ * @license lucide-react v0.468.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const bm=A.forwardRef(({color:i="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:a="",children:u,iconNode:p,...h},y)=>A.createElement("svg",{ref:y,...Am,width:n,height:n,stroke:i,strokeWidth:l?Number(r)*24/Number(n):r,className:Wd("lucide",a),...h},[...p.map(([g,x])=>A.createElement(g,x)),...Array.isArray(u)?u:[u]]));/**
56
+ * @license lucide-react v0.468.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const ze=(i,n)=>{const r=A.forwardRef(({className:l,...a},u)=>A.createElement(bm,{ref:u,iconNode:n,className:Wd(`lucide-${Lm(i)}`,l),...a}));return r.displayName=`${i}`,r};/**
61
+ * @license lucide-react v0.468.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const hs=ze("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);/**
66
+ * @license lucide-react v0.468.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const Ei=ze("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
71
+ * @license lucide-react v0.468.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const Cr=ze("CircleAlert",[["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"}]]);/**
76
+ * @license lucide-react v0.468.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const Si=ze("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/**
81
+ * @license lucide-react v0.468.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const Pm=ze("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
86
+ * @license lucide-react v0.468.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const Mm=ze("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
91
+ * @license lucide-react v0.468.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const Rm=ze("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
96
+ * @license lucide-react v0.468.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const ms=ze("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
101
+ * @license lucide-react v0.468.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const Dm=ze("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
106
+ * @license lucide-react v0.468.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const $m=ze("FolderCog",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["path",{d:"M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v3.3",key:"1k8050"}],["path",{d:"m21.7 19.4-.9-.3",key:"1qgwi9"}],["path",{d:"m15.2 16.9-.9-.3",key:"1t7mvx"}],["path",{d:"m16.6 21.7.3-.9",key:"1j67ps"}],["path",{d:"m19.1 15.2.3-.9",key:"18r7jp"}],["path",{d:"m19.6 21.7-.4-1",key:"z2vh2"}],["path",{d:"m16.8 15.3-.4-1",key:"1ei7r6"}],["path",{d:"m14.3 19.6 1-.4",key:"11sv9r"}],["path",{d:"m20.7 16.8 1-.4",key:"19m87a"}]]);/**
111
+ * @license lucide-react v0.468.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const zm=ze("FolderSync",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v.5",key:"1dkoa9"}],["path",{d:"M12 10v4h4",key:"1czhmt"}],["path",{d:"m12 14 1.535-1.605a5 5 0 0 1 8 1.5",key:"lvuxfi"}],["path",{d:"M22 22v-4h-4",key:"1ewp4q"}],["path",{d:"m22 18-1.535 1.605a5 5 0 0 1-8-1.5",key:"14ync0"}]]);/**
116
+ * @license lucide-react v0.468.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const Qd=ze("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
121
+ * @license lucide-react v0.468.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const eo=ze("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
126
+ * @license lucide-react v0.468.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const Bm=ze("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);/**
131
+ * @license lucide-react v0.468.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const Lu=ze("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
136
+ * @license lucide-react v0.468.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const lo=ze("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
141
+ * @license lucide-react v0.468.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const to=ze("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/**
146
+ * @license lucide-react v0.468.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const Um=ze("RotateCcw",[["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"}]]);/**
151
+ * @license lucide-react v0.468.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const Jd=ze("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"}]]);/**
156
+ * @license lucide-react v0.468.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const Fm=ze("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
161
+ * @license lucide-react v0.468.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const Au=ze("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
166
+ * @license lucide-react v0.468.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const Yd=ze("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"}]]);/**
171
+ * @license lucide-react v0.468.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const oo=ze("Trash2",[["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"}]]);/**
176
+ * @license lucide-react v0.468.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const Oi=ze("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),bu=Symbol.for("yaml.alias"),Su=Symbol.for("yaml.document"),tr=Symbol.for("yaml.map"),Gd=Symbol.for("yaml.pair"),pn=Symbol.for("yaml.scalar"),Ss=Symbol.for("yaml.seq"),Qt=Symbol.for("yaml.node.type"),_r=i=>!!i&&typeof i=="object"&&i[Qt]===bu,ao=i=>!!i&&typeof i=="object"&&i[Qt]===Su,Ai=i=>!!i&&typeof i=="object"&&i[Qt]===tr,We=i=>!!i&&typeof i=="object"&&i[Qt]===Gd,Me=i=>!!i&&typeof i=="object"&&i[Qt]===pn,bi=i=>!!i&&typeof i=="object"&&i[Qt]===Ss;function qe(i){if(i&&typeof i=="object")switch(i[Qt]){case tr:case Ss:return!0}return!1}function He(i){if(i&&typeof i=="object")switch(i[Qt]){case bu:case tr:case pn:case Ss:return!0}return!1}const Xd=i=>(Me(i)||qe(i))&&!!i.anchor,Sr=Symbol("break visit"),Vm=Symbol("skip children"),ji=Symbol("remove node");function js(i,n){const r=Km(n);ao(i)?cs(null,i.contents,r,Object.freeze([i]))===ji&&(i.contents=null):cs(null,i,r,Object.freeze([]))}js.BREAK=Sr;js.SKIP=Vm;js.REMOVE=ji;function cs(i,n,r,l){const a=qm(i,n,r,l);if(He(a)||We(a))return Hm(i,l,a),cs(i,a,r,l);if(typeof a!="symbol"){if(qe(n)){l=Object.freeze(l.concat(n));for(let u=0;u<n.items.length;++u){const p=cs(u,n.items[u],r,l);if(typeof p=="number")u=p-1;else{if(p===Sr)return Sr;p===ji&&(n.items.splice(u,1),u-=1)}}}else if(We(n)){l=Object.freeze(l.concat(n));const u=cs("key",n.key,r,l);if(u===Sr)return Sr;u===ji&&(n.key=null);const p=cs("value",n.value,r,l);if(p===Sr)return Sr;p===ji&&(n.value=null)}}return a}function Km(i){return typeof i=="object"&&(i.Collection||i.Node||i.Value)?Object.assign({Alias:i.Node,Map:i.Node,Scalar:i.Node,Seq:i.Node},i.Value&&{Map:i.Value,Scalar:i.Value,Seq:i.Value},i.Collection&&{Map:i.Collection,Seq:i.Collection},i):i}function qm(i,n,r,l){var a,u,p,h,y;if(typeof r=="function")return r(i,n,l);if(Ai(n))return(a=r.Map)==null?void 0:a.call(r,i,n,l);if(bi(n))return(u=r.Seq)==null?void 0:u.call(r,i,n,l);if(We(n))return(p=r.Pair)==null?void 0:p.call(r,i,n,l);if(Me(n))return(h=r.Scalar)==null?void 0:h.call(r,i,n,l);if(_r(n))return(y=r.Alias)==null?void 0:y.call(r,i,n,l)}function Hm(i,n,r){const l=n[n.length-1];if(qe(l))l.items[i]=r;else if(We(l))i==="key"?l.key=r:l.value=r;else if(ao(l))l.contents=r;else{const a=_r(l)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}const Wm={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Qm=i=>i.replace(/[!,[\]{}]/g,n=>Wm[n]);class vt{constructor(n,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},vt.defaultYaml,n),this.tags=Object.assign({},vt.defaultTags,r)}clone(){const n=new vt(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new vt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:vt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},vt.defaultTags);break}return n}add(n,r){this.atNextDocument&&(this.yaml={explicit:vt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},vt.defaultTags),this.atNextDocument=!1);const l=n.trim().split(/[ \t]+/),a=l.shift();switch(a){case"%TAG":{if(l.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),l.length<2))return!1;const[u,p]=l;return this.tags[u]=p,!0}case"%YAML":{if(this.yaml.explicit=!0,l.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;const[u]=l;if(u==="1.1"||u==="1.2")return this.yaml.version=u,!0;{const p=/^\d+\.\d+$/.test(u);return r(6,`Unsupported YAML version ${u}`,p),!1}}default:return r(0,`Unknown directive ${a}`,!0),!1}}tagName(n,r){if(n==="!")return"!";if(n[0]!=="!")return r(`Not a valid tag: ${n}`),null;if(n[1]==="<"){const p=n.slice(2,-1);return p==="!"||p==="!!"?(r(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&r("Verbatim tags must end with a >"),p)}const[,l,a]=n.match(/^(.*!)([^!]*)$/s);a||r(`The ${n} tag has no suffix`);const u=this.tags[l];if(u)try{return u+decodeURIComponent(a)}catch(p){return r(String(p)),null}return l==="!"?n:(r(`Could not resolve tag: ${n}`),null)}tagString(n){for(const[r,l]of Object.entries(this.tags))if(n.startsWith(l))return r+Qm(n.substring(l.length));return n[0]==="!"?n:`!<${n}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],l=Object.entries(this.tags);let a;if(n&&l.length>0&&He(n.contents)){const u={};js(n.contents,(p,h)=>{He(h)&&h.tag&&(u[h.tag]=!0)}),a=Object.keys(u)}else a=[];for(const[u,p]of l)u==="!!"&&p==="tag:yaml.org,2002:"||(!n||a.some(h=>h.startsWith(p)))&&r.push(`%TAG ${u} ${p}`);return r.join(`
181
+ `)}}vt.defaultYaml={explicit:!1,version:"1.2"};vt.defaultTags={"!!":"tag:yaml.org,2002:"};function Zd(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){const r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(r)}return!0}function ep(i){const n=new Set;return js(i,{Value(r,l){l.anchor&&n.add(l.anchor)}}),n}function tp(i,n){for(let r=1;;++r){const l=`${i}${r}`;if(!n.has(l))return l}}function Jm(i,n){const r=[],l=new Map;let a=null;return{onAnchor:u=>{r.push(u),a??(a=ep(i));const p=tp(n,a);return a.add(p),p},setAnchors:()=>{for(const u of r){const p=l.get(u);if(typeof p=="object"&&p.anchor&&(Me(p.node)||qe(p.node)))p.node.anchor=p.anchor;else{const h=new Error("Failed to resolve repeated object (this should not happen)");throw h.source=u,h}}},sourceObjects:l}}function fs(i,n,r,l){if(l&&typeof l=="object")if(Array.isArray(l))for(let a=0,u=l.length;a<u;++a){const p=l[a],h=fs(i,l,String(a),p);h===void 0?delete l[a]:h!==p&&(l[a]=h)}else if(l instanceof Map)for(const a of Array.from(l.keys())){const u=l.get(a),p=fs(i,l,a,u);p===void 0?l.delete(a):p!==u&&l.set(a,p)}else if(l instanceof Set)for(const a of Array.from(l)){const u=fs(i,l,a,a);u===void 0?l.delete(a):u!==a&&(l.delete(a),l.add(u))}else for(const[a,u]of Object.entries(l)){const p=fs(i,l,a,u);p===void 0?delete l[a]:p!==u&&(l[a]=p)}return i.call(n,r,l)}function Wt(i,n,r){if(Array.isArray(i))return i.map((l,a)=>Wt(l,String(a),r));if(i&&typeof i.toJSON=="function"){if(!r||!Xd(i))return i.toJSON(n,r);const l={aliasCount:0,count:1,res:void 0};r.anchors.set(i,l),r.onCreate=u=>{l.res=u,delete r.onCreate};const a=i.toJSON(n,r);return r.onCreate&&r.onCreate(a),a}return typeof i=="bigint"&&!(r!=null&&r.keep)?Number(i):i}class Pu{constructor(n){Object.defineProperty(this,Qt,{value:n})}clone(){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:r,maxAliasCount:l,onAnchor:a,reviver:u}={}){if(!ao(n))throw new TypeError("A document argument is required");const p={anchors:new Map,doc:n,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},h=Wt(this,"",p);if(typeof a=="function")for(const{count:y,res:g}of p.anchors.values())a(g,y);return typeof u=="function"?fs(u,{"":h},"",h):h}}class Mu extends Pu{constructor(n){super(bu),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n,r){let l;r!=null&&r.aliasResolveCache?l=r.aliasResolveCache:(l=[],js(n,{Node:(u,p)=>{(_r(p)||Xd(p))&&l.push(p)}}),r&&(r.aliasResolveCache=l));let a;for(const u of l){if(u===this)break;u.anchor===this.source&&(a=u)}return a}toJSON(n,r){if(!r)return{source:this.source};const{anchors:l,doc:a,maxAliasCount:u}=r,p=this.resolve(a,r);if(!p){const y=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(y)}let h=l.get(p);if(h||(Wt(p,null,r),h=l.get(p)),(h==null?void 0:h.res)===void 0){const y="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(y)}if(u>=0&&(h.count+=1,h.aliasCount===0&&(h.aliasCount=Yl(a,p,l)),h.count*h.aliasCount>u)){const y="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(y)}return h.res}toString(n,r,l){const a=`*${this.source}`;if(n){if(Zd(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){const u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(u)}if(n.implicitKey)return`${a} `}return a}}function Yl(i,n,r){if(_r(n)){const l=n.resolve(i),a=r&&l&&r.get(l);return a?a.count*a.aliasCount:0}else if(qe(n)){let l=0;for(const a of n.items){const u=Yl(i,a,r);u>l&&(l=u)}return l}else if(We(n)){const l=Yl(i,n.key,r),a=Yl(i,n.value,r);return Math.max(l,a)}return 1}const np=i=>!i||typeof i!="function"&&typeof i!="object";class ke extends Pu{constructor(n){super(pn),this.value=n}toJSON(n,r){return r!=null&&r.keep?this.value:Wt(this.value,n,r)}toString(){return String(this.value)}}ke.BLOCK_FOLDED="BLOCK_FOLDED";ke.BLOCK_LITERAL="BLOCK_LITERAL";ke.PLAIN="PLAIN";ke.QUOTE_DOUBLE="QUOTE_DOUBLE";ke.QUOTE_SINGLE="QUOTE_SINGLE";const Ym="tag:yaml.org,2002:";function Gm(i,n,r){if(n){const l=r.filter(u=>u.tag===n),a=l.find(u=>!u.format)??l[0];if(!a)throw new Error(`Tag ${n} not found`);return a}return r.find(l=>{var a;return((a=l.identify)==null?void 0:a.call(l,i))&&!l.format})}function Ti(i,n,r){var w,O,E;if(ao(i)&&(i=i.contents),He(i))return i;if(We(i)){const b=(O=(w=r.schema[tr]).createNode)==null?void 0:O.call(w,r.schema,null,r);return b.items.push(i),b}(i instanceof String||i instanceof Number||i instanceof Boolean||typeof BigInt<"u"&&i instanceof BigInt)&&(i=i.valueOf());const{aliasDuplicateObjects:l,onAnchor:a,onTagObj:u,schema:p,sourceObjects:h}=r;let y;if(l&&i&&typeof i=="object"){if(y=h.get(i),y)return y.anchor??(y.anchor=a(i)),new Mu(y.anchor);y={anchor:null,node:null},h.set(i,y)}n!=null&&n.startsWith("!!")&&(n=Ym+n.slice(2));let g=Gm(i,n,p.tags);if(!g){if(i&&typeof i.toJSON=="function"&&(i=i.toJSON()),!i||typeof i!="object"){const b=new ke(i);return y&&(y.node=b),b}g=i instanceof Map?p[tr]:Symbol.iterator in Object(i)?p[Ss]:p[tr]}u&&(u(g),delete r.onTagObj);const x=g!=null&&g.createNode?g.createNode(r.schema,i,r):typeof((E=g==null?void 0:g.nodeClass)==null?void 0:E.from)=="function"?g.nodeClass.from(r.schema,i,r):new ke(i);return n?x.tag=n:g.default||(x.tag=g.tag),y&&(y.node=x),x}function no(i,n,r){let l=r;for(let a=n.length-1;a>=0;--a){const u=n[a];if(typeof u=="number"&&Number.isInteger(u)&&u>=0){const p=[];p[u]=l,l=p}else l=new Map([[u,l]])}return Ti(l,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:i,sourceObjects:new Map})}const gi=i=>i==null||typeof i=="object"&&!!i[Symbol.iterator]().next().done;class rp extends Pu{constructor(n,r){super(n),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(n){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return n&&(r.schema=n),r.items=r.items.map(l=>He(l)||We(l)?l.clone(n):l),this.range&&(r.range=this.range.slice()),r}addIn(n,r){if(gi(n))this.add(r);else{const[l,...a]=n,u=this.get(l,!0);if(qe(u))u.addIn(a,r);else if(u===void 0&&this.schema)this.set(l,no(this.schema,a,r));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${a}`)}}deleteIn(n){const[r,...l]=n;if(l.length===0)return this.delete(r);const a=this.get(r,!0);if(qe(a))return a.deleteIn(l);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}getIn(n,r){const[l,...a]=n,u=this.get(l,!0);return a.length===0?!r&&Me(u)?u.value:u:qe(u)?u.getIn(a,r):void 0}hasAllNullValues(n){return this.items.every(r=>{if(!We(r))return!1;const l=r.value;return l==null||n&&Me(l)&&l.value==null&&!l.commentBefore&&!l.comment&&!l.tag})}hasIn(n){const[r,...l]=n;if(l.length===0)return this.has(r);const a=this.get(r,!0);return qe(a)?a.hasIn(l):!1}setIn(n,r){const[l,...a]=n;if(a.length===0)this.set(l,r);else{const u=this.get(l,!0);if(qe(u))u.setIn(a,r);else if(u===void 0&&this.schema)this.set(l,no(this.schema,a,r));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${a}`)}}}const Xm=i=>i.replace(/^(?!$)(?: $)?/gm,"#");function En(i,n){return/^\n+$/.test(i)?i.substring(1):n?i.replace(/^(?! *$)/gm,n):i}const xr=(i,n,r)=>i.endsWith(`
182
+ `)?En(r,n):r.includes(`
183
+ `)?`
184
+ `+En(r,n):(i.endsWith(" ")?"":" ")+r,sp="flow",ju="block",Gl="quoted";function uo(i,n,r="flow",{indentAtStart:l,lineWidth:a=80,minContentWidth:u=20,onFold:p,onOverflow:h}={}){if(!a||a<0)return i;a<u&&(u=0);const y=Math.max(1+u,1+a-n.length);if(i.length<=y)return i;const g=[],x={};let w=a-n.length;typeof l=="number"&&(l>a-Math.max(2,u)?g.push(0):w=a-l);let O,E,b=!1,S=-1,I=-1,R=-1;r===ju&&(S=Td(i,S,n.length),S!==-1&&(w=S+y));for(let K;K=i[S+=1];){if(r===Gl&&K==="\\"){switch(I=S,i[S+1]){case"x":S+=3;break;case"u":S+=5;break;case"U":S+=9;break;default:S+=1}R=S}if(K===`
185
+ `)r===ju&&(S=Td(i,S,n.length)),w=S+n.length+y,O=void 0;else{if(K===" "&&E&&E!==" "&&E!==`
186
+ `&&E!==" "){const W=i[S+1];W&&W!==" "&&W!==`
187
+ `&&W!==" "&&(O=S)}if(S>=w)if(O)g.push(O),w=O+y,O=void 0;else if(r===Gl){for(;E===" "||E===" ";)E=K,K=i[S+=1],b=!0;const W=S>R+1?S-2:I-1;if(x[W])return i;g.push(W),x[W]=!0,w=W+y,O=void 0}else b=!0}E=K}if(b&&h&&h(),g.length===0)return i;p&&p();let J=i.slice(0,g[0]);for(let K=0;K<g.length;++K){const W=g[K],q=g[K+1]||i.length;W===0?J=`
188
+ ${n}${i.slice(0,q)}`:(r===Gl&&x[W]&&(J+=`${i[W]}\\`),J+=`
189
+ ${n}${i.slice(W+1,q)}`)}return J}function Td(i,n,r){let l=n,a=n+1,u=i[a];for(;u===" "||u===" ";)if(n<a+r)u=i[++n];else{do u=i[++n];while(u&&u!==`
190
+ `);l=n,a=n+1,u=i[a]}return l}const co=(i,n)=>({indentAtStart:n?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),fo=i=>/^(%|---|\.\.\.)/m.test(i);function Zm(i,n,r){if(!n||n<0)return!1;const l=n-r,a=i.length;if(a<=l)return!1;for(let u=0,p=0;u<a;++u)if(i[u]===`
191
+ `){if(u-p>l)return!0;if(p=u+1,a-p<=l)return!1}return!0}function xi(i,n){const r=JSON.stringify(i);if(n.options.doubleQuotedAsJSON)return r;const{implicitKey:l}=n,a=n.options.doubleQuotedMinMultiLineLength,u=n.indent||(fo(i)?" ":"");let p="",h=0;for(let y=0,g=r[y];g;g=r[++y])if(g===" "&&r[y+1]==="\\"&&r[y+2]==="n"&&(p+=r.slice(h,y)+"\\ ",y+=1,h=y,g="\\"),g==="\\")switch(r[y+1]){case"u":{p+=r.slice(h,y);const x=r.substr(y+2,4);switch(x){case"0000":p+="\\0";break;case"0007":p+="\\a";break;case"000b":p+="\\v";break;case"001b":p+="\\e";break;case"0085":p+="\\N";break;case"00a0":p+="\\_";break;case"2028":p+="\\L";break;case"2029":p+="\\P";break;default:x.substr(0,2)==="00"?p+="\\x"+x.substr(2):p+=r.substr(y,6)}y+=5,h=y+1}break;case"n":if(l||r[y+2]==='"'||r.length<a)y+=1;else{for(p+=r.slice(h,y)+`
192
+
193
+ `;r[y+2]==="\\"&&r[y+3]==="n"&&r[y+4]!=='"';)p+=`
194
+ `,y+=2;p+=u,r[y+2]===" "&&(p+="\\"),y+=1,h=y+1}break;default:y+=1}return p=h?p+r.slice(h):r,l?p:uo(p,u,Gl,co(n,!1))}function xu(i,n){if(n.options.singleQuote===!1||n.implicitKey&&i.includes(`
195
+ `)||/[ \t]\n|\n[ \t]/.test(i))return xi(i,n);const r=n.indent||(fo(i)?" ":""),l="'"+i.replace(/'/g,"''").replace(/\n+/g,`$&
196
+ ${r}`)+"'";return n.implicitKey?l:uo(l,r,sp,co(n,!1))}function ds(i,n){const{singleQuote:r}=n.options;let l;if(r===!1)l=xi;else{const a=i.includes('"'),u=i.includes("'");a&&!u?l=xu:u&&!a?l=xi:l=r?xu:xi}return l(i,n)}let Nu;try{Nu=new RegExp(`(^|(?<!
197
+ ))
198
+ +(?!
199
+ |$)`,"g")}catch{Nu=/\n+(?!\n|$)/g}function Xl({comment:i,type:n,value:r},l,a,u){const{blockQuote:p,commentString:h,lineWidth:y}=l.options;if(!p||/\n[\t ]+$/.test(r))return ds(r,l);const g=l.indent||(l.forceBlockIndent||fo(r)?" ":""),x=p==="literal"?!0:p==="folded"||n===ke.BLOCK_FOLDED?!1:n===ke.BLOCK_LITERAL?!0:!Zm(r,y,g.length);if(!r)return x?`|
200
+ `:`>
201
+ `;let w,O;for(O=r.length;O>0;--O){const q=r[O-1];if(q!==`
202
+ `&&q!==" "&&q!==" ")break}let E=r.substring(O);const b=E.indexOf(`
203
+ `);b===-1?w="-":r===E||b!==E.length-1?(w="+",u&&u()):w="",E&&(r=r.slice(0,-E.length),E[E.length-1]===`
204
+ `&&(E=E.slice(0,-1)),E=E.replace(Nu,`$&${g}`));let S=!1,I,R=-1;for(I=0;I<r.length;++I){const q=r[I];if(q===" ")S=!0;else if(q===`
205
+ `)R=I;else break}let J=r.substring(0,R<I?R+1:I);J&&(r=r.substring(J.length),J=J.replace(/\n+/g,`$&${g}`));let W=(S?g?"2":"1":"")+w;if(i&&(W+=" "+h(i.replace(/ ?[\r\n]+/g," ")),a&&a()),!x){const q=r.replace(/\n+/g,`
206
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);let F=!1;const H=co(l,!0);p!=="folded"&&n!==ke.BLOCK_FOLDED&&(H.onOverflow=()=>{F=!0});const U=uo(`${J}${q}${E}`,g,ju,H);if(!F)return`>${W}
207
+ ${g}${U}`}return r=r.replace(/\n+/g,`$&${g}`),`|${W}
208
+ ${g}${J}${r}${E}`}function ey(i,n,r,l){const{type:a,value:u}=i,{actualString:p,implicitKey:h,indent:y,indentStep:g,inFlow:x}=n;if(h&&u.includes(`
209
+ `)||x&&/[[\]{},]/.test(u))return ds(u,n);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return h||x||!u.includes(`
210
+ `)?ds(u,n):Xl(i,n,r,l);if(!h&&!x&&a!==ke.PLAIN&&u.includes(`
211
+ `))return Xl(i,n,r,l);if(fo(u)){if(y==="")return n.forceBlockIndent=!0,Xl(i,n,r,l);if(h&&y===g)return ds(u,n)}const w=u.replace(/\n+/g,`$&
212
+ ${y}`);if(p){const O=S=>{var I;return S.default&&S.tag!=="tag:yaml.org,2002:str"&&((I=S.test)==null?void 0:I.test(w))},{compat:E,tags:b}=n.doc.schema;if(b.some(O)||E!=null&&E.some(O))return ds(u,n)}return h?w:uo(w,y,sp,co(n,!1))}function Ru(i,n,r,l){const{implicitKey:a,inFlow:u}=n,p=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)});let{type:h}=i;h!==ke.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(p.value)&&(h=ke.QUOTE_DOUBLE);const y=x=>{switch(x){case ke.BLOCK_FOLDED:case ke.BLOCK_LITERAL:return a||u?ds(p.value,n):Xl(p,n,r,l);case ke.QUOTE_DOUBLE:return xi(p.value,n);case ke.QUOTE_SINGLE:return xu(p.value,n);case ke.PLAIN:return ey(p,n,r,l);default:return null}};let g=y(h);if(g===null){const{defaultKeyType:x,defaultStringType:w}=n.options,O=a&&x||w;if(g=y(O),g===null)throw new Error(`Unsupported default string type ${O}`)}return g}function ip(i,n){const r=Object.assign({blockQuote:!0,commentString:Xm,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},i.schema.toStringOptions,n);let l;switch(r.collectionStyle){case"block":l=!1;break;case"flow":l=!0;break;default:l=null}return{anchors:new Set,doc:i,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:l,options:r}}function ty(i,n){var a;if(n.tag){const u=i.filter(p=>p.tag===n.tag);if(u.length>0)return u.find(p=>p.format===n.format)??u[0]}let r,l;if(Me(n)){l=n.value;let u=i.filter(p=>{var h;return(h=p.identify)==null?void 0:h.call(p,l)});if(u.length>1){const p=u.filter(h=>h.test);p.length>0&&(u=p)}r=u.find(p=>p.format===n.format)??u.find(p=>!p.format)}else l=n,r=i.find(u=>u.nodeClass&&l instanceof u.nodeClass);if(!r){const u=((a=l==null?void 0:l.constructor)==null?void 0:a.name)??(l===null?"null":typeof l);throw new Error(`Tag not resolved for ${u} value`)}return r}function ny(i,n,{anchors:r,doc:l}){if(!l.directives)return"";const a=[],u=(Me(i)||qe(i))&&i.anchor;u&&Zd(u)&&(r.add(u),a.push(`&${u}`));const p=i.tag??(n.default?null:n.tag);return p&&a.push(l.directives.tagString(p)),a.join(" ")}function vs(i,n,r,l){var y;if(We(i))return i.toString(n,r,l);if(_r(i)){if(n.doc.directives)return i.toString(n);if((y=n.resolvedAliases)!=null&&y.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(i):n.resolvedAliases=new Set([i]),i=i.resolve(n.doc)}let a;const u=He(i)?i:n.doc.createNode(i,{onTagObj:g=>a=g});a??(a=ty(n.doc.schema.tags,u));const p=ny(u,a,n);p.length>0&&(n.indentAtStart=(n.indentAtStart??0)+p.length+1);const h=typeof a.stringify=="function"?a.stringify(u,n,r,l):Me(u)?Ru(u,n,r,l):u.toString(n,r,l);return p?Me(u)||h[0]==="{"||h[0]==="["?`${p} ${h}`:`${p}
213
+ ${n.indent}${h}`:h}function ry({key:i,value:n},r,l,a){const{allNullValues:u,doc:p,indent:h,indentStep:y,options:{commentString:g,indentSeq:x,simpleKeys:w}}=r;let O=He(i)&&i.comment||null;if(w){if(O)throw new Error("With simple keys, key nodes cannot have comments");if(qe(i)||!He(i)&&typeof i=="object"){const H="With simple keys, collection cannot be used as a key value";throw new Error(H)}}let E=!w&&(!i||O&&n==null&&!r.inFlow||qe(i)||(Me(i)?i.type===ke.BLOCK_FOLDED||i.type===ke.BLOCK_LITERAL:typeof i=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!E&&(w||!u),indent:h+y});let b=!1,S=!1,I=vs(i,r,()=>b=!0,()=>S=!0);if(!E&&!r.inFlow&&I.length>1024){if(w)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");E=!0}if(r.inFlow){if(u||n==null)return b&&l&&l(),I===""?"?":E?`? ${I}`:I}else if(u&&!w||n==null&&E)return I=`? ${I}`,O&&!b?I+=xr(I,r.indent,g(O)):S&&a&&a(),I;b&&(O=null),E?(O&&(I+=xr(I,r.indent,g(O))),I=`? ${I}
214
+ ${h}:`):(I=`${I}:`,O&&(I+=xr(I,r.indent,g(O))));let R,J,K;He(n)?(R=!!n.spaceBefore,J=n.commentBefore,K=n.comment):(R=!1,J=null,K=null,n&&typeof n=="object"&&(n=p.createNode(n))),r.implicitKey=!1,!E&&!O&&Me(n)&&(r.indentAtStart=I.length+1),S=!1,!x&&y.length>=2&&!r.inFlow&&!E&&bi(n)&&!n.flow&&!n.tag&&!n.anchor&&(r.indent=r.indent.substring(2));let W=!1;const q=vs(n,r,()=>W=!0,()=>S=!0);let F=" ";if(O||R||J){if(F=R?`
215
+ `:"",J){const H=g(J);F+=`
216
+ ${En(H,r.indent)}`}q===""&&!r.inFlow?F===`
217
+ `&&K&&(F=`
218
+
219
+ `):F+=`
220
+ ${r.indent}`}else if(!E&&qe(n)){const H=q[0],U=q.indexOf(`
221
+ `),ue=U!==-1,Z=r.inFlow??n.flow??n.items.length===0;if(ue||!Z){let we=!1;if(ue&&(H==="&"||H==="!")){let ie=q.indexOf(" ");H==="&"&&ie!==-1&&ie<U&&q[ie+1]==="!"&&(ie=q.indexOf(" ",ie+1)),(ie===-1||U<ie)&&(we=!0)}we||(F=`
222
+ ${r.indent}`)}}else(q===""||q[0]===`
223
+ `)&&(F="");return I+=F+q,r.inFlow?W&&l&&l():K&&!W?I+=xr(I,r.indent,g(K)):S&&a&&a(),I}function lp(i,n){(i==="debug"||i==="warn")&&console.warn(n)}const Kl="<<",On={identify:i=>i===Kl||typeof i=="symbol"&&i.description===Kl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ke(Symbol(Kl)),{addToJSMap:op}),stringify:()=>Kl},sy=(i,n)=>(On.identify(n)||Me(n)&&(!n.type||n.type===ke.PLAIN)&&On.identify(n.value))&&(i==null?void 0:i.doc.schema.tags.some(r=>r.tag===On.tag&&r.default));function op(i,n,r){if(r=i&&_r(r)?r.resolve(i.doc):r,bi(r))for(const l of r.items)au(i,n,l);else if(Array.isArray(r))for(const l of r)au(i,n,l);else au(i,n,r)}function au(i,n,r){const l=i&&_r(r)?r.resolve(i.doc):r;if(!Ai(l))throw new Error("Merge sources must be maps or map aliases");const a=l.toJSON(null,i,Map);for(const[u,p]of a)n instanceof Map?n.has(u)||n.set(u,p):n instanceof Set?n.add(u):Object.prototype.hasOwnProperty.call(n,u)||Object.defineProperty(n,u,{value:p,writable:!0,enumerable:!0,configurable:!0});return n}function ap(i,n,{key:r,value:l}){if(He(r)&&r.addToJSMap)r.addToJSMap(i,n,l);else if(sy(i,r))op(i,n,l);else{const a=Wt(r,"",i);if(n instanceof Map)n.set(a,Wt(l,a,i));else if(n instanceof Set)n.add(a);else{const u=iy(r,a,i),p=Wt(l,u,i);u in n?Object.defineProperty(n,u,{value:p,writable:!0,enumerable:!0,configurable:!0}):n[u]=p}}return n}function iy(i,n,r){if(n===null)return"";if(typeof n!="object")return String(n);if(He(i)&&(r!=null&&r.doc)){const l=ip(r.doc,{});l.anchors=new Set;for(const u of r.anchors.keys())l.anchors.add(u.anchor);l.inFlow=!0,l.inStringifyKey=!0;const a=i.toString(l);if(!r.mapKeyWarned){let u=JSON.stringify(a);u.length>40&&(u=u.substring(0,36)+'..."'),lp(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${u}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return a}return JSON.stringify(n)}function Du(i,n,r){const l=Ti(i,void 0,r),a=Ti(n,void 0,r);return new wt(l,a)}class wt{constructor(n,r=null){Object.defineProperty(this,Qt,{value:Gd}),this.key=n,this.value=r}clone(n){let{key:r,value:l}=this;return He(r)&&(r=r.clone(n)),He(l)&&(l=l.clone(n)),new wt(r,l)}toJSON(n,r){const l=r!=null&&r.mapAsMap?new Map:{};return ap(r,l,this)}toString(n,r,l){return n!=null&&n.doc?ry(this,n,r,l):JSON.stringify(this)}}function up(i,n,r){return(n.inFlow??i.flow?oy:ly)(i,n,r)}function ly({comment:i,items:n},r,{blockItemPrefix:l,flowChars:a,itemIndent:u,onChompKeep:p,onComment:h}){const{indent:y,options:{commentString:g}}=r,x=Object.assign({},r,{indent:u,type:null});let w=!1;const O=[];for(let b=0;b<n.length;++b){const S=n[b];let I=null;if(He(S))!w&&S.spaceBefore&&O.push(""),ro(r,O,S.commentBefore,w),S.comment&&(I=S.comment);else if(We(S)){const J=He(S.key)?S.key:null;J&&(!w&&J.spaceBefore&&O.push(""),ro(r,O,J.commentBefore,w))}w=!1;let R=vs(S,x,()=>I=null,()=>w=!0);I&&(R+=xr(R,u,g(I))),w&&I&&(w=!1),O.push(l+R)}let E;if(O.length===0)E=a.start+a.end;else{E=O[0];for(let b=1;b<O.length;++b){const S=O[b];E+=S?`
224
+ ${y}${S}`:`
225
+ `}}return i?(E+=`
226
+ `+En(g(i),y),h&&h()):w&&p&&p(),E}function oy({items:i},n,{flowChars:r,itemIndent:l}){const{indent:a,indentStep:u,flowCollectionPadding:p,options:{commentString:h}}=n;l+=u;const y=Object.assign({},n,{indent:l,inFlow:!0,type:null});let g=!1,x=0;const w=[];for(let b=0;b<i.length;++b){const S=i[b];let I=null;if(He(S))S.spaceBefore&&w.push(""),ro(n,w,S.commentBefore,!1),S.comment&&(I=S.comment);else if(We(S)){const J=He(S.key)?S.key:null;J&&(J.spaceBefore&&w.push(""),ro(n,w,J.commentBefore,!1),J.comment&&(g=!0));const K=He(S.value)?S.value:null;K?(K.comment&&(I=K.comment),K.commentBefore&&(g=!0)):S.value==null&&(J!=null&&J.comment)&&(I=J.comment)}I&&(g=!0);let R=vs(S,y,()=>I=null);g||(g=w.length>x||R.includes(`
227
+ `)),b<i.length-1?R+=",":n.options.trailingComma&&(n.options.lineWidth>0&&(g||(g=w.reduce((J,K)=>J+K.length+2,2)+(R.length+2)>n.options.lineWidth)),g&&(R+=",")),I&&(R+=xr(R,l,h(I))),w.push(R),x=w.length}const{start:O,end:E}=r;if(w.length===0)return O+E;if(!g){const b=w.reduce((S,I)=>S+I.length+2,2);g=n.options.lineWidth>0&&b>n.options.lineWidth}if(g){let b=O;for(const S of w)b+=S?`
228
+ ${u}${a}${S}`:`
229
+ `;return`${b}
230
+ ${a}${E}`}else return`${O}${p}${w.join(" ")}${p}${E}`}function ro({indent:i,options:{commentString:n}},r,l,a){if(l&&a&&(l=l.replace(/^\n+/,"")),l){const u=En(n(l),i);r.push(u.trimStart())}}function Nr(i,n){const r=Me(n)?n.value:n;for(const l of i)if(We(l)&&(l.key===n||l.key===r||Me(l.key)&&l.key.value===r))return l}class Ht extends rp{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(tr,n),this.items=[]}static from(n,r,l){const{keepUndefined:a,replacer:u}=l,p=new this(n),h=(y,g)=>{if(typeof u=="function")g=u.call(r,y,g);else if(Array.isArray(u)&&!u.includes(y))return;(g!==void 0||a)&&p.items.push(Du(y,g,l))};if(r instanceof Map)for(const[y,g]of r)h(y,g);else if(r&&typeof r=="object")for(const y of Object.keys(r))h(y,r[y]);return typeof n.sortMapEntries=="function"&&p.items.sort(n.sortMapEntries),p}add(n,r){var p;let l;We(n)?l=n:!n||typeof n!="object"||!("key"in n)?l=new wt(n,n==null?void 0:n.value):l=new wt(n.key,n.value);const a=Nr(this.items,l.key),u=(p=this.schema)==null?void 0:p.sortMapEntries;if(a){if(!r)throw new Error(`Key ${l.key} already set`);Me(a.value)&&np(l.value)?a.value.value=l.value:a.value=l.value}else if(u){const h=this.items.findIndex(y=>u(l,y)<0);h===-1?this.items.push(l):this.items.splice(h,0,l)}else this.items.push(l)}delete(n){const r=Nr(this.items,n);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(n,r){const l=Nr(this.items,n),a=l==null?void 0:l.value;return(!r&&Me(a)?a.value:a)??void 0}has(n){return!!Nr(this.items,n)}set(n,r){this.add(new wt(n,r),!0)}toJSON(n,r,l){const a=l?new l:r!=null&&r.mapAsMap?new Map:{};r!=null&&r.onCreate&&r.onCreate(a);for(const u of this.items)ap(r,a,u);return a}toString(n,r,l){if(!n)return JSON.stringify(this);for(const a of this.items)if(!We(a))throw new Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),up(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:l,onComment:r})}}const xs={collection:"map",default:!0,nodeClass:Ht,tag:"tag:yaml.org,2002:map",resolve(i,n){return Ai(i)||n("Expected a mapping for this tag"),i},createNode:(i,n,r)=>Ht.from(i,n,r)};class Er extends rp{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(Ss,n),this.items=[]}add(n){this.items.push(n)}delete(n){const r=ql(n);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(n,r){const l=ql(n);if(typeof l!="number")return;const a=this.items[l];return!r&&Me(a)?a.value:a}has(n){const r=ql(n);return typeof r=="number"&&r<this.items.length}set(n,r){const l=ql(n);if(typeof l!="number")throw new Error(`Expected a valid index, not ${n}.`);const a=this.items[l];Me(a)&&np(r)?a.value=r:this.items[l]=r}toJSON(n,r){const l=[];r!=null&&r.onCreate&&r.onCreate(l);let a=0;for(const u of this.items)l.push(Wt(u,String(a++),r));return l}toString(n,r,l){return n?up(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:l,onComment:r}):JSON.stringify(this)}static from(n,r,l){const{replacer:a}=l,u=new this(n);if(r&&Symbol.iterator in Object(r)){let p=0;for(let h of r){if(typeof a=="function"){const y=r instanceof Set?h:String(p++);h=a.call(r,y,h)}u.items.push(Ti(h,void 0,l))}}return u}}function ql(i){let n=Me(i)?i.value:i;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}const Ns={collection:"seq",default:!0,nodeClass:Er,tag:"tag:yaml.org,2002:seq",resolve(i,n){return bi(i)||n("Expected a sequence for this tag"),i},createNode:(i,n,r)=>Er.from(i,n,r)},po={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,n,r,l){return n=Object.assign({actualString:!0},n),Ru(i,n,r,l)}},ho={identify:i=>i==null,createNode:()=>new ke(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ke(null),stringify:({source:i},n)=>typeof i=="string"&&ho.test.test(i)?i:n.options.nullStr},$u={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new ke(i[0]==="t"||i[0]==="T"),stringify({source:i,value:n},r){if(i&&$u.test.test(i)){const l=i[0]==="t"||i[0]==="T";if(n===l)return i}return n?r.options.trueStr:r.options.falseStr}};function sn({format:i,minFractionDigits:n,tag:r,value:l}){if(typeof l=="bigint")return String(l);const a=typeof l=="number"?l:Number(l);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let u=Object.is(l,-0)?"-0":JSON.stringify(l);if(!i&&n&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(u)){let p=u.indexOf(".");p<0&&(p=u.length,u+=".");let h=n-(u.length-p-1);for(;h-- >0;)u+="0"}return u}const cp={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:sn},fp={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i),stringify(i){const n=Number(i.value);return isFinite(n)?n.toExponential():sn(i)}},dp={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(i){const n=new ke(parseFloat(i)),r=i.indexOf(".");return r!==-1&&i[i.length-1]==="0"&&(n.minFractionDigits=i.length-r-1),n},stringify:sn},mo=i=>typeof i=="bigint"||Number.isInteger(i),zu=(i,n,r,{intAsBigInt:l})=>l?BigInt(i):parseInt(i.substring(n),r);function pp(i,n,r){const{value:l}=i;return mo(l)&&l>=0?r+l.toString(n):sn(i)}const hp={identify:i=>mo(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(i,n,r)=>zu(i,2,8,r),stringify:i=>pp(i,8,"0o")},mp={identify:mo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(i,n,r)=>zu(i,0,10,r),stringify:sn},yp={identify:i=>mo(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(i,n,r)=>zu(i,2,16,r),stringify:i=>pp(i,16,"0x")},ay=[xs,Ns,po,ho,$u,hp,mp,yp,cp,fp,dp];function _d(i){return typeof i=="bigint"||Number.isInteger(i)}const Hl=({value:i})=>JSON.stringify(i),uy=[{identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify:Hl},{identify:i=>i==null,createNode:()=>new ke(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Hl},{identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:i=>i==="true",stringify:Hl},{identify:_d,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(i,n,{intAsBigInt:r})=>r?BigInt(i):parseInt(i,10),stringify:({value:i})=>_d(i)?i.toString():JSON.stringify(i)},{identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:i=>parseFloat(i),stringify:Hl}],cy={default:!0,tag:"",test:/^/,resolve(i,n){return n(`Unresolved plain scalar ${JSON.stringify(i)}`),i}},fy=[xs,Ns].concat(uy,cy),Bu={identify:i=>i instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(i,n){if(typeof atob=="function"){const r=atob(i.replace(/[\n\r]/g,"")),l=new Uint8Array(r.length);for(let a=0;a<r.length;++a)l[a]=r.charCodeAt(a);return l}else return n("This environment does not support reading binary tags; either Buffer or atob is required"),i},stringify({comment:i,type:n,value:r},l,a,u){if(!r)return"";const p=r;let h;if(typeof btoa=="function"){let y="";for(let g=0;g<p.length;++g)y+=String.fromCharCode(p[g]);h=btoa(y)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=ke.BLOCK_LITERAL),n!==ke.QUOTE_DOUBLE){const y=Math.max(l.options.lineWidth-l.indent.length,l.options.minContentWidth),g=Math.ceil(h.length/y),x=new Array(g);for(let w=0,O=0;w<g;++w,O+=y)x[w]=h.substr(O,y);h=x.join(n===ke.BLOCK_LITERAL?`
231
+ `:" ")}return Ru({comment:i,type:n,value:h},l,a,u)}};function gp(i,n){if(bi(i))for(let r=0;r<i.items.length;++r){let l=i.items[r];if(!We(l)){if(Ai(l)){l.items.length>1&&n("Each pair must have its own sequence indicator");const a=l.items[0]||new wt(new ke(null));if(l.commentBefore&&(a.key.commentBefore=a.key.commentBefore?`${l.commentBefore}
232
+ ${a.key.commentBefore}`:l.commentBefore),l.comment){const u=a.value??a.key;u.comment=u.comment?`${l.comment}
233
+ ${u.comment}`:l.comment}l=a}i.items[r]=We(l)?l:new wt(l)}}else n("Expected a sequence for this tag");return i}function vp(i,n,r){const{replacer:l}=r,a=new Er(i);a.tag="tag:yaml.org,2002:pairs";let u=0;if(n&&Symbol.iterator in Object(n))for(let p of n){typeof l=="function"&&(p=l.call(n,String(u++),p));let h,y;if(Array.isArray(p))if(p.length===2)h=p[0],y=p[1];else throw new TypeError(`Expected [key, value] tuple: ${p}`);else if(p&&p instanceof Object){const g=Object.keys(p);if(g.length===1)h=g[0],y=p[h];else throw new TypeError(`Expected tuple with one key, not ${g.length} keys`)}else h=p;a.items.push(Du(h,y,r))}return a}const Uu={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:gp,createNode:vp};class ys extends Er{constructor(){super(),this.add=Ht.prototype.add.bind(this),this.delete=Ht.prototype.delete.bind(this),this.get=Ht.prototype.get.bind(this),this.has=Ht.prototype.has.bind(this),this.set=Ht.prototype.set.bind(this),this.tag=ys.tag}toJSON(n,r){if(!r)return super.toJSON(n);const l=new Map;r!=null&&r.onCreate&&r.onCreate(l);for(const a of this.items){let u,p;if(We(a)?(u=Wt(a.key,"",r),p=Wt(a.value,u,r)):u=Wt(a,"",r),l.has(u))throw new Error("Ordered maps must not include duplicate keys");l.set(u,p)}return l}static from(n,r,l){const a=vp(n,r,l),u=new this;return u.items=a.items,u}}ys.tag="tag:yaml.org,2002:omap";const Fu={collection:"seq",identify:i=>i instanceof Map,nodeClass:ys,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,n){const r=gp(i,n),l=[];for(const{key:a}of r.items)Me(a)&&(l.includes(a.value)?n(`Ordered maps must not include duplicate keys: ${a.value}`):l.push(a.value));return Object.assign(new ys,r)},createNode:(i,n,r)=>ys.from(i,n,r)};function wp({value:i,source:n},r){return n&&(i?kp:Sp).test.test(n)?n:i?r.options.trueStr:r.options.falseStr}const kp={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ke(!0),stringify:wp},Sp={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ke(!1),stringify:wp},dy={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:sn},py={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){const n=Number(i.value);return isFinite(n)?n.toExponential():sn(i)}},hy={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){const n=new ke(parseFloat(i.replace(/_/g,""))),r=i.indexOf(".");if(r!==-1){const l=i.substring(r+1).replace(/_/g,"");l[l.length-1]==="0"&&(n.minFractionDigits=l.length)}return n},stringify:sn},Pi=i=>typeof i=="bigint"||Number.isInteger(i);function yo(i,n,r,{intAsBigInt:l}){const a=i[0];if((a==="-"||a==="+")&&(n+=1),i=i.substring(n).replace(/_/g,""),l){switch(r){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}const p=BigInt(i);return a==="-"?BigInt(-1)*p:p}const u=parseInt(i,r);return a==="-"?-1*u:u}function Vu(i,n,r){const{value:l}=i;if(Pi(l)){const a=l.toString(n);return l<0?"-"+r+a.substr(1):r+a}return sn(i)}const my={identify:Pi,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,n,r)=>yo(i,2,2,r),stringify:i=>Vu(i,2,"0b")},yy={identify:Pi,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,n,r)=>yo(i,1,8,r),stringify:i=>Vu(i,8,"0")},gy={identify:Pi,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,n,r)=>yo(i,0,10,r),stringify:sn},vy={identify:Pi,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,n,r)=>yo(i,2,16,r),stringify:i=>Vu(i,16,"0x")};class gs extends Ht{constructor(n){super(n),this.tag=gs.tag}add(n){let r;We(n)?r=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?r=new wt(n.key,null):r=new wt(n,null),Nr(this.items,r.key)||this.items.push(r)}get(n,r){const l=Nr(this.items,n);return!r&&We(l)?Me(l.key)?l.key.value:l.key:l}set(n,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);const l=Nr(this.items,n);l&&!r?this.items.splice(this.items.indexOf(l),1):!l&&r&&this.items.push(new wt(n))}toJSON(n,r){return super.toJSON(n,r,Set)}toString(n,r,l){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),r,l);throw new Error("Set items must all have null values")}static from(n,r,l){const{replacer:a}=l,u=new this(n);if(r&&Symbol.iterator in Object(r))for(let p of r)typeof a=="function"&&(p=a.call(r,p,p)),u.items.push(Du(p,null,l));return u}}gs.tag="tag:yaml.org,2002:set";const Ku={collection:"map",identify:i=>i instanceof Set,nodeClass:gs,default:!1,tag:"tag:yaml.org,2002:set",createNode:(i,n,r)=>gs.from(i,n,r),resolve(i,n){if(Ai(i)){if(i.hasAllNullValues(!0))return Object.assign(new gs,i);n("Set items must all have null values")}else n("Expected a mapping for this tag");return i}};function qu(i,n){const r=i[0],l=r==="-"||r==="+"?i.substring(1):i,a=p=>n?BigInt(p):Number(p),u=l.replace(/_/g,"").split(":").reduce((p,h)=>p*a(60)+a(h),a(0));return r==="-"?a(-1)*u:u}function jp(i){let{value:n}=i,r=p=>p;if(typeof n=="bigint")r=p=>BigInt(p);else if(isNaN(n)||!isFinite(n))return sn(i);let l="";n<0&&(l="-",n*=r(-1));const a=r(60),u=[n%a];return n<60?u.unshift(0):(n=(n-u[0])/a,u.unshift(n%a),n>=60&&(n=(n-u[0])/a,u.unshift(n))),l+u.map(p=>String(p).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const xp={identify:i=>typeof i=="bigint"||Number.isInteger(i),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(i,n,{intAsBigInt:r})=>qu(i,r),stringify:jp},Np={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:i=>qu(i,!1),stringify:jp},go={identify:i=>i instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(i){const n=i.match(go.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,l,a,u,p,h]=n.map(Number),y=n[7]?Number((n[7]+"00").substr(1,3)):0;let g=Date.UTC(r,l-1,a,u||0,p||0,h||0,y);const x=n[8];if(x&&x!=="Z"){let w=qu(x,!1);Math.abs(w)<30&&(w*=60),g-=6e4*w}return new Date(g)},stringify:({value:i})=>(i==null?void 0:i.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Id=[xs,Ns,po,ho,kp,Sp,my,yy,gy,vy,dy,py,hy,Bu,On,Fu,Uu,Ku,xp,Np,go],Ld=new Map([["core",ay],["failsafe",[xs,Ns,po]],["json",fy],["yaml11",Id],["yaml-1.1",Id]]),Ad={binary:Bu,bool:$u,float:dp,floatExp:fp,floatNaN:cp,floatTime:Np,int:mp,intHex:yp,intOct:hp,intTime:xp,map:xs,merge:On,null:ho,omap:Fu,pairs:Uu,seq:Ns,set:Ku,timestamp:go},wy={"tag:yaml.org,2002:binary":Bu,"tag:yaml.org,2002:merge":On,"tag:yaml.org,2002:omap":Fu,"tag:yaml.org,2002:pairs":Uu,"tag:yaml.org,2002:set":Ku,"tag:yaml.org,2002:timestamp":go};function uu(i,n,r){const l=Ld.get(n);if(l&&!i)return r&&!l.includes(On)?l.concat(On):l.slice();let a=l;if(!a)if(Array.isArray(i))a=[];else{const u=Array.from(Ld.keys()).filter(p=>p!=="yaml11").map(p=>JSON.stringify(p)).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${u} or define customTags array`)}if(Array.isArray(i))for(const u of i)a=a.concat(u);else typeof i=="function"&&(a=i(a.slice()));return r&&(a=a.concat(On)),a.reduce((u,p)=>{const h=typeof p=="string"?Ad[p]:p;if(!h){const y=JSON.stringify(p),g=Object.keys(Ad).map(x=>JSON.stringify(x)).join(", ");throw new Error(`Unknown custom tag ${y}; use one of ${g}`)}return u.includes(h)||u.push(h),u},[])}const ky=(i,n)=>i.key<n.key?-1:i.key>n.key?1:0;class Hu{constructor({compat:n,customTags:r,merge:l,resolveKnownTags:a,schema:u,sortMapEntries:p,toStringDefaults:h}){this.compat=Array.isArray(n)?uu(n,"compat"):n?uu(null,n):null,this.name=typeof u=="string"&&u||"core",this.knownTags=a?wy:{},this.tags=uu(r,this.name,l),this.toStringOptions=h??null,Object.defineProperty(this,tr,{value:xs}),Object.defineProperty(this,pn,{value:po}),Object.defineProperty(this,Ss,{value:Ns}),this.sortMapEntries=typeof p=="function"?p:p===!0?ky:null}clone(){const n=Object.create(Hu.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function Sy(i,n){var y;const r=[];let l=n.directives===!0;if(n.directives!==!1&&i.directives){const g=i.directives.toString(i);g?(r.push(g),l=!0):i.directives.docStart&&(l=!0)}l&&r.push("---");const a=ip(i,n),{commentString:u}=a.options;if(i.commentBefore){r.length!==1&&r.unshift("");const g=u(i.commentBefore);r.unshift(En(g,""))}let p=!1,h=null;if(i.contents){if(He(i.contents)){if(i.contents.spaceBefore&&l&&r.push(""),i.contents.commentBefore){const w=u(i.contents.commentBefore);r.push(En(w,""))}a.forceBlockIndent=!!i.comment,h=i.contents.comment}const g=h?void 0:()=>p=!0;let x=vs(i.contents,a,()=>h=null,g);h&&(x+=xr(x,"",u(h))),(x[0]==="|"||x[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${x}`:r.push(x)}else r.push(vs(i.contents,a));if((y=i.directives)!=null&&y.docEnd)if(i.comment){const g=u(i.comment);g.includes(`
234
+ `)?(r.push("..."),r.push(En(g,""))):r.push(`... ${g}`)}else r.push("...");else{let g=i.comment;g&&p&&(g=g.replace(/^\n+/,"")),g&&((!p||h)&&r[r.length-1]!==""&&r.push(""),r.push(En(u(g),"")))}return r.join(`
235
+ `)+`
236
+ `}class vo{constructor(n,r,l){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Qt,{value:Su});let a=null;typeof r=="function"||Array.isArray(r)?a=r:l===void 0&&r&&(l=r,r=void 0);const u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},l);this.options=u;let{version:p}=u;l!=null&&l._directives?(this.directives=l._directives.atDocument(),this.directives.yaml.explicit&&(p=this.directives.yaml.version)):this.directives=new vt({version:p}),this.setSchema(p,l),this.contents=n===void 0?null:this.createNode(n,a,l)}clone(){const n=Object.create(vo.prototype,{[Qt]:{value:Su}});return n.commentBefore=this.commentBefore,n.comment=this.comment,n.errors=this.errors.slice(),n.warnings=this.warnings.slice(),n.options=Object.assign({},this.options),this.directives&&(n.directives=this.directives.clone()),n.schema=this.schema.clone(),n.contents=He(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){as(this.contents)&&this.contents.add(n)}addIn(n,r){as(this.contents)&&this.contents.addIn(n,r)}createAlias(n,r){if(!n.anchor){const l=ep(this);n.anchor=!r||l.has(r)?tp(r||"a",l):r}return new Mu(n.anchor)}createNode(n,r,l){let a;if(typeof r=="function")n=r.call({"":n},"",n),a=r;else if(Array.isArray(r)){const I=J=>typeof J=="number"||J instanceof String||J instanceof Number,R=r.filter(I).map(String);R.length>0&&(r=r.concat(R)),a=r}else l===void 0&&r&&(l=r,r=void 0);const{aliasDuplicateObjects:u,anchorPrefix:p,flow:h,keepUndefined:y,onTagObj:g,tag:x}=l??{},{onAnchor:w,setAnchors:O,sourceObjects:E}=Jm(this,p||"a"),b={aliasDuplicateObjects:u??!0,keepUndefined:y??!1,onAnchor:w,onTagObj:g,replacer:a,schema:this.schema,sourceObjects:E},S=Ti(n,x,b);return h&&qe(S)&&(S.flow=!0),O(),S}createPair(n,r,l={}){const a=this.createNode(n,null,l),u=this.createNode(r,null,l);return new wt(a,u)}delete(n){return as(this.contents)?this.contents.delete(n):!1}deleteIn(n){return gi(n)?this.contents==null?!1:(this.contents=null,!0):as(this.contents)?this.contents.deleteIn(n):!1}get(n,r){return qe(this.contents)?this.contents.get(n,r):void 0}getIn(n,r){return gi(n)?!r&&Me(this.contents)?this.contents.value:this.contents:qe(this.contents)?this.contents.getIn(n,r):void 0}has(n){return qe(this.contents)?this.contents.has(n):!1}hasIn(n){return gi(n)?this.contents!==void 0:qe(this.contents)?this.contents.hasIn(n):!1}set(n,r){this.contents==null?this.contents=no(this.schema,[n],r):as(this.contents)&&this.contents.set(n,r)}setIn(n,r){gi(n)?this.contents=r:this.contents==null?this.contents=no(this.schema,Array.from(n),r):as(this.contents)&&this.contents.setIn(n,r)}setSchema(n,r={}){typeof n=="number"&&(n=String(n));let l;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new vt({version:"1.1"}),l={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new vt({version:n}),l={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,l=null;break;default:{const a=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${a}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(l)this.schema=new Hu(Object.assign(l,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:r,mapAsMap:l,maxAliasCount:a,onAnchor:u,reviver:p}={}){const h={anchors:new Map,doc:this,keep:!n,mapAsMap:l===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},y=Wt(this.contents,r??"",h);if(typeof u=="function")for(const{count:g,res:x}of h.anchors.values())u(x,g);return typeof p=="function"?fs(p,{"":y},"",y):y}toJSON(n,r){return this.toJS({json:!0,jsonArg:n,mapAsMap:!1,onAnchor:r})}toString(n={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in n&&(!Number.isInteger(n.indent)||Number(n.indent)<=0)){const r=JSON.stringify(n.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return Sy(this,n)}}function as(i){if(qe(i))return!0;throw new Error("Expected a YAML collection as document contents")}class Cp extends Error{constructor(n,r,l,a){super(),this.name=n,this.code=l,this.message=a,this.pos=r}}class vi extends Cp{constructor(n,r,l){super("YAMLParseError",n,r,l)}}class jy extends Cp{constructor(n,r,l){super("YAMLWarning",n,r,l)}}const bd=(i,n)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(h=>n.linePos(h));const{line:l,col:a}=r.linePos[0];r.message+=` at line ${l}, column ${a}`;let u=a-1,p=i.substring(n.lineStarts[l-1],n.lineStarts[l]).replace(/[\n\r]+$/,"");if(u>=60&&p.length>80){const h=Math.min(u-39,p.length-79);p="…"+p.substring(h),u-=h-1}if(p.length>80&&(p=p.substring(0,79)+"…"),l>1&&/^ *$/.test(p.substring(0,u))){let h=i.substring(n.lineStarts[l-2],n.lineStarts[l-1]);h.length>80&&(h=h.substring(0,79)+`…
237
+ `),p=h+p}if(/[^ ]/.test(p)){let h=1;const y=r.linePos[1];(y==null?void 0:y.line)===l&&y.col>a&&(h=Math.max(1,Math.min(y.col-a,80-u)));const g=" ".repeat(u)+"^".repeat(h);r.message+=`:
238
+
239
+ ${p}
240
+ ${g}
241
+ `}};function ws(i,{flow:n,indicator:r,next:l,offset:a,onError:u,parentIndent:p,startOnNewline:h}){let y=!1,g=h,x=h,w="",O="",E=!1,b=!1,S=null,I=null,R=null,J=null,K=null,W=null,q=null;for(const U of i)switch(b&&(U.type!=="space"&&U.type!=="newline"&&U.type!=="comma"&&u(U.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b=!1),S&&(g&&U.type!=="comment"&&U.type!=="newline"&&u(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),S=null),U.type){case"space":!n&&(r!=="doc-start"||(l==null?void 0:l.type)!=="flow-collection")&&U.source.includes(" ")&&(S=U),x=!0;break;case"comment":{x||u(U,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const ue=U.source.substring(1)||" ";w?w+=O+ue:w=ue,O="",g=!1;break}case"newline":g?w?w+=U.source:(!W||r!=="seq-item-ind")&&(y=!0):O+=U.source,g=!0,E=!0,(I||R)&&(J=U),x=!0;break;case"anchor":I&&u(U,"MULTIPLE_ANCHORS","A node can have at most one anchor"),U.source.endsWith(":")&&u(U.offset+U.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),I=U,q??(q=U.offset),g=!1,x=!1,b=!0;break;case"tag":{R&&u(U,"MULTIPLE_TAGS","A node can have at most one tag"),R=U,q??(q=U.offset),g=!1,x=!1,b=!0;break}case r:(I||R)&&u(U,"BAD_PROP_ORDER",`Anchors and tags must be after the ${U.source} indicator`),W&&u(U,"UNEXPECTED_TOKEN",`Unexpected ${U.source} in ${n??"collection"}`),W=U,g=r==="seq-item-ind"||r==="explicit-key-ind",x=!1;break;case"comma":if(n){K&&u(U,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),K=U,g=!1,x=!1;break}default:u(U,"UNEXPECTED_TOKEN",`Unexpected ${U.type} token`),g=!1,x=!1}const F=i[i.length-1],H=F?F.offset+F.source.length:a;return b&&l&&l.type!=="space"&&l.type!=="newline"&&l.type!=="comma"&&(l.type!=="scalar"||l.source!=="")&&u(l.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S&&(g&&S.indent<=p||(l==null?void 0:l.type)==="block-map"||(l==null?void 0:l.type)==="block-seq")&&u(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:K,found:W,spaceBefore:y,comment:w,hasNewline:E,anchor:I,tag:R,newlineAfterProp:J,end:H,start:q??H}}function _i(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(`
242
+ `))return!0;if(i.end){for(const n of i.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(const n of i.items){for(const r of n.start)if(r.type==="newline")return!0;if(n.sep){for(const r of n.sep)if(r.type==="newline")return!0}if(_i(n.key)||_i(n.value))return!0}return!1;default:return!0}}function Cu(i,n,r){if((n==null?void 0:n.type)==="flow-collection"){const l=n.end[0];l.indent===i&&(l.source==="]"||l.source==="}")&&_i(n)&&r(l,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Ep(i,n,r){const{uniqueKeys:l}=i.options;if(l===!1)return!1;const a=typeof l=="function"?l:(u,p)=>u===p||Me(u)&&Me(p)&&u.value===p.value;return n.some(u=>a(u.key,r))}const Pd="All mapping items must start at the same column";function xy({composeNode:i,composeEmptyNode:n},r,l,a,u){var x;const p=(u==null?void 0:u.nodeClass)??Ht,h=new p(r.schema);r.atRoot&&(r.atRoot=!1);let y=l.offset,g=null;for(const w of l.items){const{start:O,key:E,sep:b,value:S}=w,I=ws(O,{indicator:"explicit-key-ind",next:E??(b==null?void 0:b[0]),offset:y,onError:a,parentIndent:l.indent,startOnNewline:!0}),R=!I.found;if(R){if(E&&(E.type==="block-seq"?a(y,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in E&&E.indent!==l.indent&&a(y,"BAD_INDENT",Pd)),!I.anchor&&!I.tag&&!b){g=I.end,I.comment&&(h.comment?h.comment+=`
243
+ `+I.comment:h.comment=I.comment);continue}(I.newlineAfterProp||_i(E))&&a(E??O[O.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((x=I.found)==null?void 0:x.indent)!==l.indent&&a(y,"BAD_INDENT",Pd);r.atKey=!0;const J=I.end,K=E?i(r,E,I,a):n(r,J,O,null,I,a);r.schema.compat&&Cu(l.indent,E,a),r.atKey=!1,Ep(r,h.items,K)&&a(J,"DUPLICATE_KEY","Map keys must be unique");const W=ws(b??[],{indicator:"map-value-ind",next:S,offset:K.range[2],onError:a,parentIndent:l.indent,startOnNewline:!E||E.type==="block-scalar"});if(y=W.end,W.found){R&&((S==null?void 0:S.type)==="block-map"&&!W.hasNewline&&a(y,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&I.start<W.found.offset-1024&&a(K.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const q=S?i(r,S,W,a):n(r,y,b,null,W,a);r.schema.compat&&Cu(l.indent,S,a),y=q.range[2];const F=new wt(K,q);r.options.keepSourceTokens&&(F.srcToken=w),h.items.push(F)}else{R&&a(K.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),W.comment&&(K.comment?K.comment+=`
244
+ `+W.comment:K.comment=W.comment);const q=new wt(K);r.options.keepSourceTokens&&(q.srcToken=w),h.items.push(q)}}return g&&g<y&&a(g,"IMPOSSIBLE","Map comment with trailing content"),h.range=[l.offset,y,g??y],h}function Ny({composeNode:i,composeEmptyNode:n},r,l,a,u){const p=(u==null?void 0:u.nodeClass)??Er,h=new p(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let y=l.offset,g=null;for(const{start:x,value:w}of l.items){const O=ws(x,{indicator:"seq-item-ind",next:w,offset:y,onError:a,parentIndent:l.indent,startOnNewline:!0});if(!O.found)if(O.anchor||O.tag||w)(w==null?void 0:w.type)==="block-seq"?a(O.end,"BAD_INDENT","All sequence items must start at the same column"):a(y,"MISSING_CHAR","Sequence item without - indicator");else{g=O.end,O.comment&&(h.comment=O.comment);continue}const E=w?i(r,w,O,a):n(r,O.end,x,null,O,a);r.schema.compat&&Cu(l.indent,w,a),y=E.range[2],h.items.push(E)}return h.range=[l.offset,y,g??y],h}function Mi(i,n,r,l){let a="";if(i){let u=!1,p="";for(const h of i){const{source:y,type:g}=h;switch(g){case"space":u=!0;break;case"comment":{r&&!u&&l(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const x=y.substring(1)||" ";a?a+=p+x:a=x,p="";break}case"newline":a&&(p+=y),u=!0;break;default:l(h,"UNEXPECTED_TOKEN",`Unexpected ${g} at node end`)}n+=y.length}}return{comment:a,offset:n}}const cu="Block collections are not allowed within flow collections",fu=i=>i&&(i.type==="block-map"||i.type==="block-seq");function Cy({composeNode:i,composeEmptyNode:n},r,l,a,u){var I;const p=l.start.source==="{",h=p?"flow map":"flow sequence",y=(u==null?void 0:u.nodeClass)??(p?Ht:Er),g=new y(r.schema);g.flow=!0;const x=r.atRoot;x&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let w=l.offset+l.start.source.length;for(let R=0;R<l.items.length;++R){const J=l.items[R],{start:K,key:W,sep:q,value:F}=J,H=ws(K,{flow:h,indicator:"explicit-key-ind",next:W??(q==null?void 0:q[0]),offset:w,onError:a,parentIndent:l.indent,startOnNewline:!1});if(!H.found){if(!H.anchor&&!H.tag&&!q&&!F){R===0&&H.comma?a(H.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`):R<l.items.length-1&&a(H.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${h}`),H.comment&&(g.comment?g.comment+=`
245
+ `+H.comment:g.comment=H.comment),w=H.end;continue}!p&&r.options.strict&&_i(W)&&a(W,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(R===0)H.comma&&a(H.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`);else if(H.comma||a(H.start,"MISSING_CHAR",`Missing , between ${h} items`),H.comment){let U="";e:for(const ue of K)switch(ue.type){case"comma":case"space":break;case"comment":U=ue.source.substring(1);break e;default:break e}if(U){let ue=g.items[g.items.length-1];We(ue)&&(ue=ue.value??ue.key),ue.comment?ue.comment+=`
246
+ `+U:ue.comment=U,H.comment=H.comment.substring(U.length+1)}}if(!p&&!q&&!H.found){const U=F?i(r,F,H,a):n(r,H.end,q,null,H,a);g.items.push(U),w=U.range[2],fu(F)&&a(U.range,"BLOCK_IN_FLOW",cu)}else{r.atKey=!0;const U=H.end,ue=W?i(r,W,H,a):n(r,U,K,null,H,a);fu(W)&&a(ue.range,"BLOCK_IN_FLOW",cu),r.atKey=!1;const Z=ws(q??[],{flow:h,indicator:"map-value-ind",next:F,offset:ue.range[2],onError:a,parentIndent:l.indent,startOnNewline:!1});if(Z.found){if(!p&&!H.found&&r.options.strict){if(q)for(const G of q){if(G===Z.found)break;if(G.type==="newline"){a(G,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}H.start<Z.found.offset-1024&&a(Z.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else F&&("source"in F&&((I=F.source)==null?void 0:I[0])===":"?a(F,"MISSING_CHAR",`Missing space after : in ${h}`):a(Z.start,"MISSING_CHAR",`Missing , or : between ${h} items`));const we=F?i(r,F,Z,a):Z.found?n(r,Z.end,q,null,Z,a):null;we?fu(F)&&a(we.range,"BLOCK_IN_FLOW",cu):Z.comment&&(ue.comment?ue.comment+=`
247
+ `+Z.comment:ue.comment=Z.comment);const ie=new wt(ue,we);if(r.options.keepSourceTokens&&(ie.srcToken=J),p){const G=g;Ep(r,G.items,ue)&&a(U,"DUPLICATE_KEY","Map keys must be unique"),G.items.push(ie)}else{const G=new Ht(r.schema);G.flow=!0,G.items.push(ie);const oe=(we??ue).range;G.range=[ue.range[0],oe[1],oe[2]],g.items.push(G)}w=we?we.range[2]:Z.end}}const O=p?"}":"]",[E,...b]=l.end;let S=w;if((E==null?void 0:E.source)===O)S=E.offset+E.source.length;else{const R=h[0].toUpperCase()+h.substring(1),J=x?`${R} must end with a ${O}`:`${R} in block collection must be sufficiently indented and end with a ${O}`;a(w,x?"MISSING_CHAR":"BAD_INDENT",J),E&&E.source.length!==1&&b.unshift(E)}if(b.length>0){const R=Mi(b,S,r.options.strict,a);R.comment&&(g.comment?g.comment+=`
248
+ `+R.comment:g.comment=R.comment),g.range=[l.offset,S,R.offset]}else g.range=[l.offset,S,S];return g}function du(i,n,r,l,a,u){const p=r.type==="block-map"?xy(i,n,r,l,u):r.type==="block-seq"?Ny(i,n,r,l,u):Cy(i,n,r,l,u),h=p.constructor;return a==="!"||a===h.tagName?(p.tag=h.tagName,p):(a&&(p.tag=a),p)}function Ey(i,n,r,l,a){var O;const u=l.tag,p=u?n.directives.tagName(u.source,E=>a(u,"TAG_RESOLVE_FAILED",E)):null;if(r.type==="block-seq"){const{anchor:E,newlineAfterProp:b}=l,S=E&&u?E.offset>u.offset?E:u:E??u;S&&(!b||b.offset<S.offset)&&a(S,"MISSING_CHAR","Missing newline after block sequence props")}const h=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!u||!p||p==="!"||p===Ht.tagName&&h==="map"||p===Er.tagName&&h==="seq")return du(i,n,r,a,p);let y=n.schema.tags.find(E=>E.tag===p&&E.collection===h);if(!y){const E=n.schema.knownTags[p];if((E==null?void 0:E.collection)===h)n.schema.tags.push(Object.assign({},E,{default:!1})),y=E;else return E?a(u,"BAD_COLLECTION_TYPE",`${E.tag} used for ${h} collection, but expects ${E.collection??"scalar"}`,!0):a(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${p}`,!0),du(i,n,r,a,p)}const g=du(i,n,r,a,p,y),x=((O=y.resolve)==null?void 0:O.call(y,g,E=>a(u,"TAG_RESOLVE_FAILED",E),n.options))??g,w=He(x)?x:new ke(x);return w.range=g.range,w.tag=p,y!=null&&y.format&&(w.format=y.format),w}function Oy(i,n,r){const l=n.offset,a=Ty(n,i.options.strict,r);if(!a)return{value:"",type:null,comment:"",range:[l,l,l]};const u=a.mode===">"?ke.BLOCK_FOLDED:ke.BLOCK_LITERAL,p=n.source?_y(n.source):[];let h=p.length;for(let S=p.length-1;S>=0;--S){const I=p[S][1];if(I===""||I==="\r")h=S;else break}if(h===0){const S=a.chomp==="+"&&p.length>0?`
249
+ `.repeat(Math.max(1,p.length-1)):"";let I=l+a.length;return n.source&&(I+=n.source.length),{value:S,type:u,comment:a.comment,range:[l,I,I]}}let y=n.indent+a.indent,g=n.offset+a.length,x=0;for(let S=0;S<h;++S){const[I,R]=p[S];if(R===""||R==="\r")a.indent===0&&I.length>y&&(y=I.length);else{I.length<y&&r(g+I.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),a.indent===0&&(y=I.length),x=S,y===0&&!i.atRoot&&r(g,"BAD_INDENT","Block scalar values in collections must be indented");break}g+=I.length+R.length+1}for(let S=p.length-1;S>=h;--S)p[S][0].length>y&&(h=S+1);let w="",O="",E=!1;for(let S=0;S<x;++S)w+=p[S][0].slice(y)+`
250
+ `;for(let S=x;S<h;++S){let[I,R]=p[S];g+=I.length+R.length+1;const J=R[R.length-1]==="\r";if(J&&(R=R.slice(0,-1)),R&&I.length<y){const W=`Block scalar lines must not be less indented than their ${a.indent?"explicit indentation indicator":"first line"}`;r(g-R.length-(J?2:1),"BAD_INDENT",W),I=""}u===ke.BLOCK_LITERAL?(w+=O+I.slice(y)+R,O=`
251
+ `):I.length>y||R[0]===" "?(O===" "?O=`
252
+ `:!E&&O===`
253
+ `&&(O=`
254
+
255
+ `),w+=O+I.slice(y)+R,O=`
256
+ `,E=!0):R===""?O===`
257
+ `?w+=`
258
+ `:O=`
259
+ `:(w+=O+R,O=" ",E=!1)}switch(a.chomp){case"-":break;case"+":for(let S=h;S<p.length;++S)w+=`
260
+ `+p[S][0].slice(y);w[w.length-1]!==`
261
+ `&&(w+=`
262
+ `);break;default:w+=`
263
+ `}const b=l+a.length+n.source.length;return{value:w,type:u,comment:a.comment,range:[l,b,b]}}function Ty({offset:i,props:n},r,l){if(n[0].type!=="block-scalar-header")return l(n[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=n[0],u=a[0];let p=0,h="",y=-1;for(let O=1;O<a.length;++O){const E=a[O];if(!h&&(E==="-"||E==="+"))h=E;else{const b=Number(E);!p&&b?p=b:y===-1&&(y=i+O)}}y!==-1&&l(y,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let g=!1,x="",w=a.length;for(let O=1;O<n.length;++O){const E=n[O];switch(E.type){case"space":g=!0;case"newline":w+=E.source.length;break;case"comment":r&&!g&&l(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),w+=E.source.length,x=E.source.substring(1);break;case"error":l(E,"UNEXPECTED_TOKEN",E.message),w+=E.source.length;break;default:{const b=`Unexpected token in block scalar header: ${E.type}`;l(E,"UNEXPECTED_TOKEN",b);const S=E.source;S&&typeof S=="string"&&(w+=S.length)}}}return{mode:u,indent:p,chomp:h,comment:x,length:w}}function _y(i){const n=i.split(/\n( *)/),r=n[0],l=r.match(/^( *)/),u=[l!=null&&l[1]?[l[1],r.slice(l[1].length)]:["",r]];for(let p=1;p<n.length;p+=2)u.push([n[p],n[p+1]]);return u}function Iy(i,n,r){const{offset:l,type:a,source:u,end:p}=i;let h,y;const g=(O,E,b)=>r(l+O,E,b);switch(a){case"scalar":h=ke.PLAIN,y=Ly(u,g);break;case"single-quoted-scalar":h=ke.QUOTE_SINGLE,y=Ay(u,g);break;case"double-quoted-scalar":h=ke.QUOTE_DOUBLE,y=by(u,g);break;default:return r(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[l,l+u.length,l+u.length]}}const x=l+u.length,w=Mi(p,x,n,r);return{value:y,type:h,comment:w.comment,range:[l,x,w.offset]}}function Ly(i,n){let r="";switch(i[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${i[0]}`;break}case"@":case"`":{r=`reserved character ${i[0]}`;break}}return r&&n(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Op(i)}function Ay(i,n){return(i[i.length-1]!=="'"||i.length===1)&&n(i.length,"MISSING_CHAR","Missing closing 'quote"),Op(i.slice(1,-1)).replace(/''/g,"'")}function Op(i){let n,r;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
264
+ `,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
265
+ `,"sy")}catch{n=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let l=n.exec(i);if(!l)return i;let a=l[1],u=" ",p=n.lastIndex;for(r.lastIndex=p;l=r.exec(i);)l[1]===""?u===`
266
+ `?a+=u:u=`
267
+ `:(a+=u+l[1],u=" "),p=r.lastIndex;const h=/[ \t]*(.*)/sy;return h.lastIndex=p,l=h.exec(i),a+u+((l==null?void 0:l[1])??"")}function by(i,n){let r="";for(let l=1;l<i.length-1;++l){const a=i[l];if(!(a==="\r"&&i[l+1]===`
268
+ `))if(a===`
269
+ `){const{fold:u,offset:p}=Py(i,l);r+=u,l=p}else if(a==="\\"){let u=i[++l];const p=My[u];if(p)r+=p;else if(u===`
270
+ `)for(u=i[l+1];u===" "||u===" ";)u=i[++l+1];else if(u==="\r"&&i[l+1]===`
271
+ `)for(u=i[++l+1];u===" "||u===" ";)u=i[++l+1];else if(u==="x"||u==="u"||u==="U"){const h={x:2,u:4,U:8}[u];r+=Ry(i,l+1,h,n),l+=h}else{const h=i.substr(l-1,2);n(l-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),r+=h}}else if(a===" "||a===" "){const u=l;let p=i[l+1];for(;p===" "||p===" ";)p=i[++l+1];p!==`
272
+ `&&!(p==="\r"&&i[l+2]===`
273
+ `)&&(r+=l>u?i.slice(u,l+1):a)}else r+=a}return(i[i.length-1]!=='"'||i.length===1)&&n(i.length,"MISSING_CHAR",'Missing closing "quote'),r}function Py(i,n){let r="",l=i[n+1];for(;(l===" "||l===" "||l===`
274
+ `||l==="\r")&&!(l==="\r"&&i[n+2]!==`
275
+ `);)l===`
276
+ `&&(r+=`
277
+ `),n+=1,l=i[n+1];return r||(r=" "),{fold:r,offset:n}}const My={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
278
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Ry(i,n,r,l){const a=i.substr(n,r),p=a.length===r&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;if(isNaN(p)){const h=i.substr(n-2,r+2);return l(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),h}return String.fromCodePoint(p)}function Tp(i,n,r,l){const{value:a,type:u,comment:p,range:h}=n.type==="block-scalar"?Oy(i,n,l):Iy(n,i.options.strict,l),y=r?i.directives.tagName(r.source,w=>l(r,"TAG_RESOLVE_FAILED",w)):null;let g;i.options.stringKeys&&i.atKey?g=i.schema[pn]:y?g=Dy(i.schema,a,y,r,l):n.type==="scalar"?g=$y(i,a,n,l):g=i.schema[pn];let x;try{const w=g.resolve(a,O=>l(r??n,"TAG_RESOLVE_FAILED",O),i.options);x=Me(w)?w:new ke(w)}catch(w){const O=w instanceof Error?w.message:String(w);l(r??n,"TAG_RESOLVE_FAILED",O),x=new ke(a)}return x.range=h,x.source=a,u&&(x.type=u),y&&(x.tag=y),g.format&&(x.format=g.format),p&&(x.comment=p),x}function Dy(i,n,r,l,a){var h;if(r==="!")return i[pn];const u=[];for(const y of i.tags)if(!y.collection&&y.tag===r)if(y.default&&y.test)u.push(y);else return y;for(const y of u)if((h=y.test)!=null&&h.test(n))return y;const p=i.knownTags[r];return p&&!p.collection?(i.tags.push(Object.assign({},p,{default:!1,test:void 0})),p):(a(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),i[pn])}function $y({atKey:i,directives:n,schema:r},l,a,u){const p=r.tags.find(h=>{var y;return(h.default===!0||i&&h.default==="key")&&((y=h.test)==null?void 0:y.test(l))})||r[pn];if(r.compat){const h=r.compat.find(y=>{var g;return y.default&&((g=y.test)==null?void 0:g.test(l))})??r[pn];if(p.tag!==h.tag){const y=n.tagString(p.tag),g=n.tagString(h.tag),x=`Value may be parsed as either ${y} or ${g}`;u(a,"TAG_RESOLVE_FAILED",x,!0)}}return p}function zy(i,n,r){if(n){r??(r=n.length);for(let l=r-1;l>=0;--l){let a=n[l];switch(a.type){case"space":case"comment":case"newline":i-=a.source.length;continue}for(a=n[++l];(a==null?void 0:a.type)==="space";)i+=a.source.length,a=n[++l];break}}return i}const By={composeNode:_p,composeEmptyNode:Wu};function _p(i,n,r,l){const a=i.atKey,{spaceBefore:u,comment:p,anchor:h,tag:y}=r;let g,x=!0;switch(n.type){case"alias":g=Uy(i,n,l),(h||y)&&l(n,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=Tp(i,n,y,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{g=Ey(By,i,n,r,l),h&&(g.anchor=h.source.substring(1))}catch(w){const O=w instanceof Error?w.message:String(w);l(n,"RESOURCE_EXHAUSTION",O)}break;default:{const w=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;l(n,"UNEXPECTED_TOKEN",w),x=!1}}return g??(g=Wu(i,n.offset,void 0,null,r,l)),h&&g.anchor===""&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),a&&i.options.stringKeys&&(!Me(g)||typeof g.value!="string"||g.tag&&g.tag!=="tag:yaml.org,2002:str")&&l(y??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),u&&(g.spaceBefore=!0),p&&(n.type==="scalar"&&n.source===""?g.comment=p:g.commentBefore=p),i.options.keepSourceTokens&&x&&(g.srcToken=n),g}function Wu(i,n,r,l,{spaceBefore:a,comment:u,anchor:p,tag:h,end:y},g){const x={type:"scalar",offset:zy(n,r,l),indent:-1,source:""},w=Tp(i,x,h,g);return p&&(w.anchor=p.source.substring(1),w.anchor===""&&g(p,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(w.spaceBefore=!0),u&&(w.comment=u,w.range[2]=y),w}function Uy({options:i},{offset:n,source:r,end:l},a){const u=new Mu(r.substring(1));u.source===""&&a(n,"BAD_ALIAS","Alias cannot be an empty string"),u.source.endsWith(":")&&a(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const p=n+r.length,h=Mi(l,p,i.strict,a);return u.range=[n,p,h.offset],h.comment&&(u.comment=h.comment),u}function Fy(i,n,{offset:r,start:l,value:a,end:u},p){const h=Object.assign({_directives:n},i),y=new vo(void 0,h),g={atKey:!1,atRoot:!0,directives:y.directives,options:y.options,schema:y.schema},x=ws(l,{indicator:"doc-start",next:a??(u==null?void 0:u[0]),offset:r,onError:p,parentIndent:0,startOnNewline:!0});x.found&&(y.directives.docStart=!0,a&&(a.type==="block-map"||a.type==="block-seq")&&!x.hasNewline&&p(x.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),y.contents=a?_p(g,a,x,p):Wu(g,x.end,l,null,x,p);const w=y.contents.range[2],O=Mi(u,w,!1,p);return O.comment&&(y.comment=O.comment),y.range=[r,w,O.offset],y}function yi(i){if(typeof i=="number")return[i,i+1];if(Array.isArray(i))return i.length===2?i:[i[0],i[1]];const{offset:n,source:r}=i;return[n,n+(typeof r=="string"?r.length:1)]}function Md(i){var a;let n="",r=!1,l=!1;for(let u=0;u<i.length;++u){const p=i[u];switch(p[0]){case"#":n+=(n===""?"":l?`
279
+
280
+ `:`
281
+ `)+(p.substring(1)||" "),r=!0,l=!1;break;case"%":((a=i[u+1])==null?void 0:a[0])!=="#"&&(u+=1),r=!1;break;default:r||(l=!0),r=!1}}return{comment:n,afterEmptyLine:l}}class Vy{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,l,a,u)=>{const p=yi(r);u?this.warnings.push(new jy(p,l,a)):this.errors.push(new vi(p,l,a))},this.directives=new vt({version:n.version||"1.2"}),this.options=n}decorate(n,r){const{comment:l,afterEmptyLine:a}=Md(this.prelude);if(l){const u=n.contents;if(r)n.comment=n.comment?`${n.comment}
282
+ ${l}`:l;else if(a||n.directives.docStart||!u)n.commentBefore=l;else if(qe(u)&&!u.flow&&u.items.length>0){let p=u.items[0];We(p)&&(p=p.key);const h=p.commentBefore;p.commentBefore=h?`${l}
283
+ ${h}`:l}else{const p=u.commentBefore;u.commentBefore=p?`${l}
284
+ ${p}`:l}}r?(Array.prototype.push.apply(n.errors,this.errors),Array.prototype.push.apply(n.warnings,this.warnings)):(n.errors=this.errors,n.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Md(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,r=!1,l=-1){for(const a of n)yield*this.next(a);yield*this.end(r,l)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(r,l,a)=>{const u=yi(n);u[0]+=r,this.onError(u,"BAD_DIRECTIVE",l,a)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const r=Fy(this.options,this.directives,n,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(n,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(n.source);break;case"error":{const r=n.source?`${n.message}: ${JSON.stringify(n.source)}`:n.message,l=new vi(yi(n),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(l):this.doc.errors.push(l);break}case"doc-end":{if(!this.doc){const l="Unexpected doc-end without preceding document";this.errors.push(new vi(yi(n),"UNEXPECTED_TOKEN",l));break}this.doc.directives.docEnd=!0;const r=Mi(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){const l=this.doc.comment;this.doc.comment=l?`${l}
285
+ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new vi(yi(n),"UNEXPECTED_TOKEN",`Unsupported token ${n.type}`))}}*end(n=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(n){const l=Object.assign({_directives:this.directives},this.options),a=new vo(void 0,l);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),a.range=[0,r,r],this.decorate(a,!1),yield a}}}const Ip="\uFEFF",Lp="",Ap="",Eu="";function Ky(i){switch(i){case Ip:return"byte-order-mark";case Lp:return"doc-mode";case Ap:return"flow-error-end";case Eu:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
286
+ `:case`\r
287
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(i[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function rn(i){switch(i){case void 0:case" ":case`
288
+ `:case"\r":case" ":return!0;default:return!1}}const Rd=new Set("0123456789ABCDEFabcdef"),qy=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Wl=new Set(",[]{}"),Hy=new Set(` ,[]{}
289
+ \r `),pu=i=>!i||Hy.has(i);class Wy{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(n,r=!1){if(n){if(typeof n!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+n:n,this.lineEndPos=null}this.atEnd=!r;let l=this.next??"stream";for(;l&&(r||this.hasChars(1));)l=yield*this.parseNext(l)}atLineEnd(){let n=this.pos,r=this.buffer[n];for(;r===" "||r===" ";)r=this.buffer[++n];return!r||r==="#"||r===`
290
+ `?!0:r==="\r"?this.buffer[n+1]===`
291
+ `:!1}charAt(n){return this.buffer[this.pos+n]}continueScalar(n){let r=this.buffer[n];if(this.indentNext>0){let l=0;for(;r===" ";)r=this.buffer[++l+n];if(r==="\r"){const a=this.buffer[l+n+1];if(a===`
292
+ `||!a&&!this.atEnd)return n+l+1}return r===`
293
+ `||l>=this.indentNext||!r&&!this.atEnd?n+l:-1}if(r==="-"||r==="."){const l=this.buffer.substr(n,3);if((l==="---"||l==="...")&&rn(this.buffer[n+3]))return-1}return n}getLine(){let n=this.lineEndPos;return(typeof n!="number"||n!==-1&&n<this.pos)&&(n=this.buffer.indexOf(`
294
+ `,this.pos),this.lineEndPos=n),n===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[n-1]==="\r"&&(n-=1),this.buffer.substring(this.pos,n))}hasChars(n){return this.pos+n<=this.buffer.length}setNext(n){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=n,null}peek(n){return this.buffer.substr(this.pos,n)}*parseNext(n){switch(n){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let n=this.getLine();if(n===null)return this.setNext("stream");if(n[0]===Ip&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let r=n.length,l=n.indexOf("#");for(;l!==-1;){const u=n[l-1];if(u===" "||u===" "){r=l-1;break}else l=n.indexOf("#",l+1)}for(;;){const u=n[r-1];if(u===" "||u===" ")r-=1;else break}const a=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-a),this.pushNewline(),"stream"}if(this.atLineEnd()){const r=yield*this.pushSpaces(!0);return yield*this.pushCount(n.length-r),yield*this.pushNewline(),"stream"}return yield Lp,yield*this.parseLineStart()}*parseLineStart(){const n=this.charAt(0);if(!n&&!this.atEnd)return this.setNext("line-start");if(n==="-"||n==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const r=this.peek(3);if((r==="---"||r==="...")&&rn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!rn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[n,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((n==="-"||n==="?"||n===":")&&rn(r)){const l=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=l,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const n=this.getLine();if(n===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(n[r]){case"#":yield*this.pushCount(n.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(pu),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(n.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,r,l=-1;do n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=l=r):r=0,r+=yield*this.pushSpaces(!0);while(n+r>0);const a=this.getLine();if(a===null)return this.setNext("flow");if((l!==-1&&l<this.indentNext&&a[0]!=="#"||l===0&&(a.startsWith("---")||a.startsWith("..."))&&rn(a[3]))&&!(l===this.indentNext-1&&this.flowLevel===1&&(a[0]==="]"||a[0]==="}")))return this.flowLevel=0,yield Ap,yield*this.parseLineStart();let u=0;for(;a[u]===",";)u+=yield*this.pushCount(1),u+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(u+=yield*this.pushIndicators(),a[u]){case void 0:return"flow";case"#":return yield*this.pushCount(a.length-u),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(pu),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const p=this.charAt(1);if(this.flowKey||rn(p)||p===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const n=this.charAt(0);let r=this.buffer.indexOf(n,this.pos+1);if(n==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let u=0;for(;this.buffer[r-1-u]==="\\";)u+=1;if(u%2===0)break;r=this.buffer.indexOf('"',r+1)}const l=this.buffer.substring(0,r);let a=l.indexOf(`
295
+ `,this.pos);if(a!==-1){for(;a!==-1;){const u=this.continueScalar(a+1);if(u===-1)break;a=l.indexOf(`
296
+ `,u)}a!==-1&&(r=a-(l[a-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let n=this.pos;for(;;){const r=this.buffer[++n];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>rn(r)||r==="#")}*parseBlockScalar(){let n=this.pos-1,r=0,l;e:for(let u=this.pos;l=this.buffer[u];++u)switch(l){case" ":r+=1;break;case`
297
+ `:n=u,r=0;break;case"\r":{const p=this.buffer[u+1];if(!p&&!this.atEnd)return this.setNext("block-scalar");if(p===`
298
+ `)break}default:break e}if(!l&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const u=this.continueScalar(n+1);if(u===-1)break;n=this.buffer.indexOf(`
299
+ `,u)}while(n!==-1);if(n===-1){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let a=n+1;for(l=this.buffer[a];l===" ";)l=this.buffer[++a];if(l===" "){for(;l===" "||l===" "||l==="\r"||l===`
300
+ `;)l=this.buffer[++a];n=a-1}else if(!this.blockScalarKeep)do{let u=n-1,p=this.buffer[u];p==="\r"&&(p=this.buffer[--u]);const h=u;for(;p===" ";)p=this.buffer[--u];if(p===`
301
+ `&&u>=this.pos&&u+1+r>h)n=u;else break}while(!0);return yield Eu,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r=this.pos-1,l=this.pos-1,a;for(;a=this.buffer[++l];)if(a===":"){const u=this.buffer[l+1];if(rn(u)||n&&Wl.has(u))break;r=l}else if(rn(a)){let u=this.buffer[l+1];if(a==="\r"&&(u===`
302
+ `?(l+=1,a=`
303
+ `,u=this.buffer[l+1]):r=l),u==="#"||n&&Wl.has(u))break;if(a===`
304
+ `){const p=this.continueScalar(l+1);if(p===-1)break;l=Math.max(l,p-2)}}else{if(n&&Wl.has(a))break;r=l}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield Eu,yield*this.pushToIndex(r+1,!0),n?"flow":"doc")}*pushCount(n){return n>0?(yield this.buffer.substr(this.pos,n),this.pos+=n,n):0}*pushToIndex(n,r){const l=this.buffer.slice(this.pos,n);return l?(yield l,this.pos+=l.length,l.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(pu))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,r=this.charAt(1);if(rn(r)||n&&Wl.has(r))return n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let n=this.pos+2,r=this.buffer[n];for(;!rn(r)&&r!==">";)r=this.buffer[++n];return yield*this.pushToIndex(r===">"?n+1:n,!1)}else{let n=this.pos+1,r=this.buffer[n];for(;r;)if(qy.has(r))r=this.buffer[++n];else if(r==="%"&&Rd.has(this.buffer[n+1])&&Rd.has(this.buffer[n+2]))r=this.buffer[n+=3];else break;return yield*this.pushToIndex(n,!1)}}*pushNewline(){const n=this.buffer[this.pos];return n===`
305
+ `?yield*this.pushCount(1):n==="\r"&&this.charAt(1)===`
306
+ `?yield*this.pushCount(2):0}*pushSpaces(n){let r=this.pos-1,l;do l=this.buffer[++r];while(l===" "||n&&l===" ");const a=r-this.pos;return a>0&&(yield this.buffer.substr(this.pos,a),this.pos=r),a}*pushUntil(n){let r=this.pos,l=this.buffer[r];for(;!n(l);)l=this.buffer[++r];return yield*this.pushToIndex(r,!1)}}class Qy{constructor(){this.lineStarts=[],this.addNewLine=n=>this.lineStarts.push(n),this.linePos=n=>{let r=0,l=this.lineStarts.length;for(;r<l;){const u=r+l>>1;this.lineStarts[u]<n?r=u+1:l=u}if(this.lineStarts[r]===n)return{line:r+1,col:1};if(r===0)return{line:0,col:n};const a=this.lineStarts[r-1];return{line:r,col:n-a+1}}}}function Zn(i,n){for(let r=0;r<i.length;++r)if(i[r].type===n)return!0;return!1}function Dd(i){for(let n=0;n<i.length;++n)switch(i[n].type){case"space":case"comment":case"newline":break;default:return n}return-1}function bp(i){switch(i==null?void 0:i.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Ql(i){switch(i.type){case"document":return i.start;case"block-map":{const n=i.items[i.items.length-1];return n.sep??n.start}case"block-seq":return i.items[i.items.length-1].start;default:return[]}}function us(i){var r;if(i.length===0)return[];let n=i.length;e:for(;--n>=0;)switch(i[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((r=i[++n])==null?void 0:r.type)==="space";);return i.splice(n,i.length)}function $d(i){if(i.start.type==="flow-seq-start")for(const n of i.items)n.sep&&!n.value&&!Zn(n.start,"explicit-key-ind")&&!Zn(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,bp(n.value)?n.value.end?Array.prototype.push.apply(n.value.end,n.sep):n.value.end=n.sep:Array.prototype.push.apply(n.start,n.sep),delete n.sep)}class Jy{constructor(n){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Wy,this.onNewLine=n}*parse(n,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const l of this.lexer.lex(n,r))yield*this.next(l);r||(yield*this.end())}*next(n){if(this.source=n,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=n.length;return}const r=Ky(n);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&n[0]===" "&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const l=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:l,source:n}),this.offset+=n.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const n=this.peek(1);if(this.type==="doc-end"&&(n==null?void 0:n.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!n)return yield*this.stream();switch(n.type){case"document":return yield*this.document(n);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(n);case"block-scalar":return yield*this.blockScalar(n);case"block-map":return yield*this.blockMap(n);case"block-seq":return yield*this.blockSequence(n);case"flow-collection":return yield*this.flowCollection(n);case"doc-end":return yield*this.documentEnd(n)}yield*this.pop()}peek(n){return this.stack[this.stack.length-n]}*pop(n){const r=n??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{const l=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in l?l.indent:0:r.type==="flow-collection"&&l.type==="document"&&(r.indent=0),r.type==="flow-collection"&&$d(r),l.type){case"document":l.value=r;break;case"block-scalar":l.props.push(r);break;case"block-map":{const a=l.items[l.items.length-1];if(a.value){l.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(a.sep)a.value=r;else{Object.assign(a,{key:r,sep:[]}),this.onKeyLine=!a.explicitKey;return}break}case"block-seq":{const a=l.items[l.items.length-1];a.value?l.items.push({start:[],value:r}):a.value=r;break}case"flow-collection":{const a=l.items[l.items.length-1];!a||a.value?l.items.push({start:[],key:r,sep:[]}):a.sep?a.value=r:Object.assign(a,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((l.type==="document"||l.type==="block-map"||l.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){const a=r.items[r.items.length-1];a&&!a.sep&&!a.value&&a.start.length>0&&Dd(a.start)===-1&&(r.indent===0||a.start.every(u=>u.type!=="comment"||u.indent<r.indent))&&(l.type==="document"?l.end=a.start:l.items.push({start:a.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const n={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&n.start.push(this.sourceToken),this.stack.push(n);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(n){if(n.value)return yield*this.lineEnd(n);switch(this.type){case"doc-start":{Dd(n.start)!==-1?(yield*this.pop(),yield*this.step()):n.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":n.start.push(this.sourceToken);return}const r=this.startBlockValue(n);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(n){if(this.type==="map-value-ind"){const r=Ql(this.peek(2)),l=us(r);let a;n.end?(a=n.end,a.push(this.sourceToken),delete n.end):a=[this.sourceToken];const u={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:l,key:n,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(n)}*blockScalar(n){switch(this.type){case"space":case"comment":case"newline":n.props.push(this.sourceToken);return;case"scalar":if(n.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
307
+ `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
308
+ `,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(n){var l;const r=n.items[n.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){const a="end"in r.value?r.value.end:void 0,u=Array.isArray(a)?a[a.length-1]:void 0;(u==null?void 0:u.type)==="comment"?a==null||a.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)n.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,n.indent)){const a=n.items[n.items.length-2],u=(l=a==null?void 0:a.value)==null?void 0:l.end;if(Array.isArray(u)){Array.prototype.push.apply(u,r.start),u.push(this.sourceToken),n.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=n.indent){const a=!this.onKeyLine&&this.indent===n.indent,u=a&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind";let p=[];if(u&&r.sep&&!r.value){const h=[];for(let y=0;y<r.sep.length;++y){const g=r.sep[y];switch(g.type){case"newline":h.push(y);break;case"space":break;case"comment":g.indent>n.indent&&(h.length=0);break;default:h.length=0}}h.length>=2&&(p=r.sep.splice(h[1]))}switch(this.type){case"anchor":case"tag":u||r.value?(p.push(this.sourceToken),n.items.push({start:p}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):u||r.value?(p.push(this.sourceToken),n.items.push({start:p,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)n.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Zn(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:p,key:null,sep:[this.sourceToken]}]});else if(bp(r.key)&&!Zn(r.sep,"newline")){const h=us(r.start),y=r.key,g=r.sep;g.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:h,key:y,sep:g}]})}else p.length>0?r.sep=r.sep.concat(p,this.sourceToken):r.sep.push(this.sourceToken);else if(Zn(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{const h=us(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:h,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||u?n.items.push({start:p,key:null,sep:[this.sourceToken]}):Zn(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const h=this.flowScalar(this.type);u||r.value?(n.items.push({start:p,key:h,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(h):(Object.assign(r,{key:h,sep:[]}),this.onKeyLine=!0);return}default:{const h=this.startBlockValue(n);if(h){if(h.type==="block-seq"){if(!r.explicitKey&&r.sep&&!Zn(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else a&&n.items.push({start:p});this.stack.push(h);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(n){var l;const r=n.items[n.items.length-1];switch(this.type){case"newline":if(r.value){const a="end"in r.value?r.value.end:void 0,u=Array.isArray(a)?a[a.length-1]:void 0;(u==null?void 0:u.type)==="comment"?a==null||a.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)n.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,n.indent)){const a=n.items[n.items.length-2],u=(l=a==null?void 0:a.value)==null?void 0:l.end;if(Array.isArray(u)){Array.prototype.push.apply(u,r.start),u.push(this.sourceToken),n.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=n.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==n.indent)break;r.value||Zn(r.start,"seq-item-ind")?n.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>n.indent){const a=this.startBlockValue(n);if(a){this.stack.push(a);return}}yield*this.pop(),yield*this.step()}*flowCollection(n){const r=n.items[n.items.length-1];if(this.type==="flow-error-end"){let l;do yield*this.pop(),l=this.peek(1);while((l==null?void 0:l.type)==="flow-collection")}else if(n.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?n.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?n.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?n.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);!r||r.value?n.items.push({start:[],key:a,sep:[]}):r.sep?this.stack.push(a):Object.assign(r,{key:a,sep:[]});return}case"flow-map-end":case"flow-seq-end":n.end.push(this.sourceToken);return}const l=this.startBlockValue(n);l?this.stack.push(l):(yield*this.pop(),yield*this.step())}else{const l=this.peek(2);if(l.type==="block-map"&&(this.type==="map-value-ind"&&l.indent===n.indent||this.type==="newline"&&!l.items[l.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&l.type!=="flow-collection"){const a=Ql(l),u=us(a);$d(n);const p=n.end.splice(1,n.end.length);p.push(this.sourceToken);const h={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:u,key:n,sep:p}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=h}else yield*this.lineEnd(n)}}flowScalar(n){if(this.onNewLine){let r=this.source.indexOf(`
309
+ `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
310
+ `,r)+1}return{type:n,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(n){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const r=Ql(n),l=us(r);return l.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const r=Ql(n),l=us(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,r){return this.type!=="comment"||this.indent<=r?!1:n.every(l=>l.type==="newline"||l.type==="space")}*documentEnd(n){this.type!=="doc-mode"&&(n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(n){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Yy(i){const n=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||n&&new Qy||null,prettyErrors:n}}function Gy(i,n={}){const{lineCounter:r,prettyErrors:l}=Yy(n),a=new Jy(r==null?void 0:r.addNewLine),u=new Vy(n);let p=null;for(const h of u.compose(a.parse(i),!0,i.length))if(!p)p=h;else if(p.options.logLevel!=="silent"){p.errors.push(new vi(h.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return l&&r&&(p.errors.forEach(bd(i,r)),p.warnings.forEach(bd(i,r))),p}function Xy(i,n,r){let l;const a=Gy(i,r);if(!a)return null;if(a.warnings.forEach(u=>lp(a.options.logLevel,u)),a.errors.length>0){if(a.options.logLevel!=="silent")throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:l},r))}const Zy=new Set(["get","post","put","delete","patch","options","head"]);function Pp(i){const n=ng(i);if(!n)throw new Error("请输入 API CLI 配置文本");let r;try{r=JSON.parse(n)}catch{r=Xy(n)}const l=r&&typeof r=="object"?r:{};return Ju(l.api??l.config??l.operation??r)}function eg(){return Qu({method:"post",path:"/api/v1/example/{id}",summary:"创建示例",operationId:"createExample",tags:["示例","后台管理"],description:"接口用途、业务约束、鉴权说明等。",parameters:[{name:"id",location:"path",required:!0,type:"string",description:"示例 ID"}],requestBody:{required:!0,contentType:"application/json",fields:[{name:"name",type:"string",required:!0,description:"名称"},{name:"profile",type:"object",description:"扩展信息",children:[{name:"email",type:"string",description:"邮箱"}]}]},responses:[{status:"200",description:"OK",contentType:"application/json",fields:[{name:"data",type:"object",description:"响应数据",children:[{name:"id",type:"string",description:"记录 ID"}]}]}]})}function Qu(i){return JSON.stringify({api:Ju(i)})}function Ju(i){if(!i||typeof i!="object")throw new Error("接口配置不能为空");const n=i,r=st(n.method).toLowerCase();if(!Zy.has(r))throw new Error("请选择有效的请求方法");const l=sg(st(n.path)),a=st(n.summary);if(!l)throw new Error("接口路径不能为空");if(!a)throw new Error("接口名称不能为空");const u=Ni(n.parameters).map(so).filter(g=>g.name),p=n.requestBody&&typeof n.requestBody=="object"?n.requestBody:{},h=Ni(p.fields).map(so).filter(g=>g.name),y=Ni(n.responses).map(tg).filter(g=>g.status);return y.length||y.push({status:"200",description:"Success",contentType:"application/json",fields:[]}),{method:r,path:l,summary:a,description:st(n.description),operationId:st(n.operationId),tags:rg(n.tags),parameters:u,requestBody:{required:!!p.required,contentType:st(p.contentType)||"application/json",fields:h},responses:y}}function tg(i){const n=i&&typeof i=="object"?i:{};return{status:st(n.status)||"200",description:st(n.description)||"Success",contentType:st(n.contentType)||"application/json",fields:Ni(n.fields).map(so).filter(r=>r.name)}}function so(i){const n=i&&typeof i=="object"?i:{},r=st(n.location);return{name:st(n.name),location:["query","path","header","cookie","body"].includes(r)?r:"query",required:!!n.required,type:st(n.type)||"string",format:st(n.format),description:st(n.description),defaultValue:st(n.defaultValue),enumValue:st(n.enumValue),children:Ni(n.children).map(so).filter(l=>l.name)}}function ng(i){return i.trim().replace(/^```(?:json|ya?ml|yaml)?\s*/i,"").replace(/```$/i,"").trim()}function rg(i){return Array.isArray(i)?i.map(st).filter(Boolean):st(i).split(",").map(n=>n.trim()).filter(Boolean)}function sg(i){return i?i.startsWith("/")?i:`/${i}`:""}function st(i){return typeof i=="string"?i.trim():""}function Ni(i){return Array.isArray(i)?i:[]}const ig="/api/openapi/import",lg="/api/openapi/document",og="/api/openapi/auth-check",ag="/api/openapi/cache",ug="/api/openapi/versions",cg="/api/openapi/version-select",fg="/api/openapi/version-meta",dg="/api/openapi/version-delete",pg="/api/openapi/version-export",hg="/api/openapi/version-sync-cache",Mp="/api/cache-settings",mg="/api/mock/start",yg="/api/mock/status",gg="/api/openapi/custom-operation",vg="/api/openapi/custom-operation/delete",wg="/api/openapi/operation-links",kg="apiskill.swagger.syncedAt.v1",Sg="apiskill.swagger.sourceUrl.v1",jg=["get","post","put","delete","patch","options","head"],xg=12;function Ng(i){const n=i.paths??{};return Object.entries(n).flatMap(([r,l])=>jg.flatMap(a=>{var x;const u=l==null?void 0:l[a];if(!u)return[];const p=(x=u.tags)!=null&&x.length?u.tags:["未分组"],h=u.summary||u.description||"未命名接口",y=u.parameters??[],g=[a,r,h,u.description,u.operationId,p.join(" "),y.map(w=>`${w.name} ${w.description??""}`).join(" ")].filter(Boolean).join(" ").toLowerCase();return[{id:`${a.toUpperCase()} ${r}`,path:r,method:a,operation:u,tags:p,summary:h,hasBody:$g(u),searchable:g}]})).sort((r,l)=>r.path.localeCompare(l.path)||r.method.localeCompare(l.method))}function Cg(i){const n=new Map;return i.forEach(r=>{r.tags.forEach(l=>n.set(l,(n.get(l)??0)+1))}),[...n.entries()].map(([r,l])=>({name:r,count:l})).sort((r,l)=>l.count-r.count||r.name.localeCompare(l.name))}function Ci(i){return i?decodeURIComponent(i.split("/").pop()??i):""}function Mt(i,n,r=new Set){var l;if(n){if(n.$ref){if(r.has(n.$ref))return{type:"object",description:`循环引用: ${Ci(n.$ref)}`};r.add(n.$ref);const a=n.$ref.startsWith("#/")?n.$ref.slice(2).split("/").reduce((u,p)=>{if(u&&typeof u=="object")return u[decodeURIComponent(p)]},i):void 0;return Mt(i,a,r)}return(l=n.allOf)!=null&&l.length?Eg(i,n.allOf,n):n}}function Eg(i,n,r){return n.reduce((l,a)=>{const u=Mt(i,a)??{};return{...l,...u,description:[l.description,u.description].filter(Boolean).join(";")||l.description,required:[...new Set([...l.required??[],...u.required??[]])],properties:{...l.properties??{},...u.properties??{}}}},{...r,allOf:void 0})}function ps(i,n){var l,a,u;if(!n)return"-";if(n.$ref)return Ci(n.$ref);const r=Mt(i,n)??n;if((l=r.enum)!=null&&l.length){const p=r.enum.map(Tr).join(" | ");return`${r.type??"enum"}<${p}>`}return r.type==="array"?`${ps(i,r.items)}[]`:(a=r.anyOf)!=null&&a.length?r.anyOf.map(p=>ps(i,p)).join(" | "):(u=r.oneOf)!=null&&u.length?r.oneOf.map(p=>ps(i,p)).join(" | "):r.additionalProperties&&typeof r.additionalProperties=="object"?`Record<string, ${ps(i,r.additionalProperties)}>`:[r.type,r.format].filter(Boolean).join(":")||"object"}function Or(i){var n;return((n=i==null?void 0:i.description)==null?void 0:n.trim())||""}function er(i,n,r={}){var y;const l=r.depth??0;if(!n||l>xg)return[];if(n.$ref){if((y=r.seen)!=null&&y.has(n.$ref))return[{name:r.prefix||Ci(n.$ref),path:r.prefix||Ci(n.$ref),location:r.location,required:!1,type:Ci(n.$ref),description:"循环引用,已停止展开",defaultValue:"",enumValue:"",depth:l}];const g=new Set(r.seen??[]);return g.add(n.$ref),er(i,Mt(i,n),{...r,seen:g})}const a=Mt(i,n)??n,u=[],p=a.properties??{},h=a.required??r.requiredFields??[];if(a.type==="array"){const g=r.prefix||"[]";return u.push(hu(i,g,g,a,!1,l,r.location)),u.push(...er(i,a.items,{...r,prefix:`${g}[]`,depth:l+1})),u}return Object.keys(p).length===0?(r.prefix&&u.push(hu(i,r.prefix.split(".").pop()??r.prefix,r.prefix,a,!1,l,r.location)),u):(zg(p).forEach(([g,x])=>{const w=r.prefix?`${r.prefix}.${g}`:g,O=h.includes(g);u.push(hu(i,g,w,x,O,l,r.location));const E=Mt(i,x)??x;if(E.type==="array"||!!(E.properties&&Object.keys(E.properties).length)||!!E.$ref){if(E.type==="array"){const S=E.items,I=Mt(i,S)??S;u.push(...er(i,S,{...r,prefix:`${w}[]`,requiredFields:I==null?void 0:I.required,depth:l+1}));return}u.push(...er(i,x,{...r,prefix:w,requiredFields:E.required,depth:l+1}))}}),u)}function Rp(i,n=[]){return Ii(n.filter(r=>r.in!=="body").map(r=>{var a;const l=Bg(r);return{name:r.name,path:r.name,location:r.in,required:!!r.required,type:ps(i,l),description:r.description||Or(l)||"",defaultValue:(l==null?void 0:l.default)===void 0?"":Tr(l.default),enumValue:((a=l==null?void 0:l.enum)==null?void 0:a.map(Tr).join(", "))??"",depth:0}}))}function Og(i,n){var p,h,y;const r=((p=n.requestBody)==null?void 0:p.content)??{},l=Object.fromEntries(Object.entries(r).map(([g,x])=>[g,Ii(er(i,x.schema).map(w=>({...w,location:"body"})))]));if(Object.keys(l).length)return l;const a=(h=n.parameters)==null?void 0:h.find(g=>g.in==="body");if(!(a!=null&&a.schema))return{};const u=(y=n.consumes)!=null&&y.length?n.consumes:["application/json"];return Object.fromEntries(u.map(g=>[g,Ii(er(i,a.schema).map(x=>({...x,location:"body"})))]))}function Tg(i,n){const r=n.responses??{};return Object.fromEntries(Object.entries(r).map(([l,a])=>{var g;const u=a.content??{},p=Object.fromEntries(Object.entries(u).map(([x,w])=>[x,Ii(er(i,w.schema).map(O=>({...O,location:`response ${l}`})))]));if(Object.keys(p).length)return[l,p];const h=a.schema??a.responseSchema;if(!h)return[l,{}];const y=(g=n.produces)!=null&&g.length?n.produces:["application/json"];return[l,Object.fromEntries(y.map(x=>[x,Ii(er(i,h).map(w=>({...w,location:`response ${l}`})))]))]}))}function Dp(i,n){const r=n.operation,l=Ag(r);return{method:n.method,path:n.path,summary:n.summary,description:r.description||"",operationId:r.operationId||"",tags:n.tags,parameters:Rp(i,r.parameters).map(Lg),requestBody:{required:(l==null?void 0:l.required)??!1,contentType:(l==null?void 0:l.contentType)||"application/json",fields:l!=null&&l.schema?ks(i,l.schema):[]},responses:Object.entries(r.responses??{}).map(([a,u])=>{const p=bg(r,u);return{status:a,description:u.description||"",contentType:(p==null?void 0:p.contentType)||"application/json",fields:p!=null&&p.schema?ks(i,p.schema):[]}})}}function _g(i,n){return Qu(Dp(i,n))}function Ig(i){return JSON.stringify({method:i.method.toUpperCase(),path:i.path,tags:i.tags,summary:i.summary,operation:i.operation},null,2)}function Lg(i){return{name:i.path||i.name,location:Rg(i.location),required:i.required,type:Dg(i.type),description:i.description||"",defaultValue:i.defaultValue||"",enumValue:i.enumValue||""}}function Ag(i){var a,u,p,h,y;const n=((a=i.requestBody)==null?void 0:a.content)??{},r=Object.entries(n)[0];if(r!=null&&r[1].schema)return{required:!!((u=i.requestBody)!=null&&u.required),contentType:r[0],schema:r[1].schema};const l=(p=i.parameters)==null?void 0:p.find(g=>g.in==="body");if(l!=null&&l.schema)return{required:!!l.required,contentType:((h=i.consumes)==null?void 0:h.find(g=>g.includes("json")))??((y=i.consumes)==null?void 0:y[0])??"application/json",schema:l.schema}}function bg(i,n){var a,u;const r=Object.entries(n.content??{})[0];if(r!=null&&r[1].schema)return{contentType:r[0],schema:r[1].schema};const l=n.schema??n.responseSchema;if(l)return{contentType:((a=i.produces)==null?void 0:a.find(p=>p.includes("json")))??((u=i.produces)==null?void 0:u[0])??"application/json",schema:l}}function ks(i,n,r=new Set){const l=Mt(i,n)??n;if(n.$ref){if(r.has(n.$ref))return[];const a=new Set(r);return a.add(n.$ref),ks(i,l,a)}return l.type==="array"?[{name:"items",location:"body",type:"array",description:Or(n)||Or(l),children:l.items?ks(i,l.items,r):[]}]:Object.entries(l.properties??{}).map(([a,u])=>Pg(i,a,u,(l.required??[]).includes(a),r))}function Pg(i,n,r,l,a){var y;const u=Mt(i,r)??r,p=Mg(i,r),h={name:n,location:"body",required:l,type:p,format:u.format||r.format||"",description:Or(r)||Or(u),defaultValue:u.default===void 0?"":Tr(u.default),enumValue:((y=u.enum)==null?void 0:y.map(Tr).join(", "))??""};if(p==="object"&&(h.children=r.$ref&&a.has(r.$ref)?[]:ks(i,u,zd(r,a))),p==="array"){const g=u.items;h.children=g?ks(i,g,zd(r,a)):[]}return h}function zd(i,n){if(!i.$ref)return n;const r=new Set(n);return r.add(i.$ref),r}function Mg(i,n){const r=Mt(i,n)??n;return r.type==="array"?"array":r.type==="object"||r.properties||n.$ref?"object":r.type==="integer"?"integer":r.type==="number"?"number":r.type==="boolean"?"boolean":"string"}function Rg(i){return i==="path"||i==="query"||i==="header"||i==="cookie"||i==="body"?i:"body"}function Dg(i){const n=i.toLowerCase();return n.includes("[]")||n.includes("array")?"array":n.includes("object")?"object":n.includes("integer")?"integer":n.includes("number")?"number":n.includes("boolean")?"boolean":"string"}function $g(i){var n;return!!i.requestBody||!!((n=i.parameters)!=null&&n.some(r=>r.in==="body"))}function zg(i){return Object.entries(i).sort(([n],[r])=>n.localeCompare(r,void 0,{sensitivity:"base"}))}function Ii(i){return[...i].sort((n,r)=>{const l=n.path||n.name,a=r.path||r.name;return l.localeCompare(a,void 0,{sensitivity:"base"})})}function Bg(i){var n;if(i.schema)return i.schema;if(!(!i.type&&!i.format&&!i.items&&!((n=i.enum)!=null&&n.length)&&i.default===void 0))return{type:i.type,format:i.format,items:i.items,enum:i.enum,default:i.default,description:i.description}}function hu(i,n,r,l,a,u,p){var y;const h=Mt(i,l)??l;return{name:n,path:r,location:p,required:a,type:ps(i,l),description:Or(l)||Or(h),defaultValue:h.default===void 0?"":Tr(h.default),enumValue:((y=h.enum)==null?void 0:y.map(Tr).join(", "))??"",depth:u}}function Tr(i){if(i==null)return"";if(typeof i=="string")return i;const n=JSON.stringify(i);return n===void 0?String(i):n}const Ug=["get","post","put","delete","patch","options","head"],Fg=["string","number","integer","boolean","array","object"],Vg=["query","path","header","cookie"];function Kg({selectedVersionId:i,saving:n,initialConfig:r,onClose:l,onSave:a}){var Ee,je,_e,Ye,ln,nr;const u=A.useMemo(()=>r??Pp(eg()),[r]),[p,h]=A.useState(u.method),[y,g]=A.useState(u.path),[x,w]=A.useState(u.summary),[O,E]=A.useState(u.operationId??""),[b,S]=A.useState((u.tags??[]).join(",")),[I,R]=A.useState(u.description??""),[J,K]=A.useState(!!((Ee=u.requestBody)!=null&&Ee.required)),[W,q]=A.useState(((je=u.requestBody)==null?void 0:je.contentType)||"application/json"),[F,H]=A.useState((_e=u.parameters)!=null&&_e.length?u.parameters:[mt("query")]),[U,ue]=A.useState((ln=(Ye=u.requestBody)==null?void 0:Ye.fields)!=null&&ln.length?u.requestBody.fields:[mt("body")]),[Z,we]=A.useState((nr=u.responses)!=null&&nr.length?u.responses:[wi()]),[ie,G]=A.useState(()=>Qu(u)),[oe,xe]=A.useState(!1),[Te,Se]=A.useState([]),B=A.useRef(!1),te=A.useRef(null),X=r?"编辑当前接口":i?"追加到当前版本":"保存为新版本",C=A.useMemo(()=>Wg({method:p,path:y,summary:x,operationId:O,tags:b,description:I,requestBodyRequired:J,requestContentType:W,parameters:F,bodyFields:U,responses:Z}),[U,I,p,O,F,y,J,W,Z,x,b]);A.useEffect(()=>{if(B.current){B.current=!1;return}G(Qg(C))},[C]),A.useEffect(()=>{const Y=te.current;if(!Y)return;const Ne=window.getComputedStyle(Y),it=Number.parseFloat(Ne.lineHeight)||18,Qe=(Number.parseFloat(Ne.paddingTop)||0)+(Number.parseFloat(Ne.paddingBottom)||0)+(Number.parseFloat(Ne.borderTopWidth)||0)+(Number.parseFloat(Ne.borderBottomWidth)||0),lt=it*3+Qe,on=it*16+Qe;Y.style.height="auto",Y.style.height=`${Math.min(on,Math.max(lt,Y.scrollHeight))}px`},[ie]);function M(Y){Y.preventDefault();const Ne=Bd(ie);if(Ne.errors.length){Se(Ne.errors);return}Se([]),a(Ne.config)}function he(Y){G(Y);const Ne=Bd(Y);Ne.errors.length||(B.current=!0,Se([]),Q(Ne.config))}function Q(Y){var Ne,it,Qe,lt,on,Tn;h(Y.method),g(Y.path),w(Y.summary),E(Y.operationId??""),S((Y.tags??[]).join(",")),R(Y.description??""),K(!!((Ne=Y.requestBody)!=null&&Ne.required)),q(((it=Y.requestBody)==null?void 0:it.contentType)||"application/json"),H((Qe=Y.parameters)!=null&&Qe.length?Y.parameters:[mt("query")]),ue((on=(lt=Y.requestBody)==null?void 0:lt.fields)!=null&&on.length?Y.requestBody.fields:[mt("body")]),we((Tn=Y.responses)!=null&&Tn.length?Y.responses:[wi()])}function ye(){if(Yg(ie,te.current)){pe();return}navigator.clipboard.writeText(ie).then(pe).catch(()=>{})}function pe(){xe(!0),window.setTimeout(()=>xe(!1),1600)}return d.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"add-api-title",children:d.jsxs("form",{className:"api-config-dialog",onSubmit:M,noValidate:!0,children:[d.jsxs("div",{className:"import-dialog-header",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow",children:"Manual API Config"}),d.jsx("h2",{id:"add-api-title",children:r?"编辑API配置":"新增API配置"})]}),d.jsx("span",{className:"import-badge running",children:X})]}),d.jsxs("div",{className:"api-config-body",children:[Te.length?d.jsx(qg,{errors:Te}):null,d.jsxs("section",{className:"api-config-section",children:[d.jsxs("div",{className:"section-title-row",children:[d.jsxs("div",{children:[d.jsx("h3",{children:"CLI配置"}),d.jsx("p",{children:"支持紧凑 JSON 或 YAML。CLI 与下方表单保持联动,粘贴有效配置后会自动同步表单。"})]}),d.jsxs("button",{type:"button",className:"secondary-button",onClick:ye,children:[oe?d.jsx(Ei,{size:15}):d.jsx(Si,{size:15}),oe?"已复制":"复制"]})]}),d.jsx("textarea",{ref:te,className:"api-cli-editor",value:ie,onChange:Y=>he(Y.target.value),rows:3,spellCheck:!1})]}),d.jsxs("section",{className:"api-config-section",children:[d.jsxs("div",{className:"section-title-row",children:[d.jsx("h3",{children:"基础信息"}),d.jsx("code",{children:i||"manual-new-version"})]}),d.jsxs("div",{className:"api-config-grid",children:[d.jsxs("label",{children:[d.jsx("span",{children:"方法 *"}),d.jsx("select",{value:p,onChange:Y=>h(Y.target.value),children:Ug.map(Y=>d.jsx("option",{value:Y,children:Y.toUpperCase()},Y))})]}),d.jsxs("label",{className:"span-2",children:[d.jsx("span",{children:"路径 *"}),d.jsx("input",{value:y,onChange:Y=>g(Y.target.value),placeholder:"/api/v1/example/{id}"})]}),d.jsxs("label",{children:[d.jsx("span",{children:"接口名称 *"}),d.jsx("input",{value:x,onChange:Y=>w(Y.target.value),placeholder:"查询示例详情"})]}),d.jsxs("label",{children:[d.jsx("span",{children:"Operation ID"}),d.jsx("input",{value:O,onChange:Y=>E(Y.target.value),placeholder:"getExampleDetail"})]}),d.jsxs("label",{children:[d.jsx("span",{children:"分组 Tags"}),d.jsx("input",{value:b,onChange:Y=>S(Y.target.value),placeholder:"示例,后台管理"})]}),d.jsxs("label",{className:"span-all",children:[d.jsx("span",{children:"说明"}),d.jsx("textarea",{value:I,onChange:Y=>R(Y.target.value),placeholder:"接口用途、业务约束、注意事项"})]})]})]}),d.jsx(Hg,{title:"参数",description:"用于 path / query / header / cookie 参数。body 字段请放到请求体。",fields:F,allowLocation:!0,onAdd:()=>H([...F,mt("query")]),onChange:(Y,Ne)=>H(dn(F,Y,Ne)),onRemove:Y=>H(ki(F,Y,mt("query")))}),d.jsxs("section",{className:"api-config-section",children:[d.jsxs("div",{className:"section-title-row",children:[d.jsxs("div",{children:[d.jsx("h3",{children:"请求体"}),d.jsx("p",{children:"对象字段可以展开配置子字段,也支持用点号声明嵌套字段,例如 user.name。"})]}),d.jsxs("label",{className:"inline-check",children:[d.jsx("input",{type:"checkbox",checked:J,onChange:Y=>K(Y.target.checked)}),"必填"]})]}),d.jsx("div",{className:"api-config-grid compact",children:d.jsxs("label",{children:[d.jsx("span",{children:"Content-Type"}),d.jsx("input",{value:W,onChange:Y=>q(Y.target.value)})]})}),d.jsx(io,{fields:U,onAdd:()=>ue([...U,mt("body")]),onChange:(Y,Ne)=>ue(dn(U,Y,{...Ne,location:"body"})),onRemove:Y=>ue(ki(U,Y,mt("body")))})]}),d.jsxs("section",{className:"api-config-section",children:[d.jsxs("div",{className:"section-title-row",children:[d.jsxs("div",{children:[d.jsx("h3",{children:"响应"}),d.jsx("p",{children:"每个状态码可配置一组响应字段,保存时会写入 OpenAPI responses。"})]}),d.jsxs("button",{type:"button",className:"secondary-button",onClick:()=>we([...Z,wi()]),children:[d.jsx(lo,{size:15}),"状态码"]})]}),Z.map((Y,Ne)=>{var it;return d.jsxs("div",{className:"response-config",children:[d.jsxs("div",{className:"api-config-grid compact",children:[d.jsxs("label",{children:[d.jsx("span",{children:"状态码 *"}),d.jsx("input",{value:Y.status,onChange:Qe=>we(dn(Z,Ne,{...Y,status:Qe.target.value}))})]}),d.jsxs("label",{children:[d.jsx("span",{children:"描述"}),d.jsx("input",{value:Y.description??"",onChange:Qe=>we(dn(Z,Ne,{...Y,description:Qe.target.value}))})]}),d.jsxs("label",{children:[d.jsx("span",{children:"Content-Type"}),d.jsx("input",{value:Y.contentType??"application/json",onChange:Qe=>we(dn(Z,Ne,{...Y,contentType:Qe.target.value}))})]}),d.jsx("button",{type:"button",className:"icon-danger-button",onClick:()=>we(ki(Z,Ne,wi())),children:d.jsx(oo,{size:15})})]}),d.jsx(io,{fields:(it=Y.fields)!=null&&it.length?Y.fields:[mt("body")],onAdd:()=>we(dn(Z,Ne,{...Y,fields:[...Y.fields??[],mt("body")]})),onChange:(Qe,lt)=>we(dn(Z,Ne,{...Y,fields:dn(Y.fields??[],Qe,{...lt,location:"body"})})),onRemove:Qe=>we(dn(Z,Ne,{...Y,fields:ki(Y.fields??[],Qe,mt("body"))}))})]},`response-${Ne}`)})]})]}),d.jsxs("div",{className:"import-dialog-actions",children:[d.jsx("button",{className:"secondary-button",type:"button",onClick:l,disabled:n,children:"取消"}),d.jsxs("button",{className:"primary-button",type:"submit",disabled:n,children:[d.jsx(Jd,{size:16}),n?"保存中":"保存"]})]})]})})}function qg({errors:i}){return d.jsxs("div",{className:"api-config-errors",children:[d.jsx(Cr,{size:17}),d.jsxs("div",{children:[d.jsx("strong",{children:"请补全必填配置"}),i.map(n=>d.jsx("p",{children:n},n))]})]})}function Hg({title:i,description:n,fields:r,allowLocation:l,onAdd:a,onChange:u,onRemove:p}){return d.jsxs("section",{className:"api-config-section",children:[d.jsxs("div",{className:"section-title-row",children:[d.jsxs("div",{children:[d.jsx("h3",{children:i}),d.jsx("p",{children:n})]}),d.jsxs("button",{type:"button",className:"secondary-button",onClick:a,children:[d.jsx(lo,{size:15}),"字段"]})]}),d.jsx(io,{fields:r,allowLocation:l,onAdd:a,onChange:u,onRemove:p})]})}function io({fields:i,allowLocation:n,onAdd:r,onChange:l,onRemove:a}){return d.jsxs("div",{className:"field-config-table",children:[d.jsxs("div",{className:`field-config-head ${n?"with-location":""}`,children:[n?d.jsx("span",{children:"位置"}):null,d.jsx("span",{children:"字段名"}),d.jsx("span",{children:"类型"}),d.jsx("span",{children:"必填"}),d.jsx("span",{children:"说明"}),d.jsx("span",{children:"枚举"}),d.jsx("span",{})]}),i.map((u,p)=>{var h;return d.jsxs("div",{className:"field-config-item",children:[d.jsxs("div",{className:`field-config-row ${n?"with-location":""}`,children:[n?d.jsx("select",{value:u.location??"query",onChange:y=>l(p,{...u,location:y.target.value}),children:Vg.map(y=>d.jsx("option",{value:y,children:y},y))}):null,d.jsx("input",{value:u.name,onChange:y=>l(p,{...u,name:y.target.value}),placeholder:"id / user.name"}),d.jsx("select",{value:u.type||"string",onChange:y=>l(p,Gg(u,y.target.value)),children:Fg.map(y=>d.jsx("option",{value:y,children:y},y))}),d.jsx("label",{className:"field-check",children:d.jsx("input",{type:"checkbox",checked:!!u.required,onChange:y=>l(p,{...u,required:y.target.checked})})}),d.jsx("input",{value:u.description??"",onChange:y=>l(p,{...u,description:y.target.value}),placeholder:"字段说明"}),d.jsx("input",{value:u.enumValue??"",onChange:y=>l(p,{...u,enumValue:y.target.value}),placeholder:"a,b,c"}),d.jsx("button",{type:"button",className:"icon-danger-button",onClick:()=>a(p),"aria-label":"删除字段",children:d.jsx(oo,{size:15})})]}),u.type==="object"||u.type==="array"?d.jsxs("div",{className:"child-field-config",children:[d.jsx("div",{className:"child-field-title",children:"下一级结构"}),d.jsx(io,{fields:(h=u.children)!=null&&h.length?u.children:[mt("body")],onAdd:()=>l(p,{...u,children:[...u.children??[],mt("body")]}),onChange:(y,g)=>l(p,{...u,children:dn(u.children??[],y,g)}),onRemove:y=>l(p,{...u,children:ki(u.children??[],y,mt("body"))})})]}):null]},`field-${p}`)}),d.jsxs("button",{type:"button",className:"field-add-row",onClick:r,children:[d.jsx(lo,{size:14}),"增加字段"]})]})}function Wg(i){return{method:i.method,path:i.path,summary:i.summary,operationId:i.operationId,tags:i.tags.split(",").map(n=>n.trim()).filter(Boolean),description:i.description,parameters:i.parameters,requestBody:{required:i.requestBodyRequired,contentType:i.requestContentType,fields:i.bodyFields},responses:i.responses}}function Bd(i){try{return Jg(Pp(i))}catch(n){return{config:Xg(),errors:[n instanceof Error?n.message:"CLI 配置解析失败"]}}}function Qg(i){return JSON.stringify({api:i})}function Jg(i){var r,l,a;const n=[];if(i.method||n.push("请选择请求方法"),(r=i.path)!=null&&r.trim()||n.push("请填写接口路径"),(l=i.summary)!=null&&l.trim()||n.push("请填写接口名称"),Zl(i.parameters??[],"参数",n),Zl(((a=i.requestBody)==null?void 0:a.fields)??[],"请求体字段",n),(i.responses??[]).forEach((u,p)=>{var h;(h=u.status)!=null&&h.trim()||n.push(`响应 #${p+1} 请填写状态码`),Zl(u.fields??[],`响应 ${u.status||`#${p+1}`} 字段`,n)}),n.length)return{config:i,errors:n};try{return{config:Ju(i),errors:[]}}catch(u){return{config:i,errors:[u instanceof Error?u.message:"接口配置校验失败"]}}}function Zl(i,n,r,l=""){i.forEach((a,u)=>{var h;const p=`${n}${l?` ${l}`:""} #${u+1}`;$p(a)&&((h=a.name)!=null&&h.trim()||r.push(`${p} 请填写字段名`),(a.type==="object"||a.type==="array")&&Zl(a.children??[],n,r,a.name||`#${u+1}`))})}function Yg(i,n){if(n)return n.focus(),n.select(),document.execCommand("copy");const r=document.createElement("textarea");r.value=i,r.setAttribute("readonly","true"),r.style.position="fixed",r.style.left="-9999px",r.style.top="0",document.body.appendChild(r),r.focus(),r.select();try{return document.execCommand("copy")}finally{document.body.removeChild(r)}}function $p(i){var n,r,l,a,u;return!!((n=i.name)!=null&&n.trim()||(r=i.description)!=null&&r.trim()||(l=i.enumValue)!=null&&l.trim()||(a=i.defaultValue)!=null&&a.trim()||i.required||(u=i.children)!=null&&u.some($p))}function Gg(i,n){var r;return n==="object"||n==="array"?{...i,type:n,children:(r=i.children)!=null&&r.length?i.children:[mt("body")]}:{...i,type:n,children:void 0}}function Xg(){return{method:"get",path:"",summary:"",responses:[wi()]}}function mt(i="query"){return{name:"",location:i,required:!1,type:"string",description:"",enumValue:""}}function wi(){return{status:"200",description:"Success",contentType:"application/json",fields:[mt("body")]}}function dn(i,n,r){return n>=i.length?[...i,r]:i.map((l,a)=>a===n?r:l)}function ki(i,n,r){const l=i.filter((a,u)=>u!==n);return l.length?l:[r]}function Zg({settings:i,onSettingsChange:n}){const[r,l]=A.useState(!1),[a,u]=A.useState(""),[p,h]=A.useState(!1),[y,g]=A.useState(""),[x,w]=A.useState("");async function O(){l(!0),g(""),w(""),h(!0);try{const b=await zp();n(b),u(b.defaultCacheDir)}catch(b){w(b instanceof Error?b.message:"缓存设置读取失败")}finally{h(!1)}}async function E(b=!1){h(!0),g(""),w("");try{const S=await fetch(Mp,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(b?{reset:!0}:{cacheDir:a})}),I=await S.json();if(!S.ok)throw new Error(I.error||"缓存设置保存失败");const R=I;n(R),u(R.defaultCacheDir),g(b?"已恢复内置默认地址,现有缓存文件未改动":"默认缓存地址已保存,现有缓存文件未改动")}catch(S){w(S instanceof Error?S.message:"缓存设置保存失败")}finally{h(!1)}}return d.jsxs(d.Fragment,{children:[d.jsxs("button",{className:"secondary-button cache-settings-trigger",onClick:O,title:"设置接口文档默认缓存地址",children:[d.jsx($m,{size:16}),"缓存设置"]}),r?d.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"cache-settings-title",children:d.jsxs("div",{className:"cache-settings-dialog",children:[d.jsxs("div",{className:"import-dialog-header",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow",children:"Cache Settings"}),d.jsx("h2",{id:"cache-settings-title",children:"接口文档缓存设置"})]}),d.jsx("button",{className:"icon-secondary-button",onClick:()=>l(!1),"aria-label":"关闭",children:d.jsx(Oi,{size:17})})]}),d.jsxs("div",{className:"cache-settings-body",children:[x?d.jsx("div",{className:"version-message error",children:x}):null,y?d.jsx("div",{className:"version-message",children:y}):null,d.jsxs("div",{className:"cache-location-row",children:[d.jsx("span",{children:"当前会话缓存位置"}),d.jsx("code",{children:(i==null?void 0:i.activeCacheDir)||(p?"读取中...":"-")})]}),d.jsxs("label",{className:"cache-settings-field",children:["默认缓存地址",d.jsx("input",{value:a,onChange:b=>u(b.target.value),placeholder:"例如 ~/.apiskill/cache",autoComplete:"off",disabled:p})]}),d.jsxs("div",{className:"cache-settings-notice",children:[d.jsx(Cr,{size:18}),d.jsxs("div",{children:[d.jsx("strong",{children:"修改地址不会移动或删除已有缓存文件"}),d.jsx("p",{children:"新的 CLI、MCP 进程会读取该默认地址;Web 端重启后切换。需要保留的版本可在版本管理中使用“更新缓存地址”复制过去。"})]})]}),i!=null&&i.environmentOverride?d.jsxs("div",{className:"cache-settings-notice warning",children:[d.jsx(Cr,{size:18}),d.jsxs("div",{children:[d.jsx("strong",{children:"环境变量正在覆盖默认设置"}),d.jsxs("p",{children:["当前 `APISKILL_CACHE_DIR` 为 ",i.environmentCacheDir,"。只要该变量存在,重启后仍优先使用它。"]})]})]}):null,d.jsxs("dl",{className:"cache-settings-details",children:[d.jsxs("div",{children:[d.jsx("dt",{children:"内置默认地址"}),d.jsx("dd",{children:(i==null?void 0:i.builtInCacheDir)||"-"})]}),d.jsxs("div",{children:[d.jsx("dt",{children:"配置文件"}),d.jsx("dd",{children:(i==null?void 0:i.configPath)||"-"})]})]})]}),d.jsxs("div",{className:"import-dialog-actions cache-settings-actions",children:[d.jsxs("button",{className:"secondary-button",onClick:()=>void E(!0),disabled:p,children:[d.jsx(Um,{size:16}),"恢复默认"]}),d.jsxs("div",{children:[d.jsx("button",{className:"secondary-button",onClick:()=>l(!1),disabled:p,children:"取消"}),d.jsxs("button",{className:"primary-button",onClick:()=>void E(!1),disabled:p||!a.trim(),children:[d.jsx(Jd,{size:16}),p?"保存中":"保存设置"]})]})]})]})}):null]})}async function zp(){const i=await fetch(Mp,{cache:"no-store"}),n=await i.json();if(!i.ok)throw new Error(n.error||"缓存设置读取失败");return n}function e0({versions:i,selectedVersionId:n,currentVersion:r,disabled:l,onSelect:a,onPrepareUpdate:u,onUpdateEnvironment:p,onDelete:h,cacheSettings:y,onSyncCache:g}){const[x,w]=A.useState(!1),[O,E]=A.useState(""),[b,S]=A.useState(""),[I,R]=A.useState(""),[J,K]=A.useState(""),[W,q]=A.useState(""),F=A.useMemo(()=>r??i.find(G=>G.versionId===n),[r,n,i]);A.useEffect(()=>{x||(E(""),q(""))},[x]);function H(G){q(""),E(G.versionId||""),S(G.environmentName||""),R(G.environmentBaseUrl||"")}async function U(G){K(G),q("");try{await p(G,b,I),E(""),q("环境已保存")}catch(oe){q(oe instanceof Error?oe.message:"环境保存失败")}finally{K("")}}async function ue(G){const oe=G.versionId;if(oe&&window.confirm(`确认删除文档版本 ${mu(G)}?`)){K(oe),q("");try{await h(oe),q("版本已删除")}catch(xe){q(xe instanceof Error?xe.message:"版本删除失败")}finally{K("")}}}async function Z(G){const oe=G.versionId;if(oe){K(oe),q("");try{await u(G),w(!1)}catch(xe){q(xe instanceof Error?xe.message:"准备更新失败")}finally{K("")}}}function we(G){if(!G)return;const oe=document.createElement("a");oe.href=`${pg}?versionId=${encodeURIComponent(G)}`,oe.download=`${G}.json`,document.body.appendChild(oe),oe.click(),document.body.removeChild(oe)}async function ie(G){const oe=G.versionId;if(!oe)return;if(!y){q("缓存设置尚未读取,请稍后重试");return}const xe=G.savedPath||y.activeCacheDir,Te=y.defaultCacheDir;if(y.activeMatchesDefault){window.alert(`当前缓存位置:
311
+ ${xe}
312
+
313
+ 该版本已位于默认缓存地址:
314
+ ${Te}`);return}if(window.confirm(`当前缓存位置:
315
+ ${xe}
316
+
317
+ 默认缓存地址:
318
+ ${Te}
319
+
320
+ 确认将该文档版本复制到默认缓存地址吗?源文件不会被移动或删除;目标中同版本内容将被更新。`)){K(oe),q("");try{const B=await g(oe);q(B.status==="already-current"?"该版本已位于默认缓存地址":`已同步到 ${B.targetDocumentPath}`)}catch(B){q(B instanceof Error?B.message:"更新缓存地址失败")}finally{K("")}}}return d.jsxs("div",{className:"version-manager",children:[d.jsxs("button",{className:"version-manager-trigger",onClick:()=>w(!0),disabled:l||!i.length,children:[d.jsx(Yd,{size:16}),d.jsxs("span",{children:[d.jsx("strong",{children:F?mu(F):"无缓存版本"}),d.jsx("small",{children:F?[F.environmentName||"未设置环境",F.paths===void 0?"":`${F.paths} paths`,F.savedAt?Ud(F.savedAt):""].filter(Boolean).join(" · "):"导入或爬取文档后可管理版本"})]})]}),x?d.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"version-manager-title",children:d.jsxs("div",{className:"version-manager-dialog",children:[d.jsxs("div",{className:"import-dialog-header",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow",children:"Document Versions"}),d.jsx("h2",{id:"version-manager-title",children:"文档版本管理"})]}),d.jsx("button",{className:"icon-secondary-button",onClick:()=>w(!1),"aria-label":"关闭",children:d.jsx(Oi,{size:17})})]}),d.jsxs("div",{className:"version-manager-body",children:[W?d.jsx("div",{className:W.includes("失败")||W.includes("不支持")?"version-message error":"version-message",children:W}):null,i.length?i.map(G=>{const oe=G.versionId||"",xe=O===oe,Te=J===oe,Se=oe===n;return d.jsxs("section",{className:`version-item ${Se?"active":""}`,children:[d.jsxs("div",{className:"version-item-main",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"version-item-title",children:[d.jsx("strong",{children:mu(G)}),Se?d.jsx("span",{children:"当前"}):null]}),d.jsx("p",{children:oe})]}),d.jsxs("div",{className:"version-item-stats",children:[d.jsx("span",{children:G.mode||"unknown"}),d.jsxs("span",{children:[G.paths??0," paths"]}),d.jsxs("span",{children:[G.schemas??0," schemas"]}),d.jsx("span",{children:G.savedAt?Ud(G.savedAt):"-"})]})]}),xe?d.jsxs("div",{className:"version-env-editor",children:[d.jsxs("label",{children:["环境名称",d.jsx("input",{value:b,onChange:B=>S(B.target.value),placeholder:"例如 dev / test / prod"})]}),d.jsxs("label",{children:["Base URL",d.jsx("input",{value:I,onChange:B=>R(B.target.value),placeholder:"https://api.example.com"})]})]}):d.jsxs("div",{className:"version-env-summary",children:[d.jsx("span",{children:G.environmentName||"未设置环境"}),d.jsx("code",{children:G.environmentBaseUrl||"未设置 Base URL"})]}),d.jsxs("div",{className:"version-item-actions",children:[d.jsxs("button",{className:"secondary-button",onClick:()=>a(oe),disabled:Se||Te||!oe,children:[d.jsx(to,{size:15}),"切换"]}),d.jsxs("button",{className:"primary-button",onClick:()=>Z(G),disabled:Te||!oe,children:[d.jsx(to,{size:15}),"更新"]}),xe?d.jsxs(d.Fragment,{children:[d.jsxs("button",{className:"primary-button",onClick:()=>U(oe),disabled:Te||!oe,children:[d.jsx(Ei,{size:15}),"保存环境"]}),d.jsx("button",{className:"secondary-button",onClick:()=>E(""),disabled:Te,children:"取消"})]}):d.jsxs("button",{className:"secondary-button",onClick:()=>H(G),disabled:Te||!oe,children:[d.jsx(Lu,{size:15}),"环境"]}),d.jsxs("button",{className:"secondary-button",onClick:()=>we(oe),disabled:!oe,children:[d.jsx(Mm,{size:15}),"导出"]}),d.jsxs("button",{className:"secondary-button",onClick:()=>void ie(G),disabled:Te||!oe,children:[d.jsx(zm,{size:15}),"更新缓存地址"]}),d.jsxs("button",{className:"danger-button",onClick:()=>ue(G),disabled:Te||!oe,children:[d.jsx(oo,{size:15}),"删除"]})]})]},oe)}):d.jsx("p",{className:"muted",children:"暂无缓存版本。"})]})]})}):null]})}function mu(i){return i.title||i.inputUrl||i.versionId||"未命名版本"}function Ud(i){const n=new Date(i);return Number.isNaN(n.getTime())?i:n.toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}const t0=["all","get","post","put","delete","patch"],yu="apiskill-open-endpoint-tabs";function Fd(i){return{id:i.id,method:i.method,path:i.path,summary:i.summary||i.operation.operationId||i.path}}function gu(i,n){return`${i||"local"}::${n.id}`}function n0(){const[i,n]=A.useState(null),[r,l]=A.useState("loading"),[a,u]=A.useState(""),[p,h]=A.useState(""),[y,g]=A.useState("all"),[x,w]=A.useState("all"),[O,E]=A.useState(!1),[b,S]=A.useState(""),[I,R]=A.useState(!1),[J,K]=A.useState([]),[W,q]=A.useState(!1),[F,H]=A.useState(""),[U,ue]=A.useState("blank"),[Z,we]=A.useState([]),[ie,G]=A.useState(""),[oe,xe]=A.useState(void 0),[Te,Se]=A.useState(""),[B,te]=A.useState(""),[X,C]=A.useState(""),[M,he]=A.useState(""),[Q,ye]=A.useState(null),[pe,Ee]=A.useState("API Skill Document"),[je,_e]=A.useState("1.0.0"),[Ye,ln]=A.useState("Created from API Skill blank document."),[nr,Y]=A.useState(!1),[Ne,it]=A.useState(""),[Qe,lt]=A.useState(""),[on,Tn]=A.useState(""),[_n,hn]=A.useState(""),[Cs,Es]=A.useState(""),[ut,kt]=A.useState(null),[It,rr]=A.useState(null),[Ir,sr]=A.useState(!1),[Rt,In]=A.useState(null),[Lr,ir]=A.useState(""),[Ar,Ri]=A.useState(!1),[Os,Ln]=A.useState(void 0),[Ts,An]=A.useState(void 0),[_s,mn]=A.useState({}),[bn,lr]=A.useState(!1),[Is,Ls]=A.useState(void 0),br=A.useRef(null);A.useEffect(()=>{async function N(){try{await yn()}catch(P){u(P instanceof Error?P.message:"读取最新缓存失败"),l("ready")}finally{Yt()}}N(),Dr(),zp().then(Ls).catch(()=>{})},[]);const Dt=A.useMemo(()=>i?Ng(i):[],[i]),$t=A.useMemo(()=>new Map(Dt.map(N=>[N.id,N])),[Dt]),Pr=A.useMemo(()=>Cg(Dt),[Dt]),Jt=A.useMemo(()=>{const N=p.trim().toLowerCase();return Dt.filter(P=>{const ne=!N||P.searchable.includes(N),ge=y==="all"||P.tags.includes(y),ve=x==="all"||P.method===x,de=!O||P.hasBody;return ne&&ge&&ve&&de})},[O,Dt,x,p,y]),Ae=A.useMemo(()=>{if(!(!b&&I))return $t.get(b)??Jt[0]},[I,$t,Jt,b]),St=A.useMemo(()=>Z.find(N=>N.versionId===ie)??oe,[ie,oe,Z]),wo=Ae?gu(ie,Ae):"",or=Ae?_s[wo]??Jl(Ae.operation["x-apiskill-links"]):void 0;A.useEffect(()=>{Ae&&Ae.id!==b&&S(Ae.id)},[Ae,b]),A.useEffect(()=>{Ae&&K(N=>N.some(P=>P.id===Ae.id)?N:[...N,Fd(Ae)])},[Ae]),A.useEffect(()=>{K(N=>N.filter(P=>$t.has(P.id)))},[$t]),A.useEffect(()=>{var N;if(!(!ie||!$t.size))try{const P=localStorage.getItem(yu);if(!P){q(!0);return}const ne=JSON.parse(P);if(ne.versionId!==ie){q(!0);return}const ge=ne.tabIds.map(de=>$t.get(de)).filter(de=>!!de).map(Fd);K(ge);const ve=ne.selectedId&&$t.has(ne.selectedId)?ne.selectedId:((N=ge[0])==null?void 0:N.id)??"";S(ve),R(ne.allowEmptyDetail&&!ve)}catch{localStorage.removeItem(yu)}finally{q(!0)}},[$t,ie]),A.useEffect(()=>{if(!ie||!W)return;const N={versionId:ie,tabIds:J.map(P=>P.id),selectedId:b,allowEmptyDetail:I};localStorage.setItem(yu,JSON.stringify(N))},[I,J,b,ie,W]),A.useEffect(()=>{if((ut==null?void 0:ut.status)!=="running")return;const N=window.setInterval(()=>{kt(P=>!P||P.status!=="running"?P:{...P,progress:Math.min(88,P.progress+(P.mode==="crawl"||P.mode==="curl"?4:7))})},600);return()=>window.clearInterval(N)},[ut==null?void 0:ut.status,ut==null?void 0:ut.mode]);async function yn(N){var ge,ve,de,Ze;q(!1);const P=N?await fetch(cg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:N})}):await fetch(ag,{cache:"no-store"});if(P.status===404){n(null),G(""),xe(void 0),K([]),l("ready");return}if(!P.ok)throw new Error(`读取缓存失败: ${P.status}`);const ne=await P.json();n(ne.document),R(!1),K([]),Se(((ge=ne.meta)==null?void 0:ge.savedAt)||""),G(((ve=ne.meta)==null?void 0:ve.versionId)||""),xe(ne.meta),Mr(ne.meta,ne.document),lt(((de=ne.meta)==null?void 0:de.resolvedUrl)||((Ze=ne.meta)==null?void 0:Ze.inputUrl)||""),ne.versions&&we(ne.versions),l("ready")}async function Yt(){const N=await fetch(ug,{cache:"no-store"});if(!N.ok)return;const P=await N.json();we(P.versions??[])}function ar(N){return N==="file"||N==="crawl"||N==="curl"||N==="upload"}function ko(N){if(ar(N))return N}function Mr(N,P){const ne=ko(N==null?void 0:N.mode);ne&&ue(ne),ar(N==null?void 0:N.mode)&&gn(N.mode,N.inputUrl||""),((N==null?void 0:N.mode)==="document"||(N==null?void 0:N.mode)==="manual")&&(P!=null&&P.info)&&(ue("blank"),Ee(P.info.title||"API Skill Document"),_e(P.info.version||"1.0.0"),ln(P.info.description||""))}function As(N){if(!Ne)return"";const P=Z.find(ne=>ne.versionId===Ne)??(ie===Ne?oe:void 0);return N==="blank"?(P==null?void 0:P.mode)==="document"||(P==null?void 0:P.mode)==="manual"?Ne:"":(P==null?void 0:P.mode)===N?Ne:""}function gn(N,P){N==="crawl"?C(P):N==="curl"?he(P):N==="file"&&te(P)}function Rr(N){return N==="curl"?"请输入 CURL 命令":N==="upload"?"请选择 JSON 或 YAML 文件":N==="crawl"?"请输入在线文档页地址":"请输入 Swagger/OpenAPI 文件地址"}function Di(){U==="crawl"?C(""):U==="curl"?he(""):U==="upload"?(ye(null),br.current&&(br.current.value="")):te("")}async function So(N){if(N==="upload"){if(!Q)throw new Error(Rr(N));if(!/\.(json|ya?ml)$/i.test(Q.name))throw new Error("仅支持 JSON、YAML 或 YML 文件");return{input:Q.name,content:await Q.text()}}const P=N==="crawl"?X.trim():N==="curl"?M.trim():B.trim();if(!P)throw new Error(Rr(N));return{input:P}}async function bs(N,P={type:"none"},ne=!1,ge){var jt,Ds;let ve;try{ve=await So(N)}catch(et){const xt=et instanceof Error?et.message:Rr(N);u(xt),kt({open:!0,mode:N,status:"error",progress:100,inputUrl:"",message:"未开始",error:xt});return}const de=ve.input,Ze=ge||void 0,be=!!Ze;Y(!1),H(N),u(""),kt({open:!0,mode:N,status:"running",progress:N==="crawl"&&!ne?6:N==="curl"?14:N==="crawl"?12:18,inputUrl:de,message:N==="crawl"&&!ne?"正在检测文档访问权限":N==="crawl"?be?"正在爬取并更新当前版本文档":"正在由 Node 爬取在线文档并识别 OpenAPI JSON 地址":N==="curl"?be?"正在执行 CURL 并更新当前版本文档":"正在解析并执行 CURL 请求":N==="upload"?be?"正在解析上传文件并更新当前版本文档":"正在读取并解析上传的 JSON / YAML 文件":be?"正在拉取并更新当前版本文档":"正在由 Node 拉取并解析 OpenAPI JSON 文件"});try{if(N!=="curl"&&N!=="upload"&&!ne&&P.type==="none"){const zr=await a0(de,N);if(zr.requiresAuth){rr({open:!0,mode:N,inputUrl:de,message:zr.message||"该文档地址需要用户名和密码",updateVersionId:Ze}),kt(null),H("");return}kt(Oe=>(Oe==null?void 0:Oe.status)==="running"?{...Oe,progress:N==="crawl"?12:18,message:N==="crawl"?be?"正在爬取并更新当前版本文档":"正在由 Node 爬取在线文档并识别 OpenAPI JSON 地址":be?"正在拉取并更新当前版本文档":"正在由 Node 拉取并解析 OpenAPI JSON 文件"}:Oe)}const et=await l0(de,N,P,ve.content,Ze),xt=et.document,Fi=new Date().toISOString();localStorage.setItem(kg,Fi),localStorage.setItem(Sg,de),P.type==="basic"&&hn(""),q(!1),n(xt),R(!1),K([]),Se(Fi),G(((jt=et.meta)==null?void 0:jt.versionId)||""),xe(et.meta),lt(((Ds=et.meta)==null?void 0:Ds.resolvedUrl)||de),Mr(et.meta,xt),l("ready"),et.versions?we(et.versions):await Yt(),kt({open:!0,mode:N,status:"success",progress:100,inputUrl:de,message:be?"文档已更新并覆盖原版本":"文档已解析并保存为独立版本",meta:et.meta}),it("")}catch(et){const xt=et instanceof Error?et.message:"导入失败,请检查地址或文档格式";u(xt),kt({open:!0,mode:N,status:"error",progress:100,inputUrl:de,message:"处理失败",error:xt})}finally{H("")}}async function $i(){var ge,ve,de,Ze;const N=pe.trim();if(!N){u("请输入文档名称");return}const P=As("blank")||void 0,ne=!!P;H("blank"),u(""),kt({open:!0,mode:"blank",status:"running",progress:45,inputUrl:N,message:ne?"正在更新当前 OpenAPI 文档":"正在创建空白 OpenAPI 文档"});try{const be=await o0({title:N,version:je.trim()||"1.0.0",description:Ye.trim(),versionId:P}),jt=((ge=be.meta)==null?void 0:ge.savedAt)||new Date().toISOString();q(!1),n(be.document),R(!0),K([]),S(""),Se(jt),G(((ve=be.meta)==null?void 0:ve.versionId)||""),xe(be.meta),lt(((de=be.meta)==null?void 0:de.resolvedUrl)||((Ze=be.meta)==null?void 0:Ze.inputUrl)||"manual-document"),Mr(be.meta,be.document),l("ready"),be.versions?we(be.versions):await Yt(),kt({open:!0,mode:"blank",status:"success",progress:100,inputUrl:N,message:ne?"文档已更新并覆盖原版本":"空白文档已创建,可以继续新增 API 配置",meta:be.meta}),Y(!1),it("")}catch(be){const jt=be instanceof Error?be.message:"创建文档失败";u(jt),kt({open:!0,mode:"blank",status:"error",progress:100,inputUrl:N,message:"创建失败",error:jt})}finally{H("")}}async function zi(N,P){await navigator.clipboard.writeText(P),Es(N),window.setTimeout(()=>Es(""),1600)}function Bi(){const N=(It==null?void 0:It.updateVersionId)??"";rr(null),bs((It==null?void 0:It.mode)??"crawl",{type:"basic",username:on,password:_n},!0,N)}function jo(N){K(P=>{const ne=P.findIndex(ve=>ve.id===N),ge=P.filter(ve=>ve.id!==N);if(N===b){const ve=ge[ne]??ge[ne-1];R(!ve),S((ve==null?void 0:ve.id)??"")}return ge})}function Ps(N){R(!1),S(N)}function Be(N,P){const ne=gu(ie,N);mn(ge=>({...ge,[ne]:Jl(P)}))}async function xo(N,P,ne){const ge=await fetch(fg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:N,environmentName:P,environmentBaseUrl:ne})}),ve=await ge.json();if(!ge.ok)throw new Error(ve.error||"环境保存失败");const de=ve;we(de.versions??[]),N===ie&&xe(de.meta)}async function Ms(N){const P=await fetch(dg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:N})}),ne=await P.json();if(!P.ok)throw new Error(ne.error||"版本删除失败");const ge=ne;if(we(ge.versions??[]),N===ie){if(ge.nextVersionId){await yn(ge.nextVersionId);return}n(null),G(""),xe(void 0),K([]),Se(""),lt(""),l("ready")}}async function Ui(N){const P=await fetch(hg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:N})}),ne=await P.json();if(!P.ok)throw new Error(ne.error||"文档同步到默认缓存地址失败");return ne}async function Dr(){try{const N=await fetch(yg,{cache:"no-store"});if(!N.ok)return;In(await N.json())}catch{}}async function No(){var N;if(!i||!ct.endpoints){ir("请先导入、爬取或新建 API 文档,并至少包含一个接口后再启动 MOCK 服务");return}Ri(!0),ir(""),u("");try{const P=await fetch(mg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:ie||void 0})}),ne=await P.json();if(!P.ok)throw new Error(ne.error||"MOCK 服务启动失败");const ge=ne;In(ge),ir((N=ge.mock)!=null&&N.url?`MOCK 服务已启动:${ge.mock.url}`:"MOCK 服务已启动")}catch(P){ir(P instanceof Error?P.message:"MOCK 服务启动失败")}finally{Ri(!1)}}async function Rs(N){const P=N.versionId||"";if(!P)throw new Error("请选择要更新的文档版本");const ne=N.mode||"";P!==ie?await yn(P):Mr(N,i),ue(ar(ne)?ne:"blank"),it(P),Y(!0),u("")}async function $r(N){var P,ne,ge,ve;lr(!0),u("");try{const de=await u0(ie||void 0,N,Ts),Ze=((P=de.meta)==null?void 0:P.savedAt)||new Date().toISOString();n(de.document),Se(Ze),G(((ne=de.meta)==null?void 0:ne.versionId)||""),xe(de.meta),lt(((ge=de.meta)==null?void 0:ge.resolvedUrl)||((ve=de.meta)==null?void 0:ve.inputUrl)||"manual-api-config"),l("ready"),sr(!1),Ln(void 0),An(void 0),await Yt()}catch(de){u(de instanceof Error?de.message:"新增接口保存失败")}finally{lr(!1)}}async function zt(N){var P,ne,ge,ve;if(!ie){u("请先选择一个本地缓存版本");return}if(window.confirm(`确认删除 ${N.method.toUpperCase()} ${N.path}?`)){lr(!0),u("");try{const de=await c0(ie,N.method,N.path);n(de.document),Se(((P=de.meta)==null?void 0:P.savedAt)||new Date().toISOString()),G(((ne=de.meta)==null?void 0:ne.versionId)||ie),xe(de.meta),lt(((ge=de.meta)==null?void 0:ge.resolvedUrl)||((ve=de.meta)==null?void 0:ve.inputUrl)||"manual-api-config"),l("ready"),S(""),K(Ze=>Ze.filter(be=>be.id!==N.id)),await Yt()}catch(de){u(de instanceof Error?de.message:"删除接口失败")}finally{lr(!1)}}}async function Co(N,P){var de,Ze;if(!ie)throw new Error("请先选择一个本地缓存版本");const ne=await fetch(wg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:ie,method:N.method,path:N.path,links:P})}),ge=await ne.json();if(!ne.ok)throw new Error(ge.error||"关联配置保存失败");const ve=ge;n(ve.document),Se(((de=ve.meta)==null?void 0:de.savedAt)||new Date().toISOString()),G(((Ze=ve.meta)==null?void 0:Ze.versionId)||ie),xe(ve.meta),mn(be=>{var jt;return{...be,[gu(((jt=ve.meta)==null?void 0:jt.versionId)||ie,N)]:Jl(P)}}),ve.versions?we(ve.versions):await Yt()}const ct=A.useMemo(()=>{var ge;const N=i!=null&&i.paths?Object.keys(i.paths).length:0,P=((ge=i==null?void 0:i.components)==null?void 0:ge.schemas)??(i==null?void 0:i.definitions)??{},ne=Object.keys(P).length;return{paths:N,schemas:ne,endpoints:Dt.length,tags:Pr.length}},[i,Dt.length,Pr.length]),Eo=!!As(U);return r==="loading"?d.jsxs("main",{className:"state-screen",children:[d.jsx(Pm,{className:"state-icon"}),d.jsx("h1",{children:"正在读取最新缓存"}),d.jsx("p",{children:"如果没有缓存版本,将进入空文档状态。"})]}):r==="error"?d.jsxs("main",{className:"state-screen",children:[d.jsx(Cr,{className:"state-icon error"}),d.jsx("h1",{children:"接口文档加载失败"}),d.jsx("p",{children:a})]}):d.jsxs("div",{className:"app-shell",children:[d.jsxs("header",{className:"topbar",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow",children:"OpenAPI 3.0 Console"}),d.jsx("h1",{children:"API Skill Console"})]}),d.jsxs("div",{className:"topbar-actions",children:[d.jsx(e0,{versions:Z,selectedVersionId:ie,currentVersion:St,disabled:!!F,onSelect:N=>{!N||N===ie||yn(N)},onPrepareUpdate:Rs,onUpdateEnvironment:xo,onDelete:Ms,cacheSettings:Is,onSyncCache:Ui}),d.jsxs("button",{className:"primary-button",onClick:()=>{Ln(void 0),An(void 0),sr(!0)},children:[d.jsx(lo,{size:16}),"新增API配置"]}),d.jsxs("div",{className:"sync-meta",children:[d.jsxs("span",{children:["接口 ",ct.endpoints]}),d.jsxs("span",{children:["Schema ",ct.schemas]}),d.jsx("span",{children:Te?`同步 ${N0(Te)}`:"未加载文档"})]}),d.jsx(Zg,{settings:Is,onSettingsChange:Ls})]})]}),d.jsxs("section",{className:"source-panel document-toolbar",children:[d.jsxs("div",{className:"document-source-summary",children:[d.jsx("span",{children:"当前文档源"}),d.jsx("strong",{children:Qe||"未加载"}),Rt!=null&&Rt.running&&Rt.mock?d.jsxs("small",{children:["MOCK ",Rt.mock.url," · ",Rt.mock.routesCount," routes"]}):null]}),d.jsxs("div",{className:"source-panel-actions",children:[d.jsxs("button",{className:"primary-button",onClick:()=>{St&&Rs(St)},disabled:!!F||!St,title:St?"按当前文档最初的生成方式更新并覆盖原版本":"请先新建或导入文档",children:[d.jsx(to,{size:16}),"更新文档"]}),d.jsxs("button",{className:"secondary-button",onClick:No,disabled:Ar,children:[d.jsx(Yd,{size:16,className:Ar?"spin":""}),Ar?"启动中":"启动MOCK服务"]}),d.jsxs("button",{className:"secondary-button",onClick:()=>{it(""),ue("blank"),Y(!0)},disabled:!!F,children:[d.jsx(hs,{size:16}),"新建文档"]})]}),Lr?d.jsx("div",{className:`version-message ${Lr.includes("失败")||Lr.includes("请先")?"error":""}`,children:Lr}):null]}),a?d.jsxs("div",{className:"inline-error",children:[d.jsx(Cr,{size:16}),a]}):null,ut!=null&&ut.open?d.jsx(i0,{state:ut,onClose:()=>kt(null)}):null,It!=null&&It.open?d.jsx(r0,{state:It,username:on,password:_n,onUsernameChange:Tn,onPasswordChange:hn,onClose:()=>rr(null),onSubmit:Bi}):null,nr?d.jsx(s0,{activeTab:U,updating:Eo,title:pe,version:je,description:Ye,fileSourceUrl:B,crawlSourceUrl:X,curlSourceText:M,uploadFile:Q,uploadInputRef:br,saving:F===U,onTabChange:ue,onTitleChange:Ee,onVersionChange:_e,onDescriptionChange:ln,onFileSourceUrlChange:te,onCrawlSourceUrlChange:C,onCurlSourceTextChange:he,onUploadFileChange:ye,onClear:Di,onClose:()=>{F||(Y(!1),it(""))},onSubmit:()=>{if(U==="blank"){$i();return}bs(U,{type:"none"},!1,As(U))}}):null,Ir?d.jsx(Kg,{selectedVersionId:ie,saving:bn,initialConfig:Os,onClose:()=>{sr(!1),Ln(void 0),An(void 0)},onSave:$r}):null,d.jsxs("section",{className:"workspace",children:[d.jsxs("aside",{className:"sidebar",children:[d.jsxs("div",{className:"search-box",children:[d.jsx(Fm,{size:17}),d.jsx("input",{value:p,onChange:N=>h(N.target.value),placeholder:"搜索路径、摘要、参数、tag"}),p?d.jsx("button",{type:"button",className:"search-clear-button",onClick:()=>h(""),"aria-label":"清空搜索",children:d.jsx(Oi,{size:15})}):null]}),d.jsxs("div",{className:"filters",children:[d.jsxs("label",{children:[d.jsx(Dm,{size:15}),d.jsxs("select",{value:y,onChange:N=>g(N.target.value),children:[d.jsxs("option",{value:"all",children:["全部分组 (",ct.tags,")"]}),Pr.map(N=>d.jsxs("option",{value:N.name,children:[N.name," (",N.count,")"]},N.name))]})]}),d.jsxs("label",{className:"checkbox-line",children:[d.jsx("input",{type:"checkbox",checked:O,onChange:N=>E(N.target.checked)}),"仅看有请求体"]})]}),d.jsx("div",{className:"method-tabs","aria-label":"method filters",children:t0.map(N=>d.jsx("button",{className:x===N?"active":"",onClick:()=>w(N),title:N==="all"?"全部方法":N.toUpperCase(),children:N==="all"?"ALL":N.toUpperCase()},N))}),d.jsxs("div",{className:"endpoint-count",children:["显示 ",Jt.length," / ",Dt.length]}),d.jsx("div",{className:"endpoint-list",children:Jt.map(N=>d.jsxs("button",{className:`endpoint-item ${N.id===(Ae==null?void 0:Ae.id)?"selected":""}`,onClick:()=>Ps(N.id),children:[d.jsx("span",{className:`method method-${N.method}`,children:N.method.toUpperCase()}),d.jsxs("span",{className:"endpoint-main",children:[d.jsx("strong",{children:N.summary}),d.jsx("small",{children:N.path})]})]},N.id))})]}),d.jsxs("main",{className:"detail-pane",children:[J.length?d.jsx("div",{className:"opened-api-tabs","aria-label":"已打开 API 页签",children:J.map(N=>d.jsxs("div",{className:`opened-api-tab opened-api-tab-${N.method} ${N.id===(Ae==null?void 0:Ae.id)?"active":""}`,role:"button",tabIndex:0,onClick:()=>Ps(N.id),onKeyDown:P=>{P.key!=="Enter"&&P.key!==" "||(P.preventDefault(),Ps(N.id))},title:`${N.method.toUpperCase()} ${N.path}`,children:[d.jsx("span",{className:`opened-api-tab-method method-${N.method}`,children:N.method.toUpperCase()}),d.jsx("span",{className:"opened-api-tab-text",children:d.jsx("strong",{children:N.summary})}),d.jsx("button",{type:"button",className:"opened-api-tab-close","aria-label":"关闭页签",onClick:P=>{P.stopPropagation(),jo(N.id)},children:d.jsx(Oi,{size:14})})]},N.id))}):null,i&&Ae?d.jsx(f0,{doc:i,endpoint:Ae,copied:Cs,onCopy:(N,P)=>zi(N,P),onEdit:()=>{Ln(Dp(i,Ae)),An({method:Ae.method,path:Ae.path}),sr(!0)},onDelete:()=>void zt(Ae),onSaveLinks:Co,linksDraft:or??Jl(Ae.operation["x-apiskill-links"]),onLinksDraftChange:N=>Be(Ae,N),environmentBaseUrl:(St==null?void 0:St.environmentBaseUrl)||""}):i?Jt.length?d.jsxs("div",{className:"empty-state",children:[d.jsx(ms,{size:32}),d.jsx("h2",{children:"未打开接口"}),d.jsx("p",{children:"从左侧列表选择接口后会在上方生成可关闭页签。"})]}):d.jsxs("div",{className:"empty-state",children:[d.jsx(ms,{size:32}),d.jsx("h2",{children:"没有匹配的接口"}),d.jsx("p",{children:"调整搜索词、分组或方法过滤条件。"})]}):d.jsxs("div",{className:"empty-state",children:[d.jsx(ms,{size:32}),d.jsx("h2",{children:"暂无 API 文档数据"}),d.jsx("p",{children:"导入现有 Swagger/OpenAPI 文档,或新建空白文档后从零维护接口。"})]})]})]})]})}function r0({state:i,username:n,password:r,onUsernameChange:l,onPasswordChange:a,onClose:u,onSubmit:p}){return d.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"document-auth-title",children:d.jsxs("div",{className:"auth-dialog",children:[d.jsxs("div",{className:"import-dialog-header",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow",children:"Document Auth"}),d.jsx("h2",{id:"document-auth-title",children:"输入文档访问凭据"})]}),d.jsx("span",{className:"import-badge running",children:"需要登录"})]}),d.jsxs("div",{className:"auth-dialog-body",children:[d.jsxs("div",{className:"auth-message",children:[d.jsx(Bm,{size:18}),d.jsx("span",{children:i.message})]}),d.jsxs("div",{className:"auth-target",children:[d.jsx("span",{children:"文档地址"}),d.jsx("strong",{children:i.inputUrl})]}),d.jsxs("div",{className:"auth-fields",children:[d.jsxs("label",{children:["用户名",d.jsx("input",{value:n,onChange:h=>l(h.target.value),autoComplete:"username",autoFocus:!0})]}),d.jsxs("label",{children:["密码",d.jsx("input",{value:r,onChange:h=>a(h.target.value),type:"password",autoComplete:"current-password",onKeyDown:h=>{h.key==="Enter"&&p()}})]})]})]}),d.jsxs("div",{className:"import-dialog-actions",children:[d.jsx("button",{className:"secondary-button",onClick:u,children:"取消"}),d.jsxs("button",{className:"primary-button",onClick:p,children:[d.jsx(Qd,{size:16}),"使用凭据继续"]})]})]})})}function s0({activeTab:i,updating:n,title:r,version:l,description:a,fileSourceUrl:u,crawlSourceUrl:p,curlSourceText:h,uploadFile:y,uploadInputRef:g,saving:x,onTabChange:w,onTitleChange:O,onVersionChange:E,onDescriptionChange:b,onFileSourceUrlChange:S,onCrawlSourceUrlChange:I,onCurlSourceTextChange:R,onUploadFileChange:J,onClear:K,onClose:W,onSubmit:q}){var ue;const F=[{id:"blank",label:"空白文档",icon:hs},{id:"file",label:"在线文档",icon:to},{id:"crawl",label:"爬取网页",icon:Rm},{id:"curl",label:"执行 CURL",icon:Au},{id:"upload",label:"导入文件",icon:ms}],H=i==="blank"?!!r.trim():i==="file"?!!u.trim():i==="crawl"?!!p.trim():i==="curl"?!!h.trim():!!y,U=((ue=F.find(Z=>Z.id===i))==null?void 0:ue.icon)??hs;return d.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"document-dialog-title",children:d.jsxs("div",{className:"document-dialog",children:[d.jsxs("div",{className:"import-dialog-header",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow",children:"OpenAPI Document"}),d.jsx("h2",{id:"document-dialog-title",children:n?"更新文档":"新建文档"})]}),d.jsx("button",{className:"icon-secondary-button",onClick:W,"aria-label":"关闭",disabled:x,children:d.jsx(Oi,{size:17})})]}),d.jsx("div",{className:"document-dialog-tabs",role:"tablist","aria-label":"新建文档方式",children:F.map(Z=>{const we=Z.icon;return d.jsxs("button",{className:i===Z.id?"active":"",onClick:()=>w(Z.id),role:"tab","aria-selected":i===Z.id,disabled:x,children:[d.jsx(we,{size:15}),Z.label]},Z.id)})}),d.jsx("div",{className:"document-dialog-body",role:"tabpanel",children:i==="blank"?d.jsxs("div",{className:"blank-document-fields",children:[d.jsxs("label",{className:"source-input",children:[d.jsx(ms,{size:16}),d.jsx("input",{value:r,onChange:Z=>O(Z.target.value),placeholder:"文档名称,例如 Customer Service API",autoFocus:!0})]}),d.jsxs("label",{className:"source-input",children:[d.jsx(hs,{size:16}),d.jsx("input",{value:l,onChange:Z=>E(Z.target.value),placeholder:"文档版本,例如 1.0.0"})]}),d.jsxs("label",{className:"source-input",children:[d.jsx(Lu,{size:16}),d.jsx("input",{value:a,onChange:Z=>b(Z.target.value),placeholder:"文档描述,可选"})]})]}):i==="upload"?d.jsxs("label",{className:"source-file-picker document-file-picker",children:[d.jsx(ms,{size:18}),d.jsx("input",{ref:g,type:"file",accept:".json,.yaml,.yml,application/json,application/yaml,text/yaml,text/x-yaml",onChange:Z=>{var we;return J(((we=Z.target.files)==null?void 0:we[0])??null)}}),d.jsx("span",{children:y?y.name:"选择 JSON / YAML 文件"}),d.jsx("small",{children:y?"点击可重新选择文件":"支持 OpenAPI 3.x 与 Swagger 2.0"})]}):d.jsxs("label",{className:`source-input document-source-input ${i==="curl"?"source-input-multiline":""}`,children:[d.jsx(eo,{size:16}),i==="curl"?d.jsx("textarea",{value:h,onChange:Z=>R(Z.target.value),placeholder:"粘贴 curl 命令,例如 curl 'https://example.com/openapi.yaml' -H 'accept: application/yaml'",spellCheck:!1,autoFocus:!0}):d.jsx("input",{value:i==="file"?u:p,onChange:Z=>{i==="file"?S(Z.target.value):I(Z.target.value)},placeholder:i==="file"?"输入 Swagger/OpenAPI JSON 或 YAML 文件地址":"输入 Swagger UI / Knife4j / Redoc 在线文档页地址",autoFocus:!0})]})}),d.jsxs("div",{className:"import-dialog-actions document-dialog-actions",children:[i!=="blank"&&H?d.jsx("button",{className:"secondary-button clear-document-source",onClick:K,disabled:x,children:"清空"}):null,d.jsx("button",{className:"secondary-button",onClick:W,disabled:x,children:"取消"}),d.jsxs("button",{className:"primary-button",onClick:q,disabled:x||!H,children:[d.jsx(U,{size:16,className:x?"spin":""}),x?"处理中":n?"更新":i==="blank"?"创建":"确认"]})]})]})})}function i0({state:i,onClose:n}){var a,u,p,h,y;const r=i.mode==="blank"?"新建空白文档":i.mode==="crawl"?"爬取在线文档":i.mode==="curl"?"执行 CURL":i.mode==="upload"?"上传 JSON / YAML 文件":"导入 JSON / YAML 文件",l=i.status!=="running";return d.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"import-status-title",children:d.jsxs("div",{className:"import-dialog",children:[d.jsxs("div",{className:"import-dialog-header",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow",children:"OpenAPI Import"}),d.jsx("h2",{id:"import-status-title",children:r})]}),d.jsx("span",{className:`import-badge ${i.status}`,children:i.status==="running"?"处理中":i.status==="success"?"已完成":"失败"})]}),d.jsx("div",{className:"progress-track","aria-label":"导入进度",children:d.jsx("div",{className:`progress-bar ${i.status}`,style:{width:`${i.progress}%`}})}),d.jsxs("div",{className:"import-summary",children:[d.jsxs("div",{children:[d.jsx("span",{children:"输入地址"}),d.jsx("strong",{children:i.inputUrl||"-"})]}),d.jsxs("div",{children:[d.jsx("span",{children:"当前状态"}),d.jsx("strong",{children:i.message})]}),(a=i.meta)!=null&&a.resolvedUrl?d.jsxs("div",{children:[d.jsx("span",{children:"解析地址"}),d.jsx("strong",{children:i.meta.resolvedUrl})]}):null,(u=i.meta)!=null&&u.versionId?d.jsxs("div",{children:[d.jsx("span",{children:"版本"}),d.jsx("strong",{children:i.meta.versionId})]}):null,(p=i.meta)!=null&&p.savedPath?d.jsxs("div",{children:[d.jsx("span",{children:"保存位置"}),d.jsx("strong",{children:i.meta.savedPath})]}):null,i.status==="success"?d.jsxs("div",{className:"import-counts",children:[d.jsxs("span",{children:["接口路径 ",((h=i.meta)==null?void 0:h.paths)??0]}),d.jsxs("span",{children:["Schema ",((y=i.meta)==null?void 0:y.schemas)??0]})]}):null,i.error?d.jsxs("div",{className:"import-error",children:[d.jsx(Cr,{size:16}),i.error]}):null]}),d.jsx("div",{className:"import-dialog-actions",children:d.jsx("button",{className:"secondary-button",onClick:n,disabled:!l,children:l?"关闭":"处理中"})})]})})}async function l0(i,n,r,l,a){const u=await fetch(ig,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({url:i,mode:n,auth:r,content:l,versionId:a})}),p=await u.json();if(!u.ok)throw new Error(p.error||"导入失败");return p}async function o0(i){const n=await fetch(lg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(i)}),r=await n.json();if(!n.ok)throw new Error(r.error||"创建文档失败");return r}async function a0(i,n){const r=await fetch(og,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({url:i,mode:n})}),l=await r.json();if(!r.ok)throw new Error(l.error||"检测文档访问权限失败");return l}async function u0(i,n,r){const l=await fetch(gg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:i,config:n,replaceTarget:r})}),a=await l.json();if(!l.ok)throw new Error(a.error||"新增接口保存失败");return a}async function c0(i,n,r){const l=await fetch(vg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({versionId:i,method:n,path:r})}),a=await l.json();if(!l.ok)throw new Error(a.error||"删除接口失败");return a}function f0({doc:i,endpoint:n,copied:r,onCopy:l,onEdit:a,onDelete:u,onSaveLinks:p,linksDraft:h,onLinksDraftChange:y,environmentBaseUrl:g}){const x=A.useMemo(()=>Rp(i,n.operation.parameters),[i,n]),w=A.useMemo(()=>Og(i,n.operation),[i,n]),O=A.useMemo(()=>Tg(i,n.operation),[i,n]),E=A.useMemo(()=>_g(i,n),[i,n]),b=A.useMemo(()=>Ig(n),[n]),[S,I]=A.useState("ai"),[R,J]=A.useState(!1),K=S==="json"?b:E,W=S==="json"?"复制原始 Operation":"复制 API CLI";function q(){Up(n.path),navigator.clipboard.writeText(n.path).catch(()=>{}),J(!0),window.setTimeout(()=>J(!1),1600)}return d.jsxs("article",{className:"endpoint-detail",children:[d.jsxs("div",{className:"detail-header",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"endpoint-title-line",children:[d.jsx("span",{className:`method method-${n.method}`,children:n.method.toUpperCase()}),d.jsx("h2",{children:n.summary}),d.jsx("div",{className:"tag-row",children:n.tags.map(F=>d.jsx("span",{children:F},F))})]}),d.jsxs("div",{className:"path-row",children:[d.jsx("code",{className:"path-line",children:n.path}),d.jsxs("button",{type:"button",className:"path-copy-button",onClick:q,title:"复制 API 路由地址",children:[R?d.jsx(Ei,{size:14}):d.jsx(Si,{size:14}),d.jsx("span",{children:R?"已复制":"复制"})]})]})]}),d.jsxs("div",{className:"detail-actions",children:[d.jsxs("button",{className:"secondary-button",onClick:a,children:[d.jsx(Lu,{size:15}),"编辑"]}),d.jsxs("button",{className:"danger-button",onClick:u,children:[d.jsx(oo,{size:15}),"删除"]})]})]}),n.operation.description?d.jsx("p",{className:"description",children:n.operation.description}):null,d.jsxs("section",{className:"copy-preview",children:[d.jsxs("div",{className:"copy-preview-toolbar",children:[d.jsxs("div",{className:"copy-tabs",role:"tablist","aria-label":"可复制内容",children:[d.jsxs("button",{className:S==="ai"?"active":"",onClick:()=>I("ai"),role:"tab","aria-selected":S==="ai",children:[d.jsx(Si,{size:15}),"API Cli"]}),d.jsxs("button",{className:S==="json"?"active":"",onClick:()=>I("json"),role:"tab","aria-selected":S==="json",children:[d.jsx(hs,{size:15}),"原始 Operation"]}),d.jsxs("button",{className:S==="test"?"active":"",onClick:()=>I("test"),role:"tab","aria-selected":S==="test",children:[d.jsx(Au,{size:15}),"测试请求"]}),d.jsxs("button",{className:S==="links"?"active":"",onClick:()=>I("links"),role:"tab","aria-selected":S==="links",children:[d.jsx(eo,{size:15}),"关联地址"]})]}),S==="test"||S==="links"?null:d.jsxs("button",{className:"copy-inline-button",onClick:()=>l(S,K),children:[r===S?d.jsx(Ei,{size:16}):d.jsx(Si,{size:16}),r===S?"已复制":W]})]}),S==="test"?d.jsx(p0,{doc:i,endpoint:n,environmentBaseUrl:g}):S==="links"?d.jsx(d0,{endpoint:n,links:h,onChange:y,onSave:F=>p(n,F)}):d.jsx("pre",{className:"copy-preview-content",children:K})]}),d.jsx(wu,{title:"请求参数",count:x.length,children:d.jsx(ku,{rows:x,empty:"无 query / path / header 参数"})}),d.jsx(wu,{title:"请求体",count:Object.values(w).reduce((F,H)=>F+H.length,0),children:Object.keys(w).length?Object.entries(w).map(([F,H])=>d.jsxs("div",{className:"media-block",children:[d.jsx("h4",{children:F}),d.jsx(ku,{rows:H,empty:"空对象或无字段说明"})]},F)):d.jsx("p",{className:"muted",children:"无请求体"})}),d.jsx(wu,{title:"响应字段",count:Object.values(O).reduce((F,H)=>F+Object.values(H).flat().length,0),children:Object.keys(n.operation.responses??{}).length?Object.entries(n.operation.responses??{}).map(([F,H])=>{const U=O[F]??{};return d.jsxs("div",{className:"response-block",children:[d.jsxs("div",{className:"response-heading",children:[d.jsx("strong",{children:F}),d.jsx("span",{children:H.description||"无描述"})]}),Object.keys(U).length?Object.entries(U).map(([ue,Z])=>d.jsxs("div",{className:"media-block",children:[d.jsx("h4",{children:ue}),d.jsx(ku,{rows:Z,empty:"空对象或无字段说明"})]},ue)):d.jsx("p",{className:"muted",children:"无字段说明"})]},F)}):d.jsx("p",{className:"muted",children:"无响应说明"})})]})}function d0({endpoint:i,links:n,onChange:r,onSave:l}){const[a,u]=A.useState(!1),[p,h]=A.useState("");A.useEffect(()=>{h("")},[i.id]);async function y(){u(!0),h("");try{await l(n),h("关联配置已保存")}catch(g){h(g instanceof Error?g.message:"关联配置保存失败")}finally{u(!1)}}return d.jsxs("div",{className:"endpoint-links-config",children:[p?d.jsx("div",{className:`version-message ${p.includes("失败")?"error":""}`,children:p}):null,d.jsxs("div",{className:"links-grid",children:[d.jsx(Vd,{title:"原型地址",value:n.prototype??Ou(),onChange:g=>r({...n,prototype:g})}),d.jsx(Vd,{title:"UI地址",value:n.ui??Ou(),onChange:g=>r({...n,ui:g})})]}),d.jsx("div",{className:"links-actions",children:d.jsxs("button",{className:"primary-button",onClick:y,disabled:a,children:[d.jsx(Ei,{size:16}),a?"保存中":"保存关联配置"]})})]})}function Vd({title:i,value:n,onChange:r}){const l=n.sourceType==="online",a=n.sourceType==="curl";function u(h){r({...n,...h})}function p(){const h=a?n.curl:n.url;h&&(Up(h),navigator.clipboard.writeText(h).catch(()=>{}))}return d.jsxs("section",{className:"tester-panel link-editor-panel",children:[d.jsxs("div",{className:"tester-panel-title",children:[d.jsx(eo,{size:15}),i]}),d.jsxs("div",{className:"tester-form-grid",children:[d.jsxs("label",{children:["类型",d.jsxs("select",{value:n.sourceType||"local",onChange:h=>u({sourceType:h.target.value}),children:[d.jsx("option",{value:"local",children:"本地文件地址"}),d.jsx("option",{value:"online",children:"在线地址"}),d.jsx("option",{value:"curl",children:"CURL"})]})]}),d.jsxs("label",{children:["标题",d.jsx("input",{value:n.title||"",onChange:h=>u({title:h.target.value}),placeholder:"例如 Figma 原型 / 用户列表页面"})]}),a?d.jsxs("label",{className:"span-all",children:["CURL 命令",d.jsx("textarea",{value:n.curl||"",onChange:h=>u({curl:h.target.value}),placeholder:"curl 'https://example.com/prototype' -H 'Authorization: Bearer ...'",spellCheck:!1})]}):d.jsxs("label",{className:"span-all",children:["地址",d.jsx("input",{value:n.url||"",onChange:h=>u({url:h.target.value}),placeholder:l?"https://example.com/prototype":"/Users/name/project/design/user-list.fig"})]}),l?d.jsxs(d.Fragment,{children:[d.jsxs("label",{children:["访问方式",d.jsxs("select",{value:n.authType||"none",onChange:h=>u({authType:h.target.value}),children:[d.jsx("option",{value:"none",children:"无需登录"}),d.jsx("option",{value:"browser",children:"浏览器登录 / Cookie"}),d.jsx("option",{value:"bearer",children:"Bearer Token"}),d.jsx("option",{value:"header",children:"自定义 Header"})]})]}),n.authType==="header"?d.jsxs("label",{children:["Header 名称",d.jsx("input",{value:n.headerName||"",onChange:h=>u({headerName:h.target.value}),placeholder:"X-Auth-Token"})]}):null,n.authType==="bearer"||n.authType==="header"?d.jsxs("label",{className:"span-all",children:["Token / Header 值",d.jsx("input",{value:n.token||"",onChange:h=>u({token:h.target.value}),placeholder:"仅保存在本地文档缓存中,用于记录访问凭据",type:"password"})]}):null]}):null,d.jsxs("label",{className:"span-all",children:["备注",d.jsx("input",{value:n.note||"",onChange:h=>u({note:h.target.value}),placeholder:a?"例如 CURL 里的 token 来源、过期方式或请求前置条件":l?"例如需要先登录公司 SSO,或 token 过期时找谁更新":"例如本地原型文件位置、分支或打开方式"})]})]}),d.jsxs("div",{className:"link-editor-actions",children:[d.jsxs("button",{className:"secondary-button",onClick:p,disabled:!(a?n.curl:n.url),children:[d.jsx(Si,{size:15}),a?"复制CURL":"复制地址"]}),l&&n.url?d.jsxs("a",{className:"secondary-button link-button",href:n.url,target:"_blank",rel:"noreferrer",children:[d.jsx(eo,{size:15}),"打开地址"]}):null]})]})}function Jl(i){return{prototype:Kd(i==null?void 0:i.prototype),ui:Kd(i==null?void 0:i.ui)}}function Kd(i){const n=(i==null?void 0:i.sourceType)==="online"||(i==null?void 0:i.sourceType)==="curl"?i.sourceType:"local";return{...Ou(),...i??{},sourceType:n,authType:(i==null?void 0:i.authType)||"none"}}function Ou(){return{sourceType:"local",title:"",url:"",curl:"",authType:"none",token:"",headerName:"",note:""}}function p0({doc:i,endpoint:n,environmentBaseUrl:r}){const l=n.operation.parameters??[],a=l.filter(Q=>Q.in==="path"),u=l.filter(Q=>Q.in==="query"),p=l.filter(Q=>Q.in==="header"),h=A.useMemo(()=>h0(n),[n]),y=A.useRef(""),[g,x]=A.useState(""),[w,O]=A.useState("none"),[E,b]=A.useState(""),[S,I]=A.useState("Authorization"),[R,J]=A.useState("header"),[K,W]=A.useState(""),[q,F]=A.useState(""),[H,U]=A.useState({}),[ue,Z]=A.useState({}),[we,ie]=A.useState(""),[G,oe]=A.useState(`{
321
+ "Content-Type": "application/json"
322
+ }`),[xe,Te]=A.useState(!1),[Se,B]=A.useState(""),[te,X]=A.useState(null);A.useEffect(()=>{U({}),Z({}),X(null),B(""),ie(h!=null&&h.schema?JSON.stringify(Tu(i,h.schema),null,2):""),oe(h?`{
323
+ "Content-Type": "application/json"
324
+ }`:"{}")},[i,n.id,h]),A.useEffect(()=>{const Q=r.trim();x(ye=>{const pe=y.current;return y.current=Q,!ye||ye===pe?Q:ye})},[r]);const C=A.useMemo(()=>{try{return qd(g,n.path,l,H,R==="query"?{[S]:E}:{})}catch{return n.path}},[R,S,E,g,n.path,l,H]);function M(){const Q={},ye={};l.forEach((pe,Ee)=>{const je=Li(pe,Ee),_e=v0(m0(i,pe));(pe.in==="path"||pe.in==="query")&&(Q[je]=_e),pe.in==="header"&&(ye[je]=_e)}),U(Q),Z(ye),h!=null&&h.schema&&!["get","head"].includes(n.method)?(ie(JSON.stringify(jr(i,h.schema),null,2)),oe(JSON.stringify({...k0(G),"Content-Type":h.mediaType},null,2))):ie(""),X(null),B("")}async function he(){Te(!0),B(""),X(null);try{const Q=Bp(G),ye=w0({customHeaders:Q,headerParams:p,headerValues:ue,authType:w,authValue:E,apiKeyName:S,apiKeyLocation:R,basicUsername:K,basicPassword:q}),pe=qd(g,n.path,l,H,R==="query"?{[S]:E}:{}),Ee=["get","head"].includes(n.method)?void 0:we.trim()||void 0,je=await S0({url:pe,method:n.method.toUpperCase(),headers:ye,body:Ee});X(je)}catch(Q){B(Q instanceof Error?Q.message:"请求失败")}finally{Te(!1)}}return d.jsxs("div",{className:"request-tester",children:[d.jsxs("div",{className:"request-line",children:[d.jsx("span",{className:`method method-${n.method}`,children:n.method.toUpperCase()}),d.jsxs("label",{children:["Base URL",d.jsx("input",{value:g,onChange:Q=>x(Q.target.value),placeholder:"https://api.example.com"})]}),d.jsxs("div",{className:"request-actions",children:[d.jsxs("button",{className:"primary-button",onClick:he,disabled:xe,children:[d.jsx(Au,{size:16}),xe?"请求中":"发送请求"]}),d.jsxs("button",{className:"secondary-button",onClick:M,disabled:xe,children:[d.jsx(hs,{size:16}),"MOCK数据"]})]})]}),d.jsx("code",{className:"request-preview",children:C}),d.jsxs("div",{className:"tester-grid",children:[d.jsxs("section",{className:"tester-panel",children:[d.jsxs("div",{className:"tester-panel-title",children:[d.jsx(Qd,{size:15}),"鉴权"]}),d.jsxs("div",{className:"tester-form-grid",children:[d.jsxs("label",{children:["类型",d.jsxs("select",{value:w,onChange:Q=>O(Q.target.value),children:[d.jsx("option",{value:"none",children:"None"}),d.jsx("option",{value:"bearer",children:"Bearer Token"}),d.jsx("option",{value:"jwt",children:"JWT Token"}),d.jsx("option",{value:"apiKey",children:"API Key"}),d.jsx("option",{value:"basic",children:"Basic Auth"})]})]}),w==="apiKey"?d.jsxs(d.Fragment,{children:[d.jsxs("label",{children:["Key 名称",d.jsx("input",{value:S,onChange:Q=>I(Q.target.value),placeholder:"X-API-Key"})]}),d.jsxs("label",{children:["位置",d.jsxs("select",{value:R,onChange:Q=>J(Q.target.value),children:[d.jsx("option",{value:"header",children:"Header"}),d.jsx("option",{value:"query",children:"Query"})]})]}),d.jsxs("label",{children:["Value",d.jsx("input",{value:E,onChange:Q=>b(Q.target.value),placeholder:"api key value"})]})]}):w==="basic"?d.jsxs(d.Fragment,{children:[d.jsxs("label",{children:["Username",d.jsx("input",{value:K,onChange:Q=>W(Q.target.value)})]}),d.jsxs("label",{children:["Password",d.jsx("input",{value:q,onChange:Q=>F(Q.target.value),type:"password"})]})]}):w!=="none"?d.jsxs("label",{children:["Token",d.jsx("input",{value:E,onChange:Q=>b(Q.target.value),placeholder:"token"})]}):null]})]}),d.jsxs("section",{className:"tester-panel",children:[d.jsx("div",{className:"tester-panel-title",children:"参数"}),d.jsx(vu,{title:"Path",parameters:a,values:H,onChange:U}),d.jsx(vu,{title:"Query",parameters:u,values:H,onChange:U}),d.jsx(vu,{title:"Header",parameters:p,values:ue,onChange:Z})]})]}),d.jsxs("div",{className:"tester-grid",children:[d.jsxs("section",{className:"tester-panel",children:[d.jsx("div",{className:"tester-panel-title",children:"请求头 JSON"}),d.jsx("textarea",{value:G,onChange:Q=>oe(Q.target.value),spellCheck:!1})]}),d.jsxs("section",{className:"tester-panel",children:[d.jsxs("div",{className:"tester-panel-title",children:["请求体 ",h?`(${h.mediaType})`:""]}),d.jsx("textarea",{value:we,onChange:Q=>ie(Q.target.value),disabled:!h||["get","head"].includes(n.method),spellCheck:!1,placeholder:h?"JSON / raw body":"该接口没有请求体"})]})]}),Se?d.jsxs("div",{className:"import-error",children:[d.jsx(Cr,{size:16}),Se]}):null,d.jsxs("section",{className:"tester-panel response-panel",children:[d.jsx("div",{className:"tester-panel-title",children:"响应"}),te?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"response-meta-line",children:[d.jsxs("span",{className:te.status>=200&&te.status<300?"status-ok":"status-error",children:[te.status," ",te.statusText]}),d.jsxs("span",{children:[te.elapsedMs,"ms"]}),d.jsx("span",{children:te.url})]}),d.jsx("pre",{children:j0(te.body)})]}):d.jsx("p",{className:"muted",children:"发送请求后显示响应内容。"})]})]})}function vu({title:i,parameters:n,values:r,onChange:l}){return n.length?d.jsxs("div",{className:"param-editor",children:[d.jsx("h4",{children:i}),n.map((a,u)=>{var h;const p=Li(a,u);return d.jsxs("label",{children:[d.jsxs("span",{children:[a.name,a.required?d.jsx("b",{children:"*"}):null]}),d.jsx("input",{value:r[p]??"",onChange:y=>l({...r,[p]:y.target.value}),placeholder:a.description||((h=a.schema)==null?void 0:h.description)||""})]},p)})]}):null}function h0(i){var p,h,y,g;const n=((p=i.operation.requestBody)==null?void 0:p.content)??{},r=Object.entries(n),a=r.find(([x])=>x.includes("json"))??r[0],u=(h=i.operation.parameters)==null?void 0:h.find(x=>x.in==="body");if(!a&&(u!=null&&u.schema))return{mediaType:((y=i.operation.consumes)==null?void 0:y.find(x=>x.includes("json")))??((g=i.operation.consumes)==null?void 0:g[0])??"application/json",schema:u.schema};if(a)return{mediaType:a[0],schema:a[1].schema}}function Tu(i,n,r=0,l=new Set){var p;if(!n||r>8)return{};const a=Mt(i,n)??n;if(l.has(a))return{};if(l.add(a),a.default!==void 0)return a.default;if((p=a.enum)!=null&&p.length)return a.enum[0];if(a.type==="array")return[Tu(i,a.items,r+1,l)];if(a.type==="integer"||a.type==="number")return 0;if(a.type==="boolean")return!1;if(a.type==="string")return"";const u=a.properties??{};return Object.fromEntries(Object.entries(u).map(([h,y])=>[h,Tu(i,y,r+1,new Set(l))]))}function m0(i,n){var l;if(n.default!==void 0)return n.default;if((l=n.enum)!=null&&l.length)return n.enum[0];const r=y0(n);return jr(i,r,n.name)}function jr(i,n,r="",l=0,a=new Set){var x,w,O,E;if(!n||l>8)return _u(r)??"mock-value";const u=Mt(i,n)??n;if(a.has(u))return{};const p=new Set(a);if(p.add(u),u.default!==void 0)return u.default;if(n.default!==void 0)return n.default;if((x=u.enum)!=null&&x.length)return u.enum[0];if((w=n.enum)!=null&&w.length)return n.enum[0];const h=_u(r,u.format||n.format),y=u.type||n.type||(u.properties?"object":"");if(h!==void 0&&(!y||y==="string"||y==="integer"||y==="number"))return h;if((O=u.oneOf)!=null&&O.length)return jr(i,u.oneOf[0],r,l+1,p);if((E=u.anyOf)!=null&&E.length)return jr(i,u.anyOf[0],r,l+1,p);if(y==="array")return[jr(i,u.items,r,l+1,p)];if(y==="integer"||y==="number")return g0(r);if(y==="boolean")return!0;if(y==="string")return h??"mock-value";const g=u.properties??{};return Object.keys(g).length?Object.fromEntries(Object.entries(g).map(([b,S])=>[b,jr(i,S,b,l+1,p)])):u.additionalProperties&&typeof u.additionalProperties=="object"?{key:jr(i,u.additionalProperties,"value",l+1,p)}:h??{}}function y0(i){var n;if(i.schema)return i.schema;if(!(!i.type&&!i.format&&!i.items&&!((n=i.enum)!=null&&n.length)&&i.default===void 0))return{type:i.type,format:i.format,items:i.items,enum:i.enum,default:i.default,description:i.description}}function _u(i,n=""){const r=i.toLowerCase().replace(/[^a-z0-9]/g,"");if(n==="date-time")return new Date().toISOString();if(n==="date")return new Date().toISOString().slice(0,10);if(n==="email"||r.includes("email"))return"mock@example.com";if(n==="uuid"||r.includes("uuid"))return"00000000-0000-4000-8000-000000000000";if(r==="id"||r.endsWith("id")||r==="page"||r==="pagenum"||r==="pageindex")return 1;if(r==="pagesize"||r==="limit"||r==="size")return 10;if(r.includes("phone")||r.includes("mobile"))return"13800000000";if(r.includes("name")||r.includes("title")||r.includes("keyword"))return"mock-name";if(r.includes("url"))return"https://example.com";if(r.includes("date"))return new Date().toISOString().slice(0,10);if(r.includes("time"))return new Date().toISOString()}function g0(i){const n=_u(i);return typeof n=="number"?n:1}function v0(i){return i==null?"":typeof i=="string"?i:typeof i=="number"||typeof i=="boolean"?String(i):JSON.stringify(i)}function Li(i,n){return`${i.in}-${i.name}-${n}`}function qd(i,n,r,l,a){if(!i.trim()&&!/^https?:\/\//i.test(n))throw new Error("请输入 Base URL,例如 https://api.example.com");const u=i.trim()||void 0;let p=n;r.forEach((y,g)=>{if(y.in!=="path")return;const x=l[Li(y,g)]??"";p=p.replace(new RegExp(`\\{${x0(y.name)}\\}`,"g"),encodeURIComponent(x))});const h=new URL(p,u);return r.forEach((y,g)=>{if(y.in!=="query")return;const x=l[Li(y,g)]??"";x&&h.searchParams.append(y.name,x)}),Object.entries(a).forEach(([y,g])=>{y.trim()&&g.trim()&&h.searchParams.set(y.trim(),g.trim())}),h.toString()}function w0({customHeaders:i,headerParams:n,headerValues:r,authType:l,authValue:a,apiKeyName:u,apiKeyLocation:p,basicUsername:h,basicPassword:y}){const g={...i};return n.forEach((x,w)=>{const O=r[Li(x,w)];O&&(g[x.name]=O)}),(l==="bearer"||l==="jwt")&&a.trim()&&(g.Authorization=`Bearer ${a.trim()}`),l==="apiKey"&&p==="header"&&u.trim()&&a.trim()&&(g[u.trim()]=a.trim()),l==="basic"&&(h||y)&&(g.Authorization=`Basic ${btoa(`${h}:${y}`)}`),g}function Bp(i){if(!i.trim())return{};const n=JSON.parse(i);return Object.fromEntries(Object.entries(n).map(([r,l])=>[r,String(l)]))}function k0(i){try{return Bp(i)}catch{return{}}}async function S0(i){const n=await fetch("/api/request/send",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(i)}),r=await n.json();if(!n.ok)throw new Error(r.error||"请求失败");return r}function j0(i){try{return JSON.stringify(JSON.parse(i),null,2)}catch{return i}}function Up(i){const n=document.createElement("textarea");n.value=i,n.setAttribute("readonly","true"),n.style.position="fixed",n.style.left="-9999px",n.style.top="0",document.body.appendChild(n),n.focus(),n.select();try{return document.execCommand("copy")}finally{document.body.removeChild(n)}}function x0(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wu({title:i,count:n,children:r}){return d.jsxs("section",{className:"detail-section",children:[d.jsxs("div",{className:"section-title",children:[d.jsx("h3",{children:i}),d.jsx("span",{children:n})]}),r]})}function ku({rows:i,empty:n}){return i.length?d.jsx("div",{className:"table-wrap",children:d.jsxs("table",{children:[d.jsx("thead",{children:d.jsxs("tr",{children:[d.jsx("th",{children:"字段"}),d.jsx("th",{children:"位置"}),d.jsx("th",{children:"必填"}),d.jsx("th",{children:"类型"}),d.jsx("th",{children:"说明"}),d.jsx("th",{children:"默认值"}),d.jsx("th",{children:"枚举"})]})}),d.jsx("tbody",{children:i.map((r,l)=>d.jsxs("tr",{children:[d.jsx("td",{children:d.jsx("code",{style:{paddingLeft:r.depth*16},children:r.name})}),d.jsx("td",{children:r.location||"-"}),d.jsx("td",{children:r.required?"是":"否"}),d.jsx("td",{children:r.type}),d.jsx("td",{children:r.description||"-"}),d.jsx("td",{children:r.defaultValue||"-"}),d.jsx("td",{children:r.enumValue||"-"})]},`${r.location}-${r.path}-${r.depth}-${l}`))})]})}):d.jsx("p",{className:"muted",children:n})}function N0(i){const n=new Date(i);return Number.isNaN(n.getTime())?i:n.toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}Im.createRoot(document.getElementById("root")).render(d.jsx(xm.StrictMode,{children:d.jsx(n0,{})}));