openspec-mcp 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -15
- package/dist/api/routes/kanban.d.ts.map +1 -1
- package/dist/api/routes/kanban.js +11 -16
- package/dist/api/routes/kanban.js.map +1 -1
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +30 -3
- package/dist/api/server.js.map +1 -1
- package/dist/core/approval-manager.d.ts +0 -4
- package/dist/core/approval-manager.d.ts.map +1 -1
- package/dist/core/approval-manager.js +5 -25
- package/dist/core/approval-manager.js.map +1 -1
- package/dist/core/approval-manager.test.js +6 -9
- package/dist/core/approval-manager.test.js.map +1 -1
- package/dist/index.js +0 -21
- package/dist/index.js.map +1 -1
- package/dist/server/tools/approval.js +4 -2
- package/dist/server/tools/approval.js.map +1 -1
- package/dist/server/tools/context.d.ts.map +1 -1
- package/dist/server/tools/context.js +0 -38
- package/dist/server/tools/context.js.map +1 -1
- package/dist/server/tools/critique.d.ts.map +1 -1
- package/dist/server/tools/critique.js +29 -42
- package/dist/server/tools/critique.js.map +1 -1
- package/dist/server/tools/generator.d.ts.map +1 -1
- package/dist/server/tools/generator.js +0 -23
- package/dist/server/tools/generator.js.map +1 -1
- package/dist/server/tools/reviews.d.ts.map +1 -1
- package/dist/server/tools/reviews.js +0 -25
- package/dist/server/tools/reviews.js.map +1 -1
- package/dist/types/openspec.d.ts +1 -1
- package/dist/types/openspec.d.ts.map +1 -1
- package/dist/utils/constants.d.ts +2 -3
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +2 -3
- package/dist/utils/constants.js.map +1 -1
- package/package.json +1 -1
- package/web/dist/assets/index-C5tEIOBf.css +1 -0
- package/web/dist/assets/index-D4LCY_M0.js +244 -0
- package/web/dist/index.html +2 -2
- package/dist/api/routes/qa.d.ts +0 -8
- package/dist/api/routes/qa.d.ts.map +0 -1
- package/dist/api/routes/qa.js +0 -98
- package/dist/api/routes/qa.js.map +0 -1
- package/dist/core/prompt-manager.d.ts +0 -50
- package/dist/core/prompt-manager.d.ts.map +0 -1
- package/dist/core/prompt-manager.js +0 -186
- package/dist/core/prompt-manager.js.map +0 -1
- package/dist/core/qa-runner.d.ts +0 -134
- package/dist/core/qa-runner.d.ts.map +0 -1
- package/dist/core/qa-runner.js +0 -299
- package/dist/core/qa-runner.js.map +0 -1
- package/dist/server/tools/qa.d.ts +0 -12
- package/dist/server/tools/qa.d.ts.map +0 -1
- package/dist/server/tools/qa.js +0 -248
- package/dist/server/tools/qa.js.map +0 -1
- package/web/dist/assets/index-Bf5mzJti.css +0 -1
- package/web/dist/assets/index-W9UMaaAn.js +0 -244
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
function $0(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const l=Object.getOwnPropertyDescriptor(r,i);l&&Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();var ks=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ap={exports:{}},to={},up={exports:{}},Q={};/**
|
|
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 gl=Symbol.for("react.element"),B0=Symbol.for("react.portal"),U0=Symbol.for("react.fragment"),V0=Symbol.for("react.strict_mode"),H0=Symbol.for("react.profiler"),K0=Symbol.for("react.provider"),W0=Symbol.for("react.context"),q0=Symbol.for("react.forward_ref"),Q0=Symbol.for("react.suspense"),Y0=Symbol.for("react.memo"),J0=Symbol.for("react.lazy"),_f=Symbol.iterator;function G0(e){return e===null||typeof e!="object"?null:(e=_f&&e[_f]||e["@@iterator"],typeof e=="function"?e:null)}var cp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fp=Object.assign,dp={};function ti(e,t,n){this.props=e,this.context=t,this.refs=dp,this.updater=n||cp}ti.prototype.isReactComponent={};ti.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};ti.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function hp(){}hp.prototype=ti.prototype;function Yu(e,t,n){this.props=e,this.context=t,this.refs=dp,this.updater=n||cp}var Ju=Yu.prototype=new hp;Ju.constructor=Yu;fp(Ju,ti.prototype);Ju.isPureReactComponent=!0;var Af=Array.isArray,pp=Object.prototype.hasOwnProperty,Gu={current:null},mp={key:!0,ref:!0,__self:!0,__source:!0};function gp(e,t,n){var r,i={},l=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)pp.call(t,r)&&!mp.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var a=Array(o),u=0;u<o;u++)a[u]=arguments[u+2];i.children=a}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:gl,type:e,key:l,ref:s,props:i,_owner:Gu.current}}function X0(e,t){return{$$typeof:gl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Xu(e){return typeof e=="object"&&e!==null&&e.$$typeof===gl}function Z0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Of=/\/+/g;function Fo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Z0(""+e.key):t.toString(36)}function rs(e,t,n,r,i){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case gl:case B0:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Fo(s,0):r,Af(i)?(n="",e!=null&&(n=e.replace(Of,"$&/")+"/"),rs(i,t,n,"",function(u){return u})):i!=null&&(Xu(i)&&(i=X0(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(Of,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",Af(e))for(var o=0;o<e.length;o++){l=e[o];var a=r+Fo(l,o);s+=rs(l,t,n,a,i)}else if(a=G0(e),typeof a=="function")for(e=a.call(e),o=0;!(l=e.next()).done;)l=l.value,a=r+Fo(l,o++),s+=rs(l,t,n,a,i);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Ll(e,t,n){if(e==null)return e;var r=[],i=0;return rs(e,r,"","",function(l){return t.call(n,l,i++)}),r}function ex(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ve={current:null},is={transition:null},tx={ReactCurrentDispatcher:Ve,ReactCurrentBatchConfig:is,ReactCurrentOwner:Gu};function yp(){throw Error("act(...) is not supported in production builds of React.")}Q.Children={map:Ll,forEach:function(e,t,n){Ll(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ll(e,function(){t++}),t},toArray:function(e){return Ll(e,function(t){return t})||[]},only:function(e){if(!Xu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Q.Component=ti;Q.Fragment=U0;Q.Profiler=H0;Q.PureComponent=Yu;Q.StrictMode=V0;Q.Suspense=Q0;Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tx;Q.act=yp;Q.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=fp({},e.props),i=e.key,l=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,s=Gu.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(a in t)pp.call(t,a)&&!mp.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&o!==void 0?o[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){o=Array(a);for(var u=0;u<a;u++)o[u]=arguments[u+2];r.children=o}return{$$typeof:gl,type:e.type,key:i,ref:l,props:r,_owner:s}};Q.createContext=function(e){return e={$$typeof:W0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:K0,_context:e},e.Consumer=e};Q.createElement=gp;Q.createFactory=function(e){var t=gp.bind(null,e);return t.type=e,t};Q.createRef=function(){return{current:null}};Q.forwardRef=function(e){return{$$typeof:q0,render:e}};Q.isValidElement=Xu;Q.lazy=function(e){return{$$typeof:J0,_payload:{_status:-1,_result:e},_init:ex}};Q.memo=function(e,t){return{$$typeof:Y0,type:e,compare:t===void 0?null:t}};Q.startTransition=function(e){var t=is.transition;is.transition={};try{e()}finally{is.transition=t}};Q.unstable_act=yp;Q.useCallback=function(e,t){return Ve.current.useCallback(e,t)};Q.useContext=function(e){return Ve.current.useContext(e)};Q.useDebugValue=function(){};Q.useDeferredValue=function(e){return Ve.current.useDeferredValue(e)};Q.useEffect=function(e,t){return Ve.current.useEffect(e,t)};Q.useId=function(){return Ve.current.useId()};Q.useImperativeHandle=function(e,t,n){return Ve.current.useImperativeHandle(e,t,n)};Q.useInsertionEffect=function(e,t){return Ve.current.useInsertionEffect(e,t)};Q.useLayoutEffect=function(e,t){return Ve.current.useLayoutEffect(e,t)};Q.useMemo=function(e,t){return Ve.current.useMemo(e,t)};Q.useReducer=function(e,t,n){return Ve.current.useReducer(e,t,n)};Q.useRef=function(e){return Ve.current.useRef(e)};Q.useState=function(e){return Ve.current.useState(e)};Q.useSyncExternalStore=function(e,t,n){return Ve.current.useSyncExternalStore(e,t,n)};Q.useTransition=function(){return Ve.current.useTransition()};Q.version="18.3.1";up.exports=Q;var L=up.exports;const xp=Qu(L),nx=$0({__proto__:null,default:xp},[L]);/**
|
|
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 rx=L,ix=Symbol.for("react.element"),lx=Symbol.for("react.fragment"),sx=Object.prototype.hasOwnProperty,ox=rx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ax={key:!0,ref:!0,__self:!0,__source:!0};function vp(e,t,n){var r,i={},l=null,s=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)sx.call(t,r)&&!ax.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:ix,type:e,key:l,ref:s,props:i,_owner:ox.current}}to.Fragment=lx;to.jsx=vp;to.jsxs=vp;ap.exports=to;var d=ap.exports,Oa={},wp={exports:{}},ot={},kp={exports:{}},bp={};/**
|
|
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
|
+
*/(function(e){function t(z,$){var k=z.length;z.push($);e:for(;0<k;){var Y=k-1>>>1,te=z[Y];if(0<i(te,$))z[Y]=$,z[k]=te,k=Y;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var $=z[0],k=z.pop();if(k!==$){z[0]=k;e:for(var Y=0,te=z.length,N=te>>>1;Y<N;){var Ne=2*(Y+1)-1,xt=z[Ne],oe=Ne+1,Lt=z[oe];if(0>i(xt,k))oe<te&&0>i(Lt,xt)?(z[Y]=Lt,z[oe]=k,Y=oe):(z[Y]=xt,z[Ne]=k,Y=Ne);else if(oe<te&&0>i(Lt,k))z[Y]=Lt,z[oe]=k,Y=oe;else break e}}return $}function i(z,$){var k=z.sortIndex-$.sortIndex;return k!==0?k:z.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var a=[],u=[],f=1,c=null,p=3,h=!1,y=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(z){for(var $=n(u);$!==null;){if($.callback===null)r(u);else if($.startTime<=z)r(u),$.sortIndex=$.expirationTime,t(a,$);else break;$=n(u)}}function C(z){if(g=!1,v(z),!y)if(n(a)!==null)y=!0,xe(E);else{var $=n(u);$!==null&&de(C,$.startTime-z)}}function E(z,$){y=!1,g&&(g=!1,m(P),P=-1),h=!0;var k=p;try{for(v($),c=n(a);c!==null&&(!(c.expirationTime>$)||z&&!j());){var Y=c.callback;if(typeof Y=="function"){c.callback=null,p=c.priorityLevel;var te=Y(c.expirationTime<=$);$=e.unstable_now(),typeof te=="function"?c.callback=te:c===n(a)&&r(a),v($)}else r(a);c=n(a)}if(c!==null)var N=!0;else{var Ne=n(u);Ne!==null&&de(C,Ne.startTime-$),N=!1}return N}finally{c=null,p=k,h=!1}}var b=!1,T=null,P=-1,I=5,S=-1;function j(){return!(e.unstable_now()-S<I)}function A(){if(T!==null){var z=e.unstable_now();S=z;var $=!0;try{$=T(!0,z)}finally{$?D():(b=!1,T=null)}}else b=!1}var D;if(typeof x=="function")D=function(){x(A)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,K=U.port2;U.port1.onmessage=A,D=function(){K.postMessage(null)}}else D=function(){w(A,0)};function xe(z){T=z,b||(b=!0,D())}function de(z,$){P=w(function(){z(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(z){z.callback=null},e.unstable_continueExecution=function(){y||h||(y=!0,xe(E))},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(z){switch(p){case 1:case 2:case 3:var $=3;break;default:$=p}var k=p;p=$;try{return z()}finally{p=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(z,$){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var k=p;p=z;try{return $()}finally{p=k}},e.unstable_scheduleCallback=function(z,$,k){var Y=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?Y+k:Y):k=Y,z){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=k+te,z={id:f++,callback:$,priorityLevel:z,startTime:k,expirationTime:te,sortIndex:-1},k>Y?(z.sortIndex=k,t(u,z),n(a)===null&&z===n(u)&&(g?(m(P),P=-1):g=!0,de(C,k-Y))):(z.sortIndex=te,t(a,z),y||h||(y=!0,xe(E))),z},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(z){var $=p;return function(){var k=p;p=$;try{return z.apply(this,arguments)}finally{p=k}}}})(bp);kp.exports=bp;var ux=kp.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 cx=L,st=ux;function O(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Sp=new Set,Wi={};function ir(e,t){Kr(e,t),Kr(e+"Capture",t)}function Kr(e,t){for(Wi[e]=t,e=0;e<t.length;e++)Sp.add(t[e])}var Gt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ra=Object.prototype.hasOwnProperty,fx=/^[: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]*$/,Rf={},Df={};function dx(e){return Ra.call(Df,e)?!0:Ra.call(Rf,e)?!1:fx.test(e)?Df[e]=!0:(Rf[e]=!0,!1)}function hx(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function px(e,t,n,r){if(t===null||typeof t>"u"||hx(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 He(e,t,n,r,i,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var Pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pe[e]=new He(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pe[t]=new He(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pe[e]=new He(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pe[e]=new He(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){Pe[e]=new He(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pe[e]=new He(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pe[e]=new He(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pe[e]=new He(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pe[e]=new He(e,5,!1,e.toLowerCase(),null,!1,!1)});var Zu=/[\-:]([a-z])/g;function ec(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(Zu,ec);Pe[t]=new He(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(Zu,ec);Pe[t]=new He(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(Zu,ec);Pe[t]=new He(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pe[e]=new He(e,1,!1,e.toLowerCase(),null,!1,!1)});Pe.xlinkHref=new He("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pe[e]=new He(e,1,!1,e.toLowerCase(),null,!0,!0)});function tc(e,t,n,r){var i=Pe.hasOwnProperty(t)?Pe[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(px(t,n,i,r)&&(n=null),r||i===null?dx(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var tn=cx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Pl=Symbol.for("react.element"),xr=Symbol.for("react.portal"),vr=Symbol.for("react.fragment"),nc=Symbol.for("react.strict_mode"),Da=Symbol.for("react.profiler"),Np=Symbol.for("react.provider"),Cp=Symbol.for("react.context"),rc=Symbol.for("react.forward_ref"),Ma=Symbol.for("react.suspense"),za=Symbol.for("react.suspense_list"),ic=Symbol.for("react.memo"),an=Symbol.for("react.lazy"),Ep=Symbol.for("react.offscreen"),Mf=Symbol.iterator;function mi(e){return e===null||typeof e!="object"?null:(e=Mf&&e[Mf]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Object.assign,$o;function Ei(e){if($o===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$o=t&&t[1]||""}return`
|
|
34
|
+
`+$o+e}var Bo=!1;function Uo(e,t){if(!e||Bo)return"";Bo=!0;var n=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(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
35
|
+
`),l=r.stack.split(`
|
|
36
|
+
`),s=i.length-1,o=l.length-1;1<=s&&0<=o&&i[s]!==l[o];)o--;for(;1<=s&&0<=o;s--,o--)if(i[s]!==l[o]){if(s!==1||o!==1)do if(s--,o--,0>o||i[s]!==l[o]){var a=`
|
|
37
|
+
`+i[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=o);break}}}finally{Bo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ei(e):""}function mx(e){switch(e.tag){case 5:return Ei(e.type);case 16:return Ei("Lazy");case 13:return Ei("Suspense");case 19:return Ei("SuspenseList");case 0:case 2:case 15:return e=Uo(e.type,!1),e;case 11:return e=Uo(e.type.render,!1),e;case 1:return e=Uo(e.type,!0),e;default:return""}}function Fa(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 vr:return"Fragment";case xr:return"Portal";case Da:return"Profiler";case nc:return"StrictMode";case Ma:return"Suspense";case za:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Cp:return(e.displayName||"Context")+".Consumer";case Np:return(e._context.displayName||"Context")+".Provider";case rc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ic:return t=e.displayName||null,t!==null?t:Fa(e.type)||"Memo";case an:t=e._payload,e=e._init;try{return Fa(e(t))}catch{}}return null}function gx(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 Fa(t);case 8:return t===nc?"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 En(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function jp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yx(e){var t=jp(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _l(e){e._valueTracker||(e._valueTracker=yx(e))}function Tp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=jp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function bs(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 $a(e,t){var n=t.checked;return ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function zf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=En(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ip(e,t){t=t.checked,t!=null&&tc(e,"checked",t,!1)}function Ba(e,t){Ip(e,t);var n=En(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ua(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ua(e,t.type,En(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ff(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ua(e,t,n){(t!=="number"||bs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ji=Array.isArray;function Dr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+En(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Va(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return ye({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function $f(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(O(92));if(ji(n)){if(1<n.length)throw Error(O(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:En(n)}}function Lp(e,t){var n=En(t.value),r=En(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Bf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Pp(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 Ha(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Pp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Al,_p=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Al=Al||document.createElement("div"),Al.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Al.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ai={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},xx=["Webkit","ms","Moz","O"];Object.keys(Ai).forEach(function(e){xx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ai[t]=Ai[e]})});function Ap(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ai.hasOwnProperty(e)&&Ai[e]?(""+t).trim():t+"px"}function Op(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ap(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var vx=ye({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 Ka(e,t){if(t){if(vx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function Wa(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 qa=null;function lc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qa=null,Mr=null,zr=null;function Uf(e){if(e=vl(e)){if(typeof Qa!="function")throw Error(O(280));var t=e.stateNode;t&&(t=so(t),Qa(e.stateNode,e.type,t))}}function Rp(e){Mr?zr?zr.push(e):zr=[e]:Mr=e}function Dp(){if(Mr){var e=Mr,t=zr;if(zr=Mr=null,Uf(e),t)for(e=0;e<t.length;e++)Uf(t[e])}}function Mp(e,t){return e(t)}function zp(){}var Vo=!1;function Fp(e,t,n){if(Vo)return e(t,n);Vo=!0;try{return Mp(e,t,n)}finally{Vo=!1,(Mr!==null||zr!==null)&&(zp(),Dp())}}function Qi(e,t){var n=e.stateNode;if(n===null)return null;var r=so(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(O(231,t,typeof n));return n}var Ya=!1;if(Gt)try{var gi={};Object.defineProperty(gi,"passive",{get:function(){Ya=!0}}),window.addEventListener("test",gi,gi),window.removeEventListener("test",gi,gi)}catch{Ya=!1}function wx(e,t,n,r,i,l,s,o,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var Oi=!1,Ss=null,Ns=!1,Ja=null,kx={onError:function(e){Oi=!0,Ss=e}};function bx(e,t,n,r,i,l,s,o,a){Oi=!1,Ss=null,wx.apply(kx,arguments)}function Sx(e,t,n,r,i,l,s,o,a){if(bx.apply(this,arguments),Oi){if(Oi){var u=Ss;Oi=!1,Ss=null}else throw Error(O(198));Ns||(Ns=!0,Ja=u)}}function lr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function $p(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 Vf(e){if(lr(e)!==e)throw Error(O(188))}function Nx(e){var t=e.alternate;if(!t){if(t=lr(e),t===null)throw Error(O(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var l=i.alternate;if(l===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return Vf(i),e;if(l===r)return Vf(i),t;l=l.sibling}throw Error(O(188))}if(n.return!==r.return)n=i,r=l;else{for(var s=!1,o=i.child;o;){if(o===n){s=!0,n=i,r=l;break}if(o===r){s=!0,r=i,n=l;break}o=o.sibling}if(!s){for(o=l.child;o;){if(o===n){s=!0,n=l,r=i;break}if(o===r){s=!0,r=l,n=i;break}o=o.sibling}if(!s)throw Error(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?e:t}function Bp(e){return e=Nx(e),e!==null?Up(e):null}function Up(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Up(e);if(t!==null)return t;e=e.sibling}return null}var Vp=st.unstable_scheduleCallback,Hf=st.unstable_cancelCallback,Cx=st.unstable_shouldYield,Ex=st.unstable_requestPaint,we=st.unstable_now,jx=st.unstable_getCurrentPriorityLevel,sc=st.unstable_ImmediatePriority,Hp=st.unstable_UserBlockingPriority,Cs=st.unstable_NormalPriority,Tx=st.unstable_LowPriority,Kp=st.unstable_IdlePriority,no=null,Rt=null;function Ix(e){if(Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(no,e,void 0,(e.current.flags&128)===128)}catch{}}var Ct=Math.clz32?Math.clz32:_x,Lx=Math.log,Px=Math.LN2;function _x(e){return e>>>=0,e===0?32:31-(Lx(e)/Px|0)|0}var Ol=64,Rl=4194304;function Ti(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 Es(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var o=s&~i;o!==0?r=Ti(o):(l&=s,l!==0&&(r=Ti(l)))}else s=n&~i,s!==0?r=Ti(s):l!==0&&(r=Ti(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ct(t),i=1<<n,r|=e[n],t&=~i;return r}function Ax(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 Ox(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-Ct(l),o=1<<s,a=i[s];a===-1?(!(o&n)||o&r)&&(i[s]=Ax(o,t)):a<=t&&(e.expiredLanes|=o),l&=~o}}function Ga(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Wp(){var e=Ol;return Ol<<=1,!(Ol&4194240)&&(Ol=64),e}function Ho(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ct(t),e[t]=n}function Rx(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Ct(n),l=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~l}}function oc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ct(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ee=0;function qp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Qp,ac,Yp,Jp,Gp,Xa=!1,Dl=[],gn=null,yn=null,xn=null,Yi=new Map,Ji=new Map,fn=[],Dx="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 Kf(e,t){switch(e){case"focusin":case"focusout":gn=null;break;case"dragenter":case"dragleave":yn=null;break;case"mouseover":case"mouseout":xn=null;break;case"pointerover":case"pointerout":Yi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ji.delete(t.pointerId)}}function yi(e,t,n,r,i,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[i]},t!==null&&(t=vl(t),t!==null&&ac(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Mx(e,t,n,r,i){switch(t){case"focusin":return gn=yi(gn,e,t,n,r,i),!0;case"dragenter":return yn=yi(yn,e,t,n,r,i),!0;case"mouseover":return xn=yi(xn,e,t,n,r,i),!0;case"pointerover":var l=i.pointerId;return Yi.set(l,yi(Yi.get(l)||null,e,t,n,r,i)),!0;case"gotpointercapture":return l=i.pointerId,Ji.set(l,yi(Ji.get(l)||null,e,t,n,r,i)),!0}return!1}function Xp(e){var t=Vn(e.target);if(t!==null){var n=lr(t);if(n!==null){if(t=n.tag,t===13){if(t=$p(n),t!==null){e.blockedOn=t,Gp(e.priority,function(){Yp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ls(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Za(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qa=r,n.target.dispatchEvent(r),qa=null}else return t=vl(n),t!==null&&ac(t),e.blockedOn=n,!1;t.shift()}return!0}function Wf(e,t,n){ls(e)&&n.delete(t)}function zx(){Xa=!1,gn!==null&&ls(gn)&&(gn=null),yn!==null&&ls(yn)&&(yn=null),xn!==null&&ls(xn)&&(xn=null),Yi.forEach(Wf),Ji.forEach(Wf)}function xi(e,t){e.blockedOn===t&&(e.blockedOn=null,Xa||(Xa=!0,st.unstable_scheduleCallback(st.unstable_NormalPriority,zx)))}function Gi(e){function t(i){return xi(i,e)}if(0<Dl.length){xi(Dl[0],e);for(var n=1;n<Dl.length;n++){var r=Dl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(gn!==null&&xi(gn,e),yn!==null&&xi(yn,e),xn!==null&&xi(xn,e),Yi.forEach(t),Ji.forEach(t),n=0;n<fn.length;n++)r=fn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<fn.length&&(n=fn[0],n.blockedOn===null);)Xp(n),n.blockedOn===null&&fn.shift()}var Fr=tn.ReactCurrentBatchConfig,js=!0;function Fx(e,t,n,r){var i=ee,l=Fr.transition;Fr.transition=null;try{ee=1,uc(e,t,n,r)}finally{ee=i,Fr.transition=l}}function $x(e,t,n,r){var i=ee,l=Fr.transition;Fr.transition=null;try{ee=4,uc(e,t,n,r)}finally{ee=i,Fr.transition=l}}function uc(e,t,n,r){if(js){var i=Za(e,t,n,r);if(i===null)ea(e,t,r,Ts,n),Kf(e,r);else if(Mx(i,e,t,n,r))r.stopPropagation();else if(Kf(e,r),t&4&&-1<Dx.indexOf(e)){for(;i!==null;){var l=vl(i);if(l!==null&&Qp(l),l=Za(e,t,n,r),l===null&&ea(e,t,r,Ts,n),l===i)break;i=l}i!==null&&r.stopPropagation()}else ea(e,t,r,null,n)}}var Ts=null;function Za(e,t,n,r){if(Ts=null,e=lc(r),e=Vn(e),e!==null)if(t=lr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=$p(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ts=e,null}function Zp(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(jx()){case sc:return 1;case Hp:return 4;case Cs:case Tx:return 16;case Kp:return 536870912;default:return 16}default:return 16}}var hn=null,cc=null,ss=null;function em(){if(ss)return ss;var e,t=cc,n=t.length,r,i="value"in hn?hn.value:hn.textContent,l=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[l-r];r++);return ss=i.slice(e,1<r?1-r:void 0)}function os(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 Ml(){return!0}function qf(){return!1}function at(e){function t(n,r,i,l,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(l):l[o]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Ml:qf,this.isPropagationStopped=qf,this}return ye(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ml)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ml)},persist:function(){},isPersistent:Ml}),t}var ni={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fc=at(ni),xl=ye({},ni,{view:0,detail:0}),Bx=at(xl),Ko,Wo,vi,ro=ye({},xl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dc,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!==vi&&(vi&&e.type==="mousemove"?(Ko=e.screenX-vi.screenX,Wo=e.screenY-vi.screenY):Wo=Ko=0,vi=e),Ko)},movementY:function(e){return"movementY"in e?e.movementY:Wo}}),Qf=at(ro),Ux=ye({},ro,{dataTransfer:0}),Vx=at(Ux),Hx=ye({},xl,{relatedTarget:0}),qo=at(Hx),Kx=ye({},ni,{animationName:0,elapsedTime:0,pseudoElement:0}),Wx=at(Kx),qx=ye({},ni,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qx=at(qx),Yx=ye({},ni,{data:0}),Yf=at(Yx),Jx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gx={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"},Xx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Xx[e])?!!t[e]:!1}function dc(){return Zx}var e1=ye({},xl,{key:function(e){if(e.key){var t=Jx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=os(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Gx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dc,charCode:function(e){return e.type==="keypress"?os(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?os(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),t1=at(e1),n1=ye({},ro,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jf=at(n1),r1=ye({},xl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dc}),i1=at(r1),l1=ye({},ni,{propertyName:0,elapsedTime:0,pseudoElement:0}),s1=at(l1),o1=ye({},ro,{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}),a1=at(o1),u1=[9,13,27,32],hc=Gt&&"CompositionEvent"in window,Ri=null;Gt&&"documentMode"in document&&(Ri=document.documentMode);var c1=Gt&&"TextEvent"in window&&!Ri,tm=Gt&&(!hc||Ri&&8<Ri&&11>=Ri),Gf=" ",Xf=!1;function nm(e,t){switch(e){case"keyup":return u1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wr=!1;function f1(e,t){switch(e){case"compositionend":return rm(t);case"keypress":return t.which!==32?null:(Xf=!0,Gf);case"textInput":return e=t.data,e===Gf&&Xf?null:e;default:return null}}function d1(e,t){if(wr)return e==="compositionend"||!hc&&nm(e,t)?(e=em(),ss=cc=hn=null,wr=!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 tm&&t.locale!=="ko"?null:t.data;default:return null}}var h1={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 Zf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!h1[e.type]:t==="textarea"}function im(e,t,n,r){Rp(r),t=Is(t,"onChange"),0<t.length&&(n=new fc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Di=null,Xi=null;function p1(e){mm(e,0)}function io(e){var t=Sr(e);if(Tp(t))return e}function m1(e,t){if(e==="change")return t}var lm=!1;if(Gt){var Qo;if(Gt){var Yo="oninput"in document;if(!Yo){var ed=document.createElement("div");ed.setAttribute("oninput","return;"),Yo=typeof ed.oninput=="function"}Qo=Yo}else Qo=!1;lm=Qo&&(!document.documentMode||9<document.documentMode)}function td(){Di&&(Di.detachEvent("onpropertychange",sm),Xi=Di=null)}function sm(e){if(e.propertyName==="value"&&io(Xi)){var t=[];im(t,Xi,e,lc(e)),Fp(p1,t)}}function g1(e,t,n){e==="focusin"?(td(),Di=t,Xi=n,Di.attachEvent("onpropertychange",sm)):e==="focusout"&&td()}function y1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return io(Xi)}function x1(e,t){if(e==="click")return io(t)}function v1(e,t){if(e==="input"||e==="change")return io(t)}function w1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tt=typeof Object.is=="function"?Object.is:w1;function Zi(e,t){if(Tt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ra.call(t,i)||!Tt(e[i],t[i]))return!1}return!0}function nd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rd(e,t){var n=nd(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=nd(n)}}function om(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?om(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function am(){for(var e=window,t=bs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=bs(e.document)}return t}function pc(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 k1(e){var t=am(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&om(n.ownerDocument.documentElement,n)){if(r!==null&&pc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=rd(n,l);var s=rd(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var b1=Gt&&"documentMode"in document&&11>=document.documentMode,kr=null,eu=null,Mi=null,tu=!1;function id(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tu||kr==null||kr!==bs(r)||(r=kr,"selectionStart"in r&&pc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Mi&&Zi(Mi,r)||(Mi=r,r=Is(eu,"onSelect"),0<r.length&&(t=new fc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=kr)))}function zl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var br={animationend:zl("Animation","AnimationEnd"),animationiteration:zl("Animation","AnimationIteration"),animationstart:zl("Animation","AnimationStart"),transitionend:zl("Transition","TransitionEnd")},Jo={},um={};Gt&&(um=document.createElement("div").style,"AnimationEvent"in window||(delete br.animationend.animation,delete br.animationiteration.animation,delete br.animationstart.animation),"TransitionEvent"in window||delete br.transitionend.transition);function lo(e){if(Jo[e])return Jo[e];if(!br[e])return e;var t=br[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in um)return Jo[e]=t[n];return e}var cm=lo("animationend"),fm=lo("animationiteration"),dm=lo("animationstart"),hm=lo("transitionend"),pm=new Map,ld="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 In(e,t){pm.set(e,t),ir(t,[e])}for(var Go=0;Go<ld.length;Go++){var Xo=ld[Go],S1=Xo.toLowerCase(),N1=Xo[0].toUpperCase()+Xo.slice(1);In(S1,"on"+N1)}In(cm,"onAnimationEnd");In(fm,"onAnimationIteration");In(dm,"onAnimationStart");In("dblclick","onDoubleClick");In("focusin","onFocus");In("focusout","onBlur");In(hm,"onTransitionEnd");Kr("onMouseEnter",["mouseout","mouseover"]);Kr("onMouseLeave",["mouseout","mouseover"]);Kr("onPointerEnter",["pointerout","pointerover"]);Kr("onPointerLeave",["pointerout","pointerover"]);ir("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ir("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ir("onBeforeInput",["compositionend","keypress","textInput","paste"]);ir("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ir("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ir("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ii="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),C1=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ii));function sd(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Sx(r,t,void 0,e),e.currentTarget=null}function mm(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],a=o.instance,u=o.currentTarget;if(o=o.listener,a!==l&&i.isPropagationStopped())break e;sd(i,o,u),l=a}else for(s=0;s<r.length;s++){if(o=r[s],a=o.instance,u=o.currentTarget,o=o.listener,a!==l&&i.isPropagationStopped())break e;sd(i,o,u),l=a}}}if(Ns)throw e=Ja,Ns=!1,Ja=null,e}function ae(e,t){var n=t[su];n===void 0&&(n=t[su]=new Set);var r=e+"__bubble";n.has(r)||(gm(t,e,2,!1),n.add(r))}function Zo(e,t,n){var r=0;t&&(r|=4),gm(n,e,r,t)}var Fl="_reactListening"+Math.random().toString(36).slice(2);function el(e){if(!e[Fl]){e[Fl]=!0,Sp.forEach(function(n){n!=="selectionchange"&&(C1.has(n)||Zo(n,!1,e),Zo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fl]||(t[Fl]=!0,Zo("selectionchange",!1,t))}}function gm(e,t,n,r){switch(Zp(t)){case 1:var i=Fx;break;case 4:i=$x;break;default:i=uc}n=i.bind(null,t,n,e),i=void 0,!Ya||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function ea(e,t,n,r,i){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var o=r.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;s=s.return}for(;o!==null;){if(s=Vn(o),s===null)return;if(a=s.tag,a===5||a===6){r=l=s;continue e}o=o.parentNode}}r=r.return}Fp(function(){var u=l,f=lc(n),c=[];e:{var p=pm.get(e);if(p!==void 0){var h=fc,y=e;switch(e){case"keypress":if(os(n)===0)break e;case"keydown":case"keyup":h=t1;break;case"focusin":y="focus",h=qo;break;case"focusout":y="blur",h=qo;break;case"beforeblur":case"afterblur":h=qo;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Qf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Vx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=i1;break;case cm:case fm:case dm:h=Wx;break;case hm:h=s1;break;case"scroll":h=Bx;break;case"wheel":h=a1;break;case"copy":case"cut":case"paste":h=Qx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Jf}var g=(t&4)!==0,w=!g&&e==="scroll",m=g?p!==null?p+"Capture":null:p;g=[];for(var x=u,v;x!==null;){v=x;var C=v.stateNode;if(v.tag===5&&C!==null&&(v=C,m!==null&&(C=Qi(x,m),C!=null&&g.push(tl(x,C,v)))),w)break;x=x.return}0<g.length&&(p=new h(p,y,null,n,f),c.push({event:p,listeners:g}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==qa&&(y=n.relatedTarget||n.fromElement)&&(Vn(y)||y[Xt]))break e;if((h||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?Vn(y):null,y!==null&&(w=lr(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(g=Qf,C="onMouseLeave",m="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(g=Jf,C="onPointerLeave",m="onPointerEnter",x="pointer"),w=h==null?p:Sr(h),v=y==null?p:Sr(y),p=new g(C,x+"leave",h,n,f),p.target=w,p.relatedTarget=v,C=null,Vn(f)===u&&(g=new g(m,x+"enter",y,n,f),g.target=v,g.relatedTarget=w,C=g),w=C,h&&y)t:{for(g=h,m=y,x=0,v=g;v;v=hr(v))x++;for(v=0,C=m;C;C=hr(C))v++;for(;0<x-v;)g=hr(g),x--;for(;0<v-x;)m=hr(m),v--;for(;x--;){if(g===m||m!==null&&g===m.alternate)break t;g=hr(g),m=hr(m)}g=null}else g=null;h!==null&&od(c,p,h,g,!1),y!==null&&w!==null&&od(c,w,y,g,!0)}}e:{if(p=u?Sr(u):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var E=m1;else if(Zf(p))if(lm)E=v1;else{E=y1;var b=g1}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(E=x1);if(E&&(E=E(e,u))){im(c,E,n,f);break e}b&&b(e,p,u),e==="focusout"&&(b=p._wrapperState)&&b.controlled&&p.type==="number"&&Ua(p,"number",p.value)}switch(b=u?Sr(u):window,e){case"focusin":(Zf(b)||b.contentEditable==="true")&&(kr=b,eu=u,Mi=null);break;case"focusout":Mi=eu=kr=null;break;case"mousedown":tu=!0;break;case"contextmenu":case"mouseup":case"dragend":tu=!1,id(c,n,f);break;case"selectionchange":if(b1)break;case"keydown":case"keyup":id(c,n,f)}var T;if(hc)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else wr?nm(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(tm&&n.locale!=="ko"&&(wr||P!=="onCompositionStart"?P==="onCompositionEnd"&&wr&&(T=em()):(hn=f,cc="value"in hn?hn.value:hn.textContent,wr=!0)),b=Is(u,P),0<b.length&&(P=new Yf(P,e,null,n,f),c.push({event:P,listeners:b}),T?P.data=T:(T=rm(n),T!==null&&(P.data=T)))),(T=c1?f1(e,n):d1(e,n))&&(u=Is(u,"onBeforeInput"),0<u.length&&(f=new Yf("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=T))}mm(c,t)})}function tl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Is(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,l=i.stateNode;i.tag===5&&l!==null&&(i=l,l=Qi(e,n),l!=null&&r.unshift(tl(e,l,i)),l=Qi(e,t),l!=null&&r.push(tl(e,l,i))),e=e.return}return r}function hr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function od(e,t,n,r,i){for(var l=t._reactName,s=[];n!==null&&n!==r;){var o=n,a=o.alternate,u=o.stateNode;if(a!==null&&a===r)break;o.tag===5&&u!==null&&(o=u,i?(a=Qi(n,l),a!=null&&s.unshift(tl(n,a,o))):i||(a=Qi(n,l),a!=null&&s.push(tl(n,a,o)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var E1=/\r\n?/g,j1=/\u0000|\uFFFD/g;function ad(e){return(typeof e=="string"?e:""+e).replace(E1,`
|
|
38
|
+
`).replace(j1,"")}function $l(e,t,n){if(t=ad(t),ad(e)!==t&&n)throw Error(O(425))}function Ls(){}var nu=null,ru=null;function iu(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 lu=typeof setTimeout=="function"?setTimeout:void 0,T1=typeof clearTimeout=="function"?clearTimeout:void 0,ud=typeof Promise=="function"?Promise:void 0,I1=typeof queueMicrotask=="function"?queueMicrotask:typeof ud<"u"?function(e){return ud.resolve(null).then(e).catch(L1)}:lu;function L1(e){setTimeout(function(){throw e})}function ta(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Gi(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Gi(t)}function vn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function cd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ri=Math.random().toString(36).slice(2),Ot="__reactFiber$"+ri,nl="__reactProps$"+ri,Xt="__reactContainer$"+ri,su="__reactEvents$"+ri,P1="__reactListeners$"+ri,_1="__reactHandles$"+ri;function Vn(e){var t=e[Ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xt]||n[Ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=cd(e);e!==null;){if(n=e[Ot])return n;e=cd(e)}return t}e=n,n=e.parentNode}return null}function vl(e){return e=e[Ot]||e[Xt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Sr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(O(33))}function so(e){return e[nl]||null}var ou=[],Nr=-1;function Ln(e){return{current:e}}function ue(e){0>Nr||(e.current=ou[Nr],ou[Nr]=null,Nr--)}function se(e,t){Nr++,ou[Nr]=e.current,e.current=t}var jn={},Me=Ln(jn),Ye=Ln(!1),Gn=jn;function Wr(e,t){var n=e.type.contextTypes;if(!n)return jn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Je(e){return e=e.childContextTypes,e!=null}function Ps(){ue(Ye),ue(Me)}function fd(e,t,n){if(Me.current!==jn)throw Error(O(168));se(Me,t),se(Ye,n)}function ym(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(O(108,gx(e)||"Unknown",i));return ye({},n,r)}function _s(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jn,Gn=Me.current,se(Me,e),se(Ye,Ye.current),!0}function dd(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=ym(e,t,Gn),r.__reactInternalMemoizedMergedChildContext=e,ue(Ye),ue(Me),se(Me,e)):ue(Ye),se(Ye,n)}var Vt=null,oo=!1,na=!1;function xm(e){Vt===null?Vt=[e]:Vt.push(e)}function A1(e){oo=!0,xm(e)}function Pn(){if(!na&&Vt!==null){na=!0;var e=0,t=ee;try{var n=Vt;for(ee=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Vt=null,oo=!1}catch(i){throw Vt!==null&&(Vt=Vt.slice(e+1)),Vp(sc,Pn),i}finally{ee=t,na=!1}}return null}var Cr=[],Er=0,As=null,Os=0,ut=[],ct=0,Xn=null,Kt=1,Wt="";function Fn(e,t){Cr[Er++]=Os,Cr[Er++]=As,As=e,Os=t}function vm(e,t,n){ut[ct++]=Kt,ut[ct++]=Wt,ut[ct++]=Xn,Xn=e;var r=Kt;e=Wt;var i=32-Ct(r)-1;r&=~(1<<i),n+=1;var l=32-Ct(t)+i;if(30<l){var s=i-i%5;l=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Kt=1<<32-Ct(t)+i|n<<i|r,Wt=l+e}else Kt=1<<l|n<<i|r,Wt=e}function mc(e){e.return!==null&&(Fn(e,1),vm(e,1,0))}function gc(e){for(;e===As;)As=Cr[--Er],Cr[Er]=null,Os=Cr[--Er],Cr[Er]=null;for(;e===Xn;)Xn=ut[--ct],ut[ct]=null,Wt=ut[--ct],ut[ct]=null,Kt=ut[--ct],ut[ct]=null}var it=null,rt=null,ce=!1,Nt=null;function wm(e,t){var n=dt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function hd(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,it=e,rt=vn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,it=e,rt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Xn!==null?{id:Kt,overflow:Wt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=dt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,it=e,rt=null,!0):!1;default:return!1}}function au(e){return(e.mode&1)!==0&&(e.flags&128)===0}function uu(e){if(ce){var t=rt;if(t){var n=t;if(!hd(e,t)){if(au(e))throw Error(O(418));t=vn(n.nextSibling);var r=it;t&&hd(e,t)?wm(r,n):(e.flags=e.flags&-4097|2,ce=!1,it=e)}}else{if(au(e))throw Error(O(418));e.flags=e.flags&-4097|2,ce=!1,it=e}}}function pd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;it=e}function Bl(e){if(e!==it)return!1;if(!ce)return pd(e),ce=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!iu(e.type,e.memoizedProps)),t&&(t=rt)){if(au(e))throw km(),Error(O(418));for(;t;)wm(e,t),t=vn(t.nextSibling)}if(pd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){rt=vn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}rt=null}}else rt=it?vn(e.stateNode.nextSibling):null;return!0}function km(){for(var e=rt;e;)e=vn(e.nextSibling)}function qr(){rt=it=null,ce=!1}function yc(e){Nt===null?Nt=[e]:Nt.push(e)}var O1=tn.ReactCurrentBatchConfig;function wi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(O(309));var r=n.stateNode}if(!r)throw Error(O(147,e));var i=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(s){var o=i.refs;s===null?delete o[l]:o[l]=s},t._stringRef=l,t)}if(typeof e!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,e))}return e}function Ul(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function md(e){var t=e._init;return t(e._payload)}function bm(e){function t(m,x){if(e){var v=m.deletions;v===null?(m.deletions=[x],m.flags|=16):v.push(x)}}function n(m,x){if(!e)return null;for(;x!==null;)t(m,x),x=x.sibling;return null}function r(m,x){for(m=new Map;x!==null;)x.key!==null?m.set(x.key,x):m.set(x.index,x),x=x.sibling;return m}function i(m,x){return m=Sn(m,x),m.index=0,m.sibling=null,m}function l(m,x,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<x?(m.flags|=2,x):v):(m.flags|=2,x)):(m.flags|=1048576,x)}function s(m){return e&&m.alternate===null&&(m.flags|=2),m}function o(m,x,v,C){return x===null||x.tag!==6?(x=ua(v,m.mode,C),x.return=m,x):(x=i(x,v),x.return=m,x)}function a(m,x,v,C){var E=v.type;return E===vr?f(m,x,v.props.children,C,v.key):x!==null&&(x.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===an&&md(E)===x.type)?(C=i(x,v.props),C.ref=wi(m,x,v),C.return=m,C):(C=ps(v.type,v.key,v.props,null,m.mode,C),C.ref=wi(m,x,v),C.return=m,C)}function u(m,x,v,C){return x===null||x.tag!==4||x.stateNode.containerInfo!==v.containerInfo||x.stateNode.implementation!==v.implementation?(x=ca(v,m.mode,C),x.return=m,x):(x=i(x,v.children||[]),x.return=m,x)}function f(m,x,v,C,E){return x===null||x.tag!==7?(x=Jn(v,m.mode,C,E),x.return=m,x):(x=i(x,v),x.return=m,x)}function c(m,x,v){if(typeof x=="string"&&x!==""||typeof x=="number")return x=ua(""+x,m.mode,v),x.return=m,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Pl:return v=ps(x.type,x.key,x.props,null,m.mode,v),v.ref=wi(m,null,x),v.return=m,v;case xr:return x=ca(x,m.mode,v),x.return=m,x;case an:var C=x._init;return c(m,C(x._payload),v)}if(ji(x)||mi(x))return x=Jn(x,m.mode,v,null),x.return=m,x;Ul(m,x)}return null}function p(m,x,v,C){var E=x!==null?x.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return E!==null?null:o(m,x,""+v,C);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Pl:return v.key===E?a(m,x,v,C):null;case xr:return v.key===E?u(m,x,v,C):null;case an:return E=v._init,p(m,x,E(v._payload),C)}if(ji(v)||mi(v))return E!==null?null:f(m,x,v,C,null);Ul(m,v)}return null}function h(m,x,v,C,E){if(typeof C=="string"&&C!==""||typeof C=="number")return m=m.get(v)||null,o(x,m,""+C,E);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Pl:return m=m.get(C.key===null?v:C.key)||null,a(x,m,C,E);case xr:return m=m.get(C.key===null?v:C.key)||null,u(x,m,C,E);case an:var b=C._init;return h(m,x,v,b(C._payload),E)}if(ji(C)||mi(C))return m=m.get(v)||null,f(x,m,C,E,null);Ul(x,C)}return null}function y(m,x,v,C){for(var E=null,b=null,T=x,P=x=0,I=null;T!==null&&P<v.length;P++){T.index>P?(I=T,T=null):I=T.sibling;var S=p(m,T,v[P],C);if(S===null){T===null&&(T=I);break}e&&T&&S.alternate===null&&t(m,T),x=l(S,x,P),b===null?E=S:b.sibling=S,b=S,T=I}if(P===v.length)return n(m,T),ce&&Fn(m,P),E;if(T===null){for(;P<v.length;P++)T=c(m,v[P],C),T!==null&&(x=l(T,x,P),b===null?E=T:b.sibling=T,b=T);return ce&&Fn(m,P),E}for(T=r(m,T);P<v.length;P++)I=h(T,m,P,v[P],C),I!==null&&(e&&I.alternate!==null&&T.delete(I.key===null?P:I.key),x=l(I,x,P),b===null?E=I:b.sibling=I,b=I);return e&&T.forEach(function(j){return t(m,j)}),ce&&Fn(m,P),E}function g(m,x,v,C){var E=mi(v);if(typeof E!="function")throw Error(O(150));if(v=E.call(v),v==null)throw Error(O(151));for(var b=E=null,T=x,P=x=0,I=null,S=v.next();T!==null&&!S.done;P++,S=v.next()){T.index>P?(I=T,T=null):I=T.sibling;var j=p(m,T,S.value,C);if(j===null){T===null&&(T=I);break}e&&T&&j.alternate===null&&t(m,T),x=l(j,x,P),b===null?E=j:b.sibling=j,b=j,T=I}if(S.done)return n(m,T),ce&&Fn(m,P),E;if(T===null){for(;!S.done;P++,S=v.next())S=c(m,S.value,C),S!==null&&(x=l(S,x,P),b===null?E=S:b.sibling=S,b=S);return ce&&Fn(m,P),E}for(T=r(m,T);!S.done;P++,S=v.next())S=h(T,m,P,S.value,C),S!==null&&(e&&S.alternate!==null&&T.delete(S.key===null?P:S.key),x=l(S,x,P),b===null?E=S:b.sibling=S,b=S);return e&&T.forEach(function(A){return t(m,A)}),ce&&Fn(m,P),E}function w(m,x,v,C){if(typeof v=="object"&&v!==null&&v.type===vr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Pl:e:{for(var E=v.key,b=x;b!==null;){if(b.key===E){if(E=v.type,E===vr){if(b.tag===7){n(m,b.sibling),x=i(b,v.props.children),x.return=m,m=x;break e}}else if(b.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===an&&md(E)===b.type){n(m,b.sibling),x=i(b,v.props),x.ref=wi(m,b,v),x.return=m,m=x;break e}n(m,b);break}else t(m,b);b=b.sibling}v.type===vr?(x=Jn(v.props.children,m.mode,C,v.key),x.return=m,m=x):(C=ps(v.type,v.key,v.props,null,m.mode,C),C.ref=wi(m,x,v),C.return=m,m=C)}return s(m);case xr:e:{for(b=v.key;x!==null;){if(x.key===b)if(x.tag===4&&x.stateNode.containerInfo===v.containerInfo&&x.stateNode.implementation===v.implementation){n(m,x.sibling),x=i(x,v.children||[]),x.return=m,m=x;break e}else{n(m,x);break}else t(m,x);x=x.sibling}x=ca(v,m.mode,C),x.return=m,m=x}return s(m);case an:return b=v._init,w(m,x,b(v._payload),C)}if(ji(v))return y(m,x,v,C);if(mi(v))return g(m,x,v,C);Ul(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,x!==null&&x.tag===6?(n(m,x.sibling),x=i(x,v),x.return=m,m=x):(n(m,x),x=ua(v,m.mode,C),x.return=m,m=x),s(m)):n(m,x)}return w}var Qr=bm(!0),Sm=bm(!1),Rs=Ln(null),Ds=null,jr=null,xc=null;function vc(){xc=jr=Ds=null}function wc(e){var t=Rs.current;ue(Rs),e._currentValue=t}function cu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function $r(e,t){Ds=e,xc=jr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qe=!0),e.firstContext=null)}function mt(e){var t=e._currentValue;if(xc!==e)if(e={context:e,memoizedValue:t,next:null},jr===null){if(Ds===null)throw Error(O(308));jr=e,Ds.dependencies={lanes:0,firstContext:e}}else jr=jr.next=e;return t}var Hn=null;function kc(e){Hn===null?Hn=[e]:Hn.push(e)}function Nm(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,kc(t)):(n.next=i.next,i.next=n),t.interleaved=n,Zt(e,r)}function Zt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var un=!1;function bc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Cm(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 Qt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,X&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Zt(e,n)}return i=r.interleaved,i===null?(t.next=t,kc(r)):(t.next=i.next,i.next=t),r.interleaved=t,Zt(e,n)}function as(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,oc(e,n)}}function gd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?i=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ms(e,t,n,r){var i=e.updateQueue;un=!1;var l=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var a=o,u=a.next;a.next=null,s===null?l=u:s.next=u,s=a;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==s&&(o===null?f.firstBaseUpdate=u:o.next=u,f.lastBaseUpdate=a))}if(l!==null){var c=i.baseState;s=0,f=u=a=null,o=l;do{var p=o.lane,h=o.eventTime;if((r&p)===p){f!==null&&(f=f.next={eventTime:h,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=e,g=o;switch(p=t,h=n,g.tag){case 1:if(y=g.payload,typeof y=="function"){c=y.call(h,c,p);break e}c=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=g.payload,p=typeof y=="function"?y.call(h,c,p):y,p==null)break e;c=ye({},c,p);break e;case 2:un=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[o]:p.push(o))}else h={eventTime:h,lane:p,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(u=f=h,a=c):f=f.next=h,s|=p;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;p=o,o=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(f===null&&(a=c),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);er|=s,e.lanes=s,e.memoizedState=c}}function yd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(O(191,i));i.call(r)}}}var wl={},Dt=Ln(wl),rl=Ln(wl),il=Ln(wl);function Kn(e){if(e===wl)throw Error(O(174));return e}function Sc(e,t){switch(se(il,t),se(rl,e),se(Dt,wl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ha(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ha(t,e)}ue(Dt),se(Dt,t)}function Yr(){ue(Dt),ue(rl),ue(il)}function Em(e){Kn(il.current);var t=Kn(Dt.current),n=Ha(t,e.type);t!==n&&(se(rl,e),se(Dt,n))}function Nc(e){rl.current===e&&(ue(Dt),ue(rl))}var he=Ln(0);function zs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 ra=[];function Cc(){for(var e=0;e<ra.length;e++)ra[e]._workInProgressVersionPrimary=null;ra.length=0}var us=tn.ReactCurrentDispatcher,ia=tn.ReactCurrentBatchConfig,Zn=0,me=null,Ce=null,je=null,Fs=!1,zi=!1,ll=0,R1=0;function _e(){throw Error(O(321))}function Ec(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tt(e[n],t[n]))return!1;return!0}function jc(e,t,n,r,i,l){if(Zn=l,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,us.current=e===null||e.memoizedState===null?F1:$1,e=n(r,i),zi){l=0;do{if(zi=!1,ll=0,25<=l)throw Error(O(301));l+=1,je=Ce=null,t.updateQueue=null,us.current=B1,e=n(r,i)}while(zi)}if(us.current=$s,t=Ce!==null&&Ce.next!==null,Zn=0,je=Ce=me=null,Fs=!1,t)throw Error(O(300));return e}function Tc(){var e=ll!==0;return ll=0,e}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return je===null?me.memoizedState=je=e:je=je.next=e,je}function gt(){if(Ce===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Ce.next;var t=je===null?me.memoizedState:je.next;if(t!==null)je=t,Ce=e;else{if(e===null)throw Error(O(310));Ce=e,e={memoizedState:Ce.memoizedState,baseState:Ce.baseState,baseQueue:Ce.baseQueue,queue:Ce.queue,next:null},je===null?me.memoizedState=je=e:je=je.next=e}return je}function sl(e,t){return typeof t=="function"?t(e):t}function la(e){var t=gt(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=Ce,i=r.baseQueue,l=n.pending;if(l!==null){if(i!==null){var s=i.next;i.next=l.next,l.next=s}r.baseQueue=i=l,n.pending=null}if(i!==null){l=i.next,r=r.baseState;var o=s=null,a=null,u=l;do{var f=u.lane;if((Zn&f)===f)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(o=a=c,s=r):a=a.next=c,me.lanes|=f,er|=f}u=u.next}while(u!==null&&u!==l);a===null?s=r:a.next=o,Tt(r,t.memoizedState)||(Qe=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do l=i.lane,me.lanes|=l,er|=l,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function sa(e){var t=gt(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,l=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do l=e(l,s.action),s=s.next;while(s!==i);Tt(l,t.memoizedState)||(Qe=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function jm(){}function Tm(e,t){var n=me,r=gt(),i=t(),l=!Tt(r.memoizedState,i);if(l&&(r.memoizedState=i,Qe=!0),r=r.queue,Ic(Pm.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||je!==null&&je.memoizedState.tag&1){if(n.flags|=2048,ol(9,Lm.bind(null,n,r,i,t),void 0,null),Te===null)throw Error(O(349));Zn&30||Im(n,t,i)}return i}function Im(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lm(e,t,n,r){t.value=n,t.getSnapshot=r,_m(t)&&Am(e)}function Pm(e,t,n){return n(function(){_m(t)&&Am(e)})}function _m(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tt(e,n)}catch{return!0}}function Am(e){var t=Zt(e,1);t!==null&&Et(t,e,1,-1)}function xd(e){var t=_t();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:e},t.queue=e,e=e.dispatch=z1.bind(null,me,e),[t.memoizedState,e]}function ol(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Om(){return gt().memoizedState}function cs(e,t,n,r){var i=_t();me.flags|=e,i.memoizedState=ol(1|t,n,void 0,r===void 0?null:r)}function ao(e,t,n,r){var i=gt();r=r===void 0?null:r;var l=void 0;if(Ce!==null){var s=Ce.memoizedState;if(l=s.destroy,r!==null&&Ec(r,s.deps)){i.memoizedState=ol(t,n,l,r);return}}me.flags|=e,i.memoizedState=ol(1|t,n,l,r)}function vd(e,t){return cs(8390656,8,e,t)}function Ic(e,t){return ao(2048,8,e,t)}function Rm(e,t){return ao(4,2,e,t)}function Dm(e,t){return ao(4,4,e,t)}function Mm(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 zm(e,t,n){return n=n!=null?n.concat([e]):null,ao(4,4,Mm.bind(null,t,e),n)}function Lc(){}function Fm(e,t){var n=gt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ec(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function $m(e,t){var n=gt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ec(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Bm(e,t,n){return Zn&21?(Tt(n,t)||(n=Wp(),me.lanes|=n,er|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Qe=!0),e.memoizedState=n)}function D1(e,t){var n=ee;ee=n!==0&&4>n?n:4,e(!0);var r=ia.transition;ia.transition={};try{e(!1),t()}finally{ee=n,ia.transition=r}}function Um(){return gt().memoizedState}function M1(e,t,n){var r=bn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Vm(e))Hm(t,n);else if(n=Nm(e,t,n,r),n!==null){var i=Ue();Et(n,e,r,i),Km(n,t,r)}}function z1(e,t,n){var r=bn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vm(e))Hm(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,o=l(s,n);if(i.hasEagerState=!0,i.eagerState=o,Tt(o,s)){var a=t.interleaved;a===null?(i.next=i,kc(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Nm(e,t,i,r),n!==null&&(i=Ue(),Et(n,e,r,i),Km(n,t,r))}}function Vm(e){var t=e.alternate;return e===me||t!==null&&t===me}function Hm(e,t){zi=Fs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Km(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,oc(e,n)}}var $s={readContext:mt,useCallback:_e,useContext:_e,useEffect:_e,useImperativeHandle:_e,useInsertionEffect:_e,useLayoutEffect:_e,useMemo:_e,useReducer:_e,useRef:_e,useState:_e,useDebugValue:_e,useDeferredValue:_e,useTransition:_e,useMutableSource:_e,useSyncExternalStore:_e,useId:_e,unstable_isNewReconciler:!1},F1={readContext:mt,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:vd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,cs(4194308,4,Mm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){return cs(4,2,e,t)},useMemo:function(e,t){var n=_t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=_t();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=M1.bind(null,me,e),[r.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:xd,useDebugValue:Lc,useDeferredValue:function(e){return _t().memoizedState=e},useTransition:function(){var e=xd(!1),t=e[0];return e=D1.bind(null,e[1]),_t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=me,i=_t();if(ce){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),Te===null)throw Error(O(349));Zn&30||Im(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,vd(Pm.bind(null,r,l,e),[e]),r.flags|=2048,ol(9,Lm.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=_t(),t=Te.identifierPrefix;if(ce){var n=Wt,r=Kt;n=(r&~(1<<32-Ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ll++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=R1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},$1={readContext:mt,useCallback:Fm,useContext:mt,useEffect:Ic,useImperativeHandle:zm,useInsertionEffect:Rm,useLayoutEffect:Dm,useMemo:$m,useReducer:la,useRef:Om,useState:function(){return la(sl)},useDebugValue:Lc,useDeferredValue:function(e){var t=gt();return Bm(t,Ce.memoizedState,e)},useTransition:function(){var e=la(sl)[0],t=gt().memoizedState;return[e,t]},useMutableSource:jm,useSyncExternalStore:Tm,useId:Um,unstable_isNewReconciler:!1},B1={readContext:mt,useCallback:Fm,useContext:mt,useEffect:Ic,useImperativeHandle:zm,useInsertionEffect:Rm,useLayoutEffect:Dm,useMemo:$m,useReducer:sa,useRef:Om,useState:function(){return sa(sl)},useDebugValue:Lc,useDeferredValue:function(e){var t=gt();return Ce===null?t.memoizedState=e:Bm(t,Ce.memoizedState,e)},useTransition:function(){var e=sa(sl)[0],t=gt().memoizedState;return[e,t]},useMutableSource:jm,useSyncExternalStore:Tm,useId:Um,unstable_isNewReconciler:!1};function bt(e,t){if(e&&e.defaultProps){t=ye({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function fu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ye({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var uo={isMounted:function(e){return(e=e._reactInternals)?lr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ue(),i=bn(e),l=Qt(r,i);l.payload=t,n!=null&&(l.callback=n),t=wn(e,l,i),t!==null&&(Et(t,e,i,r),as(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ue(),i=bn(e),l=Qt(r,i);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=wn(e,l,i),t!==null&&(Et(t,e,i,r),as(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ue(),r=bn(e),i=Qt(n,r);i.tag=2,t!=null&&(i.callback=t),t=wn(e,i,r),t!==null&&(Et(t,e,r,n),as(t,e,r))}};function wd(e,t,n,r,i,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,s):t.prototype&&t.prototype.isPureReactComponent?!Zi(n,r)||!Zi(i,l):!0}function Wm(e,t,n){var r=!1,i=jn,l=t.contextType;return typeof l=="object"&&l!==null?l=mt(l):(i=Je(t)?Gn:Me.current,r=t.contextTypes,l=(r=r!=null)?Wr(e,i):jn),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=uo,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=l),t}function kd(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&uo.enqueueReplaceState(t,t.state,null)}function du(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},bc(e);var l=t.contextType;typeof l=="object"&&l!==null?i.context=mt(l):(l=Je(t)?Gn:Me.current,i.context=Wr(e,l)),i.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(fu(e,t,l,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&uo.enqueueReplaceState(i,i.state,null),Ms(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Jr(e,t){try{var n="",r=t;do n+=mx(r),r=r.return;while(r);var i=n}catch(l){i=`
|
|
39
|
+
Error generating stack: `+l.message+`
|
|
40
|
+
`+l.stack}return{value:e,source:t,stack:i,digest:null}}function oa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function hu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var U1=typeof WeakMap=="function"?WeakMap:Map;function qm(e,t,n){n=Qt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Us||(Us=!0,Su=r),hu(e,t)},n}function Qm(e,t,n){n=Qt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){hu(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){hu(e,t),typeof r!="function"&&(kn===null?kn=new Set([this]):kn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function bd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new U1;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=nv.bind(null,e,t,n),t.then(e,e))}function Sd(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 Nd(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Qt(-1,1),t.tag=2,wn(n,t,1))),n.lanes|=1),e)}var V1=tn.ReactCurrentOwner,Qe=!1;function Fe(e,t,n,r){t.child=e===null?Sm(t,null,n,r):Qr(t,e.child,n,r)}function Cd(e,t,n,r,i){n=n.render;var l=t.ref;return $r(t,i),r=jc(e,t,n,r,l,i),n=Tc(),e!==null&&!Qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,en(e,t,i)):(ce&&n&&mc(t),t.flags|=1,Fe(e,t,r,i),t.child)}function Ed(e,t,n,r,i){if(e===null){var l=n.type;return typeof l=="function"&&!zc(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,Ym(e,t,l,r,i)):(e=ps(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&i)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:Zi,n(s,r)&&e.ref===t.ref)return en(e,t,i)}return t.flags|=1,e=Sn(l,r),e.ref=t.ref,e.return=t,t.child=e}function Ym(e,t,n,r,i){if(e!==null){var l=e.memoizedProps;if(Zi(l,r)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=r=l,(e.lanes&i)!==0)e.flags&131072&&(Qe=!0);else return t.lanes=e.lanes,en(e,t,i)}return pu(e,t,n,r,i)}function Jm(e,t,n){var r=t.pendingProps,i=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},se(Ir,tt),tt|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,se(Ir,tt),tt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,se(Ir,tt),tt|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,se(Ir,tt),tt|=r;return Fe(e,t,i,n),t.child}function Gm(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function pu(e,t,n,r,i){var l=Je(n)?Gn:Me.current;return l=Wr(t,l),$r(t,i),n=jc(e,t,n,r,l,i),r=Tc(),e!==null&&!Qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,en(e,t,i)):(ce&&r&&mc(t),t.flags|=1,Fe(e,t,n,i),t.child)}function jd(e,t,n,r,i){if(Je(n)){var l=!0;_s(t)}else l=!1;if($r(t,i),t.stateNode===null)fs(e,t),Wm(t,n,r),du(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,o=t.memoizedProps;s.props=o;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=mt(u):(u=Je(n)?Gn:Me.current,u=Wr(t,u));var f=n.getDerivedStateFromProps,c=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";c||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==r||a!==u)&&kd(t,s,r,u),un=!1;var p=t.memoizedState;s.state=p,Ms(t,r,s,i),a=t.memoizedState,o!==r||p!==a||Ye.current||un?(typeof f=="function"&&(fu(t,n,f,r),a=t.memoizedState),(o=un||wd(t,n,o,r,p,a,u))?(c||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Cm(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:bt(t.type,o),s.props=u,c=t.pendingProps,p=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=mt(a):(a=Je(n)?Gn:Me.current,a=Wr(t,a));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==c||p!==a)&&kd(t,s,r,a),un=!1,p=t.memoizedState,s.state=p,Ms(t,r,s,i);var y=t.memoizedState;o!==c||p!==y||Ye.current||un?(typeof h=="function"&&(fu(t,n,h,r),y=t.memoizedState),(u=un||wd(t,n,u,r,p,y,a)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return mu(e,t,n,r,l,i)}function mu(e,t,n,r,i,l){Gm(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&dd(t,n,!1),en(e,t,l);r=t.stateNode,V1.current=t;var o=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Qr(t,e.child,null,l),t.child=Qr(t,null,o,l)):Fe(e,t,o,l),t.memoizedState=r.state,i&&dd(t,n,!0),t.child}function Xm(e){var t=e.stateNode;t.pendingContext?fd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fd(e,t.context,!1),Sc(e,t.containerInfo)}function Td(e,t,n,r,i){return qr(),yc(i),t.flags|=256,Fe(e,t,n,r),t.child}var gu={dehydrated:null,treeContext:null,retryLane:0};function yu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Zm(e,t,n){var r=t.pendingProps,i=he.current,l=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),se(he,i&1),e===null)return uu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,l?(r=t.mode,l=t.child,s={mode:"hidden",children:s},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=ho(s,r,0,null),e=Jn(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=yu(n),t.memoizedState=gu,e):Pc(t,s));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return H1(e,t,s,r,o,i,n);if(l){l=r.fallback,s=t.mode,i=e.child,o=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Sn(i,a),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?l=Sn(o,l):(l=Jn(l,s,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,s=e.child.memoizedState,s=s===null?yu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=gu,r}return l=e.child,e=l.sibling,r=Sn(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Pc(e,t){return t=ho({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Vl(e,t,n,r){return r!==null&&yc(r),Qr(t,e.child,null,n),e=Pc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function H1(e,t,n,r,i,l,s){if(n)return t.flags&256?(t.flags&=-257,r=oa(Error(O(422))),Vl(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,i=t.mode,r=ho({mode:"visible",children:r.children},i,0,null),l=Jn(l,i,s,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Qr(t,e.child,null,s),t.child.memoizedState=yu(s),t.memoizedState=gu,l);if(!(t.mode&1))return Vl(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,l=Error(O(419)),r=oa(l,r,void 0),Vl(e,t,s,r)}if(o=(s&e.childLanes)!==0,Qe||o){if(r=Te,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==l.retryLane&&(l.retryLane=i,Zt(e,i),Et(r,e,i,-1))}return Mc(),r=oa(Error(O(421))),Vl(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=rv.bind(null,e),i._reactRetry=t,null):(e=l.treeContext,rt=vn(i.nextSibling),it=t,ce=!0,Nt=null,e!==null&&(ut[ct++]=Kt,ut[ct++]=Wt,ut[ct++]=Xn,Kt=e.id,Wt=e.overflow,Xn=t),t=Pc(t,r.children),t.flags|=4096,t)}function Id(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),cu(e.return,t,n)}function aa(e,t,n,r,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=i)}function eg(e,t,n){var r=t.pendingProps,i=r.revealOrder,l=r.tail;if(Fe(e,t,r.children,n),r=he.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Id(e,n,t);else if(e.tag===19)Id(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(se(he,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&zs(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),aa(t,!1,i,n,l);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&zs(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}aa(t,!0,n,null,l);break;case"together":aa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function en(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),er|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,n=Sn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Sn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function K1(e,t,n){switch(t.tag){case 3:Xm(t),qr();break;case 5:Em(t);break;case 1:Je(t.type)&&_s(t);break;case 4:Sc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;se(Rs,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(se(he,he.current&1),t.flags|=128,null):n&t.child.childLanes?Zm(e,t,n):(se(he,he.current&1),e=en(e,t,n),e!==null?e.sibling:null);se(he,he.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return eg(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),se(he,he.current),r)break;return null;case 22:case 23:return t.lanes=0,Jm(e,t,n)}return en(e,t,n)}var tg,xu,ng,rg;tg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};xu=function(){};ng=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Kn(Dt.current);var l=null;switch(n){case"input":i=$a(e,i),r=$a(e,r),l=[];break;case"select":i=ye({},i,{value:void 0}),r=ye({},r,{value:void 0}),l=[];break;case"textarea":i=Va(e,i),r=Va(e,r),l=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ls)}Ka(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var o=i[u];for(s in o)o.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Wi.hasOwnProperty(u)?l||(l=[]):(l=l||[]).push(u,null));for(u in r){var a=r[u];if(o=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==o&&(a!=null||o!=null))if(u==="style")if(o){for(s in o)!o.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&o[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(l||(l=[]),l.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,o=o?o.__html:void 0,a!=null&&o!==a&&(l=l||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(l=l||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Wi.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&ae("scroll",e),l||o===a||(l=[])):(l=l||[]).push(u,a))}n&&(l=l||[]).push("style",n);var u=l;(t.updateQueue=u)&&(t.flags|=4)}};rg=function(e,t,n,r){n!==r&&(t.flags|=4)};function ki(e,t){if(!ce)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ae(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function W1(e,t,n){var r=t.pendingProps;switch(gc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ae(t),null;case 1:return Je(t.type)&&Ps(),Ae(t),null;case 3:return r=t.stateNode,Yr(),ue(Ye),ue(Me),Cc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Bl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Nt!==null&&(Eu(Nt),Nt=null))),xu(e,t),Ae(t),null;case 5:Nc(t);var i=Kn(il.current);if(n=t.type,e!==null&&t.stateNode!=null)ng(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(O(166));return Ae(t),null}if(e=Kn(Dt.current),Bl(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Ot]=t,r[nl]=l,e=(t.mode&1)!==0,n){case"dialog":ae("cancel",r),ae("close",r);break;case"iframe":case"object":case"embed":ae("load",r);break;case"video":case"audio":for(i=0;i<Ii.length;i++)ae(Ii[i],r);break;case"source":ae("error",r);break;case"img":case"image":case"link":ae("error",r),ae("load",r);break;case"details":ae("toggle",r);break;case"input":zf(r,l),ae("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},ae("invalid",r);break;case"textarea":$f(r,l),ae("invalid",r)}Ka(n,l),i=null;for(var s in l)if(l.hasOwnProperty(s)){var o=l[s];s==="children"?typeof o=="string"?r.textContent!==o&&(l.suppressHydrationWarning!==!0&&$l(r.textContent,o,e),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(l.suppressHydrationWarning!==!0&&$l(r.textContent,o,e),i=["children",""+o]):Wi.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ae("scroll",r)}switch(n){case"input":_l(r),Ff(r,l,!0);break;case"textarea":_l(r),Bf(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Ls)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Pp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ot]=t,e[nl]=r,tg(e,t,!1,!1),t.stateNode=e;e:{switch(s=Wa(n,r),n){case"dialog":ae("cancel",e),ae("close",e),i=r;break;case"iframe":case"object":case"embed":ae("load",e),i=r;break;case"video":case"audio":for(i=0;i<Ii.length;i++)ae(Ii[i],e);i=r;break;case"source":ae("error",e),i=r;break;case"img":case"image":case"link":ae("error",e),ae("load",e),i=r;break;case"details":ae("toggle",e),i=r;break;case"input":zf(e,r),i=$a(e,r),ae("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ye({},r,{value:void 0}),ae("invalid",e);break;case"textarea":$f(e,r),i=Va(e,r),ae("invalid",e);break;default:i=r}Ka(n,i),o=i;for(l in o)if(o.hasOwnProperty(l)){var a=o[l];l==="style"?Op(e,a):l==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&_p(e,a)):l==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&qi(e,a):typeof a=="number"&&qi(e,""+a):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Wi.hasOwnProperty(l)?a!=null&&l==="onScroll"&&ae("scroll",e):a!=null&&tc(e,l,a,s))}switch(n){case"input":_l(e),Ff(e,r,!1);break;case"textarea":_l(e),Bf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+En(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?Dr(e,!!r.multiple,l,!1):r.defaultValue!=null&&Dr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ls)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ae(t),null;case 6:if(e&&t.stateNode!=null)rg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(O(166));if(n=Kn(il.current),Kn(Dt.current),Bl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ot]=t,(l=r.nodeValue!==n)&&(e=it,e!==null))switch(e.tag){case 3:$l(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&$l(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ot]=t,t.stateNode=r}return Ae(t),null;case 13:if(ue(he),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ce&&rt!==null&&t.mode&1&&!(t.flags&128))km(),qr(),t.flags|=98560,l=!1;else if(l=Bl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(O(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(O(317));l[Ot]=t}else qr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ae(t),l=!1}else Nt!==null&&(Eu(Nt),Nt=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||he.current&1?Ee===0&&(Ee=3):Mc())),t.updateQueue!==null&&(t.flags|=4),Ae(t),null);case 4:return Yr(),xu(e,t),e===null&&el(t.stateNode.containerInfo),Ae(t),null;case 10:return wc(t.type._context),Ae(t),null;case 17:return Je(t.type)&&Ps(),Ae(t),null;case 19:if(ue(he),l=t.memoizedState,l===null)return Ae(t),null;if(r=(t.flags&128)!==0,s=l.rendering,s===null)if(r)ki(l,!1);else{if(Ee!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=zs(e),s!==null){for(t.flags|=128,ki(l,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,s=l.alternate,s===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,e=s.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return se(he,he.current&1|2),t.child}e=e.sibling}l.tail!==null&&we()>Gr&&(t.flags|=128,r=!0,ki(l,!1),t.lanes=4194304)}else{if(!r)if(e=zs(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ki(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!ce)return Ae(t),null}else 2*we()-l.renderingStartTime>Gr&&n!==1073741824&&(t.flags|=128,r=!0,ki(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=we(),t.sibling=null,n=he.current,se(he,r?n&1|2:n&1),t):(Ae(t),null);case 22:case 23:return Dc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?tt&1073741824&&(Ae(t),t.subtreeFlags&6&&(t.flags|=8192)):Ae(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function q1(e,t){switch(gc(t),t.tag){case 1:return Je(t.type)&&Ps(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yr(),ue(Ye),ue(Me),Cc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nc(t),null;case 13:if(ue(he),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));qr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ue(he),null;case 4:return Yr(),null;case 10:return wc(t.type._context),null;case 22:case 23:return Dc(),null;case 24:return null;default:return null}}var Hl=!1,Oe=!1,Q1=typeof WeakSet=="function"?WeakSet:Set,F=null;function Tr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ve(e,t,r)}else n.current=null}function vu(e,t,n){try{n()}catch(r){ve(e,t,r)}}var Ld=!1;function Y1(e,t){if(nu=js,e=am(),pc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,o=-1,a=-1,u=0,f=0,c=e,p=null;t:for(;;){for(var h;c!==n||i!==0&&c.nodeType!==3||(o=s+i),c!==l||r!==0&&c.nodeType!==3||(a=s+r),c.nodeType===3&&(s+=c.nodeValue.length),(h=c.firstChild)!==null;)p=c,c=h;for(;;){if(c===e)break t;if(p===n&&++u===i&&(o=s),p===l&&++f===r&&(a=s),(h=c.nextSibling)!==null)break;c=p,p=c.parentNode}c=h}n=o===-1||a===-1?null:{start:o,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(ru={focusedElem:e,selectionRange:n},js=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,w=y.memoizedState,m=t.stateNode,x=m.getSnapshotBeforeUpdate(t.elementType===t.type?g:bt(t.type,g),w);m.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(C){ve(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return y=Ld,Ld=!1,y}function Fi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&vu(t,n,l)}i=i.next}while(i!==r)}}function co(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ig(e){var t=e.alternate;t!==null&&(e.alternate=null,ig(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ot],delete t[nl],delete t[su],delete t[P1],delete t[_1])),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 lg(e){return e.tag===5||e.tag===3||e.tag===4}function Pd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||lg(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 ku(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ls));else if(r!==4&&(e=e.child,e!==null))for(ku(e,t,n),e=e.sibling;e!==null;)ku(e,t,n),e=e.sibling}function bu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(bu(e,t,n),e=e.sibling;e!==null;)bu(e,t,n),e=e.sibling}var Ie=null,St=!1;function ln(e,t,n){for(n=n.child;n!==null;)sg(e,t,n),n=n.sibling}function sg(e,t,n){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(no,n)}catch{}switch(n.tag){case 5:Oe||Tr(n,t);case 6:var r=Ie,i=St;Ie=null,ln(e,t,n),Ie=r,St=i,Ie!==null&&(St?(e=Ie,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ie.removeChild(n.stateNode));break;case 18:Ie!==null&&(St?(e=Ie,n=n.stateNode,e.nodeType===8?ta(e.parentNode,n):e.nodeType===1&&ta(e,n),Gi(e)):ta(Ie,n.stateNode));break;case 4:r=Ie,i=St,Ie=n.stateNode.containerInfo,St=!0,ln(e,t,n),Ie=r,St=i;break;case 0:case 11:case 14:case 15:if(!Oe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&vu(n,t,s),i=i.next}while(i!==r)}ln(e,t,n);break;case 1:if(!Oe&&(Tr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){ve(n,t,o)}ln(e,t,n);break;case 21:ln(e,t,n);break;case 22:n.mode&1?(Oe=(r=Oe)||n.memoizedState!==null,ln(e,t,n),Oe=r):ln(e,t,n);break;default:ln(e,t,n)}}function _d(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Q1),t.forEach(function(r){var i=iv.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function wt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var l=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 5:Ie=o.stateNode,St=!1;break e;case 3:Ie=o.stateNode.containerInfo,St=!0;break e;case 4:Ie=o.stateNode.containerInfo,St=!0;break e}o=o.return}if(Ie===null)throw Error(O(160));sg(l,s,i),Ie=null,St=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){ve(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)og(t,e),t=t.sibling}function og(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wt(t,e),Pt(e),r&4){try{Fi(3,e,e.return),co(3,e)}catch(g){ve(e,e.return,g)}try{Fi(5,e,e.return)}catch(g){ve(e,e.return,g)}}break;case 1:wt(t,e),Pt(e),r&512&&n!==null&&Tr(n,n.return);break;case 5:if(wt(t,e),Pt(e),r&512&&n!==null&&Tr(n,n.return),e.flags&32){var i=e.stateNode;try{qi(i,"")}catch(g){ve(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var l=e.memoizedProps,s=n!==null?n.memoizedProps:l,o=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{o==="input"&&l.type==="radio"&&l.name!=null&&Ip(i,l),Wa(o,s);var u=Wa(o,l);for(s=0;s<a.length;s+=2){var f=a[s],c=a[s+1];f==="style"?Op(i,c):f==="dangerouslySetInnerHTML"?_p(i,c):f==="children"?qi(i,c):tc(i,f,c,u)}switch(o){case"input":Ba(i,l);break;case"textarea":Lp(i,l);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!l.multiple;var h=l.value;h!=null?Dr(i,!!l.multiple,h,!1):p!==!!l.multiple&&(l.defaultValue!=null?Dr(i,!!l.multiple,l.defaultValue,!0):Dr(i,!!l.multiple,l.multiple?[]:"",!1))}i[nl]=l}catch(g){ve(e,e.return,g)}}break;case 6:if(wt(t,e),Pt(e),r&4){if(e.stateNode===null)throw Error(O(162));i=e.stateNode,l=e.memoizedProps;try{i.nodeValue=l}catch(g){ve(e,e.return,g)}}break;case 3:if(wt(t,e),Pt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Gi(t.containerInfo)}catch(g){ve(e,e.return,g)}break;case 4:wt(t,e),Pt(e);break;case 13:wt(t,e),Pt(e),i=e.child,i.flags&8192&&(l=i.memoizedState!==null,i.stateNode.isHidden=l,!l||i.alternate!==null&&i.alternate.memoizedState!==null||(Oc=we())),r&4&&_d(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Oe=(u=Oe)||f,wt(t,e),Oe=u):wt(t,e),Pt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(F=e,f=e.child;f!==null;){for(c=F=f;F!==null;){switch(p=F,h=p.child,p.tag){case 0:case 11:case 14:case 15:Fi(4,p,p.return);break;case 1:Tr(p,p.return);var y=p.stateNode;if(typeof y.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(g){ve(r,n,g)}}break;case 5:Tr(p,p.return);break;case 22:if(p.memoizedState!==null){Od(c);continue}}h!==null?(h.return=p,F=h):Od(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{i=c.stateNode,u?(l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(o=c.stateNode,a=c.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,o.style.display=Ap("display",s))}catch(g){ve(e,e.return,g)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(g){ve(e,e.return,g)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:wt(t,e),Pt(e),r&4&&_d(e);break;case 21:break;default:wt(t,e),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(lg(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(qi(i,""),r.flags&=-33);var l=Pd(e);bu(e,l,i);break;case 3:case 4:var s=r.stateNode.containerInfo,o=Pd(e);ku(e,o,s);break;default:throw Error(O(161))}}catch(a){ve(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function J1(e,t,n){F=e,ag(e)}function ag(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var i=F,l=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Hl;if(!s){var o=i.alternate,a=o!==null&&o.memoizedState!==null||Oe;o=Hl;var u=Oe;if(Hl=s,(Oe=a)&&!u)for(F=i;F!==null;)s=F,a=s.child,s.tag===22&&s.memoizedState!==null?Rd(i):a!==null?(a.return=s,F=a):Rd(i);for(;l!==null;)F=l,ag(l),l=l.sibling;F=i,Hl=o,Oe=u}Ad(e)}else i.subtreeFlags&8772&&l!==null?(l.return=i,F=l):Ad(e)}}function Ad(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Oe||co(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Oe)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:bt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&yd(t,l,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}yd(t,s,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&Gi(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}Oe||t.flags&512&&wu(t)}catch(p){ve(t,t.return,p)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function Od(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function Rd(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{co(4,t)}catch(a){ve(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){ve(t,i,a)}}var l=t.return;try{wu(t)}catch(a){ve(t,l,a)}break;case 5:var s=t.return;try{wu(t)}catch(a){ve(t,s,a)}}}catch(a){ve(t,t.return,a)}if(t===e){F=null;break}var o=t.sibling;if(o!==null){o.return=t.return,F=o;break}F=t.return}}var G1=Math.ceil,Bs=tn.ReactCurrentDispatcher,_c=tn.ReactCurrentOwner,ht=tn.ReactCurrentBatchConfig,X=0,Te=null,be=null,Le=0,tt=0,Ir=Ln(0),Ee=0,al=null,er=0,fo=0,Ac=0,$i=null,We=null,Oc=0,Gr=1/0,Ut=null,Us=!1,Su=null,kn=null,Kl=!1,pn=null,Vs=0,Bi=0,Nu=null,ds=-1,hs=0;function Ue(){return X&6?we():ds!==-1?ds:ds=we()}function bn(e){return e.mode&1?X&2&&Le!==0?Le&-Le:O1.transition!==null?(hs===0&&(hs=Wp()),hs):(e=ee,e!==0||(e=window.event,e=e===void 0?16:Zp(e.type)),e):1}function Et(e,t,n,r){if(50<Bi)throw Bi=0,Nu=null,Error(O(185));yl(e,n,r),(!(X&2)||e!==Te)&&(e===Te&&(!(X&2)&&(fo|=n),Ee===4&&dn(e,Le)),Ge(e,r),n===1&&X===0&&!(t.mode&1)&&(Gr=we()+500,oo&&Pn()))}function Ge(e,t){var n=e.callbackNode;Ox(e,t);var r=Es(e,e===Te?Le:0);if(r===0)n!==null&&Hf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Hf(n),t===1)e.tag===0?A1(Dd.bind(null,e)):xm(Dd.bind(null,e)),I1(function(){!(X&6)&&Pn()}),n=null;else{switch(qp(r)){case 1:n=sc;break;case 4:n=Hp;break;case 16:n=Cs;break;case 536870912:n=Kp;break;default:n=Cs}n=gg(n,ug.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ug(e,t){if(ds=-1,hs=0,X&6)throw Error(O(327));var n=e.callbackNode;if(Br()&&e.callbackNode!==n)return null;var r=Es(e,e===Te?Le:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Hs(e,r);else{t=r;var i=X;X|=2;var l=fg();(Te!==e||Le!==t)&&(Ut=null,Gr=we()+500,Yn(e,t));do try{ev();break}catch(o){cg(e,o)}while(!0);vc(),Bs.current=l,X=i,be!==null?t=0:(Te=null,Le=0,t=Ee)}if(t!==0){if(t===2&&(i=Ga(e),i!==0&&(r=i,t=Cu(e,i))),t===1)throw n=al,Yn(e,0),dn(e,r),Ge(e,we()),n;if(t===6)dn(e,r);else{if(i=e.current.alternate,!(r&30)&&!X1(i)&&(t=Hs(e,r),t===2&&(l=Ga(e),l!==0&&(r=l,t=Cu(e,l))),t===1))throw n=al,Yn(e,0),dn(e,r),Ge(e,we()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(O(345));case 2:$n(e,We,Ut);break;case 3:if(dn(e,r),(r&130023424)===r&&(t=Oc+500-we(),10<t)){if(Es(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Ue(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=lu($n.bind(null,e,We,Ut),t);break}$n(e,We,Ut);break;case 4:if(dn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Ct(r);l=1<<s,s=t[s],s>i&&(i=s),r&=~l}if(r=i,r=we()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*G1(r/1960))-r,10<r){e.timeoutHandle=lu($n.bind(null,e,We,Ut),r);break}$n(e,We,Ut);break;case 5:$n(e,We,Ut);break;default:throw Error(O(329))}}}return Ge(e,we()),e.callbackNode===n?ug.bind(null,e):null}function Cu(e,t){var n=$i;return e.current.memoizedState.isDehydrated&&(Yn(e,t).flags|=256),e=Hs(e,t),e!==2&&(t=We,We=n,t!==null&&Eu(t)),e}function Eu(e){We===null?We=e:We.push.apply(We,e)}function X1(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],l=i.getSnapshot;i=i.value;try{if(!Tt(l(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function dn(e,t){for(t&=~Ac,t&=~fo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ct(t),r=1<<n;e[n]=-1,t&=~r}}function Dd(e){if(X&6)throw Error(O(327));Br();var t=Es(e,0);if(!(t&1))return Ge(e,we()),null;var n=Hs(e,t);if(e.tag!==0&&n===2){var r=Ga(e);r!==0&&(t=r,n=Cu(e,r))}if(n===1)throw n=al,Yn(e,0),dn(e,t),Ge(e,we()),n;if(n===6)throw Error(O(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$n(e,We,Ut),Ge(e,we()),null}function Rc(e,t){var n=X;X|=1;try{return e(t)}finally{X=n,X===0&&(Gr=we()+500,oo&&Pn())}}function tr(e){pn!==null&&pn.tag===0&&!(X&6)&&Br();var t=X;X|=1;var n=ht.transition,r=ee;try{if(ht.transition=null,ee=1,e)return e()}finally{ee=r,ht.transition=n,X=t,!(X&6)&&Pn()}}function Dc(){tt=Ir.current,ue(Ir)}function Yn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,T1(n)),be!==null)for(n=be.return;n!==null;){var r=n;switch(gc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ps();break;case 3:Yr(),ue(Ye),ue(Me),Cc();break;case 5:Nc(r);break;case 4:Yr();break;case 13:ue(he);break;case 19:ue(he);break;case 10:wc(r.type._context);break;case 22:case 23:Dc()}n=n.return}if(Te=e,be=e=Sn(e.current,null),Le=tt=t,Ee=0,al=null,Ac=fo=er=0,We=$i=null,Hn!==null){for(t=0;t<Hn.length;t++)if(n=Hn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,l=n.pending;if(l!==null){var s=l.next;l.next=i,r.next=s}n.pending=r}Hn=null}return e}function cg(e,t){do{var n=be;try{if(vc(),us.current=$s,Fs){for(var r=me.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Fs=!1}if(Zn=0,je=Ce=me=null,zi=!1,ll=0,_c.current=null,n===null||n.return===null){Ee=1,al=t,be=null;break}e:{var l=e,s=n.return,o=n,a=t;if(t=Le,o.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,f=o,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=Sd(s);if(h!==null){h.flags&=-257,Nd(h,s,o,l,t),h.mode&1&&bd(l,u,t),t=h,a=u;var y=t.updateQueue;if(y===null){var g=new Set;g.add(a),t.updateQueue=g}else y.add(a);break e}else{if(!(t&1)){bd(l,u,t),Mc();break e}a=Error(O(426))}}else if(ce&&o.mode&1){var w=Sd(s);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Nd(w,s,o,l,t),yc(Jr(a,o));break e}}l=a=Jr(a,o),Ee!==4&&(Ee=2),$i===null?$i=[l]:$i.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var m=qm(l,a,t);gd(l,m);break e;case 1:o=a;var x=l.type,v=l.stateNode;if(!(l.flags&128)&&(typeof x.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(kn===null||!kn.has(v)))){l.flags|=65536,t&=-t,l.lanes|=t;var C=Qm(l,o,t);gd(l,C);break e}}l=l.return}while(l!==null)}hg(n)}catch(E){t=E,be===n&&n!==null&&(be=n=n.return);continue}break}while(!0)}function fg(){var e=Bs.current;return Bs.current=$s,e===null?$s:e}function Mc(){(Ee===0||Ee===3||Ee===2)&&(Ee=4),Te===null||!(er&268435455)&&!(fo&268435455)||dn(Te,Le)}function Hs(e,t){var n=X;X|=2;var r=fg();(Te!==e||Le!==t)&&(Ut=null,Yn(e,t));do try{Z1();break}catch(i){cg(e,i)}while(!0);if(vc(),X=n,Bs.current=r,be!==null)throw Error(O(261));return Te=null,Le=0,Ee}function Z1(){for(;be!==null;)dg(be)}function ev(){for(;be!==null&&!Cx();)dg(be)}function dg(e){var t=mg(e.alternate,e,tt);e.memoizedProps=e.pendingProps,t===null?hg(e):be=t,_c.current=null}function hg(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=q1(n,t),n!==null){n.flags&=32767,be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ee=6,be=null;return}}else if(n=W1(n,t,tt),n!==null){be=n;return}if(t=t.sibling,t!==null){be=t;return}be=t=e}while(t!==null);Ee===0&&(Ee=5)}function $n(e,t,n){var r=ee,i=ht.transition;try{ht.transition=null,ee=1,tv(e,t,n,r)}finally{ht.transition=i,ee=r}return null}function tv(e,t,n,r){do Br();while(pn!==null);if(X&6)throw Error(O(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(O(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(Rx(e,l),e===Te&&(be=Te=null,Le=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Kl||(Kl=!0,gg(Cs,function(){return Br(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=ht.transition,ht.transition=null;var s=ee;ee=1;var o=X;X|=4,_c.current=null,Y1(e,n),og(n,e),k1(ru),js=!!nu,ru=nu=null,e.current=n,J1(n),Ex(),X=o,ee=s,ht.transition=l}else e.current=n;if(Kl&&(Kl=!1,pn=e,Vs=i),l=e.pendingLanes,l===0&&(kn=null),Ix(n.stateNode),Ge(e,we()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Us)throw Us=!1,e=Su,Su=null,e;return Vs&1&&e.tag!==0&&Br(),l=e.pendingLanes,l&1?e===Nu?Bi++:(Bi=0,Nu=e):Bi=0,Pn(),null}function Br(){if(pn!==null){var e=qp(Vs),t=ht.transition,n=ee;try{if(ht.transition=null,ee=16>e?16:e,pn===null)var r=!1;else{if(e=pn,pn=null,Vs=0,X&6)throw Error(O(331));var i=X;for(X|=4,F=e.current;F!==null;){var l=F,s=l.child;if(F.flags&16){var o=l.deletions;if(o!==null){for(var a=0;a<o.length;a++){var u=o[a];for(F=u;F!==null;){var f=F;switch(f.tag){case 0:case 11:case 15:Fi(8,f,l)}var c=f.child;if(c!==null)c.return=f,F=c;else for(;F!==null;){f=F;var p=f.sibling,h=f.return;if(ig(f),f===u){F=null;break}if(p!==null){p.return=h,F=p;break}F=h}}}var y=l.alternate;if(y!==null){var g=y.child;if(g!==null){y.child=null;do{var w=g.sibling;g.sibling=null,g=w}while(g!==null)}}F=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,F=s;else e:for(;F!==null;){if(l=F,l.flags&2048)switch(l.tag){case 0:case 11:case 15:Fi(9,l,l.return)}var m=l.sibling;if(m!==null){m.return=l.return,F=m;break e}F=l.return}}var x=e.current;for(F=x;F!==null;){s=F;var v=s.child;if(s.subtreeFlags&2064&&v!==null)v.return=s,F=v;else e:for(s=x;F!==null;){if(o=F,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:co(9,o)}}catch(E){ve(o,o.return,E)}if(o===s){F=null;break e}var C=o.sibling;if(C!==null){C.return=o.return,F=C;break e}F=o.return}}if(X=i,Pn(),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(no,e)}catch{}r=!0}return r}finally{ee=n,ht.transition=t}}return!1}function Md(e,t,n){t=Jr(n,t),t=qm(e,t,1),e=wn(e,t,1),t=Ue(),e!==null&&(yl(e,1,t),Ge(e,t))}function ve(e,t,n){if(e.tag===3)Md(e,e,n);else for(;t!==null;){if(t.tag===3){Md(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(kn===null||!kn.has(r))){e=Jr(n,e),e=Qm(t,e,1),t=wn(t,e,1),e=Ue(),t!==null&&(yl(t,1,e),Ge(t,e));break}}t=t.return}}function nv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ue(),e.pingedLanes|=e.suspendedLanes&n,Te===e&&(Le&n)===n&&(Ee===4||Ee===3&&(Le&130023424)===Le&&500>we()-Oc?Yn(e,0):Ac|=n),Ge(e,t)}function pg(e,t){t===0&&(e.mode&1?(t=Rl,Rl<<=1,!(Rl&130023424)&&(Rl=4194304)):t=1);var n=Ue();e=Zt(e,t),e!==null&&(yl(e,t,n),Ge(e,n))}function rv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),pg(e,n)}function iv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),pg(e,n)}var mg;mg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ye.current)Qe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Qe=!1,K1(e,t,n);Qe=!!(e.flags&131072)}else Qe=!1,ce&&t.flags&1048576&&vm(t,Os,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;fs(e,t),e=t.pendingProps;var i=Wr(t,Me.current);$r(t,n),i=jc(null,t,r,e,i,n);var l=Tc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Je(r)?(l=!0,_s(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,bc(t),i.updater=uo,t.stateNode=i,i._reactInternals=t,du(t,r,e,n),t=mu(null,t,r,!0,l,n)):(t.tag=0,ce&&l&&mc(t),Fe(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(fs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=sv(r),e=bt(r,e),i){case 0:t=pu(null,t,r,e,n);break e;case 1:t=jd(null,t,r,e,n);break e;case 11:t=Cd(null,t,r,e,n);break e;case 14:t=Ed(null,t,r,bt(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bt(r,i),pu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bt(r,i),jd(e,t,r,i,n);case 3:e:{if(Xm(t),e===null)throw Error(O(387));r=t.pendingProps,l=t.memoizedState,i=l.element,Cm(e,t),Ms(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=Jr(Error(O(423)),t),t=Td(e,t,r,n,i);break e}else if(r!==i){i=Jr(Error(O(424)),t),t=Td(e,t,r,n,i);break e}else for(rt=vn(t.stateNode.containerInfo.firstChild),it=t,ce=!0,Nt=null,n=Sm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(qr(),r===i){t=en(e,t,n);break e}Fe(e,t,r,n)}t=t.child}return t;case 5:return Em(t),e===null&&uu(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,s=i.children,iu(r,i)?s=null:l!==null&&iu(r,l)&&(t.flags|=32),Gm(e,t),Fe(e,t,s,n),t.child;case 6:return e===null&&uu(t),null;case 13:return Zm(e,t,n);case 4:return Sc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qr(t,null,r,n):Fe(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bt(r,i),Cd(e,t,r,i,n);case 7:return Fe(e,t,t.pendingProps,n),t.child;case 8:return Fe(e,t,t.pendingProps.children,n),t.child;case 12:return Fe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,s=i.value,se(Rs,r._currentValue),r._currentValue=s,l!==null)if(Tt(l.value,s)){if(l.children===i.children&&!Ye.current){t=en(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var o=l.dependencies;if(o!==null){s=l.child;for(var a=o.firstContext;a!==null;){if(a.context===r){if(l.tag===1){a=Qt(-1,n&-n),a.tag=2;var u=l.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?a.next=a:(a.next=f.next,f.next=a),u.pending=a}}l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),cu(l.return,n,t),o.lanes|=n;break}a=a.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(O(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),cu(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}Fe(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,$r(t,n),i=mt(i),r=r(i),t.flags|=1,Fe(e,t,r,n),t.child;case 14:return r=t.type,i=bt(r,t.pendingProps),i=bt(r.type,i),Ed(e,t,r,i,n);case 15:return Ym(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bt(r,i),fs(e,t),t.tag=1,Je(r)?(e=!0,_s(t)):e=!1,$r(t,n),Wm(t,r,i),du(t,r,i,n),mu(null,t,r,!0,e,n);case 19:return eg(e,t,n);case 22:return Jm(e,t,n)}throw Error(O(156,t.tag))};function gg(e,t){return Vp(e,t)}function lv(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dt(e,t,n,r){return new lv(e,t,n,r)}function zc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sv(e){if(typeof e=="function")return zc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===rc)return 11;if(e===ic)return 14}return 2}function Sn(e,t){var n=e.alternate;return n===null?(n=dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ps(e,t,n,r,i,l){var s=2;if(r=e,typeof e=="function")zc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case vr:return Jn(n.children,i,l,t);case nc:s=8,i|=8;break;case Da:return e=dt(12,n,t,i|2),e.elementType=Da,e.lanes=l,e;case Ma:return e=dt(13,n,t,i),e.elementType=Ma,e.lanes=l,e;case za:return e=dt(19,n,t,i),e.elementType=za,e.lanes=l,e;case Ep:return ho(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Np:s=10;break e;case Cp:s=9;break e;case rc:s=11;break e;case ic:s=14;break e;case an:s=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=dt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function Jn(e,t,n,r){return e=dt(7,e,r,t),e.lanes=n,e}function ho(e,t,n,r){return e=dt(22,e,r,t),e.elementType=Ep,e.lanes=n,e.stateNode={isHidden:!1},e}function ua(e,t,n){return e=dt(6,e,null,t),e.lanes=n,e}function ca(e,t,n){return t=dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ov(e,t,n,r,i){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=Ho(0),this.expirationTimes=Ho(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ho(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fc(e,t,n,r,i,l,s,o,a){return e=new ov(e,t,n,o,a),t===1?(t=1,l===!0&&(t|=8)):t=0,l=dt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},bc(l),e}function av(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function yg(e){if(!e)return jn;e=e._reactInternals;e:{if(lr(e)!==e||e.tag!==1)throw Error(O(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Je(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(O(171))}if(e.tag===1){var n=e.type;if(Je(n))return ym(e,n,t)}return t}function xg(e,t,n,r,i,l,s,o,a){return e=Fc(n,r,!0,e,i,l,s,o,a),e.context=yg(null),n=e.current,r=Ue(),i=bn(n),l=Qt(r,i),l.callback=t??null,wn(n,l,i),e.current.lanes=i,yl(e,i,r),Ge(e,r),e}function po(e,t,n,r){var i=t.current,l=Ue(),s=bn(i);return n=yg(n),t.context===null?t.context=n:t.pendingContext=n,t=Qt(l,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=wn(i,t,s),e!==null&&(Et(e,i,s,l),as(e,i,s)),s}function Ks(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 zd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function $c(e,t){zd(e,t),(e=e.alternate)&&zd(e,t)}function uv(){return null}var vg=typeof reportError=="function"?reportError:function(e){console.error(e)};function Bc(e){this._internalRoot=e}mo.prototype.render=Bc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));po(e,t,null,null)};mo.prototype.unmount=Bc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;tr(function(){po(null,e,null,null)}),t[Xt]=null}};function mo(e){this._internalRoot=e}mo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Jp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<fn.length&&t!==0&&t<fn[n].priority;n++);fn.splice(n,0,e),n===0&&Xp(e)}};function Uc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function go(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Fd(){}function cv(e,t,n,r,i){if(i){if(typeof r=="function"){var l=r;r=function(){var u=Ks(s);l.call(u)}}var s=xg(t,r,e,0,null,!1,!1,"",Fd);return e._reactRootContainer=s,e[Xt]=s.current,el(e.nodeType===8?e.parentNode:e),tr(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var u=Ks(a);o.call(u)}}var a=Fc(e,0,!1,null,null,!1,!1,"",Fd);return e._reactRootContainer=a,e[Xt]=a.current,el(e.nodeType===8?e.parentNode:e),tr(function(){po(t,a,n,r)}),a}function yo(e,t,n,r,i){var l=n._reactRootContainer;if(l){var s=l;if(typeof i=="function"){var o=i;i=function(){var a=Ks(s);o.call(a)}}po(t,s,e,i)}else s=cv(n,t,e,i,r);return Ks(s)}Qp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ti(t.pendingLanes);n!==0&&(oc(t,n|1),Ge(t,we()),!(X&6)&&(Gr=we()+500,Pn()))}break;case 13:tr(function(){var r=Zt(e,1);if(r!==null){var i=Ue();Et(r,e,1,i)}}),$c(e,1)}};ac=function(e){if(e.tag===13){var t=Zt(e,134217728);if(t!==null){var n=Ue();Et(t,e,134217728,n)}$c(e,134217728)}};Yp=function(e){if(e.tag===13){var t=bn(e),n=Zt(e,t);if(n!==null){var r=Ue();Et(n,e,t,r)}$c(e,t)}};Jp=function(){return ee};Gp=function(e,t){var n=ee;try{return ee=e,t()}finally{ee=n}};Qa=function(e,t,n){switch(t){case"input":if(Ba(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=so(r);if(!i)throw Error(O(90));Tp(r),Ba(r,i)}}}break;case"textarea":Lp(e,n);break;case"select":t=n.value,t!=null&&Dr(e,!!n.multiple,t,!1)}};Mp=Rc;zp=tr;var fv={usingClientEntryPoint:!1,Events:[vl,Sr,so,Rp,Dp,Rc]},bi={findFiberByHostInstance:Vn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dv={bundleType:bi.bundleType,version:bi.version,rendererPackageName:bi.rendererPackageName,rendererConfig:bi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:tn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Bp(e),e===null?null:e.stateNode},findFiberByHostInstance:bi.findFiberByHostInstance||uv,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 Wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wl.isDisabled&&Wl.supportsFiber)try{no=Wl.inject(dv),Rt=Wl}catch{}}ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fv;ot.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Uc(t))throw Error(O(200));return av(e,t,null,n)};ot.createRoot=function(e,t){if(!Uc(e))throw Error(O(299));var n=!1,r="",i=vg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Fc(e,1,!1,null,null,n,!1,r,i),e[Xt]=t.current,el(e.nodeType===8?e.parentNode:e),new Bc(t)};ot.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(O(188)):(e=Object.keys(e).join(","),Error(O(268,e)));return e=Bp(t),e=e===null?null:e.stateNode,e};ot.flushSync=function(e){return tr(e)};ot.hydrate=function(e,t,n){if(!go(t))throw Error(O(200));return yo(null,e,t,!0,n)};ot.hydrateRoot=function(e,t,n){if(!Uc(e))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,i=!1,l="",s=vg;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=xg(t,null,e,1,n??null,i,!1,l,s),e[Xt]=t.current,el(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new mo(t)};ot.render=function(e,t,n){if(!go(t))throw Error(O(200));return yo(null,e,t,!1,n)};ot.unmountComponentAtNode=function(e){if(!go(e))throw Error(O(40));return e._reactRootContainer?(tr(function(){yo(null,null,e,!1,function(){e._reactRootContainer=null,e[Xt]=null})}),!0):!1};ot.unstable_batchedUpdates=Rc;ot.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!go(n))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return yo(e,t,n,!1,r)};ot.version="18.3.1-next-f1338f8080-20240426";function wg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wg)}catch(e){console.error(e)}}wg(),wp.exports=ot;var hv=wp.exports,$d=hv;Oa.createRoot=$d.createRoot,Oa.hydrateRoot=$d.hydrateRoot;/**
|
|
41
|
+
* @remix-run/router v1.23.1
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/function ul(){return ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ul.apply(this,arguments)}var mn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(mn||(mn={}));const Bd="popstate";function pv(e){e===void 0&&(e={});function t(r,i){let{pathname:l,search:s,hash:o}=r.location;return ju("",{pathname:l,search:s,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Ws(i)}return gv(t,n,null,e)}function Se(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Vc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function mv(){return Math.random().toString(36).substr(2,8)}function Ud(e,t){return{usr:e.state,key:e.key,idx:t}}function ju(e,t,n,r){return n===void 0&&(n=null),ul({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ii(t):t,{state:n,key:t&&t.key||r||mv()})}function Ws(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ii(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function gv(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:l=!1}=r,s=i.history,o=mn.Pop,a=null,u=f();u==null&&(u=0,s.replaceState(ul({},s.state,{idx:u}),""));function f(){return(s.state||{idx:null}).idx}function c(){o=mn.Pop;let w=f(),m=w==null?null:w-u;u=w,a&&a({action:o,location:g.location,delta:m})}function p(w,m){o=mn.Push;let x=ju(g.location,w,m);u=f()+1;let v=Ud(x,u),C=g.createHref(x);try{s.pushState(v,"",C)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(C)}l&&a&&a({action:o,location:g.location,delta:1})}function h(w,m){o=mn.Replace;let x=ju(g.location,w,m);u=f();let v=Ud(x,u),C=g.createHref(x);s.replaceState(v,"",C),l&&a&&a({action:o,location:g.location,delta:0})}function y(w){let m=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof w=="string"?w:Ws(w);return x=x.replace(/ $/,"%20"),Se(m,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,m)}let g={get action(){return o},get location(){return e(i,s)},listen(w){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(Bd,c),a=w,()=>{i.removeEventListener(Bd,c),a=null}},createHref(w){return t(i,w)},createURL:y,encodeLocation(w){let m=y(w);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:h,go(w){return s.go(w)}};return g}var Vd;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Vd||(Vd={}));function yv(e,t,n){return n===void 0&&(n="/"),xv(e,t,n)}function xv(e,t,n,r){let i=typeof t=="string"?ii(t):t,l=Hc(i.pathname||"/",n);if(l==null)return null;let s=kg(e);vv(s);let o=null;for(let a=0;o==null&&a<s.length;++a){let u=Pv(l);o=Tv(s[a],u)}return o}function kg(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(l,s,o)=>{let a={relativePath:o===void 0?l.path||"":o,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};a.relativePath.startsWith("/")&&(Se(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=Nn([r,a.relativePath]),f=n.concat(a);l.children&&l.children.length>0&&(Se(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),kg(l.children,t,f,u)),!(l.path==null&&!l.index)&&t.push({path:u,score:Ev(u,l.index),routesMeta:f})};return e.forEach((l,s)=>{var o;if(l.path===""||!((o=l.path)!=null&&o.includes("?")))i(l,s);else for(let a of bg(l.path))i(l,s,a)}),t}function bg(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return i?[l,""]:[l];let s=bg(r.join("/")),o=[];return o.push(...s.map(a=>a===""?l:[l,a].join("/"))),i&&o.push(...s),o.map(a=>e.startsWith("/")&&a===""?"/":a)}function vv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:jv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const wv=/^:[\w-]+$/,kv=3,bv=2,Sv=1,Nv=10,Cv=-2,Hd=e=>e==="*";function Ev(e,t){let n=e.split("/"),r=n.length;return n.some(Hd)&&(r+=Cv),t&&(r+=bv),n.filter(i=>!Hd(i)).reduce((i,l)=>i+(wv.test(l)?kv:l===""?Sv:Nv),r)}function jv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Tv(e,t,n){let{routesMeta:r}=e,i={},l="/",s=[];for(let o=0;o<r.length;++o){let a=r[o],u=o===r.length-1,f=l==="/"?t:t.slice(l.length)||"/",c=Iv({path:a.relativePath,caseSensitive:a.caseSensitive,end:u},f),p=a.route;if(!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:Nn([l,c.pathname]),pathnameBase:Dv(Nn([l,c.pathnameBase])),route:p}),c.pathnameBase!=="/"&&(l=Nn([l,c.pathnameBase]))}return s}function Iv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Lv(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let l=i[0],s=l.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:r.reduce((u,f,c)=>{let{paramName:p,isOptional:h}=f;if(p==="*"){let g=o[c]||"";s=l.slice(0,l.length-g.length).replace(/(.)\/+$/,"$1")}const y=o[c];return h&&!y?u[p]=void 0:u[p]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:l,pathnameBase:s,pattern:e}}function Lv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Vc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,a)=>(r.push({paramName:o,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Pv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Vc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Hc(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const _v=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Av=e=>_v.test(e);function Ov(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ii(e):e,l;if(n)if(Av(n))l=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),Vc(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+n))}n.startsWith("/")?l=Kd(n.substring(1),"/"):l=Kd(n,t)}else l=t;return{pathname:l,search:Mv(r),hash:zv(i)}}function Kd(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function fa(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Rv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Sg(e,t){let n=Rv(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ng(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ii(e):(i=ul({},e),Se(!i.pathname||!i.pathname.includes("?"),fa("?","pathname","search",i)),Se(!i.pathname||!i.pathname.includes("#"),fa("#","pathname","hash",i)),Se(!i.search||!i.search.includes("#"),fa("#","search","hash",i)));let l=e===""||i.pathname==="",s=l?"/":i.pathname,o;if(s==null)o=n;else{let c=t.length-1;if(!r&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),c-=1;i.pathname=p.join("/")}o=c>=0?t[c]:"/"}let a=Ov(i,o),u=s&&s!=="/"&&s.endsWith("/"),f=(l||s===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||f)&&(a.pathname+="/"),a}const Nn=e=>e.join("/").replace(/\/\/+/g,"/"),Dv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Mv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,zv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Fv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Cg=["post","put","patch","delete"];new Set(Cg);const $v=["get",...Cg];new Set($v);/**
|
|
50
|
+
* React Router v6.30.2
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/function cl(){return cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cl.apply(this,arguments)}const Kc=L.createContext(null),Bv=L.createContext(null),sr=L.createContext(null),xo=L.createContext(null),_n=L.createContext({outlet:null,matches:[],isDataRoute:!1}),Eg=L.createContext(null);function Uv(e,t){let{relative:n}=t===void 0?{}:t;kl()||Se(!1);let{basename:r,navigator:i}=L.useContext(sr),{hash:l,pathname:s,search:o}=Tg(e,{relative:n}),a=s;return r!=="/"&&(a=s==="/"?r:Nn([r,s])),i.createHref({pathname:a,search:o,hash:l})}function kl(){return L.useContext(xo)!=null}function bl(){return kl()||Se(!1),L.useContext(xo).location}function jg(e){L.useContext(sr).static||L.useLayoutEffect(e)}function Vv(){let{isDataRoute:e}=L.useContext(_n);return e?rw():Hv()}function Hv(){kl()||Se(!1);let e=L.useContext(Kc),{basename:t,future:n,navigator:r}=L.useContext(sr),{matches:i}=L.useContext(_n),{pathname:l}=bl(),s=JSON.stringify(Sg(i,n.v7_relativeSplatPath)),o=L.useRef(!1);return jg(()=>{o.current=!0}),L.useCallback(function(u,f){if(f===void 0&&(f={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let c=Ng(u,JSON.parse(s),l,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Nn([t,c.pathname])),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,s,l,e])}function Kv(){let{matches:e}=L.useContext(_n),t=e[e.length-1];return t?t.params:{}}function Tg(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=L.useContext(sr),{matches:i}=L.useContext(_n),{pathname:l}=bl(),s=JSON.stringify(Sg(i,r.v7_relativeSplatPath));return L.useMemo(()=>Ng(e,JSON.parse(s),l,n==="path"),[e,s,l,n])}function Wv(e,t){return qv(e,t)}function qv(e,t,n,r){kl()||Se(!1);let{navigator:i}=L.useContext(sr),{matches:l}=L.useContext(_n),s=l[l.length-1],o=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let u=bl(),f;if(t){var c;let w=typeof t=="string"?ii(t):t;a==="/"||(c=w.pathname)!=null&&c.startsWith(a)||Se(!1),f=w}else f=u;let p=f.pathname||"/",h=p;if(a!=="/"){let w=a.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=yv(e,{pathname:h}),g=Xv(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:Nn([a,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?a:Nn([a,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),l,n,r);return t&&g?L.createElement(xo.Provider,{value:{location:cl({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:mn.Pop}},g):g}function Qv(){let e=nw(),t=Fv(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},t),n?L.createElement("pre",{style:i},n):null,null)}const Yv=L.createElement(Qv,null);class Jv extends L.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?L.createElement(_n.Provider,{value:this.props.routeContext},L.createElement(Eg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Gv(e){let{routeContext:t,match:n,children:r}=e,i=L.useContext(Kc);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),L.createElement(_n.Provider,{value:t},r)}function Xv(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var l;if(!n)return null;if(n.errors)e=n.matches;else if((l=r)!=null&&l.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,o=(i=n)==null?void 0:i.errors;if(o!=null){let f=s.findIndex(c=>c.route.id&&(o==null?void 0:o[c.route.id])!==void 0);f>=0||Se(!1),s=s.slice(0,Math.min(s.length,f+1))}let a=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<s.length;f++){let c=s[f];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=f),c.route.id){let{loaderData:p,errors:h}=n,y=c.route.loader&&p[c.route.id]===void 0&&(!h||h[c.route.id]===void 0);if(c.route.lazy||y){a=!0,u>=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((f,c,p)=>{let h,y=!1,g=null,w=null;n&&(h=o&&c.route.id?o[c.route.id]:void 0,g=c.route.errorElement||Yv,a&&(u<0&&p===0?(iw("route-fallback"),y=!0,w=null):u===p&&(y=!0,w=c.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,p+1)),x=()=>{let v;return h?v=g:y?v=w:c.route.Component?v=L.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=f,L.createElement(Gv,{match:c,routeContext:{outlet:f,matches:m,isDataRoute:n!=null},children:v})};return n&&(c.route.ErrorBoundary||c.route.errorElement||p===0)?L.createElement(Jv,{location:n.location,revalidation:n.revalidation,component:g,error:h,children:x(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):x()},null)}var Ig=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Ig||{}),Lg=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Lg||{});function Zv(e){let t=L.useContext(Kc);return t||Se(!1),t}function ew(e){let t=L.useContext(Bv);return t||Se(!1),t}function tw(e){let t=L.useContext(_n);return t||Se(!1),t}function Pg(e){let t=tw(),n=t.matches[t.matches.length-1];return n.route.id||Se(!1),n.route.id}function nw(){var e;let t=L.useContext(Eg),n=ew(),r=Pg();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function rw(){let{router:e}=Zv(Ig.UseNavigateStable),t=Pg(Lg.UseNavigateStable),n=L.useRef(!1);return jg(()=>{n.current=!0}),L.useCallback(function(i,l){l===void 0&&(l={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,cl({fromRouteId:t},l)))},[e,t])}const Wd={};function iw(e,t,n){Wd[e]||(Wd[e]=!0)}function lw(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function on(e){Se(!1)}function sw(e){let{basename:t="/",children:n=null,location:r,navigationType:i=mn.Pop,navigator:l,static:s=!1,future:o}=e;kl()&&Se(!1);let a=t.replace(/^\/*/,"/"),u=L.useMemo(()=>({basename:a,navigator:l,static:s,future:cl({v7_relativeSplatPath:!1},o)}),[a,o,l,s]);typeof r=="string"&&(r=ii(r));let{pathname:f="/",search:c="",hash:p="",state:h=null,key:y="default"}=r,g=L.useMemo(()=>{let w=Hc(f,a);return w==null?null:{location:{pathname:w,search:c,hash:p,state:h,key:y},navigationType:i}},[a,f,c,p,h,y,i]);return g==null?null:L.createElement(sr.Provider,{value:u},L.createElement(xo.Provider,{children:n,value:g}))}function ow(e){let{children:t,location:n}=e;return Wv(Tu(t),n)}new Promise(()=>{});function Tu(e,t){t===void 0&&(t=[]);let n=[];return L.Children.forEach(e,(r,i)=>{if(!L.isValidElement(r))return;let l=[...t,i];if(r.type===L.Fragment){n.push.apply(n,Tu(r.props.children,l));return}r.type!==on&&Se(!1),!r.props.index||!r.props.children||Se(!1);let s={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Tu(r.props.children,l)),n.push(s)}),n}/**
|
|
59
|
+
* React Router DOM v6.30.2
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Remix Software Inc.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
+
*
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/function Iu(){return Iu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Iu.apply(this,arguments)}function aw(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,l;for(l=0;l<r.length;l++)i=r[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function uw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function cw(e,t){return e.button===0&&(!t||t==="_self")&&!uw(e)}const fw=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],dw="6";try{window.__reactRouterVersion=dw}catch{}const hw="startTransition",qd=nx[hw];function pw(e){let{basename:t,children:n,future:r,window:i}=e,l=L.useRef();l.current==null&&(l.current=pv({window:i,v5Compat:!0}));let s=l.current,[o,a]=L.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},f=L.useCallback(c=>{u&&qd?qd(()=>a(c)):a(c)},[a,u]);return L.useLayoutEffect(()=>s.listen(f),[s,f]),L.useEffect(()=>lw(r),[r]),L.createElement(sw,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:s,future:r})}const mw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yt=L.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:l,replace:s,state:o,target:a,to:u,preventScrollReset:f,viewTransition:c}=t,p=aw(t,fw),{basename:h}=L.useContext(sr),y,g=!1;if(typeof u=="string"&&gw.test(u)&&(y=u,mw))try{let v=new URL(window.location.href),C=u.startsWith("//")?new URL(v.protocol+u):new URL(u),E=Hc(C.pathname,h);C.origin===v.origin&&E!=null?u=E+C.search+C.hash:g=!0}catch{}let w=Uv(u,{relative:i}),m=yw(u,{replace:s,state:o,target:a,preventScrollReset:f,relative:i,viewTransition:c});function x(v){r&&r(v),v.defaultPrevented||m(v)}return L.createElement("a",Iu({},p,{href:y||w,onClick:g||l?r:x,ref:n,target:a}))});var Qd;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Qd||(Qd={}));var Yd;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Yd||(Yd={}));function yw(e,t){let{target:n,replace:r,state:i,preventScrollReset:l,relative:s,viewTransition:o}=t===void 0?{}:t,a=Vv(),u=bl(),f=Tg(e,{relative:s});return L.useCallback(c=>{if(cw(c,n)){c.preventDefault();let p=r!==void 0?r:Ws(u)===Ws(f);a(e,{replace:p,state:i,preventScrollReset:l,relative:s,viewTransition:o})}},[u,a,f,r,i,n,e,l,s,o])}function An(){const[e,t]=L.useState(!1),[n,r]=L.useState(null),i=L.useRef(null),l=L.useRef(null),s=L.useCallback(()=>{const u=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,f=new WebSocket(u);f.onopen=()=>{console.log("WebSocket connected"),t(!0)},f.onmessage=c=>{try{const p=JSON.parse(c.data);r(p),console.log("WebSocket message:",p)}catch(p){console.error("Failed to parse WebSocket message:",p)}},f.onclose=()=>{console.log("WebSocket disconnected"),t(!1),i.current=null,l.current=setTimeout(()=>{console.log("Attempting to reconnect..."),s()},3e3)},f.onerror=c=>{console.error("WebSocket error:",c)},i.current=f},[]);L.useEffect(()=>(s(),()=>{l.current&&clearTimeout(l.current),i.current&&i.current.close()}),[s]);const o=L.useCallback(a=>{i.current&&i.current.readyState===WebSocket.OPEN&&i.current.send(JSON.stringify(a))},[]);return{connected:e,lastMessage:n,send:o}}const xw="/api";async function Z(e,t){const n=await fetch(`${xw}${e}`,{...t,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}});if(!n.ok){const r=await n.json().catch(()=>({error:"Unknown error"}));throw new Error(r.error||`HTTP ${n.status}`)}return n.json()}const Ht={list:(e=!1)=>Z(`/changes?includeArchived=${e}`),get:e=>Z(`/changes/${e}`),validate:(e,t=!1)=>Z(`/changes/${e}/validate`,{method:"POST",body:JSON.stringify({strict:t})}),archive:(e,t=!1)=>Z(`/changes/${e}/archive`,{method:"POST",body:JSON.stringify({skipSpecs:t})}),getReviews:e=>Z(`/changes/${e}/reviews`),addReview:(e,t,n,r,i)=>Z(`/changes/${e}/reviews`,{method:"POST",body:JSON.stringify({targetType:t,body:n,type:r,...i})}),resolveReview:(e,t,n,r="resolved")=>Z(`/changes/${e}/reviews/${t}`,{method:"PATCH",body:JSON.stringify({targetType:n,status:r})}),getCrossServiceInfo:e=>Z(`/changes/${e}/cross-service`),getCrossServiceDoc:(e,t)=>Z(`/changes/${e}/cross-service/${encodeURIComponent(t)}`),getSpecs:e=>Z(`/changes/${e}/specs`)},Bn={list:()=>Z("/specs"),get:e=>Z(`/specs/${e}`),validate:(e,t=!1)=>Z(`/specs/${e}/validate`,{method:"POST",body:JSON.stringify({strict:t})}),listReviews:(e,t,n)=>{const r=new URLSearchParams;t&&r.append("status",t),n&&r.append("type",n);const i=r.toString()?`?${r.toString()}`:"";return Z(`/specs/${e}/reviews${i}`)},addReview:(e,t,n,r)=>Z(`/specs/${e}/reviews`,{method:"POST",body:JSON.stringify({body:t,type:n,...r})}),resolveReview:(e,t,n="resolved")=>Z(`/specs/${e}/reviews/${t}`,{method:"PATCH",body:JSON.stringify({status:n})}),getDependencies:()=>Z("/specs/dependencies")},Li={get:e=>Z(`/changes/${e}/tasks`),update:(e,t,n)=>Z(`/changes/${e}/tasks/${t}`,{method:"PATCH",body:JSON.stringify({status:n})}),getProgress:()=>Z("/progress")},Pi={list:()=>Z("/approvals"),listPending:()=>Z("/approvals/pending"),get:e=>Z(`/approvals/${e}`),request:(e,t,n)=>Z(`/approvals/${e}/request`,{method:"POST",body:JSON.stringify({requestedBy:t,reviewers:n})}),approve:(e,t,n)=>Z(`/approvals/${e}/approve`,{method:"POST",body:JSON.stringify({approver:t,comment:n})}),reject:(e,t,n)=>Z(`/approvals/${e}/reject`,{method:"POST",body:JSON.stringify({rejector:t,reason:n})})},vw={get:()=>Z("/project")},Jd={get:()=>Z("/kanban"),getSummary:()=>Z("/kanban/summary"),moveCard:(e,t,n)=>Z(`/kanban/${e}/move`,{method:"PUT",body:JSON.stringify({toColumn:t,note:n})})},ww={analyze:(e=!1)=>Z(`/context/analyze${e?"?refresh=true":""}`),getSummary:()=>Z("/context/summary")};function kw(){const{lastMessage:e}=An(),[t,n]=L.useState({changes:0,specs:0,pendingApprovals:0,overallProgress:0}),[r,i]=L.useState([]),[l,s]=L.useState(!0),o=L.useCallback(async()=>{try{const[a,u,f,c]=await Promise.all([Ht.list(),Bn.list(),Li.getProgress(),Pi.listPending()]);n({changes:a.changes.length,specs:u.specs.length,pendingApprovals:c.approvals.length,overallProgress:f.overall.percentage}),i(a.changes.slice(0,5))}catch(a){console.error("Failed to fetch dashboard data:",a)}},[]);return L.useEffect(()=>{o().finally(()=>s(!1))},[o]),L.useEffect(()=>{if(!e)return;const{event:a}=e;["change:archived","tasks:updated","task:updated","change:content_updated","approval:requested","approval:approved","approval:rejected"].includes(a)&&o()},[e,o]),l?d.jsx("div",{className:"flex justify-center items-center h-96",children:d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-indigo-600"}),d.jsx("div",{className:"absolute top-0 left-0 h-12 w-12 rounded-full border-t-2 border-indigo-100 opacity-30 animate-pulse"})]})}):d.jsxs("div",{className:"space-y-8 animate-fade-in",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-3xl font-bold text-gray-900 tracking-tight",children:"Overview"}),d.jsx("p",{className:"mt-1 text-gray-500",children:"Track your project specifications and progress."})]}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[d.jsx(ql,{title:"Active Changes",value:t.changes,icon:d.jsx(bw,{}),link:"/changes",color:"blue",trend:"Updates pending"}),d.jsx(ql,{title:"Specifications",value:t.specs,icon:d.jsx(Gd,{}),link:"/specs",color:"indigo",trend:"Project documentation"}),d.jsx(ql,{title:"Pending Approvals",value:t.pendingApprovals,icon:d.jsx(Sw,{}),link:"/approvals",color:"amber",trend:"Requires attention",highlight:t.pendingApprovals>0}),d.jsx(ql,{title:"Overall Progress",value:`${t.overallProgress}%`,icon:d.jsx(Nw,{}),color:"emerald",trend:"Completion rate"})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[d.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:"Recent Changes"}),d.jsxs(Yt,{to:"/changes",className:"group flex items-center text-sm font-medium text-indigo-600 hover:text-indigo-800 transition-colors",children:["View all",d.jsx("span",{className:"ml-1 group-hover:translate-x-0.5 transition-transform",children:"→"})]})]}),d.jsx("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden",children:r.length===0?d.jsxs("div",{className:"p-8 text-center",children:[d.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-full bg-gray-100 mb-4",children:d.jsx(Cw,{className:"w-6 h-6 text-gray-400"})}),d.jsx("p",{className:"text-gray-500",children:"No recent changes found."})]}):d.jsx("div",{className:"divide-y divide-gray-50",children:r.map(a=>d.jsx(Yt,{to:`/changes/${a.id}`,className:"block p-5 hover:bg-gray-50 transition-colors duration-150",children:d.jsxs("div",{className:"flex justify-between items-start",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsx("h4",{className:"font-semibold text-gray-900 group-hover:text-indigo-600 transition-colors",children:a.title}),d.jsxs("div",{className:"flex items-center space-x-2 text-xs text-gray-500 font-mono",children:[d.jsx("span",{className:"px-1.5 py-0.5 rounded bg-gray-100 text-gray-600",children:a.id}),d.jsx("span",{children:"•"}),d.jsx("span",{children:"Updated recently"})]})]}),d.jsxs("div",{className:"flex flex-col items-end min-w-[100px]",children:[d.jsxs("div",{className:"text-xs font-medium text-gray-500 mb-1.5",children:[a.tasksCompleted," / ",a.tasksTotal," tasks"]}),d.jsx("div",{className:"w-28 h-1.5 bg-gray-100 rounded-full overflow-hidden",children:d.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${a.tasksCompleted===a.tasksTotal?"bg-emerald-500":"bg-indigo-500"}`,style:{width:`${a.tasksTotal>0?a.tasksCompleted/a.tasksTotal*100:0}%`}})})]})]})},a.id))})})]}),d.jsxs("div",{className:"space-y-6",children:[d.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:"Quick Actions"}),d.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-5 space-y-3",children:[d.jsxs("div",{className:"flex items-center p-3 rounded-lg border border-dashed border-gray-200 bg-gray-50",children:[d.jsx("div",{className:"p-2 rounded-md bg-blue-50 text-blue-600",children:d.jsx(Ew,{className:"w-5 h-5"})}),d.jsxs("div",{className:"ml-3",children:[d.jsx("span",{className:"font-medium text-gray-600 text-sm",children:"Create Change"}),d.jsxs("p",{className:"text-xs text-gray-400 mt-0.5",children:["Use ",d.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"openspec_create_change"})]})]})]}),d.jsxs(Yt,{to:"/specs",className:"flex items-center p-3 rounded-lg border border-gray-100 hover:border-indigo-100 hover:bg-indigo-50 transition-all group",children:[d.jsx("div",{className:"p-2 rounded-md bg-purple-50 text-purple-600 group-hover:bg-white group-hover:scale-110 transition-all",children:d.jsx(Gd,{className:"w-5 h-5"})}),d.jsx("span",{className:"ml-3 font-medium text-gray-700 group-hover:text-purple-700",children:"Browse Specs"})]})]}),d.jsxs("div",{className:"bg-gradient-to-br from-indigo-500 to-purple-600 rounded-xl p-6 text-white shadow-lg",children:[d.jsx("h4",{className:"font-bold text-lg mb-2",children:"Pro Tip"}),d.jsx("p",{className:"text-indigo-100 text-sm opacity-90",children:"Review pending approvals to unblock your team's progress."})]})]})]})]})}function ql({title:e,value:t,icon:n,link:r,color:i,trend:l,highlight:s=!1}){const a={blue:{icon:"text-blue-600 bg-blue-50",border:"hover:border-blue-200"},indigo:{icon:"text-indigo-600 bg-indigo-50",border:"hover:border-indigo-200"},amber:{icon:"text-amber-600 bg-amber-50",border:"hover:border-amber-200"},emerald:{icon:"text-emerald-600 bg-emerald-50",border:"hover:border-emerald-200"}}[i],u=d.jsxs("div",{className:`
|
|
68
|
+
relative p-6 rounded-xl bg-white border border-gray-100 shadow-sm transition-all duration-300
|
|
69
|
+
${r?"hover:-translate-y-1 hover:shadow-md "+a.border:""}
|
|
70
|
+
${s?"ring-2 ring-amber-100":""}
|
|
71
|
+
`,children:[d.jsxs("div",{className:"flex justify-between items-start",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-gray-500",children:e}),d.jsx("p",{className:"text-3xl font-bold text-gray-900 mt-2 tracking-tight",children:t})]}),d.jsx("div",{className:`p-3 rounded-lg ${a.icon}`,children:n})]}),l&&d.jsx("div",{className:"mt-4 flex items-center text-xs text-gray-400 font-medium",children:l})]});return r?d.jsx(Yt,{to:r,className:"block",children:u}):u}function bw({className:e="w-6 h-6"}){return d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("circle",{cx:"18",cy:"18",r:"3"}),d.jsx("circle",{cx:"6",cy:"6",r:"3"}),d.jsx("path",{d:"M13 6h3a2 2 0 0 1 2 2v7"}),d.jsx("line",{x1:"6",y1:"9",x2:"6",y2:"21"})]})}function Gd({className:e="w-6 h-6"}){return d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"}),d.jsx("polyline",{points:"14 2 14 8 20 8"}),d.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),d.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),d.jsx("line",{x1:"10",y1:"9",x2:"8",y2:"9"})]})}function Sw({className:e="w-6 h-6"}){return d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),d.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]})}function Nw({className:e="w-6 h-6"}){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:d.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})})}function Cw({className:e="w-6 h-6"}){return d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),d.jsx("path",{d:"M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"})]})}function Ew({className:e="w-6 h-6"}){return d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),d.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function jw(){const{lastMessage:e}=An(),[t,n]=L.useState([]),[r,i]=L.useState(!0),[l,s]=L.useState(!1),o=async()=>{try{const a=await Ht.list(l);n(a.changes)}catch(a){console.error("Failed to fetch changes:",a)}};return L.useEffect(()=>{i(!0),o().finally(()=>i(!1))},[l]),L.useEffect(()=>{if(!e)return;const{event:a}=e;["change:archived","tasks:updated","task:updated","change:content_updated"].includes(a)&&o()},[e]),r?d.jsx("div",{className:"flex justify-center items-center h-64",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Changes"}),d.jsxs("label",{className:"flex items-center space-x-2 text-sm",children:[d.jsx("input",{type:"checkbox",checked:l,onChange:a=>s(a.target.checked),className:"rounded border-gray-300"}),d.jsx("span",{children:"Include archived"})]})]}),t.length===0?d.jsx("div",{className:"bg-white rounded-lg shadow p-8 text-center text-gray-500",children:"No changes found."}):d.jsx("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:d.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[d.jsx("thead",{className:"bg-gray-50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Change"}),d.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),d.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Progress"}),d.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Updated"})]})}),d.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:t.map(a=>d.jsxs("tr",{className:"hover:bg-gray-50",children:[d.jsx("td",{className:"px-6 py-4",children:d.jsxs(Yt,{to:`/changes/${a.id}`,className:"text-blue-600 hover:text-blue-800",children:[d.jsx("div",{className:"font-medium",children:a.title}),d.jsx("div",{className:"text-sm text-gray-500",children:a.id})]})}),d.jsx("td",{className:"px-6 py-4",children:d.jsx("span",{className:`status-badge ${a.status==="active"?"status-implementing":"status-completed"}`,children:a.status})}),d.jsx("td",{className:"px-6 py-4",children:d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx("div",{className:"w-24 h-2 bg-gray-200 rounded-full",children:d.jsx("div",{className:"h-full bg-blue-500 rounded-full",style:{width:`${a.tasksTotal>0?a.tasksCompleted/a.tasksTotal*100:0}%`}})}),d.jsxs("span",{className:"text-sm text-gray-600",children:[a.tasksCompleted,"/",a.tasksTotal]})]})}),d.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:new Date(a.updatedAt).toLocaleDateString()})]},a.id))})]})})]})}function Tw(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Iw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pw={};function Xd(e,t){return(Pw.jsx?Lw:Iw).test(e)}const _w=/[ \t\n\f\r]/g;function Aw(e){return typeof e=="object"?e.type==="text"?Zd(e.value):!1:Zd(e)}function Zd(e){return e.replace(_w,"")===""}let Sl=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Sl.prototype.normal={};Sl.prototype.property={};Sl.prototype.space=void 0;function _g(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Sl(n,r,t)}function Lu(e){return e.toLowerCase()}class Xe{constructor(t,n){this.attribute=n,this.property=t}}Xe.prototype.attribute="";Xe.prototype.booleanish=!1;Xe.prototype.boolean=!1;Xe.prototype.commaOrSpaceSeparated=!1;Xe.prototype.commaSeparated=!1;Xe.prototype.defined=!1;Xe.prototype.mustUseProperty=!1;Xe.prototype.number=!1;Xe.prototype.overloadedBoolean=!1;Xe.prototype.property="";Xe.prototype.spaceSeparated=!1;Xe.prototype.space=void 0;let Ow=0;const W=or(),ke=or(),Pu=or(),R=or(),le=or(),Ur=or(),et=or();function or(){return 2**++Ow}const _u=Object.freeze(Object.defineProperty({__proto__:null,boolean:W,booleanish:ke,commaOrSpaceSeparated:et,commaSeparated:Ur,number:R,overloadedBoolean:Pu,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),da=Object.keys(_u);class Wc extends Xe{constructor(t,n,r,i){let l=-1;if(super(t,n),eh(this,"space",i),typeof r=="number")for(;++l<da.length;){const s=da[l];eh(this,da[l],(r&_u[s])===_u[s])}}}Wc.prototype.defined=!0;function eh(e,t,n){n&&(e[t]=n)}function li(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new Wc(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[Lu(r)]=r,n[Lu(l.attribute)]=r}return new Sl(t,n,e.space)}const Ag=li({properties:{ariaActiveDescendant:null,ariaAtomic:ke,ariaAutoComplete:null,ariaBusy:ke,ariaChecked:ke,ariaColCount:R,ariaColIndex:R,ariaColSpan:R,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:ke,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:ke,ariaFlowTo:le,ariaGrabbed:ke,ariaHasPopup:null,ariaHidden:ke,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:R,ariaLive:null,ariaModal:ke,ariaMultiLine:ke,ariaMultiSelectable:ke,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:R,ariaPressed:ke,ariaReadOnly:ke,ariaRelevant:null,ariaRequired:ke,ariaRoleDescription:le,ariaRowCount:R,ariaRowIndex:R,ariaRowSpan:R,ariaSelected:ke,ariaSetSize:R,ariaSort:null,ariaValueMax:R,ariaValueMin:R,ariaValueNow:R,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Og(e,t){return t in e?e[t]:t}function Rg(e,t){return Og(e,t.toLowerCase())}const Rw=li({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ur,acceptCharset:le,accessKey:le,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:le,autoFocus:W,autoPlay:W,blocking:le,capture:null,charSet:null,checked:W,cite:null,className:le,cols:R,colSpan:null,content:null,contentEditable:ke,controls:W,controlsList:le,coords:R|Ur,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:Pu,draggable:ke,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:le,height:R,hidden:Pu,high:R,href:null,hrefLang:null,htmlFor:le,httpEquiv:le,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:le,itemRef:le,itemScope:W,itemType:le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:R,manifest:null,max:null,maxLength:R,media:null,method:null,min:null,minLength:R,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:W,optimum:R,pattern:null,ping:le,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:le,required:W,reversed:W,rows:R,rowSpan:R,sandbox:le,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shape:null,size:R,sizes:null,slot:null,span:R,spellCheck:ke,src:null,srcDoc:null,srcLang:null,srcSet:null,start:R,step:null,style:null,tabIndex:R,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:ke,width:R,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:le,axis:null,background:null,bgColor:null,border:R,borderColor:null,bottomMargin:R,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:R,leftMargin:R,link:null,longDesc:null,lowSrc:null,marginHeight:R,marginWidth:R,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:R,rules:null,scheme:null,scrolling:ke,standby:null,summary:null,text:null,topMargin:R,valueType:null,version:null,vAlign:null,vLink:null,vSpace:R,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:W,disableRemotePlayback:W,prefix:null,property:null,results:R,security:null,unselectable:null},space:"html",transform:Rg}),Dw=li({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:et,accentHeight:R,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:R,amplitude:R,arabicForm:null,ascent:R,attributeName:null,attributeType:null,azimuth:R,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:R,by:null,calcMode:null,capHeight:R,className:le,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:R,diffuseConstant:R,direction:null,display:null,dur:null,divisor:R,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:R,enableBackground:null,end:null,event:null,exponent:R,externalResourcesRequired:null,fill:null,fillOpacity:R,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ur,g2:Ur,glyphName:Ur,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:R,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:R,horizOriginX:R,horizOriginY:R,id:null,ideographic:R,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:R,k:R,k1:R,k2:R,k3:R,k4:R,kernelMatrix:et,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:R,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:R,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:R,overlineThickness:R,paintOrder:null,panose1:null,path:null,pathLength:R,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:R,pointsAtY:R,pointsAtZ:R,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:et,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:et,rev:et,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:et,requiredFeatures:et,requiredFonts:et,requiredFormats:et,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:R,specularExponent:R,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:R,strikethroughThickness:R,string:null,stroke:null,strokeDashArray:et,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:R,strokeOpacity:R,strokeWidth:null,style:null,surfaceScale:R,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:et,tabIndex:R,tableValues:null,target:null,targetX:R,targetY:R,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:et,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:R,underlineThickness:R,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:R,values:null,vAlphabetic:R,vMathematical:R,vectorEffect:null,vHanging:R,vIdeographic:R,version:null,vertAdvY:R,vertOriginX:R,vertOriginY:R,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:R,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Og}),Dg=li({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Mg=li({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Rg}),zg=li({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Mw={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},zw=/[A-Z]/g,th=/-[a-z]/g,Fw=/^data[-\w.:]+$/i;function $w(e,t){const n=Lu(t);let r=t,i=Xe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Fw.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(th,Uw);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!th.test(l)){let s=l.replace(zw,Bw);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Wc}return new i(r,t)}function Bw(e){return"-"+e.toLowerCase()}function Uw(e){return e.charAt(1).toUpperCase()}const Vw=_g([Ag,Rw,Dg,Mg,zg],"html"),qc=_g([Ag,Dw,Dg,Mg,zg],"svg");function Hw(e){return e.join(" ").trim()}var Qc={},nh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Kw=/\n/g,Ww=/^\s*/,qw=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Qw=/^:\s*/,Yw=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Jw=/^[;\s]*/,Gw=/^\s+|\s+$/g,Xw=`
|
|
72
|
+
`,rh="/",ih="*",Un="",Zw="comment",ek="declaration";function tk(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var g=y.match(Kw);g&&(n+=g.length);var w=y.lastIndexOf(Xw);r=~w?y.length-w:r+y.length}function l(){var y={line:n,column:r};return function(g){return g.position=new s(y),u(),g}}function s(y){this.start=y,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function o(y){var g=new Error(t.source+":"+n+":"+r+": "+y);if(g.reason=y,g.filename=t.source,g.line=n,g.column=r,g.source=e,!t.silent)throw g}function a(y){var g=y.exec(e);if(g){var w=g[0];return i(w),e=e.slice(w.length),g}}function u(){a(Ww)}function f(y){var g;for(y=y||[];g=c();)g!==!1&&y.push(g);return y}function c(){var y=l();if(!(rh!=e.charAt(0)||ih!=e.charAt(1))){for(var g=2;Un!=e.charAt(g)&&(ih!=e.charAt(g)||rh!=e.charAt(g+1));)++g;if(g+=2,Un===e.charAt(g-1))return o("End of comment missing");var w=e.slice(2,g-2);return r+=2,i(w),e=e.slice(g),r+=2,y({type:Zw,comment:w})}}function p(){var y=l(),g=a(qw);if(g){if(c(),!a(Qw))return o("property missing ':'");var w=a(Yw),m=y({type:ek,property:lh(g[0].replace(nh,Un)),value:w?lh(w[0].replace(nh,Un)):Un});return a(Jw),m}}function h(){var y=[];f(y);for(var g;g=p();)g!==!1&&(y.push(g),f(y));return y}return u(),h()}function lh(e){return e?e.replace(Gw,Un):Un}var nk=tk,rk=ks&&ks.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qc,"__esModule",{value:!0});Qc.default=lk;const ik=rk(nk);function lk(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,ik.default)(e),i=typeof t=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:s,value:o}=l;i?t(s,o,l):o&&(n=n||{},n[s]=o)}),n}var vo={};Object.defineProperty(vo,"__esModule",{value:!0});vo.camelCase=void 0;var sk=/^--[a-zA-Z0-9_-]+$/,ok=/-([a-z])/g,ak=/^[^-]+$/,uk=/^-(webkit|moz|ms|o|khtml)-/,ck=/^-(ms)-/,fk=function(e){return!e||ak.test(e)||sk.test(e)},dk=function(e,t){return t.toUpperCase()},sh=function(e,t){return"".concat(t,"-")},hk=function(e,t){return t===void 0&&(t={}),fk(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(ck,sh):e=e.replace(uk,sh),e.replace(ok,dk))};vo.camelCase=hk;var pk=ks&&ks.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mk=pk(Qc),gk=vo;function Au(e,t){var n={};return!e||typeof e!="string"||(0,mk.default)(e,function(r,i){r&&i&&(n[(0,gk.camelCase)(r,t)]=i)}),n}Au.default=Au;var yk=Au;const xk=Qu(yk),Fg=$g("end"),Yc=$g("start");function $g(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function vk(e){const t=Yc(e),n=Fg(e);if(t&&n)return{start:t,end:n}}function Ui(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?oh(e.position):"start"in e||"end"in e?oh(e):"line"in e||"column"in e?Ou(e):""}function Ou(e){return ah(e&&e.line)+":"+ah(e&&e.column)}function oh(e){return Ou(e&&e.start)+"-"+Ou(e&&e.end)}function ah(e){return e&&typeof e=="number"?e:1}class ze extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},s=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(s=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?l.ruleId=r:(l.source=r.slice(0,a),l.ruleId=r.slice(a+1))}if(!l.place&&l.ancestors&&l.ancestors){const a=l.ancestors[l.ancestors.length-1];a&&(l.place=a.position)}const o=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Ui(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=s&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ze.prototype.file="";ze.prototype.name="";ze.prototype.reason="";ze.prototype.message="";ze.prototype.stack="";ze.prototype.column=void 0;ze.prototype.line=void 0;ze.prototype.ancestors=void 0;ze.prototype.cause=void 0;ze.prototype.fatal=void 0;ze.prototype.place=void 0;ze.prototype.ruleId=void 0;ze.prototype.source=void 0;const Jc={}.hasOwnProperty,wk=new Map,kk=/[A-Z]/g,bk=new Set(["table","tbody","thead","tfoot","tr"]),Sk=new Set(["td","th"]),Bg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Nk(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=_k(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Pk(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?qc:Vw,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Ug(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Ug(e,t,n){if(t.type==="element")return Ck(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ek(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Tk(e,t,n);if(t.type==="mdxjsEsm")return jk(e,t);if(t.type==="root")return Ik(e,t,n);if(t.type==="text")return Lk(e,t)}function Ck(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=qc,e.schema=i),e.ancestors.push(t);const l=Hg(e,t.tagName,!1),s=Ak(e,t);let o=Xc(e,t);return bk.has(t.tagName)&&(o=o.filter(function(a){return typeof a=="string"?!Aw(a):!0})),Vg(e,s,l,t),Gc(s,o),e.ancestors.pop(),e.schema=r,e.create(t,l,s,n)}function Ek(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}fl(e,t.position)}function jk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);fl(e,t.position)}function Tk(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=qc,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:Hg(e,t.name,!0),s=Ok(e,t),o=Xc(e,t);return Vg(e,s,l,t),Gc(s,o),e.ancestors.pop(),e.schema=r,e.create(t,l,s,n)}function Ik(e,t,n){const r={};return Gc(r,Xc(e,t)),e.create(t,e.Fragment,r,n)}function Lk(e,t){return t.value}function Vg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Gc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Pk(e,t,n){return r;function r(i,l,s,o){const u=Array.isArray(s.children)?n:t;return o?u(l,s,o):u(l,s)}}function _k(e,t){return n;function n(r,i,l,s){const o=Array.isArray(l.children),a=Yc(r);return t(i,l,s,o,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function Ak(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Jc.call(t.properties,i)){const l=Rk(e,i,t.properties[i]);if(l){const[s,o]=l;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&Sk.has(t.tagName)?r=o:n[s]=o}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Ok(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const s=l.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else fl(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,l=e.evaluater.evaluateExpression(o.expression)}else fl(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function Xc(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:wk;for(;++r<t.children.length;){const l=t.children[r];let s;if(e.passKeys){const a=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(a){const u=i.get(a)||0;s=a+"-"+u,i.set(a,u+1)}}const o=Ug(e,l,s);o!==void 0&&n.push(o)}return n}function Rk(e,t,n){const r=$w(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Tw(n):Hw(n)),r.property==="style"){let i=typeof n=="object"?n:Dk(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Mk(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Mw[r.property]||r.property:r.attribute,n]}}function Dk(e,t){try{return xk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ze("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Bg+"#cannot-parse-style-attribute",i}}function Hg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,s;for(;++l<i.length;){const o=Xd(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(l&&o.type==="Literal"),optional:!1}:o}r=s}else r=Xd(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Jc.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);fl(e)}function fl(e,t){const n=new ze("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Bg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Mk(e){const t={};let n;for(n in e)Jc.call(e,n)&&(t[zk(n)]=e[n]);return t}function zk(e){let t=e.replace(kk,Fk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Fk(e){return"-"+e.toLowerCase()}const ha={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},$k={};function Zc(e,t){const n=$k,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Kg(e,r,i)}function Kg(e,t,n){if(Bk(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return uh(e.children,t,n)}return Array.isArray(e)?uh(e,t,n):""}function uh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Kg(e[i],t,n);return r.join("")}function Bk(e){return!!(e&&typeof e=="object")}const ch=document.createElement("i");function ef(e){const t="&"+e+";";ch.innerHTML=t;const n=ch.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function lt(e,t,n,r){const i=e.length;let l=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);l<r.length;)s=r.slice(l,l+1e4),s.unshift(t,0),e.splice(...s),l+=1e4,t+=1e4}function ft(e,t){return e.length>0?(lt(e,e.length,0,t),e):t}const fh={}.hasOwnProperty;function Wg(e){const t={};let n=-1;for(;++n<e.length;)Uk(t,e[n]);return t}function Uk(e,t){let n;for(n in t){const i=(fh.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let s;if(l)for(s in l){fh.call(i,s)||(i[s]=[]);const o=l[s];Vk(i[s],Array.isArray(o)?o:o?[o]:[])}}}function Vk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);lt(e,0,0,r)}function qg(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function jt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Be=On(/[A-Za-z]/),Re=On(/[\dA-Za-z]/),Hk=On(/[#-'*+\--9=?A-Z^-~]/);function qs(e){return e!==null&&(e<32||e===127)}const Ru=On(/\d/),Kk=On(/[\dA-Fa-f]/),Wk=On(/[!-/:-@[-`{-~]/);function B(e){return e!==null&&e<-2}function re(e){return e!==null&&(e<0||e===32)}function q(e){return e===-2||e===-1||e===32}const wo=On(new RegExp("\\p{P}|\\p{S}","u")),nr=On(/\s/);function On(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function si(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let s="";if(l===37&&Re(e.charCodeAt(n+1))&&Re(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(s=String.fromCharCode(l));else if(l>55295&&l<57344){const o=e.charCodeAt(n+1);l<56320&&o>56319&&o<57344?(s=String.fromCharCode(l,o),i=1):s="�"}else s=String.fromCharCode(l);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function G(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return s;function s(a){return q(a)?(e.enter(n),o(a)):t(a)}function o(a){return q(a)&&l++<i?(e.consume(a),o):(e.exit(n),t(a))}}const qk={tokenize:Qk};function Qk(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),G(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),l(o)}function l(o){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return B(o)?(e.consume(o),e.exit("chunkText"),l):(e.consume(o),s)}}const Yk={tokenize:Jk},dh={tokenize:Gk};function Jk(e){const t=this,n=[];let r=0,i,l,s;return o;function o(v){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,a,u)(v)}return u(v)}function a(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const C=t.events.length;let E=C,b;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){b=t.events[E][1].end;break}m(r);let T=C;for(;T<t.events.length;)t.events[T][1].end={...b},T++;return lt(t.events,E+1,0,t.events.slice(C)),t.events.length=T,u(v)}return o(v)}function u(v){if(r===n.length){if(!i)return p(v);if(i.currentConstruct&&i.currentConstruct.concrete)return y(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(dh,f,c)(v)}function f(v){return i&&x(),m(r),p(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,y(v)}function p(v){return t.containerState={},e.attempt(dh,h,y)(v)}function h(v){return r++,n.push([t.currentConstruct,t.containerState]),p(v)}function y(v){if(v===null){i&&x(),m(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),g(v)}function g(v){if(v===null){w(e.exit("chunkFlow"),!0),m(0),e.consume(v);return}return B(v)?(e.consume(v),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(v),g)}function w(v,C){const E=t.sliceStream(v);if(C&&E.push(null),v.previous=l,l&&(l.next=v),l=v,i.defineSkip(v.start),i.write(E),t.parser.lazy[v.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<s&&(!i.events[b][1].end||i.events[b][1].end.offset>s))return;const T=t.events.length;let P=T,I,S;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(I){S=t.events[P][1].end;break}I=!0}for(m(r),b=T;b<t.events.length;)t.events[b][1].end={...S},b++;lt(t.events,P+1,0,t.events.slice(T)),t.events.length=b}}function m(v){let C=n.length;for(;C-- >v;){const E=n[C];t.containerState=E[1],E[0].exit.call(t,e)}n.length=v}function x(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Gk(e,t,n){return G(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Xr(e){if(e===null||re(e)||nr(e))return 1;if(wo(e))return 2}function ko(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const Du={name:"attention",resolveAll:Xk,tokenize:Zk};function Xk(e,t){let n=-1,r,i,l,s,o,a,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;a=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};hh(c,-a),hh(p,a),s={type:a>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},o={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},l={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[n][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ft(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=ft(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",l,t]]),u=ft(u,ko(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=ft(u,[["exit",l,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=ft(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,lt(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Zk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Xr(r);let l;return s;function s(a){return l=a,e.enter("attentionSequence"),o(a)}function o(a){if(a===l)return e.consume(a),o;const u=e.exit("attentionSequence"),f=Xr(a),c=!f||f===2&&i||n.includes(a),p=!i||i===2&&f||n.includes(r);return u._open=!!(l===42?c:c&&(i||!p)),u._close=!!(l===42?p:p&&(f||!c)),t(a)}}function hh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const eb={name:"autolink",tokenize:tb};function tb(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(h){return Be(h)?(e.consume(h),s):h===64?n(h):u(h)}function s(h){return h===43||h===45||h===46||Re(h)?(r=1,o(h)):u(h)}function o(h){return h===58?(e.consume(h),r=0,a):(h===43||h===45||h===46||Re(h))&&r++<32?(e.consume(h),o):(r=0,u(h))}function a(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||qs(h)?n(h):(e.consume(h),a)}function u(h){return h===64?(e.consume(h),f):Hk(h)?(e.consume(h),u):n(h)}function f(h){return Re(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||Re(h))&&r++<63){const y=h===45?p:c;return e.consume(h),y}return n(h)}}const Nl={partial:!0,tokenize:nb};function nb(e,t,n){return r;function r(l){return q(l)?G(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||B(l)?t(l):n(l)}}const Qg={continuation:{tokenize:ib},exit:lb,name:"blockQuote",tokenize:rb};function rb(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),l}return n(s)}function l(s){return q(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function ib(e,t,n){const r=this;return i;function i(s){return q(s)?G(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):l(s)}function l(s){return e.attempt(Qg,t,n)(s)}}function lb(e){e.exit("blockQuote")}const Yg={name:"characterEscape",tokenize:sb};function sb(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Wk(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Jg={name:"characterReference",tokenize:ob};function ob(e,t,n){const r=this;let i=0,l,s;return o;function o(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),a}function a(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,s=Re,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,s=Kk,f):(e.enter("characterReferenceValue"),l=7,s=Ru,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return s===Re&&!ef(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(c)&&i++<l?(e.consume(c),f):n(c)}}const ph={partial:!0,tokenize:ub},mh={concrete:!0,name:"codeFenced",tokenize:ab};function ab(e,t,n){const r=this,i={partial:!0,tokenize:E};let l=0,s=0,o;return a;function a(b){return u(b)}function u(b){const T=r.events[r.events.length-1];return l=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,o=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===o?(s++,e.consume(b),f):s<3?n(b):(e.exit("codeFencedFenceSequence"),q(b)?G(e,c,"whitespace")(b):c(b))}function c(b){return b===null||B(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(ph,g,C)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||B(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(b)):q(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),G(e,h,"whitespace")(b)):b===96&&b===o?n(b):(e.consume(b),p)}function h(b){return b===null||B(b)?c(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||B(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(b)):b===96&&b===o?n(b):(e.consume(b),y)}function g(b){return e.attempt(i,C,w)(b)}function w(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m}function m(b){return l>0&&q(b)?G(e,x,"linePrefix",l+1)(b):x(b)}function x(b){return b===null||B(b)?e.check(ph,g,C)(b):(e.enter("codeFlowValue"),v(b))}function v(b){return b===null||B(b)?(e.exit("codeFlowValue"),x(b)):(e.consume(b),v)}function C(b){return e.exit("codeFenced"),t(b)}function E(b,T,P){let I=0;return S;function S(K){return b.enter("lineEnding"),b.consume(K),b.exit("lineEnding"),j}function j(K){return b.enter("codeFencedFence"),q(K)?G(b,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):A(K)}function A(K){return K===o?(b.enter("codeFencedFenceSequence"),D(K)):P(K)}function D(K){return K===o?(I++,b.consume(K),D):I>=s?(b.exit("codeFencedFenceSequence"),q(K)?G(b,U,"whitespace")(K):U(K)):P(K)}function U(K){return K===null||B(K)?(b.exit("codeFencedFence"),T(K)):P(K)}}}function ub(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l)}function l(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const pa={name:"codeIndented",tokenize:fb},cb={partial:!0,tokenize:db};function fb(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),G(e,l,"linePrefix",5)(u)}function l(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?a(u):B(u)?e.attempt(cb,s,a)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||B(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),o)}function a(u){return e.exit("codeIndented"),t(u)}}function db(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):B(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):G(e,l,"linePrefix",5)(s)}function l(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):B(s)?i(s):n(s)}}const hb={name:"codeText",previous:mb,resolve:pb,tokenize:gb};function pb(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function mb(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function gb(e,t,n){let r=0,i,l;return s;function s(c){return e.enter("codeText"),e.enter("codeTextSequence"),o(c)}function o(c){return c===96?(e.consume(c),r++,o):(e.exit("codeTextSequence"),a(c))}function a(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),a):c===96?(l=e.enter("codeTextSequence"),i=0,f(c)):B(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||B(c)?(e.exit("codeTextData"),a(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(l.type="codeTextData",u(c))}}class yb{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Si(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Si(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Si(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Si(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Si(this.left,n.reverse())}}}function Si(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Gg(e){const t={};let n=-1,r,i,l,s,o,a,u;const f=new yb(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,l=0,l<a.length&&a[l][1].type==="lineEndingBlank"&&(l+=2),l<a.length&&a[l][1].type==="content"))for(;++l<a.length&&a[l][1].type!=="content";)a[l][1].type==="chunkText"&&(a[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,xb(f,n)),n=t[n],u=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(s=f.get(l),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=l);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},o=f.slice(i,n),o.unshift(r),f.splice(i,n-i+1,o))}}return lt(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function xb(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,a=[],u={};let f,c,p=-1,h=n,y=0,g=0;const w=[g];for(;h;){for(;e.get(++i)[1]!==h;);l.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(g=p+1,w.push(g),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):w.pop(),p=w.length;p--;){const m=o.slice(w[p],w[p+1]),x=l.pop();a.push([x,x+m.length-1]),e.splice(x,2,m)}for(a.reverse(),p=-1;++p<a.length;)u[y+a[p][0]]=y+a[p][1],y+=a[p][1]-a[p][0]-1;return u}const vb={resolve:kb,tokenize:bb},wb={partial:!0,tokenize:Sb};function kb(e){return Gg(e),e}function bb(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?l(o):B(o)?e.check(wb,s,l)(o):(e.consume(o),i)}function l(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Sb(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),G(e,l,"linePrefix")}function l(s){if(s===null||B(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Xg(e,t,n,r,i,l,s,o,a){const u=a||Number.POSITIVE_INFINITY;let f=0;return c;function c(m){return m===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(m),e.exit(l),p):m===null||m===32||m===41||qs(m)?n(m):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),g(m))}function p(m){return m===62?(e.enter(l),e.consume(m),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===62?(e.exit("chunkString"),e.exit(o),p(m)):m===null||m===60||B(m)?n(m):(e.consume(m),m===92?y:h)}function y(m){return m===60||m===62||m===92?(e.consume(m),h):h(m)}function g(m){return!f&&(m===null||m===41||re(m))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(m)):f<u&&m===40?(e.consume(m),f++,g):m===41?(e.consume(m),f--,g):m===null||m===32||m===40||qs(m)?n(m):(e.consume(m),m===92?w:g)}function w(m){return m===40||m===41||m===92?(e.consume(m),g):g(m)}}function Zg(e,t,n,r,i,l){const s=this;let o=0,a;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(l),f}function f(h){return o>999||h===null||h===91||h===93&&!a||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(l),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):B(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||B(h)||o++>999?(e.exit("chunkString"),f(h)):(e.consume(h),a||(a=!q(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),o++,c):c(h)}}function ey(e,t,n,r,i,l){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,a):n(p)}function a(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(l),u(p))}function u(p){return p===s?(e.exit(l),a(s)):p===null?n(p):B(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),G(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===s||p===null||B(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?c:f)}function c(p){return p===s||p===92?(e.consume(p),f):f(p)}}function Vi(e,t){let n;return r;function r(i){return B(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):q(i)?G(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Nb={name:"definition",tokenize:Eb},Cb={partial:!0,tokenize:jb};function Eb(e,t,n){const r=this;let i;return l;function l(h){return e.enter("definition"),s(h)}function s(h){return Zg.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return re(h)?Vi(e,u)(h):u(h)}function u(h){return Xg(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(Cb,c,c)(h)}function c(h){return q(h)?G(e,p,"whitespace")(h):p(h)}function p(h){return h===null||B(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function jb(e,t,n){return r;function r(o){return re(o)?Vi(e,i)(o):n(o)}function i(o){return ey(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function l(o){return q(o)?G(e,s,"whitespace")(o):s(o)}function s(o){return o===null||B(o)?t(o):n(o)}}const Tb={name:"hardBreakEscape",tokenize:Ib};function Ib(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return B(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const Lb={name:"headingAtx",resolve:Pb,tokenize:_b};function Pb(e,t){let n=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},lt(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function _b(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||re(f)?(e.exit("atxHeadingSequence"),o(f)):n(f)}function o(f){return f===35?(e.enter("atxHeadingSequence"),a(f)):f===null||B(f)?(e.exit("atxHeading"),t(f)):q(f)?G(e,o,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function a(f){return f===35?(e.consume(f),a):(e.exit("atxHeadingSequence"),o(f))}function u(f){return f===null||f===35||re(f)?(e.exit("atxHeadingText"),o(f)):(e.consume(f),u)}}const Ab=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],gh=["pre","script","style","textarea"],Ob={concrete:!0,name:"htmlFlow",resolveTo:Mb,tokenize:zb},Rb={partial:!0,tokenize:$b},Db={partial:!0,tokenize:Fb};function Mb(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function zb(e,t,n){const r=this;let i,l,s,o,a;return u;function u(N){return f(N)}function f(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),c}function c(N){return N===33?(e.consume(N),p):N===47?(e.consume(N),l=!0,g):N===63?(e.consume(N),i=3,r.interrupt?t:k):Be(N)?(e.consume(N),s=String.fromCharCode(N),w):n(N)}function p(N){return N===45?(e.consume(N),i=2,h):N===91?(e.consume(N),i=5,o=0,y):Be(N)?(e.consume(N),i=4,r.interrupt?t:k):n(N)}function h(N){return N===45?(e.consume(N),r.interrupt?t:k):n(N)}function y(N){const Ne="CDATA[";return N===Ne.charCodeAt(o++)?(e.consume(N),o===Ne.length?r.interrupt?t:A:y):n(N)}function g(N){return Be(N)?(e.consume(N),s=String.fromCharCode(N),w):n(N)}function w(N){if(N===null||N===47||N===62||re(N)){const Ne=N===47,xt=s.toLowerCase();return!Ne&&!l&&gh.includes(xt)?(i=1,r.interrupt?t(N):A(N)):Ab.includes(s.toLowerCase())?(i=6,Ne?(e.consume(N),m):r.interrupt?t(N):A(N)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):l?x(N):v(N))}return N===45||Re(N)?(e.consume(N),s+=String.fromCharCode(N),w):n(N)}function m(N){return N===62?(e.consume(N),r.interrupt?t:A):n(N)}function x(N){return q(N)?(e.consume(N),x):S(N)}function v(N){return N===47?(e.consume(N),S):N===58||N===95||Be(N)?(e.consume(N),C):q(N)?(e.consume(N),v):S(N)}function C(N){return N===45||N===46||N===58||N===95||Re(N)?(e.consume(N),C):E(N)}function E(N){return N===61?(e.consume(N),b):q(N)?(e.consume(N),E):v(N)}function b(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),a=N,T):q(N)?(e.consume(N),b):P(N)}function T(N){return N===a?(e.consume(N),a=null,I):N===null||B(N)?n(N):(e.consume(N),T)}function P(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||re(N)?E(N):(e.consume(N),P)}function I(N){return N===47||N===62||q(N)?v(N):n(N)}function S(N){return N===62?(e.consume(N),j):n(N)}function j(N){return N===null||B(N)?A(N):q(N)?(e.consume(N),j):n(N)}function A(N){return N===45&&i===2?(e.consume(N),xe):N===60&&i===1?(e.consume(N),de):N===62&&i===4?(e.consume(N),Y):N===63&&i===3?(e.consume(N),k):N===93&&i===5?(e.consume(N),$):B(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Rb,te,D)(N)):N===null||B(N)?(e.exit("htmlFlowData"),D(N)):(e.consume(N),A)}function D(N){return e.check(Db,U,te)(N)}function U(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),K}function K(N){return N===null||B(N)?D(N):(e.enter("htmlFlowData"),A(N))}function xe(N){return N===45?(e.consume(N),k):A(N)}function de(N){return N===47?(e.consume(N),s="",z):A(N)}function z(N){if(N===62){const Ne=s.toLowerCase();return gh.includes(Ne)?(e.consume(N),Y):A(N)}return Be(N)&&s.length<8?(e.consume(N),s+=String.fromCharCode(N),z):A(N)}function $(N){return N===93?(e.consume(N),k):A(N)}function k(N){return N===62?(e.consume(N),Y):N===45&&i===2?(e.consume(N),k):A(N)}function Y(N){return N===null||B(N)?(e.exit("htmlFlowData"),te(N)):(e.consume(N),Y)}function te(N){return e.exit("htmlFlow"),t(N)}}function Fb(e,t,n){const r=this;return i;function i(s){return B(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l):n(s)}function l(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function $b(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Nl,t,n)}}const Bb={name:"htmlText",tokenize:Ub};function Ub(e,t,n){const r=this;let i,l,s;return o;function o(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),a}function a(k){return k===33?(e.consume(k),u):k===47?(e.consume(k),E):k===63?(e.consume(k),v):Be(k)?(e.consume(k),P):n(k)}function u(k){return k===45?(e.consume(k),f):k===91?(e.consume(k),l=0,y):Be(k)?(e.consume(k),x):n(k)}function f(k){return k===45?(e.consume(k),h):n(k)}function c(k){return k===null?n(k):k===45?(e.consume(k),p):B(k)?(s=c,de(k)):(e.consume(k),c)}function p(k){return k===45?(e.consume(k),h):c(k)}function h(k){return k===62?xe(k):k===45?p(k):c(k)}function y(k){const Y="CDATA[";return k===Y.charCodeAt(l++)?(e.consume(k),l===Y.length?g:y):n(k)}function g(k){return k===null?n(k):k===93?(e.consume(k),w):B(k)?(s=g,de(k)):(e.consume(k),g)}function w(k){return k===93?(e.consume(k),m):g(k)}function m(k){return k===62?xe(k):k===93?(e.consume(k),m):g(k)}function x(k){return k===null||k===62?xe(k):B(k)?(s=x,de(k)):(e.consume(k),x)}function v(k){return k===null?n(k):k===63?(e.consume(k),C):B(k)?(s=v,de(k)):(e.consume(k),v)}function C(k){return k===62?xe(k):v(k)}function E(k){return Be(k)?(e.consume(k),b):n(k)}function b(k){return k===45||Re(k)?(e.consume(k),b):T(k)}function T(k){return B(k)?(s=T,de(k)):q(k)?(e.consume(k),T):xe(k)}function P(k){return k===45||Re(k)?(e.consume(k),P):k===47||k===62||re(k)?I(k):n(k)}function I(k){return k===47?(e.consume(k),xe):k===58||k===95||Be(k)?(e.consume(k),S):B(k)?(s=I,de(k)):q(k)?(e.consume(k),I):xe(k)}function S(k){return k===45||k===46||k===58||k===95||Re(k)?(e.consume(k),S):j(k)}function j(k){return k===61?(e.consume(k),A):B(k)?(s=j,de(k)):q(k)?(e.consume(k),j):I(k)}function A(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,D):B(k)?(s=A,de(k)):q(k)?(e.consume(k),A):(e.consume(k),U)}function D(k){return k===i?(e.consume(k),i=void 0,K):k===null?n(k):B(k)?(s=D,de(k)):(e.consume(k),D)}function U(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||re(k)?I(k):(e.consume(k),U)}function K(k){return k===47||k===62||re(k)?I(k):n(k)}function xe(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function de(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),z}function z(k){return q(k)?G(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):$(k)}function $(k){return e.enter("htmlTextData"),s(k)}}const tf={name:"labelEnd",resolveAll:Wb,resolveTo:qb,tokenize:Qb},Vb={tokenize:Yb},Hb={tokenize:Jb},Kb={tokenize:Gb};function Wb(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&<(e,0,e.length,n),e}function qb(e,t){let n=e.length,r=0,i,l,s,o;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const a={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",a,t],["enter",u,t]],o=ft(o,e.slice(l+1,l+r+3)),o=ft(o,[["enter",f,t]]),o=ft(o,ko(t.parser.constructs.insideSpan.null,e.slice(l+r+4,s-3),t)),o=ft(o,[["exit",f,t],e[s-2],e[s-1],["exit",u,t]]),o=ft(o,e.slice(s+1)),o=ft(o,[["exit",a,t]]),lt(e,l,e.length,o),e}function Qb(e,t,n){const r=this;let i=r.events.length,l,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return o;function o(p){return l?l._inactive?c(p):(s=r.parser.defined.includes(jt(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),a):n(p)}function a(p){return p===40?e.attempt(Vb,f,s?f:c)(p):p===91?e.attempt(Hb,f,s?u:c)(p):s?f(p):c(p)}function u(p){return e.attempt(Kb,f,c)(p)}function f(p){return t(p)}function c(p){return l._balanced=!0,n(p)}}function Yb(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return re(c)?Vi(e,l)(c):l(c)}function l(c){return c===41?f(c):Xg(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function s(c){return re(c)?Vi(e,a)(c):f(c)}function o(c){return n(c)}function a(c){return c===34||c===39||c===40?ey(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return re(c)?Vi(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function Jb(e,t,n){const r=this;return i;function i(o){return Zg.call(r,e,l,s,"reference","referenceMarker","referenceString")(o)}function l(o){return r.parser.defined.includes(jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function Gb(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const Xb={name:"labelStartImage",resolveAll:tf.resolveAll,tokenize:Zb};function Zb(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),l}function l(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const eS={name:"labelStartLink",resolveAll:tf.resolveAll,tokenize:tS};function tS(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),l}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ma={name:"lineEnding",tokenize:nS};function nS(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),G(e,t,"linePrefix")}}const ms={name:"thematicBreak",tokenize:rS};function rS(e,t,n){let r=0,i;return l;function l(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||B(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),q(u)?G(e,o,"whitespace")(u):o(u))}}const Ke={continuation:{tokenize:oS},exit:uS,name:"list",tokenize:sS},iS={partial:!0,tokenize:cS},lS={partial:!0,tokenize:aS};function sS(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const y=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Ru(h)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(ms,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return Ru(h)&&++s<10?(e.consume(h),a):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Nl,r.interrupt?n:f,e.attempt(iS,p,c))}function f(h){return r.containerState.initialBlankLine=!0,l++,p(h)}function c(h){return q(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function oS(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Nl,i,l);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,G(e,t,"listItemIndent",r.containerState.size+1)(o)}function l(o){return r.containerState.furtherBlankLines||!q(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(lS,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,G(e,e.attempt(Ke,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function aS(e,t,n){const r=this;return G(e,i,"listItemIndent",r.containerState.size+1);function i(l){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(l):n(l)}}function uS(e){e.exit(this.containerState.type)}function cS(e,t,n){const r=this;return G(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const s=r.events[r.events.length-1];return!q(l)&&s&&s[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const yh={name:"setextUnderline",resolveTo:fS,tokenize:dS};function fS(e,t){let n=e.length,r,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",s,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function dS(e,t,n){const r=this;let i;return l;function l(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),q(u)?G(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||B(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const hS={tokenize:pS};function pS(e){const t=this,n=e.attempt(Nl,r,e.attempt(this.parser.constructs.flowInitial,i,G(e,e.attempt(this.parser.constructs.flow,i,e.attempt(vb,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const mS={resolveAll:ny()},gS=ty("string"),yS=ty("text");function ty(e){return{resolveAll:ny(e==="text"?xS:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,s,o);return s;function s(f){return u(f)?l(f):o(f)}function o(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),a}function a(f){return u(f)?(n.exit("data"),l(f)):(n.consume(f),a)}function u(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function ny(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function xS(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let l=i.length,s=-1,o=0,a;for(;l--;){const u=i[l];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(u===-2)a=!0,o++;else if(u!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const u={type:n===e.length||a||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?s:r.start._bufferIndex+s,_index:r.start._index+l,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const vS={42:Ke,43:Ke,45:Ke,48:Ke,49:Ke,50:Ke,51:Ke,52:Ke,53:Ke,54:Ke,55:Ke,56:Ke,57:Ke,62:Qg},wS={91:Nb},kS={[-2]:pa,[-1]:pa,32:pa},bS={35:Lb,42:ms,45:[yh,ms],60:Ob,61:yh,95:ms,96:mh,126:mh},SS={38:Jg,92:Yg},NS={[-5]:ma,[-4]:ma,[-3]:ma,33:Xb,38:Jg,42:Du,60:[eb,Bb],91:eS,92:[Tb,Yg],93:tf,95:Du,96:hb},CS={null:[Du,mS]},ES={null:[42,95]},jS={null:[]},TS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ES,contentInitial:wS,disable:jS,document:vS,flow:bS,flowInitial:kS,insideSpan:CS,string:SS,text:NS},Symbol.toStringTag,{value:"Module"}));function IS(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let s=[],o=[];const a={attempt:T(E),check:T(b),consume:x,enter:v,exit:C,interrupt:T(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:g,events:[],now:y,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=t.tokenize.call(u,a);return t.resolveAll&&l.push(t),u;function c(j){return s=ft(s,j),w(),s[s.length-1]!==null?[]:(P(t,0),u.events=ko(l,u.events,u),u.events)}function p(j,A){return PS(h(j),A)}function h(j){return LS(s,j)}function y(){const{_bufferIndex:j,_index:A,line:D,column:U,offset:K}=r;return{_bufferIndex:j,_index:A,line:D,column:U,offset:K}}function g(j){i[j.line]=j.column,S()}function w(){let j;for(;r._index<s.length;){const A=s[r._index];if(typeof A=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<A.length;)m(A.charCodeAt(r._bufferIndex));else m(A)}}function m(j){f=f(j)}function x(j){B(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,S()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=j}function v(j,A){const D=A||{};return D.type=j,D.start=y(),u.events.push(["enter",D,u]),o.push(D),D}function C(j){const A=o.pop();return A.end=y(),u.events.push(["exit",A,u]),A}function E(j,A){P(j,A.from)}function b(j,A){A.restore()}function T(j,A){return D;function D(U,K,xe){let de,z,$,k;return Array.isArray(U)?te(U):"tokenize"in U?te([U]):Y(U);function Y(oe){return Lt;function Lt(rn){const cr=rn!==null&&oe[rn],fr=rn!==null&&oe.null,Il=[...Array.isArray(cr)?cr:cr?[cr]:[],...Array.isArray(fr)?fr:fr?[fr]:[]];return te(Il)(rn)}}function te(oe){return de=oe,z=0,oe.length===0?xe:N(oe[z])}function N(oe){return Lt;function Lt(rn){return k=I(),$=oe,oe.partial||(u.currentConstruct=oe),oe.name&&u.parser.constructs.disable.null.includes(oe.name)?xt():oe.tokenize.call(A?Object.assign(Object.create(u),A):u,a,Ne,xt)(rn)}}function Ne(oe){return j($,k),K}function xt(oe){return k.restore(),++z<de.length?N(de[z]):xe}}}function P(j,A){j.resolveAll&&!l.includes(j)&&l.push(j),j.resolve&<(u.events,A,u.events.length-A,j.resolve(u.events.slice(A),u)),j.resolveTo&&(u.events=j.resolveTo(u.events,u))}function I(){const j=y(),A=u.previous,D=u.currentConstruct,U=u.events.length,K=Array.from(o);return{from:U,restore:xe};function xe(){r=j,u.previous=A,u.currentConstruct=D,u.events.length=U,o=K,S()}}function S(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function LS(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,l)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}l>0&&s.push(e[i].slice(0,l))}return s}function PS(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let s;if(typeof l=="string")s=l;else switch(l){case-5:{s="\r";break}case-4:{s=`
|
|
73
|
+
`;break}case-3:{s=`\r
|
|
74
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(l)}i=l===-2,r.push(s)}return r.join("")}function _S(e){const r={constructs:Wg([TS,...(e||{}).extensions||[]]),content:i(qk),defined:[],document:i(Yk),flow:i(hS),lazy:{},string:i(gS),text:i(yS)};return r;function i(l){return s;function s(o){return IS(r,l,o)}}}function AS(e){for(;!Gg(e););return e}const xh=/[\0\t\n\r]/g;function OS(){let e=1,t="",n=!0,r;return i;function i(l,s,o){const a=[];let u,f,c,p,h;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(s||void 0).decode(l)),c=0,t="",n&&(l.charCodeAt(0)===65279&&c++,n=void 0);c<l.length;){if(xh.lastIndex=c,u=xh.exec(l),p=u&&u.index!==void 0?u.index:l.length,h=l.charCodeAt(p),!u){t=l.slice(c);break}if(h===10&&c===p&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),c<p&&(a.push(l.slice(c,p)),e+=p-c),h){case 0:{a.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,a.push(-2);e++<f;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return o&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const RS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function DS(e){return e.replace(RS,MS)}function MS(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return qg(n.slice(l?2:1),l?16:10)}return ef(n)||e}const ry={}.hasOwnProperty;function zS(e,t,n){return typeof t!="string"&&(n=t,t=void 0),FS(n)(AS(_S(n).document().write(OS()(e,t,!0))))}function FS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Lf),autolinkProtocol:I,autolinkEmail:I,atxHeading:l(jf),blockQuote:l(fr),characterEscape:I,characterReference:I,codeFenced:l(Il),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:l(Il,s),codeText:l(P0,s),codeTextData:I,data:I,codeFlowValue:I,definition:l(_0),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:l(A0),hardBreakEscape:l(Tf),hardBreakTrailing:l(Tf),htmlFlow:l(If,s),htmlFlowData:I,htmlText:l(If,s),htmlTextData:I,image:l(O0),label:s,link:l(Lf),listItem:l(R0),listItemValue:p,listOrdered:l(Pf,c),listUnordered:l(Pf),paragraph:l(D0),reference:N,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:l(jf),strong:l(M0),thematicBreak:l(F0)},exit:{atxHeading:a(),atxHeadingSequence:E,autolink:a(),autolinkEmail:cr,autolinkProtocol:rn,blockQuote:a(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:xt,characterReferenceMarkerNumeric:xt,characterReferenceValue:oe,characterReference:Lt,codeFenced:a(w),codeFencedFence:g,codeFencedFenceInfo:h,codeFencedFenceMeta:y,codeFlowValue:S,codeIndented:a(m),codeText:a(K),codeTextData:S,data:S,definition:a(),definitionDestinationString:C,definitionLabelString:x,definitionTitleString:v,emphasis:a(),hardBreakEscape:a(A),hardBreakTrailing:a(A),htmlFlow:a(D),htmlFlowData:S,htmlText:a(U),htmlTextData:S,image:a(de),label:$,labelText:z,lineEnding:j,link:a(xe),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:Ne,resourceDestinationString:k,resourceTitleString:Y,resource:te,setextHeading:a(P),setextHeadingLineSequence:T,setextHeadingText:b,strong:a(),thematicBreak:a()}};iy(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(_){let M={type:"root",children:[]};const H={stack:[M],tokenStack:[],config:t,enter:o,exit:u,buffer:s,resume:f,data:n},J=[];let ne=-1;for(;++ne<_.length;)if(_[ne][1].type==="listOrdered"||_[ne][1].type==="listUnordered")if(_[ne][0]==="enter")J.push(ne);else{const vt=J.pop();ne=i(_,vt,ne)}for(ne=-1;++ne<_.length;){const vt=t[_[ne][0]];ry.call(vt,_[ne][1].type)&&vt[_[ne][1].type].call(Object.assign({sliceSerialize:_[ne][2].sliceSerialize},H),_[ne][1])}if(H.tokenStack.length>0){const vt=H.tokenStack[H.tokenStack.length-1];(vt[1]||vh).call(H,void 0,vt[0])}for(M.position={start:sn(_.length>0?_[0][1].start:{line:1,column:1,offset:0}),end:sn(_.length>0?_[_.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne<t.transforms.length;)M=t.transforms[ne](M)||M;return M}function i(_,M,H){let J=M-1,ne=-1,vt=!1,Dn,$t,hi,pi;for(;++J<=H;){const Ze=_[J];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?ne++:ne--,pi=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Dn&&!pi&&!ne&&!hi&&(hi=J),pi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:pi=void 0}if(!ne&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||ne===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Dn){let dr=J;for($t=void 0;dr--;){const Bt=_[dr];if(Bt[1].type==="lineEnding"||Bt[1].type==="lineEndingBlank"){if(Bt[0]==="exit")continue;$t&&(_[$t][1].type="lineEndingBlank",vt=!0),Bt[1].type="lineEnding",$t=dr}else if(!(Bt[1].type==="linePrefix"||Bt[1].type==="blockQuotePrefix"||Bt[1].type==="blockQuotePrefixWhitespace"||Bt[1].type==="blockQuoteMarker"||Bt[1].type==="listItemIndent"))break}hi&&(!$t||hi<$t)&&(Dn._spread=!0),Dn.end=Object.assign({},$t?_[$t][1].start:Ze[1].end),_.splice($t||J,0,["exit",Dn,Ze[2]]),J++,H++}if(Ze[1].type==="listItemPrefix"){const dr={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Dn=dr,_.splice(J,0,["enter",dr,Ze[2]]),J++,H++,hi=void 0,pi=!0}}}return _[M][1]._spread=vt,H}function l(_,M){return H;function H(J){o.call(this,_(J),J),M&&M.call(this,J)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(_,M,H){this.stack[this.stack.length-1].children.push(_),this.stack.push(_),this.tokenStack.push([M,H||void 0]),_.position={start:sn(M.start),end:void 0}}function a(_){return M;function M(H){_&&_.call(this,H),u.call(this,H)}}function u(_,M){const H=this.stack.pop(),J=this.tokenStack.pop();if(J)J[0].type!==_.type&&(M?M.call(this,_,J[0]):(J[1]||vh).call(this,_,J[0]));else throw new Error("Cannot close `"+_.type+"` ("+Ui({start:_.start,end:_.end})+"): it’s not open");H.position.end=sn(_.end)}function f(){return Zc(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(_){if(this.data.expectingFirstListItemValue){const M=this.stack[this.stack.length-2];M.start=Number.parseInt(this.sliceSerialize(_),10),this.data.expectingFirstListItemValue=void 0}}function h(){const _=this.resume(),M=this.stack[this.stack.length-1];M.lang=_}function y(){const _=this.resume(),M=this.stack[this.stack.length-1];M.meta=_}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const _=this.resume(),M=this.stack[this.stack.length-1];M.value=_.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const _=this.resume(),M=this.stack[this.stack.length-1];M.value=_.replace(/(\r?\n|\r)$/g,"")}function x(_){const M=this.resume(),H=this.stack[this.stack.length-1];H.label=M,H.identifier=jt(this.sliceSerialize(_)).toLowerCase()}function v(){const _=this.resume(),M=this.stack[this.stack.length-1];M.title=_}function C(){const _=this.resume(),M=this.stack[this.stack.length-1];M.url=_}function E(_){const M=this.stack[this.stack.length-1];if(!M.depth){const H=this.sliceSerialize(_).length;M.depth=H}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function T(_){const M=this.stack[this.stack.length-1];M.depth=this.sliceSerialize(_).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function I(_){const H=this.stack[this.stack.length-1].children;let J=H[H.length-1];(!J||J.type!=="text")&&(J=z0(),J.position={start:sn(_.start),end:void 0},H.push(J)),this.stack.push(J)}function S(_){const M=this.stack.pop();M.value+=this.sliceSerialize(_),M.position.end=sn(_.end)}function j(_){const M=this.stack[this.stack.length-1];if(this.data.atHardBreak){const H=M.children[M.children.length-1];H.position.end=sn(_.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(M.type)&&(I.call(this,_),S.call(this,_))}function A(){this.data.atHardBreak=!0}function D(){const _=this.resume(),M=this.stack[this.stack.length-1];M.value=_}function U(){const _=this.resume(),M=this.stack[this.stack.length-1];M.value=_}function K(){const _=this.resume(),M=this.stack[this.stack.length-1];M.value=_}function xe(){const _=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";_.type+="Reference",_.referenceType=M,delete _.url,delete _.title}else delete _.identifier,delete _.label;this.data.referenceType=void 0}function de(){const _=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";_.type+="Reference",_.referenceType=M,delete _.url,delete _.title}else delete _.identifier,delete _.label;this.data.referenceType=void 0}function z(_){const M=this.sliceSerialize(_),H=this.stack[this.stack.length-2];H.label=DS(M),H.identifier=jt(M).toLowerCase()}function $(){const _=this.stack[this.stack.length-1],M=this.resume(),H=this.stack[this.stack.length-1];if(this.data.inReference=!0,H.type==="link"){const J=_.children;H.children=J}else H.alt=M}function k(){const _=this.resume(),M=this.stack[this.stack.length-1];M.url=_}function Y(){const _=this.resume(),M=this.stack[this.stack.length-1];M.title=_}function te(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function Ne(_){const M=this.resume(),H=this.stack[this.stack.length-1];H.label=M,H.identifier=jt(this.sliceSerialize(_)).toLowerCase(),this.data.referenceType="full"}function xt(_){this.data.characterReferenceType=_.type}function oe(_){const M=this.sliceSerialize(_),H=this.data.characterReferenceType;let J;H?(J=qg(M,H==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):J=ef(M);const ne=this.stack[this.stack.length-1];ne.value+=J}function Lt(_){const M=this.stack.pop();M.position.end=sn(_.end)}function rn(_){S.call(this,_);const M=this.stack[this.stack.length-1];M.url=this.sliceSerialize(_)}function cr(_){S.call(this,_);const M=this.stack[this.stack.length-1];M.url="mailto:"+this.sliceSerialize(_)}function fr(){return{type:"blockquote",children:[]}}function Il(){return{type:"code",lang:null,meta:null,value:""}}function P0(){return{type:"inlineCode",value:""}}function _0(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function A0(){return{type:"emphasis",children:[]}}function jf(){return{type:"heading",depth:0,children:[]}}function Tf(){return{type:"break"}}function If(){return{type:"html",value:""}}function O0(){return{type:"image",title:null,url:"",alt:null}}function Lf(){return{type:"link",title:null,url:"",children:[]}}function Pf(_){return{type:"list",ordered:_.type==="listOrdered",start:null,spread:_._spread,children:[]}}function R0(_){return{type:"listItem",spread:_._spread,checked:null,children:[]}}function D0(){return{type:"paragraph",children:[]}}function M0(){return{type:"strong",children:[]}}function z0(){return{type:"text",value:""}}function F0(){return{type:"thematicBreak"}}}function sn(e){return{line:e.line,column:e.column,offset:e.offset}}function iy(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?iy(e,r):$S(e,r)}}function $S(e,t){let n;for(n in t)if(ry.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function vh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ui({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ui({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ui({start:t.start,end:t.end})+") is still open")}function BS(e){const t=this;t.parser=n;function n(r){return zS(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function US(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function VS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
75
|
+
`}]}function HS(e,t){const n=t.value?t.value+`
|
|
76
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function KS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function WS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=si(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=l+1,o+=1,e.footnoteCounts.set(r,o);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function QS(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ly(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function JS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ly(e,t);const i={src:si(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function GS(e,t){const n={src:si(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function XS(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function ZS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ly(e,t);const i={href:si(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function eN(e,t){const n={href:si(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function tN(e,t,n){const r=e.all(t),i=n?nN(n):sy(t),l={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const f=r[o];(i||o!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
|
|
77
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&s.push({type:"text",value:`
|
|
78
|
+
`});const u={type:"element",tagName:"li",properties:l,children:s};return e.patch(t,u),e.applyData(t,u)}function nN(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=sy(n[r])}return t}function sy(e){const t=e.spread;return t??e.children.length>1}function rN(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function iN(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lN(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function sN(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oN(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Yc(t.children[1]),a=Fg(t.children[t.children.length-1]);o&&a&&(s.position={start:o,end:a}),i.push(s)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function aN(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let a=-1;const u=[];for(;++a<o;){const c=t.children[a],p={},h=s?s[a]:void 0;h&&(p.align=h);let y={type:"element",tagName:l,properties:p,children:[]};c&&(y.children=e.all(c),e.patch(c,y),y=e.applyData(c,y)),u.push(y)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function uN(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const wh=9,kh=32;function cN(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(bh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(bh(t.slice(i),i>0,!1)),l.join("")}function bh(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===wh||l===kh;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===wh||l===kh;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function fN(e,t){const n={type:"text",value:cN(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function dN(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const hN={blockquote:US,break:VS,code:HS,delete:KS,emphasis:WS,footnoteReference:qS,heading:QS,html:YS,imageReference:JS,image:GS,inlineCode:XS,linkReference:ZS,link:eN,listItem:tN,list:rN,paragraph:iN,root:lN,strong:sN,table:oN,tableCell:uN,tableRow:aN,text:fN,thematicBreak:dN,toml:Ql,yaml:Ql,definition:Ql,footnoteDefinition:Ql};function Ql(){}const oy=-1,bo=0,Hi=1,Qs=2,nf=3,rf=4,lf=5,sf=6,ay=7,uy=8,Sh=typeof self=="object"?self:globalThis,pN=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,s]=t[i];switch(l){case bo:case oy:return n(s,i);case Hi:{const o=n([],i);for(const a of s)o.push(r(a));return o}case Qs:{const o=n({},i);for(const[a,u]of s)o[r(a)]=r(u);return o}case nf:return n(new Date(s),i);case rf:{const{source:o,flags:a}=s;return n(new RegExp(o,a),i)}case lf:{const o=n(new Map,i);for(const[a,u]of s)o.set(r(a),r(u));return o}case sf:{const o=n(new Set,i);for(const a of s)o.add(r(a));return o}case ay:{const{name:o,message:a}=s;return n(new Sh[o](a),i)}case uy:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return n(new DataView(o),s)}}return n(new Sh[l](s),i)};return r},Nh=e=>pN(new Map,e)(0),pr="",{toString:mN}={},{keys:gN}=Object,Ni=e=>{const t=typeof e;if(t!=="object"||!e)return[bo,t];const n=mN.call(e).slice(8,-1);switch(n){case"Array":return[Hi,pr];case"Object":return[Qs,pr];case"Date":return[nf,pr];case"RegExp":return[rf,pr];case"Map":return[lf,pr];case"Set":return[sf,pr];case"DataView":return[Hi,n]}return n.includes("Array")?[Hi,n]:n.includes("Error")?[ay,n]:[Qs,n]},Yl=([e,t])=>e===bo&&(t==="function"||t==="symbol"),yN=(e,t,n,r)=>{const i=(s,o)=>{const a=r.push(s)-1;return n.set(o,a),a},l=s=>{if(n.has(s))return n.get(s);let[o,a]=Ni(s);switch(o){case bo:{let f=s;switch(a){case"bigint":o=uy,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);f=null;break;case"undefined":return i([oy],s)}return i([o,f],s)}case Hi:{if(a){let p=s;return a==="DataView"?p=new Uint8Array(s.buffer):a==="ArrayBuffer"&&(p=new Uint8Array(s)),i([a,[...p]],s)}const f=[],c=i([o,f],s);for(const p of s)f.push(l(p));return c}case Qs:{if(a)switch(a){case"BigInt":return i([a,s.toString()],s);case"Boolean":case"Number":case"String":return i([a,s.valueOf()],s)}if(t&&"toJSON"in s)return l(s.toJSON());const f=[],c=i([o,f],s);for(const p of gN(s))(e||!Yl(Ni(s[p])))&&f.push([l(p),l(s[p])]);return c}case nf:return i([o,s.toISOString()],s);case rf:{const{source:f,flags:c}=s;return i([o,{source:f,flags:c}],s)}case lf:{const f=[],c=i([o,f],s);for(const[p,h]of s)(e||!(Yl(Ni(p))||Yl(Ni(h))))&&f.push([l(p),l(h)]);return c}case sf:{const f=[],c=i([o,f],s);for(const p of s)(e||!Yl(Ni(p)))&&f.push(l(p));return c}}const{message:u}=s;return i([o,{name:a,message:u}],s)};return l},Ch=(e,{json:t,lossy:n}={})=>{const r=[];return yN(!(t||n),!!t,new Map,r)(e),r},Ys=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Nh(Ch(e,t)):structuredClone(e):(e,t)=>Nh(Ch(e,t));function xN(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function vN(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function wN(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||xN,r=e.options.footnoteBackLabel||vN,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let a=-1;for(;++a<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[a]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),p=si(c.toLowerCase());let h=0;const y=[],g=e.footnoteCounts.get(c);for(;g!==void 0&&++h<=g;){y.length>0&&y.push({type:"text",value:" "});let x=typeof n=="string"?n:n(a,h);typeof x=="string"&&(x={type:"text",value:x}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(a,h),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const x=w.children[w.children.length-1];x&&x.type==="text"?x.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...y)}else f.push(...y);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(u,m),o.push(m)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Ys(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
79
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
80
|
+
`}]}}const So=function(e){if(e==null)return NN;if(typeof e=="function")return No(e);if(typeof e=="object")return Array.isArray(e)?kN(e):bN(e);if(typeof e=="string")return SN(e);throw new Error("Expected function, string, or object as test")};function kN(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=So(e[n]);return No(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function bN(e){const t=e;return No(n);function n(r){const i=r;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function SN(e){return No(t);function t(n){return n&&n.type===e}}function No(e){return t;function t(n,r,i){return!!(CN(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function NN(){return!0}function CN(e){return e!==null&&typeof e=="object"&&"type"in e}const cy=[],EN=!0,Mu=!1,jN="skip";function fy(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const l=So(i),s=r?-1:1;o(e,void 0,[])();function o(a,u,f){const c=a&&typeof a=="object"?a:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(a.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=cy,y,g,w;if((!t||l(a,u,f[f.length-1]||void 0))&&(h=TN(n(a,f)),h[0]===Mu))return h;if("children"in a&&a.children){const m=a;if(m.children&&h[0]!==jN)for(g=(r?m.children.length:-1)+s,w=f.concat(m);g>-1&&g<m.children.length;){const x=m.children[g];if(y=o(x,g,w)(),y[0]===Mu)return y;g=typeof y[1]=="number"?y[1]:g+s}}return h}}}function TN(e){return Array.isArray(e)?e:typeof e=="number"?[EN,e]:e==null?cy:[e]}function of(e,t,n,r){let i,l,s;typeof t=="function"&&typeof n!="function"?(l=void 0,s=t,i=n):(l=t,s=n,i=r),fy(e,l,o,i);function o(a,u){const f=u[u.length-1],c=f?f.children.indexOf(a):void 0;return s(a,c,f)}}const zu={}.hasOwnProperty,IN={};function LN(e,t){const n=t||IN,r=new Map,i=new Map,l=new Map,s={...hN,...n.handlers},o={all:u,applyData:_N,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:s,one:a,options:n,patch:PN,wrap:ON};return of(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();c.has(p)||c.set(p,f)}}),o;function a(f,c){const p=f.type,h=o.handlers[p];if(zu.call(o.handlers,p)&&h)return h(o,f,c);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in f){const{children:g,...w}=f,m=Ys(w);return m.children=o.all(f),m}return Ys(f)}return(o.options.unknownHandler||AN)(o,f,c)}function u(f){const c=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const y=o.one(p[h],f);if(y){if(h&&p[h-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=Eh(y.value)),!Array.isArray(y)&&y.type==="element")){const g=y.children[0];g&&g.type==="text"&&(g.value=Eh(g.value))}Array.isArray(y)?c.push(...y):c.push(y)}}}return c}}function PN(e,t){e.position&&(t.position=vk(e))}function _N(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&l&&Object.assign(n.properties,Ys(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function AN(e,t){const n=t.data||{},r="value"in t&&!(zu.call(n,"hProperties")||zu.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ON(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
81
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
82
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
83
|
+
`}),n}function Eh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function jh(e,t){const n=LN(e,t),r=n.one(e,void 0),i=wN(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
|
|
84
|
+
`},i),l}function RN(e,t){return e&&"run"in e?async function(n,r){const i=jh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return jh(n,{file:r,...e||t})}}function Th(e){if(e)throw e}var gs=Object.prototype.hasOwnProperty,dy=Object.prototype.toString,Ih=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,Ph=function(t){return typeof Array.isArray=="function"?Array.isArray(t):dy.call(t)==="[object Array]"},_h=function(t){if(!t||dy.call(t)!=="[object Object]")return!1;var n=gs.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&gs.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||gs.call(t,i)},Ah=function(t,n){Ih&&n.name==="__proto__"?Ih(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Oh=function(t,n){if(n==="__proto__")if(gs.call(t,n)){if(Lh)return Lh(t,n).value}else return;return t[n]},DN=function e(){var t,n,r,i,l,s,o=arguments[0],a=1,u=arguments.length,f=!1;for(typeof o=="boolean"&&(f=o,o=arguments[1]||{},a=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});a<u;++a)if(t=arguments[a],t!=null)for(n in t)r=Oh(o,n),i=Oh(t,n),o!==i&&(f&&i&&(_h(i)||(l=Ph(i)))?(l?(l=!1,s=r&&Ph(r)?r:[]):s=r&&_h(r)?r:{},Ah(o,{name:n,newValue:e(f,s,i)})):typeof i<"u"&&Ah(o,{name:n,newValue:i}));return o};const ga=Qu(DN);function Fu(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function MN(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(a,...u){const f=e[++l];let c=-1;if(a){s(a);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?zN(f,o)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function zN(e,t){let n;return r;function r(...s){const o=e.length>s.length;let a;o&&s.push(i);try{a=e.apply(this,s)}catch(u){const f=u;if(o&&n)throw f;return i(f)}o||(a&&a.then&&typeof a.then=="function"?a.then(l,i):a instanceof Error?i(a):l(a))}function i(s,...o){n||(n=!0,t(s,...o))}function l(s){i(null,s)}}const At={basename:FN,dirname:$N,extname:BN,join:UN,sep:"/"};function FN(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Cl(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else s<0&&(l=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function $N(e){if(Cl(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function BN(e){Cl(e);let t=e.length,n=-1,r=0,i=-1,l=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function UN(...e){let t=-1,n;for(;++t<e.length;)Cl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":VN(n)}function VN(e){Cl(e);const t=e.codePointAt(0)===47;let n=HN(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function HN(e,t){let n="",r=0,i=-1,l=0,s=-1,o,a;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||l===1))if(i!==s-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=s,l=0;continue}}else if(n.length>0){n="",r=0,i=s,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,l=0}else o===46&&l>-1?l++:l=-1}return n}function Cl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const KN={cwd:WN};function WN(){return"/"}function $u(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function qN(e){if(typeof e=="string")e=new URL(e);else if(!$u(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return QN(e)}function QN(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const ya=["history","path","basename","stem","extname","dirname"];class hy{constructor(t){let n;t?$u(t)?n={path:t}:typeof t=="string"||YN(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":KN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ya.length;){const l=ya[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)ya.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?At.basename(this.path):void 0}set basename(t){va(t,"basename"),xa(t,"basename"),this.path=At.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?At.dirname(this.path):void 0}set dirname(t){Rh(this.basename,"dirname"),this.path=At.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?At.extname(this.path):void 0}set extname(t){if(xa(t,"extname"),Rh(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=At.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){$u(t)&&(t=qN(t)),va(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?At.basename(this.path,this.extname):void 0}set stem(t){va(t,"stem"),xa(t,"stem"),this.path=At.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ze(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function xa(e,t){if(e&&e.includes(At.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+At.sep+"`")}function va(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Rh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function YN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const JN=function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l},GN={}.hasOwnProperty;class af extends JN{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=MN()}copy(){const t=new af;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ga(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ba("data",this.frozen),this.namespace[t]=n,this):GN.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ba("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Jl(t),r=this.parser||this.Parser;return wa("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),wa("process",this.parser||this.Parser),ka("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,s){const o=Jl(t),a=r.parse(o);r.run(a,o,function(f,c,p){if(f||!c||!p)return u(f);const h=c,y=r.stringify(h,p);e2(y)?p.value=y:p.result=y,u(f,p)});function u(f,c){f||!c?s(f):l?l(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),wa("processSync",this.parser||this.Parser),ka("processSync",this.compiler||this.Compiler),this.process(t,i),Mh("processSync","process",n),r;function i(l,s){n=!0,Th(l),r=s}}run(t,n,r){Dh(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(s,o){const a=Jl(n);i.run(t,a,u);function u(f,c,p){const h=c||t;f?o(f):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),Mh("runSync","run",r),i;function l(s,o){Th(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=Jl(n),i=this.compiler||this.Compiler;return ka("stringify",i),Dh(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ba("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;a(f,c)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(u.plugins),u.settings&&(i.settings=ga(!0,i.settings,u.settings))}function o(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];l(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(u,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===u){p=c;break}if(p===-1)r.push([u,...f]);else if(f.length>0){let[h,...y]=f;const g=r[p][1];Fu(g)&&Fu(h)&&(h=ga(!0,g,h)),r[p]=[u,h,...y]}}}}const XN=new af().freeze();function wa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ka(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ba(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Dh(e){if(!Fu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Mh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Jl(e){return ZN(e)?e:new hy(e)}function ZN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function e2(e){return typeof e=="string"||t2(e)}function t2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const n2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zh=[],Fh={allowDangerousHtml:!0},r2=/^(https?|ircs?|mailto|xmpp)$/i,i2=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Lr(e){const t=l2(e),n=s2(e);return o2(t.runSync(t.parse(n),n),e)}function l2(e){const t=e.rehypePlugins||zh,n=e.remarkPlugins||zh,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Fh}:Fh;return XN().use(BS).use(n).use(RN,r).use(t)}function s2(e){const t=e.children||"",n=new hy;return typeof t=="string"&&(n.value=t),n}function o2(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,s=t.skipHtml,o=t.unwrapDisallowed,a=t.urlTransform||a2;for(const f of i2)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+n2+f.id,void 0);return of(e,u),Nk(e,{Fragment:d.Fragment,components:i,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function u(f,c,p){if(f.type==="raw"&&p&&typeof c=="number")return s?p.children.splice(c,1):p.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let h;for(h in ha)if(Object.hasOwn(ha,h)&&Object.hasOwn(f.properties,h)){const y=f.properties[h],g=ha[h];(g===null||g.includes(f.tagName))&&(f.properties[h]=a(String(y||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):l?l.includes(f.tagName):!1;if(!h&&r&&typeof c=="number"&&(h=!r(f,c,p)),h&&p&&typeof c=="number")return o&&f.children?p.children.splice(c,1,...f.children):p.children.splice(c,1),c}}}function a2(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||r2.test(e.slice(0,t))?e:""}function $h(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function u2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function c2(e,t,n){const i=So((n||{}).ignore||[]),l=f2(t);let s=-1;for(;++s<l.length;)fy(e,"text",o);function o(u,f){let c=-1,p;for(;++c<f.length;){const h=f[c],y=p?p.children:void 0;if(i(h,y?y.indexOf(h):void 0,p))return;p=h}if(p)return a(u,f)}function a(u,f){const c=f[f.length-1],p=l[s][0],h=l[s][1];let y=0;const w=c.children.indexOf(u);let m=!1,x=[];p.lastIndex=0;let v=p.exec(u.value);for(;v;){const C=v.index,E={index:v.index,input:v.input,stack:[...f,u]};let b=h(...v,E);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?p.lastIndex=C+1:(y!==C&&x.push({type:"text",value:u.value.slice(y,C)}),Array.isArray(b)?x.push(...b):b&&x.push(b),y=C+v[0].length,m=!0),!p.global)break;v=p.exec(u.value)}return m?(y<u.value.length&&x.push({type:"text",value:u.value.slice(y)}),c.children.splice(w,1,...x)):x=[u],w+x.length}}function f2(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([d2(i[0]),h2(i[1])])}return t}function d2(e){return typeof e=="string"?new RegExp(u2(e),"g"):e}function h2(e){return typeof e=="function"?e:function(){return e}}const Sa="phrasing",Na=["autolink","link","image","label"];function p2(){return{transforms:[k2],enter:{literalAutolink:g2,literalAutolinkEmail:Ca,literalAutolinkHttp:Ca,literalAutolinkWww:Ca},exit:{literalAutolink:w2,literalAutolinkEmail:v2,literalAutolinkHttp:y2,literalAutolinkWww:x2}}}function m2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Sa,notInConstruct:Na},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Sa,notInConstruct:Na},{character:":",before:"[ps]",after:"\\/",inConstruct:Sa,notInConstruct:Na}]}}function g2(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ca(e){this.config.enter.autolinkProtocol.call(this,e)}function y2(e){this.config.exit.autolinkProtocol.call(this,e)}function x2(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function v2(e){this.config.exit.autolinkEmail.call(this,e)}function w2(e){this.exit(e)}function k2(e){c2(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,b2],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),S2]],{ignore:["link","linkReference"]})}function b2(e,t,n,r,i){let l="";if(!py(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!N2(n)))return!1;const s=C2(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:l+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function S2(e,t,n,r){return!py(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function N2(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function C2(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=$h(e,"(");let l=$h(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function py(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||nr(n)||wo(n))&&(!t||n!==47)}my.peek=O2;function E2(){this.buffer()}function j2(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function T2(){this.buffer()}function I2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function L2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function P2(e){this.exit(e)}function _2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function A2(e){this.exit(e)}function O2(){return"["}function my(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),o(),s(),l+=i.move("]"),l}function R2(){return{enter:{gfmFootnoteCallString:E2,gfmFootnoteCall:j2,gfmFootnoteDefinitionLabelString:T2,gfmFootnoteDefinition:I2},exit:{gfmFootnoteCallString:L2,gfmFootnoteCall:P2,gfmFootnoteDefinitionLabelString:_2,gfmFootnoteDefinition:A2}}}function D2(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:my},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,s){const o=l.createTracker(s);let a=o.move("[^");const u=l.enter("footnoteDefinition"),f=l.enter("label");return a+=o.move(l.safe(l.associationId(r),{before:a,after:"]"})),f(),a+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),a+=o.move((t?`
|
|
85
|
+
`:" ")+l.indentLines(l.containerFlow(r,o.current()),t?gy:M2))),u(),a}}function M2(e,t,n){return t===0?e:gy(e,t,n)}function gy(e,t,n){return(n?"":" ")+e}const z2=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];yy.peek=V2;function F2(){return{canContainEols:["delete"],enter:{strikethrough:B2},exit:{strikethrough:U2}}}function $2(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:z2}],handlers:{delete:yy}}}function B2(e){this.enter({type:"delete",children:[]},e)}function U2(e){this.exit(e)}function yy(e,t,n,r){const i=n.createTracker(r),l=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),l(),s}function V2(){return"~"}function H2(e){return e.length}function K2(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||H2,l=[],s=[],o=[],a=[];let u=0,f=-1;for(;++f<e.length;){const g=[],w=[];let m=-1;for(e[f].length>u&&(u=e[f].length);++m<e[f].length;){const x=W2(e[f][m]);if(n.alignDelimiters!==!1){const v=i(x);w[m]=v,(a[m]===void 0||v>a[m])&&(a[m]=v)}g.push(x)}s[f]=g,o[f]=w}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)l[c]=Bh(r[c]);else{const g=Bh(r);for(;++c<u;)l[c]=g}c=-1;const p=[],h=[];for(;++c<u;){const g=l[c];let w="",m="";g===99?(w=":",m=":"):g===108?w=":":g===114&&(m=":");let x=n.alignDelimiters===!1?1:Math.max(1,a[c]-w.length-m.length);const v=w+"-".repeat(x)+m;n.alignDelimiters!==!1&&(x=w.length+x+m.length,x>a[c]&&(a[c]=x),h[c]=x),p[c]=v}s.splice(1,0,p),o.splice(1,0,h),f=-1;const y=[];for(;++f<s.length;){const g=s[f],w=o[f];c=-1;const m=[];for(;++c<u;){const x=g[c]||"";let v="",C="";if(n.alignDelimiters!==!1){const E=a[c]-(w[c]||0),b=l[c];b===114?v=" ".repeat(E):b===99?E%2?(v=" ".repeat(E/2+.5),C=" ".repeat(E/2-.5)):(v=" ".repeat(E/2),C=v):C=" ".repeat(E)}n.delimiterStart!==!1&&!c&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&x==="")&&(n.delimiterStart!==!1||c)&&m.push(" "),n.alignDelimiters!==!1&&m.push(v),m.push(x),n.alignDelimiters!==!1&&m.push(C),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&m.push("|")}y.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return y.join(`
|
|
86
|
+
`)}function W2(e){return e==null?"":String(e)}function Bh(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function q2(e,t,n,r){const i=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const s=n.indentLines(n.containerFlow(e,l.current()),Q2);return i(),s}function Q2(e,t,n){return">"+(n?"":" ")+e}function Y2(e,t){return Uh(e,t.inConstruct,!0)&&!Uh(e,t.notInConstruct,!1)}function Uh(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Vh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
87
|
+
`&&Y2(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
88
|
+
`}function J2(e,t){const n=String(e);let r=n.indexOf(t),i=r,l=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>s&&(s=l):l=1,i=r+t.length,r=n.indexOf(t,i);return s}function G2(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function X2(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Z2(e,t,n,r){const i=X2(n),l=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(G2(e,n)){const c=n.enter("codeIndented"),p=n.indentLines(l,eC);return c(),p}const o=n.createTracker(r),a=i.repeat(Math.max(J2(l,i)+1,3)),u=n.enter("codeFenced");let f=o.move(a);if(e.lang){const c=n.enter(`codeFencedLang${s}`);f+=o.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...o.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${s}`);f+=o.move(" "),f+=o.move(n.safe(e.meta,{before:f,after:`
|
|
89
|
+
`,encode:["`"],...o.current()})),c()}return f+=o.move(`
|
|
90
|
+
`),l&&(f+=o.move(l+`
|
|
91
|
+
`)),f+=o.move(a),u(),f}function eC(e,t,n){return(n?"":" ")+e}function uf(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function tC(e,t,n,r){const i=uf(n),l=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(o=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
92
|
+
`,...a.current()}))),o(),e.title&&(o=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),o()),s(),u}function nC(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function dl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Js(e,t,n){const r=Xr(e),i=Xr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}xy.peek=rC;function xy(e,t,n,r){const i=nC(n),l=n.enter("emphasis"),s=n.createTracker(r),o=s.move(i);let a=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const u=a.charCodeAt(0),f=Js(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(a=dl(u)+a.slice(1));const c=a.charCodeAt(a.length-1),p=Js(r.after.charCodeAt(0),c,i);p.inside&&(a=a.slice(0,-1)+dl(c));const h=s.move(i);return l(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},o+a+h}function rC(e,t,n){return n.options.emphasis||"*"}function iC(e,t){let n=!1;return of(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Mu}),!!((!e.depth||e.depth<3)&&Zc(e)&&(t.options.setext||n))}function lC(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(r);if(iC(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),p=n.containerPhrasing(e,{...l.current(),before:`
|
|
93
|
+
`,after:`
|
|
94
|
+
`});return c(),f(),p+`
|
|
95
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
96
|
+
`))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),a=n.enter("phrasing");l.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
97
|
+
`,...l.current()});return/^[\t ]/.test(u)&&(u=dl(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),o(),u}vy.peek=sC;function vy(e){return e.value||""}function sC(){return"<"}wy.peek=oC;function wy(e,t,n,r){const i=uf(n),l=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(o=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),o(),e.title&&(o=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),o()),u+=a.move(")"),s(),u}function oC(){return"!"}ky.peek=aC;function ky(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let a=o.move("![");const u=n.safe(e.alt,{before:a,after:"]",...o.current()});a+=o.move(u+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...o.current()});return s(),n.stack=f,l(),i==="full"||!u||u!==c?a+=o.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=o.move("]"),a}function aC(){return"!"}by.peek=uC;function by(e,t,n){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){const s=n.unsafe[l],o=n.compilePattern(s);let a;if(s.atBreak)for(;a=o.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function uC(){return"`"}function Sy(e,t){const n=Zc(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ny.peek=cC;function Ny(e,t,n,r){const i=uf(n),l=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,a;if(Sy(e,n)){const f=n.stack;n.stack=[],o=n.enter("autolink");let c=s.move("<");return c+=s.move(n.containerPhrasing(e,{before:c,after:">",...s.current()})),c+=s.move(">"),o(),n.stack=f,c}o=n.enter("link"),a=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${l}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),o(),u}function cC(e,t,n){return Sy(e,n)?"<":"["}Cy.peek=fC;function Cy(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let a=o.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...o.current()});a+=o.move(u+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...o.current()});return s(),n.stack=f,l(),i==="full"||!u||u!==c?a+=o.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=o.move("]"),a}function fC(){return"["}function cf(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function dC(e){const t=cf(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function hC(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ey(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function pC(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let s=e.ordered?hC(n):cf(n);const o=e.ordered?s==="."?")":".":dC(n);let a=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),Ey(n)===s&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(s=o),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=l,i(),u}function mC(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function gC(e,t,n,r){const i=mC(n);let l=n.bulletCurrent||cf(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let s=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(l+" ".repeat(s-l.length)),o.shift(s);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),f);return a(),u;function f(c,p,h){return p?(h?"":" ".repeat(s))+c:(h?l:l+" ".repeat(s-l.length))+c}}function yC(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),s=n.containerPhrasing(e,r);return l(),i(),s}const xC=So(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vC(e,t,n,r){return(e.children.some(function(s){return xC(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function wC(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}jy.peek=kC;function jy(e,t,n,r){const i=wC(n),l=n.enter("strong"),s=n.createTracker(r),o=s.move(i+i);let a=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const u=a.charCodeAt(0),f=Js(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(a=dl(u)+a.slice(1));const c=a.charCodeAt(a.length-1),p=Js(r.after.charCodeAt(0),c,i);p.inside&&(a=a.slice(0,-1)+dl(c));const h=s.move(i+i);return l(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},o+a+h}function kC(e,t,n){return n.options.strong||"*"}function bC(e,t,n,r){return n.safe(e.value,r)}function SC(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function NC(e,t,n){const r=(Ey(n)+(n.options.ruleSpaces?" ":"")).repeat(SC(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ty={blockquote:q2,break:Vh,code:Z2,definition:tC,emphasis:xy,hardBreak:Vh,heading:lC,html:vy,image:wy,imageReference:ky,inlineCode:by,link:Ny,linkReference:Cy,list:pC,listItem:gC,paragraph:yC,root:vC,strong:jy,text:bC,thematicBreak:NC};function CC(){return{enter:{table:EC,tableData:Hh,tableHeader:Hh,tableRow:TC},exit:{codeText:IC,table:jC,tableData:Ea,tableHeader:Ea,tableRow:Ea}}}function EC(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function jC(e){this.exit(e),this.data.inTable=void 0}function TC(e){this.enter({type:"tableRow",children:[]},e)}function Ea(e){this.exit(e)}function Hh(e){this.enter({type:"tableCell",children:[]},e)}function IC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,LC));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function LC(e,t){return t==="|"?t:e}function PC(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
98
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:a,tableRow:o}};function s(h,y,g,w){return u(f(h,g,w),h.align)}function o(h,y,g,w){const m=c(h,g,w),x=u([m]);return x.slice(0,x.indexOf(`
|
|
99
|
+
`))}function a(h,y,g,w){const m=g.enter("tableCell"),x=g.enter("phrasing"),v=g.containerPhrasing(h,{...w,before:l,after:l});return x(),m(),v}function u(h,y){return K2(h,{align:y,alignDelimiters:r,padding:n,stringLength:i})}function f(h,y,g){const w=h.children;let m=-1;const x=[],v=y.enter("table");for(;++m<w.length;)x[m]=c(w[m],y,g);return v(),x}function c(h,y,g){const w=h.children;let m=-1;const x=[],v=y.enter("tableRow");for(;++m<w.length;)x[m]=a(w[m],h,y,g);return v(),x}function p(h,y,g){let w=Ty.inlineCode(h,y,g);return g.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function _C(){return{exit:{taskListCheckValueChecked:Kh,taskListCheckValueUnchecked:Kh,paragraph:OC}}}function AC(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:RC}}}function Kh(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function OC(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let l=-1,s;for(;++l<i.length;){const o=i[l];if(o.type==="paragraph"){s=o;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function RC(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);l&&o.move(s);let a=Ty.listItem(e,t,n,{...r,...o.current()});return l&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(f){return f+s}}function DC(){return[p2(),R2(),F2(),CC(),_C()]}function MC(e){return{extensions:[m2(),D2(e),$2(),PC(e),AC()]}}const zC={tokenize:HC,partial:!0},Iy={tokenize:KC,partial:!0},Ly={tokenize:WC,partial:!0},Py={tokenize:qC,partial:!0},FC={tokenize:QC,partial:!0},_y={name:"wwwAutolink",tokenize:UC,previous:Oy},Ay={name:"protocolAutolink",tokenize:VC,previous:Ry},nn={name:"emailAutolink",tokenize:BC,previous:Dy},Ft={};function $C(){return{text:Ft}}let Mn=48;for(;Mn<123;)Ft[Mn]=nn,Mn++,Mn===58?Mn=65:Mn===91&&(Mn=97);Ft[43]=nn;Ft[45]=nn;Ft[46]=nn;Ft[95]=nn;Ft[72]=[nn,Ay];Ft[104]=[nn,Ay];Ft[87]=[nn,_y];Ft[119]=[nn,_y];function BC(e,t,n){const r=this;let i,l;return s;function s(c){return!Bu(c)||!Dy.call(r,r.previous)||ff(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(c))}function o(c){return Bu(c)?(e.consume(c),o):c===64?(e.consume(c),a):n(c)}function a(c){return c===46?e.check(FC,f,u)(c):c===45||c===95||Re(c)?(l=!0,e.consume(c),a):f(c)}function u(c){return e.consume(c),i=!0,a}function f(c){return l&&i&&Be(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function UC(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Oy.call(r,r.previous)||ff(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(zC,e.attempt(Iy,e.attempt(Ly,l),n),n)(s))}function l(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function VC(e,t,n){const r=this;let i="",l=!1;return s;function s(c){return(c===72||c===104)&&Ry.call(r,r.previous)&&!ff(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),o):n(c)}function o(c){if(Be(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),o;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),a}return n(c)}function a(c){return c===47?(e.consume(c),l?u:(l=!0,a)):n(c)}function u(c){return c===null||qs(c)||re(c)||nr(c)||wo(c)?n(c):e.attempt(Iy,e.attempt(Ly,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function HC(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),l):n(s)}function l(s){return s===null?n(s):t(s)}}function KC(e,t,n){let r,i,l;return s;function s(u){return u===46||u===95?e.check(Py,a,o)(u):u===null||re(u)||nr(u)||u!==45&&wo(u)?a(u):(l=!0,e.consume(u),s)}function o(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function a(u){return i||r||!l?n(u):t(u)}}function WC(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?l(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Py,t,l)(s):s===null||re(s)||nr(s)?t(s):(e.consume(s),i)}function l(s){return s===41&&r++,e.consume(s),i}}function qC(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),l):o===93?(e.consume(o),i):o===60||o===null||re(o)||nr(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||re(o)||nr(o)?t(o):r(o)}function l(o){return Be(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):Be(o)?(e.consume(o),s):n(o)}}function QC(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return Re(l)?n(l):t(l)}}function Oy(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||re(e)}function Ry(e){return!Be(e)}function Dy(e){return!(e===47||Bu(e))}function Bu(e){return e===43||e===45||e===46||e===95||Re(e)}function ff(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const YC={tokenize:rE,partial:!0};function JC(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:eE,continuation:{tokenize:tE},exit:nE}},text:{91:{name:"gfmFootnoteCall",tokenize:ZC},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:GC,resolveTo:XC}}}}function GC(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){s=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return o;function o(a){if(!s||!s._balanced)return n(a);const u=jt(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!l.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function XC(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",s,t],["exit",s,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function ZC(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,s;return o;function o(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),a}function a(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(l>999||c===93&&!s||c===null||c===91||re(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(jt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return re(c)||(s=!0),l++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),l++,u):u(c)}}function eE(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,s=0,o;return a;function a(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(y)}function f(y){if(s>999||y===93&&!o||y===null||y===91||re(y))return n(y);if(y===93){e.exit("chunkString");const g=e.exit("gfmFootnoteDefinitionLabelString");return l=jt(r.sliceSerialize(g)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return re(y)||(o=!0),s++,e.consume(y),y===92?c:f}function c(y){return y===91||y===92||y===93?(e.consume(y),s++,f):f(y)}function p(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(l)||i.push(l),G(e,h,"gfmFootnoteDefinitionWhitespace")):n(y)}function h(y){return t(y)}}function tE(e,t,n){return e.check(Nl,t,e.attempt(YC,t,n))}function nE(e){e.exit("gfmFootnoteDefinition")}function rE(e,t,n){const r=this;return G(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(l):n(l)}}function iE(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let a=-1;for(;++a<s.length;)if(s[a][0]==="enter"&&s[a][1].type==="strikethroughSequenceTemporary"&&s[a][1]._close){let u=a;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[a][1].end.offset-s[a][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[a][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[a][1].end)},c={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[a][1].start)},p=[["enter",f,o],["enter",s[u][1],o],["exit",s[u][1],o],["enter",c,o]],h=o.parser.constructs.insideSpan.null;h&<(p,p.length,0,ko(h,s.slice(u+1,a),o)),lt(p,p.length,0,[["exit",c,o],["enter",s[a][1],o],["exit",s[a][1],o],["exit",f,o]]),lt(s,u-1,a-u+3,p),a=u+p.length-2;break}}for(a=-1;++a<s.length;)s[a][1].type==="strikethroughSequenceTemporary"&&(s[a][1].type="data");return s}function l(s,o,a){const u=this.previous,f=this.events;let c=0;return p;function p(y){return u===126&&f[f.length-1][1].type!=="characterEscape"?a(y):(s.enter("strikethroughSequenceTemporary"),h(y))}function h(y){const g=Xr(u);if(y===126)return c>1?a(y):(s.consume(y),c++,h);if(c<2&&!n)return a(y);const w=s.exit("strikethroughSequenceTemporary"),m=Xr(y);return w._open=!m||m===2&&!!g,w._close=!g||g===2&&!!m,o(y)}}}class lE{constructor(){this.map=[]}add(t,n,r){sE(this,t,n,r)}consume(t){if(this.map.sort(function(l,s){return l[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0}}function sE(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function oE(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function aE(){return{flow:{null:{name:"table",tokenize:uE,resolveAll:cE}}}}function uE(e,t,n){const r=this;let i=0,l=0,s;return o;function o(S){let j=r.events.length-1;for(;j>-1;){const U=r.events[j][1].type;if(U==="lineEnding"||U==="linePrefix")j--;else break}const A=j>-1?r.events[j][1].type:null,D=A==="tableHead"||A==="tableRow"?b:a;return D===b&&r.parser.lazy[r.now().line]?n(S):D(S)}function a(S){return e.enter("tableHead"),e.enter("tableRow"),u(S)}function u(S){return S===124||(s=!0,l+=1),f(S)}function f(S){return S===null?n(S):B(S)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),h):n(S):q(S)?G(e,f,"whitespace")(S):(l+=1,s&&(s=!1,i+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),c(S)))}function c(S){return S===null||S===124||re(S)?(e.exit("data"),f(S)):(e.consume(S),S===92?p:c)}function p(S){return S===92||S===124?(e.consume(S),c):c(S)}function h(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),s=!1,q(S)?G(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):y(S))}function y(S){return S===45||S===58?w(S):S===124?(s=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),g):E(S)}function g(S){return q(S)?G(e,w,"whitespace")(S):w(S)}function w(S){return S===58?(l+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),m):S===45?(l+=1,m(S)):S===null||B(S)?C(S):E(S)}function m(S){return S===45?(e.enter("tableDelimiterFiller"),x(S)):E(S)}function x(S){return S===45?(e.consume(S),x):S===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(S))}function v(S){return q(S)?G(e,C,"whitespace")(S):C(S)}function C(S){return S===124?y(S):S===null||B(S)?!s||i!==l?E(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):E(S)}function E(S){return n(S)}function b(S){return e.enter("tableRow"),T(S)}function T(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),T):S===null||B(S)?(e.exit("tableRow"),t(S)):q(S)?G(e,T,"whitespace")(S):(e.enter("data"),P(S))}function P(S){return S===null||S===124||re(S)?(e.exit("data"),T(S)):(e.consume(S),S===92?I:P)}function I(S){return S===92||S===124?(e.consume(S),P):P(S)}}function cE(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],s=[0,0,0,0],o=!1,a=0,u,f,c;const p=new lE;for(;++n<e.length;){const h=e[n],y=h[1];h[0]==="enter"?y.type==="tableHead"?(o=!1,a!==0&&(Wh(p,t,a,u,f),f=void 0,a=0),u={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},p.add(n,0,[["enter",u,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,c=void 0,l=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,f={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},p.add(n,0,[["enter",f,t]])),i=y.type==="tableDelimiterRow"?2:f?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(l[1]!==0&&(s[0]=s[1],c=Gl(p,t,l,i,void 0,c),l=[0,0,0,0]),s[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(s[0]=s[1],c=Gl(p,t,l,i,void 0,c)),l=s,s=[l[1],n,0,0])):y.type==="tableHead"?(o=!0,a=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(a=n,l[1]!==0?(s[0]=s[1],c=Gl(p,t,l,i,n,c)):s[1]!==0&&(c=Gl(p,t,s,i,n,c)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(s[3]=n)}for(a!==0&&Wh(p,t,a,u,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=oE(t.events,n))}return e}function Gl(e,t,n,r,i,l){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(l.end=Object.assign({},yr(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const a=yr(t.events,n[1]);if(l={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const u=yr(t.events,n[2]),f=yr(t.events,n[3]),c={type:o,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,g=n[3]-n[2]-1;e.add(y,g,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(l.end=Object.assign({},yr(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function Wh(e,t,n,r,i){const l=[],s=yr(t.events,n);i&&(i.end=Object.assign({},s),l.push(["exit",i,t])),r.end=Object.assign({},s),l.push(["exit",r,t]),e.add(n+1,0,l)}function yr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const fE={name:"tasklistCheck",tokenize:hE};function dE(){return{text:{91:fE}}}function hE(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),l)}function l(a){return re(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),s):n(a)}function s(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(a)}function o(a){return B(a)?t(a):q(a)?e.check({tokenize:pE},t,n)(a):n(a)}}function pE(e,t,n){return G(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function mE(e){return Wg([$C(),JC(),iE(e),aE(),dE()])}const gE={};function Pr(e){const t=this,n=e||gE,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(mE(n)),l.push(DC()),s.push(MC(n))}const df=Symbol.for("yaml.alias"),Uu=Symbol.for("yaml.document"),Cn=Symbol.for("yaml.map"),My=Symbol.for("yaml.pair"),zt=Symbol.for("yaml.scalar"),oi=Symbol.for("yaml.seq"),yt=Symbol.for("yaml.node.type"),Rn=e=>!!e&&typeof e=="object"&&e[yt]===df,ar=e=>!!e&&typeof e=="object"&&e[yt]===Uu,ai=e=>!!e&&typeof e=="object"&&e[yt]===Cn,fe=e=>!!e&&typeof e=="object"&&e[yt]===My,ie=e=>!!e&&typeof e=="object"&&e[yt]===zt,ui=e=>!!e&&typeof e=="object"&&e[yt]===oi;function pe(e){if(e&&typeof e=="object")switch(e[yt]){case Cn:case oi:return!0}return!1}function ge(e){if(e&&typeof e=="object")switch(e[yt]){case df:case Cn:case zt:case oi:return!0}return!1}const zy=e=>(ie(e)||pe(e))&&!!e.anchor,qe=Symbol("break visit"),Fy=Symbol("skip children"),Mt=Symbol("remove node");function ur(e,t){const n=$y(t);ar(e)?_r(null,e.contents,n,Object.freeze([e]))===Mt&&(e.contents=null):_r(null,e,n,Object.freeze([]))}ur.BREAK=qe;ur.SKIP=Fy;ur.REMOVE=Mt;function _r(e,t,n,r){const i=By(e,t,n,r);if(ge(i)||fe(i))return Uy(e,r,i),_r(e,i,n,r);if(typeof i!="symbol"){if(pe(t)){r=Object.freeze(r.concat(t));for(let l=0;l<t.items.length;++l){const s=_r(l,t.items[l],n,r);if(typeof s=="number")l=s-1;else{if(s===qe)return qe;s===Mt&&(t.items.splice(l,1),l-=1)}}}else if(fe(t)){r=Object.freeze(r.concat(t));const l=_r("key",t.key,n,r);if(l===qe)return qe;l===Mt&&(t.key=null);const s=_r("value",t.value,n,r);if(s===qe)return qe;s===Mt&&(t.value=null)}}return i}async function Co(e,t){const n=$y(t);ar(e)?await Ar(null,e.contents,n,Object.freeze([e]))===Mt&&(e.contents=null):await Ar(null,e,n,Object.freeze([]))}Co.BREAK=qe;Co.SKIP=Fy;Co.REMOVE=Mt;async function Ar(e,t,n,r){const i=await By(e,t,n,r);if(ge(i)||fe(i))return Uy(e,r,i),Ar(e,i,n,r);if(typeof i!="symbol"){if(pe(t)){r=Object.freeze(r.concat(t));for(let l=0;l<t.items.length;++l){const s=await Ar(l,t.items[l],n,r);if(typeof s=="number")l=s-1;else{if(s===qe)return qe;s===Mt&&(t.items.splice(l,1),l-=1)}}}else if(fe(t)){r=Object.freeze(r.concat(t));const l=await Ar("key",t.key,n,r);if(l===qe)return qe;l===Mt&&(t.key=null);const s=await Ar("value",t.value,n,r);if(s===qe)return qe;s===Mt&&(t.value=null)}}return i}function $y(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function By(e,t,n,r){var i,l,s,o,a;if(typeof n=="function")return n(e,t,r);if(ai(t))return(i=n.Map)==null?void 0:i.call(n,e,t,r);if(ui(t))return(l=n.Seq)==null?void 0:l.call(n,e,t,r);if(fe(t))return(s=n.Pair)==null?void 0:s.call(n,e,t,r);if(ie(t))return(o=n.Scalar)==null?void 0:o.call(n,e,t,r);if(Rn(t))return(a=n.Alias)==null?void 0:a.call(n,e,t,r)}function Uy(e,t,n){const r=t[t.length-1];if(pe(r))r.items[e]=n;else if(fe(r))e==="key"?r.key=n:r.value=n;else if(ar(r))r.contents=n;else{const i=Rn(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const yE={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},xE=e=>e.replace(/[!,[\]{}]/g,t=>yE[t]);class $e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},$e.defaultYaml,t),this.tags=Object.assign({},$e.defaultTags,n)}clone(){const t=new $e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new $e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:$e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},$e.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:$e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},$e.defaultTags),this.atNextDocument=!1);const r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[l,s]=r;return this.tags[l]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[l]=r;if(l==="1.1"||l==="1.2")return this.yaml.version=l,!0;{const s=/^\d+\.\d+$/.test(l);return n(6,`Unsupported YAML version ${l}`,s),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const s=t.slice(2,-1);return s==="!"||s==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),s)}const[,r,i]=t.match(/^(.*!)([^!]*)$/s);i||n(`The ${t} tag has no suffix`);const l=this.tags[r];if(l)try{return l+decodeURIComponent(i)}catch(s){return n(String(s)),null}return r==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+xE(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(t&&r.length>0&&ge(t.contents)){const l={};ur(t.contents,(s,o)=>{ge(o)&&o.tag&&(l[o.tag]=!0)}),i=Object.keys(l)}else i=[];for(const[l,s]of r)l==="!!"&&s==="tag:yaml.org,2002:"||(!t||i.some(o=>o.startsWith(s)))&&n.push(`%TAG ${l} ${s}`);return n.join(`
|
|
100
|
+
`)}}$e.defaultYaml={explicit:!1,version:"1.2"};$e.defaultTags={"!!":"tag:yaml.org,2002:"};function Vy(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function Hy(e){const t=new Set;return ur(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function Ky(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function vE(e,t){const n=[],r=new Map;let i=null;return{onAnchor:l=>{n.push(l),i??(i=Hy(e));const s=Ky(t,i);return i.add(s),s},setAnchors:()=>{for(const l of n){const s=r.get(l);if(typeof s=="object"&&s.anchor&&(ie(s.node)||pe(s.node)))s.node.anchor=s.anchor;else{const o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=l,o}}},sourceObjects:r}}function Or(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,l=r.length;i<l;++i){const s=r[i],o=Or(e,r,String(i),s);o===void 0?delete r[i]:o!==s&&(r[i]=o)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const l=r.get(i),s=Or(e,r,i,l);s===void 0?r.delete(i):s!==l&&r.set(i,s)}else if(r instanceof Set)for(const i of Array.from(r)){const l=Or(e,r,i,i);l===void 0?r.delete(i):l!==i&&(r.delete(i),r.add(l))}else for(const[i,l]of Object.entries(r)){const s=Or(e,r,i,l);s===void 0?delete r[i]:s!==l&&(r[i]=s)}return e.call(t,n,r)}function pt(e,t,n){if(Array.isArray(e))return e.map((r,i)=>pt(r,String(i),n));if(e&&typeof e.toJSON=="function"){if(!n||!zy(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=l=>{r.res=l,delete n.onCreate};const i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class hf{constructor(t){Object.defineProperty(this,yt,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:l}={}){if(!ar(t))throw new TypeError("A document argument is required");const s={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},o=pt(this,"",s);if(typeof i=="function")for(const{count:a,res:u}of s.anchors.values())i(u,a);return typeof l=="function"?Or(l,{"":o},"",o):o}}class Eo extends hf{constructor(t){super(df),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let r;n!=null&&n.aliasResolveCache?r=n.aliasResolveCache:(r=[],ur(t,{Node:(l,s)=>{(Rn(s)||zy(s))&&r.push(s)}}),n&&(n.aliasResolveCache=r));let i;for(const l of r){if(l===this)break;l.anchor===this.source&&(i=l)}return i}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:l}=n,s=this.resolve(i,n);if(!s){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let o=r.get(s);if(o||(pt(s,null,n),o=r.get(s)),(o==null?void 0:o.res)===void 0){const a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(l>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=ys(i,s,r)),o.count*o.aliasCount>l)){const a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return o.res}toString(t,n,r){const i=`*${this.source}`;if(t){if(Vy(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(l)}if(t.implicitKey)return`${i} `}return i}}function ys(e,t,n){if(Rn(t)){const r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(pe(t)){let r=0;for(const i of t.items){const l=ys(e,i,n);l>r&&(r=l)}return r}else if(fe(t)){const r=ys(e,t.key,n),i=ys(e,t.value,n);return Math.max(r,i)}return 1}const Wy=e=>!e||typeof e!="function"&&typeof e!="object";class V extends hf{constructor(t){super(zt),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:pt(this.value,t,n)}toString(){return String(this.value)}}V.BLOCK_FOLDED="BLOCK_FOLDED";V.BLOCK_LITERAL="BLOCK_LITERAL";V.PLAIN="PLAIN";V.QUOTE_DOUBLE="QUOTE_DOUBLE";V.QUOTE_SINGLE="QUOTE_SINGLE";const wE="tag:yaml.org,2002:";function kE(e,t,n){if(t){const r=n.filter(l=>l.tag===t),i=r.find(l=>!l.format)??r[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find(r=>{var i;return((i=r.identify)==null?void 0:i.call(r,e))&&!r.format})}function hl(e,t,n){var c,p,h;if(ar(e)&&(e=e.contents),ge(e))return e;if(fe(e)){const y=(p=(c=n.schema[Cn]).createNode)==null?void 0:p.call(c,n.schema,null,n);return y.items.push(e),y}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:l,schema:s,sourceObjects:o}=n;let a;if(r&&e&&typeof e=="object"){if(a=o.get(e),a)return a.anchor??(a.anchor=i(e)),new Eo(a.anchor);a={anchor:null,node:null},o.set(e,a)}t!=null&&t.startsWith("!!")&&(t=wE+t.slice(2));let u=kE(e,t,s.tags);if(!u){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const y=new V(e);return a&&(a.node=y),y}u=e instanceof Map?s[Cn]:Symbol.iterator in Object(e)?s[oi]:s[Cn]}l&&(l(u),delete n.onTagObj);const f=u!=null&&u.createNode?u.createNode(n.schema,e,n):typeof((h=u==null?void 0:u.nodeClass)==null?void 0:h.from)=="function"?u.nodeClass.from(n.schema,e,n):new V(e);return t?f.tag=t:u.default||(f.tag=u.tag),a&&(a.node=f),f}function Gs(e,t,n){let r=n;for(let i=t.length-1;i>=0;--i){const l=t[i];if(typeof l=="number"&&Number.isInteger(l)&&l>=0){const s=[];s[l]=r,r=s}else r=new Map([[l,r]])}return hl(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const _i=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class qy extends hf{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>ge(r)||fe(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(_i(t))this.add(n);else{const[r,...i]=t,l=this.get(r,!0);if(pe(l))l.addIn(i,n);else if(l===void 0&&this.schema)this.set(r,Gs(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(pe(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...i]=t,l=this.get(r,!0);return i.length===0?!n&&ie(l)?l.value:l:pe(l)?l.getIn(i,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!fe(n))return!1;const r=n.value;return r==null||t&&ie(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const i=this.get(n,!0);return pe(i)?i.hasIn(r):!1}setIn(t,n){const[r,...i]=t;if(i.length===0)this.set(r,n);else{const l=this.get(r,!0);if(pe(l))l.setIn(i,n);else if(l===void 0&&this.schema)this.set(r,Gs(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}const bE=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function qt(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Wn=(e,t,n)=>e.endsWith(`
|
|
101
|
+
`)?qt(n,t):n.includes(`
|
|
102
|
+
`)?`
|
|
103
|
+
`+qt(n,t):(e.endsWith(" ")?"":" ")+n,Qy="flow",Vu="block",xs="quoted";function jo(e,t,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:l=20,onFold:s,onOverflow:o}={}){if(!i||i<0)return e;i<l&&(l=0);const a=Math.max(1+l,1+i-t.length);if(e.length<=a)return e;const u=[],f={};let c=i-t.length;typeof r=="number"&&(r>i-Math.max(2,l)?u.push(0):c=i-r);let p,h,y=!1,g=-1,w=-1,m=-1;n===Vu&&(g=qh(e,g,t.length),g!==-1&&(c=g+a));for(let v;v=e[g+=1];){if(n===xs&&v==="\\"){switch(w=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}m=g}if(v===`
|
|
104
|
+
`)n===Vu&&(g=qh(e,g,t.length)),c=g+t.length+a,p=void 0;else{if(v===" "&&h&&h!==" "&&h!==`
|
|
105
|
+
`&&h!==" "){const C=e[g+1];C&&C!==" "&&C!==`
|
|
106
|
+
`&&C!==" "&&(p=g)}if(g>=c)if(p)u.push(p),c=p+a,p=void 0;else if(n===xs){for(;h===" "||h===" ";)h=v,v=e[g+=1],y=!0;const C=g>m+1?g-2:w-1;if(f[C])return e;u.push(C),f[C]=!0,c=C+a,p=void 0}else y=!0}h=v}if(y&&o&&o(),u.length===0)return e;s&&s();let x=e.slice(0,u[0]);for(let v=0;v<u.length;++v){const C=u[v],E=u[v+1]||e.length;C===0?x=`
|
|
107
|
+
${t}${e.slice(0,E)}`:(n===xs&&f[C]&&(x+=`${e[C]}\\`),x+=`
|
|
108
|
+
${t}${e.slice(C+1,E)}`)}return x}function qh(e,t,n){let r=t,i=t+1,l=e[i];for(;l===" "||l===" ";)if(t<i+n)l=e[++t];else{do l=e[++t];while(l&&l!==`
|
|
109
|
+
`);r=t,i=t+1,l=e[i]}return r}const To=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Io=e=>/^(%|---|\.\.\.)/m.test(e);function SE(e,t,n){if(!t||t<0)return!1;const r=t-n,i=e.length;if(i<=r)return!1;for(let l=0,s=0;l<i;++l)if(e[l]===`
|
|
110
|
+
`){if(l-s>r)return!0;if(s=l+1,i-s<=r)return!1}return!0}function Ki(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,l=t.indent||(Io(e)?" ":"");let s="",o=0;for(let a=0,u=n[a];u;u=n[++a])if(u===" "&&n[a+1]==="\\"&&n[a+2]==="n"&&(s+=n.slice(o,a)+"\\ ",a+=1,o=a,u="\\"),u==="\\")switch(n[a+1]){case"u":{s+=n.slice(o,a);const f=n.substr(a+2,4);switch(f){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:f.substr(0,2)==="00"?s+="\\x"+f.substr(2):s+=n.substr(a,6)}a+=5,o=a+1}break;case"n":if(r||n[a+2]==='"'||n.length<i)a+=1;else{for(s+=n.slice(o,a)+`
|
|
111
|
+
|
|
112
|
+
`;n[a+2]==="\\"&&n[a+3]==="n"&&n[a+4]!=='"';)s+=`
|
|
113
|
+
`,a+=2;s+=l,n[a+2]===" "&&(s+="\\"),a+=1,o=a+1}break;default:a+=1}return s=o?s+n.slice(o):n,r?s:jo(s,l,xs,To(t,!1))}function Hu(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
114
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return Ki(e,t);const n=t.indent||(Io(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
115
|
+
${n}`)+"'";return t.implicitKey?r:jo(r,n,Qy,To(t,!1))}function Rr(e,t){const{singleQuote:n}=t.options;let r;if(n===!1)r=Ki;else{const i=e.includes('"'),l=e.includes("'");i&&!l?r=Hu:l&&!i?r=Ki:r=n?Hu:Ki}return r(e,t)}let Ku;try{Ku=new RegExp(`(^|(?<!
|
|
116
|
+
))
|
|
117
|
+
+(?!
|
|
118
|
+
|$)`,"g")}catch{Ku=/\n+(?!\n|$)/g}function vs({comment:e,type:t,value:n},r,i,l){const{blockQuote:s,commentString:o,lineWidth:a}=r.options;if(!s||/\n[\t ]+$/.test(n))return Rr(n,r);const u=r.indent||(r.forceBlockIndent||Io(n)?" ":""),f=s==="literal"?!0:s==="folded"||t===V.BLOCK_FOLDED?!1:t===V.BLOCK_LITERAL?!0:!SE(n,a,u.length);if(!n)return f?`|
|
|
119
|
+
`:`>
|
|
120
|
+
`;let c,p;for(p=n.length;p>0;--p){const E=n[p-1];if(E!==`
|
|
121
|
+
`&&E!==" "&&E!==" ")break}let h=n.substring(p);const y=h.indexOf(`
|
|
122
|
+
`);y===-1?c="-":n===h||y!==h.length-1?(c="+",l&&l()):c="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
|
|
123
|
+
`&&(h=h.slice(0,-1)),h=h.replace(Ku,`$&${u}`));let g=!1,w,m=-1;for(w=0;w<n.length;++w){const E=n[w];if(E===" ")g=!0;else if(E===`
|
|
124
|
+
`)m=w;else break}let x=n.substring(0,m<w?m+1:w);x&&(n=n.substring(x.length),x=x.replace(/\n+/g,`$&${u}`));let C=(g?u?"2":"1":"")+c;if(e&&(C+=" "+o(e.replace(/ ?[\r\n]+/g," ")),i&&i()),!f){const E=n.replace(/\n+/g,`
|
|
125
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`);let b=!1;const T=To(r,!0);s!=="folded"&&t!==V.BLOCK_FOLDED&&(T.onOverflow=()=>{b=!0});const P=jo(`${x}${E}${h}`,u,Vu,T);if(!b)return`>${C}
|
|
126
|
+
${u}${P}`}return n=n.replace(/\n+/g,`$&${u}`),`|${C}
|
|
127
|
+
${u}${x}${n}${h}`}function NE(e,t,n,r){const{type:i,value:l}=e,{actualString:s,implicitKey:o,indent:a,indentStep:u,inFlow:f}=t;if(o&&l.includes(`
|
|
128
|
+
`)||f&&/[[\]{},]/.test(l))return Rr(l,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(l))return o||f||!l.includes(`
|
|
129
|
+
`)?Rr(l,t):vs(e,t,n,r);if(!o&&!f&&i!==V.PLAIN&&l.includes(`
|
|
130
|
+
`))return vs(e,t,n,r);if(Io(l)){if(a==="")return t.forceBlockIndent=!0,vs(e,t,n,r);if(o&&a===u)return Rr(l,t)}const c=l.replace(/\n+/g,`$&
|
|
131
|
+
${a}`);if(s){const p=g=>{var w;return g.default&&g.tag!=="tag:yaml.org,2002:str"&&((w=g.test)==null?void 0:w.test(c))},{compat:h,tags:y}=t.doc.schema;if(y.some(p)||h!=null&&h.some(p))return Rr(l,t)}return o?c:jo(c,a,Qy,To(t,!1))}function El(e,t,n,r){const{implicitKey:i,inFlow:l}=t,s=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==V.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(o=V.QUOTE_DOUBLE);const a=f=>{switch(f){case V.BLOCK_FOLDED:case V.BLOCK_LITERAL:return i||l?Rr(s.value,t):vs(s,t,n,r);case V.QUOTE_DOUBLE:return Ki(s.value,t);case V.QUOTE_SINGLE:return Hu(s.value,t);case V.PLAIN:return NE(s,t,n,r);default:return null}};let u=a(o);if(u===null){const{defaultKeyType:f,defaultStringType:c}=t.options,p=i&&f||c;if(u=a(p),u===null)throw new Error(`Unsupported default string type ${p}`)}return u}function Yy(e,t){const n=Object.assign({blockQuote:!0,commentString:bE,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,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function CE(e,t){var i;if(t.tag){const l=e.filter(s=>s.tag===t.tag);if(l.length>0)return l.find(s=>s.format===t.format)??l[0]}let n,r;if(ie(t)){r=t.value;let l=e.filter(s=>{var o;return(o=s.identify)==null?void 0:o.call(s,r)});if(l.length>1){const s=l.filter(o=>o.test);s.length>0&&(l=s)}n=l.find(s=>s.format===t.format)??l.find(s=>!s.format)}else r=t,n=e.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!n){const l=((i=r==null?void 0:r.constructor)==null?void 0:i.name)??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${l} value`)}return n}function EE(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],l=(ie(e)||pe(e))&&e.anchor;l&&Vy(l)&&(n.add(l),i.push(`&${l}`));const s=e.tag??(t.default?null:t.tag);return s&&i.push(r.directives.tagString(s)),i.join(" ")}function Zr(e,t,n,r){var a;if(fe(e))return e.toString(t,n,r);if(Rn(e)){if(t.doc.directives)return e.toString(t);if((a=t.resolvedAliases)!=null&&a.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i;const l=ge(e)?e:t.doc.createNode(e,{onTagObj:u=>i=u});i??(i=CE(t.doc.schema.tags,l));const s=EE(l,i,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);const o=typeof i.stringify=="function"?i.stringify(l,t,n,r):ie(l)?El(l,t,n,r):l.toString(t,n,r);return s?ie(l)||o[0]==="{"||o[0]==="["?`${s} ${o}`:`${s}
|
|
132
|
+
${t.indent}${o}`:o}function jE({key:e,value:t},n,r,i){const{allNullValues:l,doc:s,indent:o,indentStep:a,options:{commentString:u,indentSeq:f,simpleKeys:c}}=n;let p=ge(e)&&e.comment||null;if(c){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(pe(e)||!ge(e)&&typeof e=="object"){const T="With simple keys, collection cannot be used as a key value";throw new Error(T)}}let h=!c&&(!e||p&&t==null&&!n.inFlow||pe(e)||(ie(e)?e.type===V.BLOCK_FOLDED||e.type===V.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(c||!l),indent:o+a});let y=!1,g=!1,w=Zr(e,n,()=>y=!0,()=>g=!0);if(!h&&!n.inFlow&&w.length>1024){if(c)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(l||t==null)return y&&r&&r(),w===""?"?":h?`? ${w}`:w}else if(l&&!c||t==null&&h)return w=`? ${w}`,p&&!y?w+=Wn(w,n.indent,u(p)):g&&i&&i(),w;y&&(p=null),h?(p&&(w+=Wn(w,n.indent,u(p))),w=`? ${w}
|
|
133
|
+
${o}:`):(w=`${w}:`,p&&(w+=Wn(w,n.indent,u(p))));let m,x,v;ge(t)?(m=!!t.spaceBefore,x=t.commentBefore,v=t.comment):(m=!1,x=null,v=null,t&&typeof t=="object"&&(t=s.createNode(t))),n.implicitKey=!1,!h&&!p&&ie(t)&&(n.indentAtStart=w.length+1),g=!1,!f&&a.length>=2&&!n.inFlow&&!h&&ui(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let C=!1;const E=Zr(t,n,()=>C=!0,()=>g=!0);let b=" ";if(p||m||x){if(b=m?`
|
|
134
|
+
`:"",x){const T=u(x);b+=`
|
|
135
|
+
${qt(T,n.indent)}`}E===""&&!n.inFlow?b===`
|
|
136
|
+
`&&v&&(b=`
|
|
137
|
+
|
|
138
|
+
`):b+=`
|
|
139
|
+
${n.indent}`}else if(!h&&pe(t)){const T=E[0],P=E.indexOf(`
|
|
140
|
+
`),I=P!==-1,S=n.inFlow??t.flow??t.items.length===0;if(I||!S){let j=!1;if(I&&(T==="&"||T==="!")){let A=E.indexOf(" ");T==="&"&&A!==-1&&A<P&&E[A+1]==="!"&&(A=E.indexOf(" ",A+1)),(A===-1||P<A)&&(j=!0)}j||(b=`
|
|
141
|
+
${n.indent}`)}}else(E===""||E[0]===`
|
|
142
|
+
`)&&(b="");return w+=b+E,n.inFlow?C&&r&&r():v&&!C?w+=Wn(w,n.indent,u(v)):g&&i&&i(),w}function Jy(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Xl="<<",Jt={identify:e=>e===Xl||typeof e=="symbol"&&e.description===Xl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new V(Symbol(Xl)),{addToJSMap:Gy}),stringify:()=>Xl},TE=(e,t)=>(Jt.identify(t)||ie(t)&&(!t.type||t.type===V.PLAIN)&&Jt.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===Jt.tag&&n.default));function Gy(e,t,n){if(n=e&&Rn(n)?n.resolve(e.doc):n,ui(n))for(const r of n.items)ja(e,t,r);else if(Array.isArray(n))for(const r of n)ja(e,t,r);else ja(e,t,n)}function ja(e,t,n){const r=e&&Rn(n)?n.resolve(e.doc):n;if(!ai(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,e,Map);for(const[l,s]of i)t instanceof Map?t.has(l)||t.set(l,s):t instanceof Set?t.add(l):Object.prototype.hasOwnProperty.call(t,l)||Object.defineProperty(t,l,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}function Xy(e,t,{key:n,value:r}){if(ge(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(TE(e,n))Gy(e,t,r);else{const i=pt(n,"",e);if(t instanceof Map)t.set(i,pt(r,i,e));else if(t instanceof Set)t.add(i);else{const l=IE(n,i,e),s=pt(r,l,e);l in t?Object.defineProperty(t,l,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[l]=s}}return t}function IE(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(ge(e)&&(n!=null&&n.doc)){const r=Yy(n.doc,{});r.anchors=new Set;for(const l of n.anchors.keys())r.anchors.add(l.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=e.toString(r);if(!n.mapKeyWarned){let l=JSON.stringify(i);l.length>40&&(l=l.substring(0,36)+'..."'),Jy(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${l}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(t)}function pf(e,t,n){const r=hl(e,void 0,n),i=hl(t,void 0,n);return new De(r,i)}class De{constructor(t,n=null){Object.defineProperty(this,yt,{value:My}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return ge(n)&&(n=n.clone(t)),ge(r)&&(r=r.clone(t)),new De(n,r)}toJSON(t,n){const r=n!=null&&n.mapAsMap?new Map:{};return Xy(n,r,this)}toString(t,n,r){return t!=null&&t.doc?jE(this,t,n,r):JSON.stringify(this)}}function Zy(e,t,n){return(t.inFlow??e.flow?PE:LE)(e,t,n)}function LE({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:l,onChompKeep:s,onComment:o}){const{indent:a,options:{commentString:u}}=n,f=Object.assign({},n,{indent:l,type:null});let c=!1;const p=[];for(let y=0;y<t.length;++y){const g=t[y];let w=null;if(ge(g))!c&&g.spaceBefore&&p.push(""),Xs(n,p,g.commentBefore,c),g.comment&&(w=g.comment);else if(fe(g)){const x=ge(g.key)?g.key:null;x&&(!c&&x.spaceBefore&&p.push(""),Xs(n,p,x.commentBefore,c))}c=!1;let m=Zr(g,f,()=>w=null,()=>c=!0);w&&(m+=Wn(m,l,u(w))),c&&w&&(c=!1),p.push(r+m)}let h;if(p.length===0)h=i.start+i.end;else{h=p[0];for(let y=1;y<p.length;++y){const g=p[y];h+=g?`
|
|
143
|
+
${a}${g}`:`
|
|
144
|
+
`}}return e?(h+=`
|
|
145
|
+
`+qt(u(e),a),o&&o()):c&&s&&s(),h}function PE({items:e},t,{flowChars:n,itemIndent:r}){const{indent:i,indentStep:l,flowCollectionPadding:s,options:{commentString:o}}=t;r+=l;const a=Object.assign({},t,{indent:r,inFlow:!0,type:null});let u=!1,f=0;const c=[];for(let y=0;y<e.length;++y){const g=e[y];let w=null;if(ge(g))g.spaceBefore&&c.push(""),Xs(t,c,g.commentBefore,!1),g.comment&&(w=g.comment);else if(fe(g)){const x=ge(g.key)?g.key:null;x&&(x.spaceBefore&&c.push(""),Xs(t,c,x.commentBefore,!1),x.comment&&(u=!0));const v=ge(g.value)?g.value:null;v?(v.comment&&(w=v.comment),v.commentBefore&&(u=!0)):g.value==null&&(x!=null&&x.comment)&&(w=x.comment)}w&&(u=!0);let m=Zr(g,a,()=>w=null);y<e.length-1&&(m+=","),w&&(m+=Wn(m,r,o(w))),!u&&(c.length>f||m.includes(`
|
|
146
|
+
`))&&(u=!0),c.push(m),f=c.length}const{start:p,end:h}=n;if(c.length===0)return p+h;if(!u){const y=c.reduce((g,w)=>g+w.length+2,2);u=t.options.lineWidth>0&&y>t.options.lineWidth}if(u){let y=p;for(const g of c)y+=g?`
|
|
147
|
+
${l}${i}${g}`:`
|
|
148
|
+
`;return`${y}
|
|
149
|
+
${i}${h}`}else return`${p}${s}${c.join(" ")}${s}${h}`}function Xs({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const l=qt(t(r),e);n.push(l.trimStart())}}function qn(e,t){const n=ie(t)?t.value:t;for(const r of e)if(fe(r)&&(r.key===t||r.key===n||ie(r.key)&&r.key.value===n))return r}class nt extends qy{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Cn,t),this.items=[]}static from(t,n,r){const{keepUndefined:i,replacer:l}=r,s=new this(t),o=(a,u)=>{if(typeof l=="function")u=l.call(n,a,u);else if(Array.isArray(l)&&!l.includes(a))return;(u!==void 0||i)&&s.items.push(pf(a,u,r))};if(n instanceof Map)for(const[a,u]of n)o(a,u);else if(n&&typeof n=="object")for(const a of Object.keys(n))o(a,n[a]);return typeof t.sortMapEntries=="function"&&s.items.sort(t.sortMapEntries),s}add(t,n){var s;let r;fe(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new De(t,t==null?void 0:t.value):r=new De(t.key,t.value);const i=qn(this.items,r.key),l=(s=this.schema)==null?void 0:s.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);ie(i.value)&&Wy(r.value)?i.value.value=r.value:i.value=r.value}else if(l){const o=this.items.findIndex(a=>l(r,a)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(t){const n=qn(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const r=qn(this.items,t),i=r==null?void 0:r.value;return(!n&&ie(i)?i.value:i)??void 0}has(t){return!!qn(this.items,t)}set(t,n){this.add(new De(t,n),!0)}toJSON(t,n,r){const i=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(i);for(const l of this.items)Xy(n,i,l);return i}toString(t,n,r){if(!t)return JSON.stringify(this);for(const i of this.items)if(!fe(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),Zy(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}const ci={collection:"map",default:!0,nodeClass:nt,tag:"tag:yaml.org,2002:map",resolve(e,t){return ai(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>nt.from(e,t,n)};class Tn extends qy{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(oi,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Zl(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=Zl(t);if(typeof r!="number")return;const i=this.items[r];return!n&&ie(i)?i.value:i}has(t){const n=Zl(t);return typeof n=="number"&&n<this.items.length}set(t,n){const r=Zl(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const i=this.items[r];ie(i)&&Wy(n)?i.value=n:this.items[r]=n}toJSON(t,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let i=0;for(const l of this.items)r.push(pt(l,String(i++),n));return r}toString(t,n,r){return t?Zy(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:i}=r,l=new this(t);if(n&&Symbol.iterator in Object(n)){let s=0;for(let o of n){if(typeof i=="function"){const a=n instanceof Set?o:String(s++);o=i.call(n,a,o)}l.items.push(hl(o,void 0,r))}}return l}}function Zl(e){let t=ie(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const fi={collection:"seq",default:!0,nodeClass:Tn,tag:"tag:yaml.org,2002:seq",resolve(e,t){return ui(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Tn.from(e,t,n)},Lo={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),El(e,t,n,r)}},Po={identify:e=>e==null,createNode:()=>new V(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new V(null),stringify:({source:e},t)=>typeof e=="string"&&Po.test.test(e)?e:t.options.nullStr},mf={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new V(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&mf.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?n.options.trueStr:n.options.falseStr}};function It({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let l=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(l)){let s=l.indexOf(".");s<0&&(s=l.length,l+=".");let o=t-(l.length-s-1);for(;o-- >0;)l+="0"}return l}const e0={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:It},t0={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():It(e)}},n0={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new V(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:It},_o=e=>typeof e=="bigint"||Number.isInteger(e),gf=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function r0(e,t,n){const{value:r}=e;return _o(r)&&r>=0?n+r.toString(t):It(e)}const i0={identify:e=>_o(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>gf(e,2,8,n),stringify:e=>r0(e,8,"0o")},l0={identify:_o,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>gf(e,0,10,n),stringify:It},s0={identify:e=>_o(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>gf(e,2,16,n),stringify:e=>r0(e,16,"0x")},_E=[ci,fi,Lo,Po,mf,i0,l0,s0,e0,t0,n0];function Qh(e){return typeof e=="bigint"||Number.isInteger(e)}const es=({value:e})=>JSON.stringify(e),AE=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:es},{identify:e=>e==null,createNode:()=>new V(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:es},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:es},{identify:Qh,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Qh(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:es}],OE={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},RE=[ci,fi].concat(AE,OE),yf={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},r,i,l){if(!n)return"";const s=n;let o;if(typeof btoa=="function"){let a="";for(let u=0;u<s.length;++u)a+=String.fromCharCode(s[u]);o=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=V.BLOCK_LITERAL),t!==V.QUOTE_DOUBLE){const a=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),u=Math.ceil(o.length/a),f=new Array(u);for(let c=0,p=0;c<u;++c,p+=a)f[c]=o.substr(p,a);o=f.join(t===V.BLOCK_LITERAL?`
|
|
150
|
+
`:" ")}return El({comment:e,type:t,value:o},r,i,l)}};function o0(e,t){if(ui(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!fe(r)){if(ai(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");const i=r.items[0]||new De(new V(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore}
|
|
151
|
+
${i.key.commentBefore}`:r.commentBefore),r.comment){const l=i.value??i.key;l.comment=l.comment?`${r.comment}
|
|
152
|
+
${l.comment}`:r.comment}r=i}e.items[n]=fe(r)?r:new De(r)}}else t("Expected a sequence for this tag");return e}function a0(e,t,n){const{replacer:r}=n,i=new Tn(e);i.tag="tag:yaml.org,2002:pairs";let l=0;if(t&&Symbol.iterator in Object(t))for(let s of t){typeof r=="function"&&(s=r.call(t,String(l++),s));let o,a;if(Array.isArray(s))if(s.length===2)o=s[0],a=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){const u=Object.keys(s);if(u.length===1)o=u[0],a=s[o];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else o=s;i.items.push(pf(o,a,n))}return i}const xf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:o0,createNode:a0};class Vr extends Tn{constructor(){super(),this.add=nt.prototype.add.bind(this),this.delete=nt.prototype.delete.bind(this),this.get=nt.prototype.get.bind(this),this.has=nt.prototype.has.bind(this),this.set=nt.prototype.set.bind(this),this.tag=Vr.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const i of this.items){let l,s;if(fe(i)?(l=pt(i.key,"",n),s=pt(i.value,l,n)):l=pt(i,"",n),r.has(l))throw new Error("Ordered maps must not include duplicate keys");r.set(l,s)}return r}static from(t,n,r){const i=a0(t,n,r),l=new this;return l.items=i.items,l}}Vr.tag="tag:yaml.org,2002:omap";const vf={collection:"seq",identify:e=>e instanceof Map,nodeClass:Vr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=o0(e,t),r=[];for(const{key:i}of n.items)ie(i)&&(r.includes(i.value)?t(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new Vr,n)},createNode:(e,t,n)=>Vr.from(e,t,n)};function u0({value:e,source:t},n){return t&&(e?c0:f0).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const c0={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new V(!0),stringify:u0},f0={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new V(!1),stringify:u0},DE={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:It},ME={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():It(e)}},zE={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new V(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const r=e.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:It},jl=e=>typeof e=="bigint"||Number.isInteger(e);function Ao(e,t,n,{intAsBigInt:r}){const i=e[0];if((i==="-"||i==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const s=BigInt(e);return i==="-"?BigInt(-1)*s:s}const l=parseInt(e,n);return i==="-"?-1*l:l}function wf(e,t,n){const{value:r}=e;if(jl(r)){const i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return It(e)}const FE={identify:jl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Ao(e,2,2,n),stringify:e=>wf(e,2,"0b")},$E={identify:jl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Ao(e,1,8,n),stringify:e=>wf(e,8,"0")},BE={identify:jl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Ao(e,0,10,n),stringify:It},UE={identify:jl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Ao(e,2,16,n),stringify:e=>wf(e,16,"0x")};class Hr extends nt{constructor(t){super(t),this.tag=Hr.tag}add(t){let n;fe(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new De(t.key,null):n=new De(t,null),qn(this.items,n.key)||this.items.push(n)}get(t,n){const r=qn(this.items,t);return!n&&fe(r)?ie(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=qn(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new De(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(t,n,r){const{replacer:i}=r,l=new this(t);if(n&&Symbol.iterator in Object(n))for(let s of n)typeof i=="function"&&(s=i.call(n,s,s)),l.items.push(pf(s,null,r));return l}}Hr.tag="tag:yaml.org,2002:set";const kf={collection:"map",identify:e=>e instanceof Set,nodeClass:Hr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>Hr.from(e,t,n),resolve(e,t){if(ai(e)){if(e.hasAllNullValues(!0))return Object.assign(new Hr,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function bf(e,t){const n=e[0],r=n==="-"||n==="+"?e.substring(1):e,i=s=>t?BigInt(s):Number(s),l=r.replace(/_/g,"").split(":").reduce((s,o)=>s*i(60)+i(o),i(0));return n==="-"?i(-1)*l:l}function d0(e){let{value:t}=e,n=s=>s;if(typeof t=="bigint")n=s=>BigInt(s);else if(isNaN(t)||!isFinite(t))return It(e);let r="";t<0&&(r="-",t*=n(-1));const i=n(60),l=[t%i];return t<60?l.unshift(0):(t=(t-l[0])/i,l.unshift(t%i),t>=60&&(t=(t-l[0])/i,l.unshift(t))),r+l.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const h0={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>bf(e,n),stringify:d0},p0={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>bf(e,!1),stringify:d0},Oo={identify:e=>e 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(e){const t=e.match(Oo.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,l,s,o]=t.map(Number),a=t[7]?Number((t[7]+"00").substr(1,3)):0;let u=Date.UTC(n,r-1,i,l||0,s||0,o||0,a);const f=t[8];if(f&&f!=="Z"){let c=bf(f,!1);Math.abs(c)<30&&(c*=60),u-=6e4*c}return new Date(u)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Yh=[ci,fi,Lo,Po,c0,f0,FE,$E,BE,UE,DE,ME,zE,yf,Jt,vf,xf,kf,h0,p0,Oo],Jh=new Map([["core",_E],["failsafe",[ci,fi,Lo]],["json",RE],["yaml11",Yh],["yaml-1.1",Yh]]),Gh={binary:yf,bool:mf,float:n0,floatExp:t0,floatNaN:e0,floatTime:p0,int:l0,intHex:s0,intOct:i0,intTime:h0,map:ci,merge:Jt,null:Po,omap:vf,pairs:xf,seq:fi,set:kf,timestamp:Oo},VE={"tag:yaml.org,2002:binary":yf,"tag:yaml.org,2002:merge":Jt,"tag:yaml.org,2002:omap":vf,"tag:yaml.org,2002:pairs":xf,"tag:yaml.org,2002:set":kf,"tag:yaml.org,2002:timestamp":Oo};function Ta(e,t,n){const r=Jh.get(t);if(r&&!e)return n&&!r.includes(Jt)?r.concat(Jt):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{const l=Array.from(Jh.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${l} or define customTags array`)}if(Array.isArray(e))for(const l of e)i=i.concat(l);else typeof e=="function"&&(i=e(i.slice()));return n&&(i=i.concat(Jt)),i.reduce((l,s)=>{const o=typeof s=="string"?Gh[s]:s;if(!o){const a=JSON.stringify(s),u=Object.keys(Gh).map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${u}`)}return l.includes(o)||l.push(o),l},[])}const HE=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Ro{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:i,schema:l,sortMapEntries:s,toStringDefaults:o}){this.compat=Array.isArray(t)?Ta(t,"compat"):t?Ta(null,t):null,this.name=typeof l=="string"&&l||"core",this.knownTags=i?VE:{},this.tags=Ta(n,this.name,r),this.toStringOptions=o??null,Object.defineProperty(this,Cn,{value:ci}),Object.defineProperty(this,zt,{value:Lo}),Object.defineProperty(this,oi,{value:fi}),this.sortMapEntries=typeof s=="function"?s:s===!0?HE:null}clone(){const t=Object.create(Ro.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}function KE(e,t){var a;const n=[];let r=t.directives===!0;if(t.directives!==!1&&e.directives){const u=e.directives.toString(e);u?(n.push(u),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");const i=Yy(e,t),{commentString:l}=i.options;if(e.commentBefore){n.length!==1&&n.unshift("");const u=l(e.commentBefore);n.unshift(qt(u,""))}let s=!1,o=null;if(e.contents){if(ge(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){const c=l(e.contents.commentBefore);n.push(qt(c,""))}i.forceBlockIndent=!!e.comment,o=e.contents.comment}const u=o?void 0:()=>s=!0;let f=Zr(e.contents,i,()=>o=null,u);o&&(f+=Wn(f,"",l(o))),(f[0]==="|"||f[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${f}`:n.push(f)}else n.push(Zr(e.contents,i));if((a=e.directives)!=null&&a.docEnd)if(e.comment){const u=l(e.comment);u.includes(`
|
|
153
|
+
`)?(n.push("..."),n.push(qt(u,""))):n.push(`... ${u}`)}else n.push("...");else{let u=e.comment;u&&s&&(u=u.replace(/^\n+/,"")),u&&((!s||o)&&n[n.length-1]!==""&&n.push(""),n.push(qt(l(u),"")))}return n.join(`
|
|
154
|
+
`)+`
|
|
155
|
+
`}class di{constructor(t,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,yt,{value:Uu});let i=null;typeof n=="function"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=void 0);const l=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=l;let{version:s}=l;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new $e({version:s}),this.setSchema(s,r),this.contents=t===void 0?null:this.createNode(t,i,r)}clone(){const t=Object.create(di.prototype,{[yt]:{value:Uu}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=ge(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){mr(this.contents)&&this.contents.add(t)}addIn(t,n){mr(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const r=Hy(this);t.anchor=!n||r.has(n)?Ky(n||"a",r):n}return new Eo(t.anchor)}createNode(t,n,r){let i;if(typeof n=="function")t=n.call({"":t},"",t),i=n;else if(Array.isArray(n)){const w=x=>typeof x=="number"||x instanceof String||x instanceof Number,m=n.filter(w).map(String);m.length>0&&(n=n.concat(m)),i=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:l,anchorPrefix:s,flow:o,keepUndefined:a,onTagObj:u,tag:f}=r??{},{onAnchor:c,setAnchors:p,sourceObjects:h}=vE(this,s||"a"),y={aliasDuplicateObjects:l??!0,keepUndefined:a??!1,onAnchor:c,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:h},g=hl(t,f,y);return o&&pe(g)&&(g.flow=!0),p(),g}createPair(t,n,r={}){const i=this.createNode(t,null,r),l=this.createNode(n,null,r);return new De(i,l)}delete(t){return mr(this.contents)?this.contents.delete(t):!1}deleteIn(t){return _i(t)?this.contents==null?!1:(this.contents=null,!0):mr(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return pe(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return _i(t)?!n&&ie(this.contents)?this.contents.value:this.contents:pe(this.contents)?this.contents.getIn(t,n):void 0}has(t){return pe(this.contents)?this.contents.has(t):!1}hasIn(t){return _i(t)?this.contents!==void 0:pe(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Gs(this.schema,[t],n):mr(this.contents)&&this.contents.set(t,n)}setIn(t,n){_i(t)?this.contents=n:this.contents==null?this.contents=Gs(this.schema,Array.from(t),n):mr(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new $e({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new $e({version:t}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new Ro(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:l,reviver:s}={}){const o={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=pt(this.contents,n??"",o);if(typeof l=="function")for(const{count:u,res:f}of o.anchors.values())l(f,u);return typeof s=="function"?Or(s,{"":a},"",a):a}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return KE(this,t)}}function mr(e){if(pe(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Sf extends Error{constructor(t,n,r,i){super(),this.name=t,this.code=r,this.message=i,this.pos=n}}class Qn extends Sf{constructor(t,n,r){super("YAMLParseError",t,n,r)}}class m0 extends Sf{constructor(t,n,r){super("YAMLWarning",t,n,r)}}const Zs=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(o=>t.linePos(o));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let l=i-1,s=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(l>=60&&s.length>80){const o=Math.min(l-39,s.length-79);s="…"+s.substring(o),l-=o-1}if(s.length>80&&(s=s.substring(0,79)+"…"),r>1&&/^ *$/.test(s.substring(0,l))){let o=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);o.length>80&&(o=o.substring(0,79)+`…
|
|
156
|
+
`),s=o+s}if(/[^ ]/.test(s)){let o=1;const a=n.linePos[1];(a==null?void 0:a.line)===r&&a.col>i&&(o=Math.max(1,Math.min(a.col-i,80-l)));const u=" ".repeat(l)+"^".repeat(o);n.message+=`:
|
|
157
|
+
|
|
158
|
+
${s}
|
|
159
|
+
${u}
|
|
160
|
+
`}};function ei(e,{flow:t,indicator:n,next:r,offset:i,onError:l,parentIndent:s,startOnNewline:o}){let a=!1,u=o,f=o,c="",p="",h=!1,y=!1,g=null,w=null,m=null,x=null,v=null,C=null,E=null;for(const P of e)switch(y&&(P.type!=="space"&&P.type!=="newline"&&P.type!=="comma"&&l(P.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y=!1),g&&(u&&P.type!=="comment"&&P.type!=="newline"&&l(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),P.type){case"space":!t&&(n!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&P.source.includes(" ")&&(g=P),f=!0;break;case"comment":{f||l(P,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const I=P.source.substring(1)||" ";c?c+=p+I:c=I,p="",u=!1;break}case"newline":u?c?c+=P.source:(!C||n!=="seq-item-ind")&&(a=!0):p+=P.source,u=!0,h=!0,(w||m)&&(x=P),f=!0;break;case"anchor":w&&l(P,"MULTIPLE_ANCHORS","A node can have at most one anchor"),P.source.endsWith(":")&&l(P.offset+P.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),w=P,E??(E=P.offset),u=!1,f=!1,y=!0;break;case"tag":{m&&l(P,"MULTIPLE_TAGS","A node can have at most one tag"),m=P,E??(E=P.offset),u=!1,f=!1,y=!0;break}case n:(w||m)&&l(P,"BAD_PROP_ORDER",`Anchors and tags must be after the ${P.source} indicator`),C&&l(P,"UNEXPECTED_TOKEN",`Unexpected ${P.source} in ${t??"collection"}`),C=P,u=n==="seq-item-ind"||n==="explicit-key-ind",f=!1;break;case"comma":if(t){v&&l(P,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=P,u=!1,f=!1;break}default:l(P,"UNEXPECTED_TOKEN",`Unexpected ${P.type} token`),u=!1,f=!1}const b=e[e.length-1],T=b?b.offset+b.source.length:i;return y&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&l(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g&&(u&&g.indent<=s||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&l(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:C,spaceBefore:a,comment:c,hasNewline:h,anchor:w,tag:m,newlineAfterProp:x,end:T,start:E??T}}function pl(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
161
|
+
`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(pl(t.key)||pl(t.value))return!0}return!1;default:return!0}}function Wu(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&pl(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function g0(e,t,n){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const i=typeof r=="function"?r:(l,s)=>l===s||ie(l)&&ie(s)&&l.value===s.value;return t.some(l=>i(l.key,n))}const Xh="All mapping items must start at the same column";function WE({composeNode:e,composeEmptyNode:t},n,r,i,l){var f;const s=(l==null?void 0:l.nodeClass)??nt,o=new s(n.schema);n.atRoot&&(n.atRoot=!1);let a=r.offset,u=null;for(const c of r.items){const{start:p,key:h,sep:y,value:g}=c,w=ei(p,{indicator:"explicit-key-ind",next:h??(y==null?void 0:y[0]),offset:a,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!w.found;if(m){if(h&&(h.type==="block-seq"?i(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==r.indent&&i(a,"BAD_INDENT",Xh)),!w.anchor&&!w.tag&&!y){u=w.end,w.comment&&(o.comment?o.comment+=`
|
|
162
|
+
`+w.comment:o.comment=w.comment);continue}(w.newlineAfterProp||pl(h))&&i(h??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((f=w.found)==null?void 0:f.indent)!==r.indent&&i(a,"BAD_INDENT",Xh);n.atKey=!0;const x=w.end,v=h?e(n,h,w,i):t(n,x,p,null,w,i);n.schema.compat&&Wu(r.indent,h,i),n.atKey=!1,g0(n,o.items,v)&&i(x,"DUPLICATE_KEY","Map keys must be unique");const C=ei(y??[],{indicator:"map-value-ind",next:g,offset:v.range[2],onError:i,parentIndent:r.indent,startOnNewline:!h||h.type==="block-scalar"});if(a=C.end,C.found){m&&((g==null?void 0:g.type)==="block-map"&&!C.hasNewline&&i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&w.start<C.found.offset-1024&&i(v.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const E=g?e(n,g,C,i):t(n,a,y,null,C,i);n.schema.compat&&Wu(r.indent,g,i),a=E.range[2];const b=new De(v,E);n.options.keepSourceTokens&&(b.srcToken=c),o.items.push(b)}else{m&&i(v.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),C.comment&&(v.comment?v.comment+=`
|
|
163
|
+
`+C.comment:v.comment=C.comment);const E=new De(v);n.options.keepSourceTokens&&(E.srcToken=c),o.items.push(E)}}return u&&u<a&&i(u,"IMPOSSIBLE","Map comment with trailing content"),o.range=[r.offset,a,u??a],o}function qE({composeNode:e,composeEmptyNode:t},n,r,i,l){const s=(l==null?void 0:l.nodeClass)??Tn,o=new s(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let a=r.offset,u=null;for(const{start:f,value:c}of r.items){const p=ei(f,{indicator:"seq-item-ind",next:c,offset:a,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||c)(c==null?void 0:c.type)==="block-seq"?i(p.end,"BAD_INDENT","All sequence items must start at the same column"):i(a,"MISSING_CHAR","Sequence item without - indicator");else{u=p.end,p.comment&&(o.comment=p.comment);continue}const h=c?e(n,c,p,i):t(n,p.end,f,null,p,i);n.schema.compat&&Wu(r.indent,c,i),a=h.range[2],o.items.push(h)}return o.range=[r.offset,a,u??a],o}function Tl(e,t,n,r){let i="";if(e){let l=!1,s="";for(const o of e){const{source:a,type:u}=o;switch(u){case"space":l=!0;break;case"comment":{n&&!l&&r(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const f=a.substring(1)||" ";i?i+=s+f:i=f,s="";break}case"newline":i&&(s+=a),l=!0;break;default:r(o,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}t+=a.length}}return{comment:i,offset:t}}const Ia="Block collections are not allowed within flow collections",La=e=>e&&(e.type==="block-map"||e.type==="block-seq");function QE({composeNode:e,composeEmptyNode:t},n,r,i,l){var w;const s=r.start.source==="{",o=s?"flow map":"flow sequence",a=(l==null?void 0:l.nodeClass)??(s?nt:Tn),u=new a(n.schema);u.flow=!0;const f=n.atRoot;f&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let c=r.offset+r.start.source.length;for(let m=0;m<r.items.length;++m){const x=r.items[m],{start:v,key:C,sep:E,value:b}=x,T=ei(v,{flow:o,indicator:"explicit-key-ind",next:C??(E==null?void 0:E[0]),offset:c,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!T.found){if(!T.anchor&&!T.tag&&!E&&!b){m===0&&T.comma?i(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):m<r.items.length-1&&i(T.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),T.comment&&(u.comment?u.comment+=`
|
|
164
|
+
`+T.comment:u.comment=T.comment),c=T.end;continue}!s&&n.options.strict&&pl(C)&&i(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)T.comma&&i(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(T.comma||i(T.start,"MISSING_CHAR",`Missing , between ${o} items`),T.comment){let P="";e:for(const I of v)switch(I.type){case"comma":case"space":break;case"comment":P=I.source.substring(1);break e;default:break e}if(P){let I=u.items[u.items.length-1];fe(I)&&(I=I.value??I.key),I.comment?I.comment+=`
|
|
165
|
+
`+P:I.comment=P,T.comment=T.comment.substring(P.length+1)}}if(!s&&!E&&!T.found){const P=b?e(n,b,T,i):t(n,T.end,E,null,T,i);u.items.push(P),c=P.range[2],La(b)&&i(P.range,"BLOCK_IN_FLOW",Ia)}else{n.atKey=!0;const P=T.end,I=C?e(n,C,T,i):t(n,P,v,null,T,i);La(C)&&i(I.range,"BLOCK_IN_FLOW",Ia),n.atKey=!1;const S=ei(E??[],{flow:o,indicator:"map-value-ind",next:b,offset:I.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(S.found){if(!s&&!T.found&&n.options.strict){if(E)for(const D of E){if(D===S.found)break;if(D.type==="newline"){i(D,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}T.start<S.found.offset-1024&&i(S.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else b&&("source"in b&&((w=b.source)==null?void 0:w[0])===":"?i(b,"MISSING_CHAR",`Missing space after : in ${o}`):i(S.start,"MISSING_CHAR",`Missing , or : between ${o} items`));const j=b?e(n,b,S,i):S.found?t(n,S.end,E,null,S,i):null;j?La(b)&&i(j.range,"BLOCK_IN_FLOW",Ia):S.comment&&(I.comment?I.comment+=`
|
|
166
|
+
`+S.comment:I.comment=S.comment);const A=new De(I,j);if(n.options.keepSourceTokens&&(A.srcToken=x),s){const D=u;g0(n,D.items,I)&&i(P,"DUPLICATE_KEY","Map keys must be unique"),D.items.push(A)}else{const D=new nt(n.schema);D.flow=!0,D.items.push(A);const U=(j??I).range;D.range=[I.range[0],U[1],U[2]],u.items.push(D)}c=j?j.range[2]:S.end}}const p=s?"}":"]",[h,...y]=r.end;let g=c;if((h==null?void 0:h.source)===p)g=h.offset+h.source.length;else{const m=o[0].toUpperCase()+o.substring(1),x=f?`${m} must end with a ${p}`:`${m} in block collection must be sufficiently indented and end with a ${p}`;i(c,f?"MISSING_CHAR":"BAD_INDENT",x),h&&h.source.length!==1&&y.unshift(h)}if(y.length>0){const m=Tl(y,g,n.options.strict,i);m.comment&&(u.comment?u.comment+=`
|
|
167
|
+
`+m.comment:u.comment=m.comment),u.range=[r.offset,g,m.offset]}else u.range=[r.offset,g,g];return u}function Pa(e,t,n,r,i,l){const s=n.type==="block-map"?WE(e,t,n,r,l):n.type==="block-seq"?qE(e,t,n,r,l):QE(e,t,n,r,l),o=s.constructor;return i==="!"||i===o.tagName?(s.tag=o.tagName,s):(i&&(s.tag=i),s)}function YE(e,t,n,r,i){var p;const l=r.tag,s=l?t.directives.tagName(l.source,h=>i(l,"TAG_RESOLVE_FAILED",h)):null;if(n.type==="block-seq"){const{anchor:h,newlineAfterProp:y}=r,g=h&&l?h.offset>l.offset?h:l:h??l;g&&(!y||y.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}const o=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!l||!s||s==="!"||s===nt.tagName&&o==="map"||s===Tn.tagName&&o==="seq")return Pa(e,t,n,i,s);let a=t.schema.tags.find(h=>h.tag===s&&h.collection===o);if(!a){const h=t.schema.knownTags[s];if((h==null?void 0:h.collection)===o)t.schema.tags.push(Object.assign({},h,{default:!1})),a=h;else return h?i(l,"BAD_COLLECTION_TYPE",`${h.tag} used for ${o} collection, but expects ${h.collection??"scalar"}`,!0):i(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Pa(e,t,n,i,s)}const u=Pa(e,t,n,i,s,a),f=((p=a.resolve)==null?void 0:p.call(a,u,h=>i(l,"TAG_RESOLVE_FAILED",h),t.options))??u,c=ge(f)?f:new V(f);return c.range=u.range,c.tag=s,a!=null&&a.format&&(c.format=a.format),c}function y0(e,t,n){const r=t.offset,i=JE(t,e.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const l=i.mode===">"?V.BLOCK_FOLDED:V.BLOCK_LITERAL,s=t.source?GE(t.source):[];let o=s.length;for(let g=s.length-1;g>=0;--g){const w=s[g][1];if(w===""||w==="\r")o=g;else break}if(o===0){const g=i.chomp==="+"&&s.length>0?`
|
|
168
|
+
`.repeat(Math.max(1,s.length-1)):"";let w=r+i.length;return t.source&&(w+=t.source.length),{value:g,type:l,comment:i.comment,range:[r,w,w]}}let a=t.indent+i.indent,u=t.offset+i.length,f=0;for(let g=0;g<o;++g){const[w,m]=s[g];if(m===""||m==="\r")i.indent===0&&w.length>a&&(a=w.length);else{w.length<a&&n(u+w.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(a=w.length),f=g,a===0&&!e.atRoot&&n(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=w.length+m.length+1}for(let g=s.length-1;g>=o;--g)s[g][0].length>a&&(o=g+1);let c="",p="",h=!1;for(let g=0;g<f;++g)c+=s[g][0].slice(a)+`
|
|
169
|
+
`;for(let g=f;g<o;++g){let[w,m]=s[g];u+=w.length+m.length+1;const x=m[m.length-1]==="\r";if(x&&(m=m.slice(0,-1)),m&&w.length<a){const C=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;n(u-m.length-(x?2:1),"BAD_INDENT",C),w=""}l===V.BLOCK_LITERAL?(c+=p+w.slice(a)+m,p=`
|
|
170
|
+
`):w.length>a||m[0]===" "?(p===" "?p=`
|
|
171
|
+
`:!h&&p===`
|
|
172
|
+
`&&(p=`
|
|
173
|
+
|
|
174
|
+
`),c+=p+w.slice(a)+m,p=`
|
|
175
|
+
`,h=!0):m===""?p===`
|
|
176
|
+
`?c+=`
|
|
177
|
+
`:p=`
|
|
178
|
+
`:(c+=p+m,p=" ",h=!1)}switch(i.chomp){case"-":break;case"+":for(let g=o;g<s.length;++g)c+=`
|
|
179
|
+
`+s[g][0].slice(a);c[c.length-1]!==`
|
|
180
|
+
`&&(c+=`
|
|
181
|
+
`);break;default:c+=`
|
|
182
|
+
`}const y=r+i.length+t.source.length;return{value:c,type:l,comment:i.comment,range:[r,y,y]}}function JE({offset:e,props:t},n,r){if(t[0].type!=="block-scalar-header")return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=t[0],l=i[0];let s=0,o="",a=-1;for(let p=1;p<i.length;++p){const h=i[p];if(!o&&(h==="-"||h==="+"))o=h;else{const y=Number(h);!s&&y?s=y:a===-1&&(a=e+p)}}a!==-1&&r(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let u=!1,f="",c=i.length;for(let p=1;p<t.length;++p){const h=t[p];switch(h.type){case"space":u=!0;case"newline":c+=h.source.length;break;case"comment":n&&!u&&r(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),c+=h.source.length,f=h.source.substring(1);break;case"error":r(h,"UNEXPECTED_TOKEN",h.message),c+=h.source.length;break;default:{const y=`Unexpected token in block scalar header: ${h.type}`;r(h,"UNEXPECTED_TOKEN",y);const g=h.source;g&&typeof g=="string"&&(c+=g.length)}}}return{mode:l,indent:s,chomp:o,comment:f,length:c}}function GE(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),l=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let s=1;s<t.length;s+=2)l.push([t[s],t[s+1]]);return l}function x0(e,t,n){const{offset:r,type:i,source:l,end:s}=e;let o,a;const u=(p,h,y)=>n(r+p,h,y);switch(i){case"scalar":o=V.PLAIN,a=XE(l,u);break;case"single-quoted-scalar":o=V.QUOTE_SINGLE,a=ZE(l,u);break;case"double-quoted-scalar":o=V.QUOTE_DOUBLE,a=ej(l,u);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+l.length,r+l.length]}}const f=r+l.length,c=Tl(s,f,t,n);return{value:a,type:o,comment:c.comment,range:[r,f,c.offset]}}function XE(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),v0(e)}function ZE(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),v0(e.slice(1,-1)).replace(/''/g,"'")}function v0(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
183
|
+
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
184
|
+
`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],l=" ",s=t.lastIndex;for(n.lastIndex=s;r=n.exec(e);)r[1]===""?l===`
|
|
185
|
+
`?i+=l:l=`
|
|
186
|
+
`:(i+=l+r[1],l=" "),s=n.lastIndex;const o=/[ \t]*(.*)/sy;return o.lastIndex=s,r=o.exec(e),i+l+((r==null?void 0:r[1])??"")}function ej(e,t){let n="";for(let r=1;r<e.length-1;++r){const i=e[r];if(!(i==="\r"&&e[r+1]===`
|
|
187
|
+
`))if(i===`
|
|
188
|
+
`){const{fold:l,offset:s}=tj(e,r);n+=l,r=s}else if(i==="\\"){let l=e[++r];const s=nj[l];if(s)n+=s;else if(l===`
|
|
189
|
+
`)for(l=e[r+1];l===" "||l===" ";)l=e[++r+1];else if(l==="\r"&&e[r+1]===`
|
|
190
|
+
`)for(l=e[++r+1];l===" "||l===" ";)l=e[++r+1];else if(l==="x"||l==="u"||l==="U"){const o={x:2,u:4,U:8}[l];n+=rj(e,r+1,o,t),r+=o}else{const o=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),n+=o}}else if(i===" "||i===" "){const l=r;let s=e[r+1];for(;s===" "||s===" ";)s=e[++r+1];s!==`
|
|
191
|
+
`&&!(s==="\r"&&e[r+2]===`
|
|
192
|
+
`)&&(n+=r>l?e.slice(l,r+1):i)}else n+=i}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function tj(e,t){let n="",r=e[t+1];for(;(r===" "||r===" "||r===`
|
|
193
|
+
`||r==="\r")&&!(r==="\r"&&e[t+2]!==`
|
|
194
|
+
`);)r===`
|
|
195
|
+
`&&(n+=`
|
|
196
|
+
`),t+=1,r=e[t+1];return n||(n=" "),{fold:n,offset:t}}const nj={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
197
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function rj(e,t,n,r){const i=e.substr(t,n),s=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(s)){const o=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(s)}function w0(e,t,n,r){const{value:i,type:l,comment:s,range:o}=t.type==="block-scalar"?y0(e,t,r):x0(t,e.options.strict,r),a=n?e.directives.tagName(n.source,c=>r(n,"TAG_RESOLVE_FAILED",c)):null;let u;e.options.stringKeys&&e.atKey?u=e.schema[zt]:a?u=ij(e.schema,i,a,n,r):t.type==="scalar"?u=lj(e,i,t,r):u=e.schema[zt];let f;try{const c=u.resolve(i,p=>r(n??t,"TAG_RESOLVE_FAILED",p),e.options);f=ie(c)?c:new V(c)}catch(c){const p=c instanceof Error?c.message:String(c);r(n??t,"TAG_RESOLVE_FAILED",p),f=new V(i)}return f.range=o,f.source=i,l&&(f.type=l),a&&(f.tag=a),u.format&&(f.format=u.format),s&&(f.comment=s),f}function ij(e,t,n,r,i){var o;if(n==="!")return e[zt];const l=[];for(const a of e.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)l.push(a);else return a;for(const a of l)if((o=a.test)!=null&&o.test(t))return a;const s=e.knownTags[n];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[zt])}function lj({atKey:e,directives:t,schema:n},r,i,l){const s=n.tags.find(o=>{var a;return(o.default===!0||e&&o.default==="key")&&((a=o.test)==null?void 0:a.test(r))})||n[zt];if(n.compat){const o=n.compat.find(a=>{var u;return a.default&&((u=a.test)==null?void 0:u.test(r))})??n[zt];if(s.tag!==o.tag){const a=t.tagString(s.tag),u=t.tagString(o.tag),f=`Value may be parsed as either ${a} or ${u}`;l(i,"TAG_RESOLVE_FAILED",f,!0)}}return s}function sj(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let i=t[r];switch(i.type){case"space":case"comment":case"newline":e-=i.source.length;continue}for(i=t[++r];(i==null?void 0:i.type)==="space";)e+=i.source.length,i=t[++r];break}}return e}const oj={composeNode:k0,composeEmptyNode:Nf};function k0(e,t,n,r){const i=e.atKey,{spaceBefore:l,comment:s,anchor:o,tag:a}=n;let u,f=!0;switch(t.type){case"alias":u=aj(e,t,r),(o||a)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=w0(e,t,a,r),o&&(u.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":u=YE(oj,e,t,n,r),o&&(u.anchor=o.source.substring(1));break;default:{const c=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",c),u=Nf(e,t.offset,void 0,null,n,r),f=!1}}return o&&u.anchor===""&&r(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&e.options.stringKeys&&(!ie(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&r(a??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),l&&(u.spaceBefore=!0),s&&(t.type==="scalar"&&t.source===""?u.comment=s:u.commentBefore=s),e.options.keepSourceTokens&&f&&(u.srcToken=t),u}function Nf(e,t,n,r,{spaceBefore:i,comment:l,anchor:s,tag:o,end:a},u){const f={type:"scalar",offset:sj(t,n,r),indent:-1,source:""},c=w0(e,f,o,u);return s&&(c.anchor=s.source.substring(1),c.anchor===""&&u(s,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(c.spaceBefore=!0),l&&(c.comment=l,c.range[2]=a),c}function aj({options:e},{offset:t,source:n,end:r},i){const l=new Eo(n.substring(1));l.source===""&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),l.source.endsWith(":")&&i(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=t+n.length,o=Tl(r,s,e.strict,i);return l.range=[t,s,o.offset],o.comment&&(l.comment=o.comment),l}function uj(e,t,{offset:n,start:r,value:i,end:l},s){const o=Object.assign({_directives:t},e),a=new di(void 0,o),u={atKey:!1,atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},f=ei(r,{indicator:"doc-start",next:i??(l==null?void 0:l[0]),offset:n,onError:s,parentIndent:0,startOnNewline:!0});f.found&&(a.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!f.hasNewline&&s(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=i?k0(u,i,f,s):Nf(u,f.end,r,null,f,s);const c=a.contents.range[2],p=Tl(l,c,!1,s);return p.comment&&(a.comment=p.comment),a.range=[n,c,p.offset],a}function Ci(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function Zh(e){var i;let t="",n=!1,r=!1;for(let l=0;l<e.length;++l){const s=e[l];switch(s[0]){case"#":t+=(t===""?"":r?`
|
|
198
|
+
|
|
199
|
+
`:`
|
|
200
|
+
`)+(s.substring(1)||" "),n=!0,r=!1;break;case"%":((i=e[l+1])==null?void 0:i[0])!=="#"&&(l+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}class Cf{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,i,l)=>{const s=Ci(n);l?this.warnings.push(new m0(s,r,i)):this.errors.push(new Qn(s,r,i))},this.directives=new $e({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:r,afterEmptyLine:i}=Zh(this.prelude);if(r){const l=t.contents;if(n)t.comment=t.comment?`${t.comment}
|
|
201
|
+
${r}`:r;else if(i||t.directives.docStart||!l)t.commentBefore=r;else if(pe(l)&&!l.flow&&l.items.length>0){let s=l.items[0];fe(s)&&(s=s.key);const o=s.commentBefore;s.commentBefore=o?`${r}
|
|
202
|
+
${o}`:r}else{const s=l.commentBefore;l.commentBefore=s?`${r}
|
|
203
|
+
${s}`:r}}n?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Zh(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,r=-1){for(const i of t)yield*this.next(i);yield*this.end(n,r)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,r,i)=>{const l=Ci(t);l[0]+=n,this.onError(l,"BAD_DIRECTIVE",r,i)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=uj(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,r=new Qn(Ci(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new Qn(Ci(t),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=Tl(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
|
|
204
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Qn(Ci(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const r=Object.assign({_directives:this.directives},this.options),i=new di(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}function cj(e,t=!0,n){if(e){const r=(i,l,s)=>{const o=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(o,l,s);else throw new Qn([o,o+1],l,s)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return x0(e,t,r);case"block-scalar":return y0({options:{strict:t}},e,r)}}return null}function fj(e,t){const{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:l=-1,type:s="PLAIN"}=t,o=El({type:s,value:e},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),a=t.end??[{type:"newline",offset:-1,indent:r,source:`
|
|
205
|
+
`}];switch(o[0]){case"|":case">":{const u=o.indexOf(`
|
|
206
|
+
`),f=o.substring(0,u),c=o.substring(u+1)+`
|
|
207
|
+
`,p=[{type:"block-scalar-header",offset:l,indent:r,source:f}];return b0(p,a)||p.push({type:"newline",offset:-1,indent:r,source:`
|
|
208
|
+
`}),{type:"block-scalar",offset:l,indent:r,props:p,source:c}}case'"':return{type:"double-quoted-scalar",offset:l,indent:r,source:o,end:a};case"'":return{type:"single-quoted-scalar",offset:l,indent:r,source:o,end:a};default:return{type:"scalar",offset:l,indent:r,source:o,end:a}}}function dj(e,t,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:l=!1,type:s}=n,o="indent"in e?e.indent:null;if(r&&typeof o=="number"&&(o+=2),!s)switch(e.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{const u=e.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}const a=El({type:s,value:t},{implicitKey:i||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":hj(e,a);break;case'"':_a(e,a,"double-quoted-scalar");break;case"'":_a(e,a,"single-quoted-scalar");break;default:_a(e,a,"scalar")}}function hj(e,t){const n=t.indexOf(`
|
|
209
|
+
`),r=t.substring(0,n),i=t.substring(n+1)+`
|
|
210
|
+
`;if(e.type==="block-scalar"){const l=e.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l.source=r,e.source=i}else{const{offset:l}=e,s="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:l,indent:s,source:r}];b0(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:s,source:`
|
|
211
|
+
`});for(const a of Object.keys(e))a!=="type"&&a!=="offset"&&delete e[a];Object.assign(e,{type:"block-scalar",indent:s,props:o,source:i})}}function b0(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function _a(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let i=t.length;e.props[0].type==="block-scalar-header"&&(i-=e.props[0].source.length);for(const l of r)l.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const i={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
|
|
212
|
+
`};delete e.items,Object.assign(e,{type:n,source:t,end:[i]});break}default:{const r="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter(l=>l.type==="space"||l.type==="comment"||l.type==="newline"):[];for(const l of Object.keys(e))l!=="type"&&l!=="offset"&&delete e[l];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}const pj=e=>"type"in e?eo(e):ws(e);function eo(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=eo(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=ws(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=ws(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=ws(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function ws({start:e,key:t,sep:n,value:r}){let i="";for(const l of e)i+=l.source;if(t&&(i+=eo(t)),n)for(const l of n)i+=l.source;return r&&(i+=eo(r)),i}const qu=Symbol("break visit"),mj=Symbol("skip children"),S0=Symbol("remove item");function rr(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),N0(Object.freeze([]),e,t)}rr.BREAK=qu;rr.SKIP=mj;rr.REMOVE=S0;rr.itemAtPath=(e,t)=>{let n=e;for(const[r,i]of t){const l=n==null?void 0:n[r];if(l&&"items"in l)n=l.items[i];else return}return n};rr.parentCollection=(e,t)=>{const n=rr.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n==null?void 0:n[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function N0(e,t,n){let r=n(t,e);if(typeof r=="symbol")return r;for(const i of["key","value"]){const l=t[i];if(l&&"items"in l){for(let s=0;s<l.items.length;++s){const o=N0(Object.freeze(e.concat([[i,s]])),l.items[s],n);if(typeof o=="number")s=o-1;else{if(o===qu)return qu;o===S0&&(l.items.splice(s,1),s-=1)}}typeof r=="function"&&i==="key"&&(r=r(t,e))}}return typeof r=="function"?r(t,e):r}const Do="\uFEFF",Mo="",zo="",ml="",gj=e=>!!e&&"items"in e,yj=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function xj(e){switch(e){case Do:return"<BOM>";case Mo:return"<DOC>";case zo:return"<FLOW_END>";case ml:return"<SCALAR>";default:return JSON.stringify(e)}}function C0(e){switch(e){case Do:return"byte-order-mark";case Mo:return"doc-mode";case zo:return"flow-error-end";case ml:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
213
|
+
`:case`\r
|
|
214
|
+
`: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(e[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}const vj=Object.freeze(Object.defineProperty({__proto__:null,BOM:Do,DOCUMENT:Mo,FLOW_END:zo,SCALAR:ml,createScalarToken:fj,isCollection:gj,isScalar:yj,prettyToken:xj,resolveAsScalar:cj,setScalarValue:dj,stringify:pj,tokenType:C0,visit:rr},Symbol.toStringTag,{value:"Module"}));function kt(e){switch(e){case void 0:case" ":case`
|
|
215
|
+
`:case"\r":case" ":return!0;default:return!1}}const ep=new Set("0123456789ABCDEFabcdef"),wj=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ts=new Set(",[]{}"),kj=new Set(` ,[]{}
|
|
216
|
+
\r `),Aa=e=>!e||kj.has(e);class E0{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(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
|
|
217
|
+
`?!0:n==="\r"?this.buffer[t+1]===`
|
|
218
|
+
`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+t];if(n==="\r"){const i=this.buffer[r+t+1];if(i===`
|
|
219
|
+
`||!i&&!this.atEnd)return t+r+1}return n===`
|
|
220
|
+
`||r>=this.indentNext||!n&&!this.atEnd?t+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&kt(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
|
|
221
|
+
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){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 t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Do&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,r=t.indexOf("#");for(;r!==-1;){const l=t[r-1];if(l===" "||l===" "){n=r-1;break}else r=t.indexOf("#",r+1)}for(;;){const l=t[n-1];if(l===" "||l===" ")n-=1;else break}const i=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield Mo,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if((n==="---"||n==="...")&&kt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!kt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&kt(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);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(Aa),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,r=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&i[0]!=="#"||r===0&&(i.startsWith("---")||i.startsWith("..."))&&kt(i[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield zo,yield*this.parseLineStart();let l=0;for(;i[l]===",";)l+=yield*this.pushCount(1),l+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(l+=yield*this.pushIndicators(),i[l]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-l),"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(Aa),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const s=this.charAt(1);if(this.flowKey||kt(s)||s===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let l=0;for(;this.buffer[n-1-l]==="\\";)l+=1;if(l%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);let i=r.indexOf(`
|
|
222
|
+
`,this.pos);if(i!==-1){for(;i!==-1;){const l=this.continueScalar(i+1);if(l===-1)break;i=r.indexOf(`
|
|
223
|
+
`,l)}i!==-1&&(n=i-(r[i-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>kt(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,r;e:for(let l=this.pos;r=this.buffer[l];++l)switch(r){case" ":n+=1;break;case`
|
|
224
|
+
`:t=l,n=0;break;case"\r":{const s=this.buffer[l+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===`
|
|
225
|
+
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const l=this.continueScalar(t+1);if(l===-1)break;t=this.buffer.indexOf(`
|
|
226
|
+
`,l)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let i=t+1;for(r=this.buffer[i];r===" ";)r=this.buffer[++i];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
227
|
+
`;)r=this.buffer[++i];t=i-1}else if(!this.blockScalarKeep)do{let l=t-1,s=this.buffer[l];s==="\r"&&(s=this.buffer[--l]);const o=l;for(;s===" ";)s=this.buffer[--l];if(s===`
|
|
228
|
+
`&&l>=this.pos&&l+1+n>o)t=l;else break}while(!0);return yield ml,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){const l=this.buffer[r+1];if(kt(l)||t&&ts.has(l))break;n=r}else if(kt(i)){let l=this.buffer[r+1];if(i==="\r"&&(l===`
|
|
229
|
+
`?(r+=1,i=`
|
|
230
|
+
`,l=this.buffer[r+1]):n=r),l==="#"||t&&ts.has(l))break;if(i===`
|
|
231
|
+
`){const s=this.continueScalar(r+1);if(s===-1)break;r=Math.max(r,s-2)}}else{if(t&&ts.has(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield ml,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const r=this.buffer.slice(this.pos,t);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Aa))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(kt(n)||t&&ts.has(n))return t?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 t=this.pos+2,n=this.buffer[t];for(;!kt(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(wj.has(n))n=this.buffer[++t];else if(n==="%"&&ep.has(this.buffer[t+1])&&ep.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
|
|
232
|
+
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
233
|
+
`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||t&&r===" ");const i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(t){let n=this.pos,r=this.buffer[n];for(;!t(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class j0{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,r=this.lineStarts.length;for(;n<r;){const l=n+r>>1;this.lineStarts[l]<t?n=l+1:r=l}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};const i=this.lineStarts[n-1];return{line:n,col:t-i+1}}}}function cn(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function tp(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function T0(e){switch(e==null?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ns(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function gr(e){var n;if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function np(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!cn(t.start,"explicit-key-ind")&&!cn(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,T0(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class Ef{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new E0,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(t,n))yield*this.next(r);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=C0(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const r=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:t}),this.offset+=t.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 t=this.peek(1);if(this.type==="doc-end"&&(t==null?void 0:t.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(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&np(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{const i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:n}):i.value=n;break}case"flow-collection":{const i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&tp(i.start)===-1&&(n.indent===0||i.start.every(l=>l.type!=="comment"||l.indent<n.indent))&&(r.type==="document"?r.end=i.start:r.items.push({start:i.start}),n.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 t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{tp(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){const n=ns(this.peek(2)),r=gr(n);let i;t.end?(i=t.end,i.push(this.sourceToken),delete t.end):i=[this.sourceToken];const l={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:r,key:t,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
234
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
235
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var r;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const i="end"in n.value?n.value.end:void 0,l=Array.isArray(i)?i[i.length-1]:void 0;(l==null?void 0:l.type)==="comment"?i==null||i.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const i=t.items[t.items.length-2],l=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const i=!this.onKeyLine&&this.indent===t.indent,l=i&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let s=[];if(l&&n.sep&&!n.value){const o=[];for(let a=0;a<n.sep.length;++a){const u=n.sep[a];switch(u.type){case"newline":o.push(a);break;case"space":break;case"comment":u.indent>t.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":l||n.value?(s.push(this.sourceToken),t.items.push({start:s}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):l||n.value?(s.push(this.sourceToken),t.items.push({start:s,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(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(cn(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(T0(n.key)&&!cn(n.sep,"newline")){const o=gr(n.start),a=n.key,u=n.sep;u.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:u}]})}else s.length>0?n.sep=n.sep.concat(s,this.sourceToken):n.sep.push(this.sourceToken);else if(cn(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const o=gr(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||l?t.items.push({start:s,key:null,sep:[this.sourceToken]}):cn(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);l||n.value?(t.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(t);if(o){if(o.type==="block-seq"){if(!n.explicitKey&&n.sep&&!cn(n.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 i&&t.items.push({start:s});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var r;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const i="end"in n.value?n.value.end:void 0,l=Array.isArray(i)?i[i.length-1]:void 0;(l==null?void 0:l.type)==="comment"?i==null||i.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const i=t.items[t.items.length-2],l=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||cn(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const i=this.startBlockValue(t);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while((r==null?void 0:r.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const i=ns(r),l=gr(i);np(t);const s=t.end.splice(1,t.end.length);s.push(this.sourceToken);const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:l,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
|
|
236
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
237
|
+
`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){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 n=ns(t),r=gr(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=ns(t),r=gr(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){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:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function I0(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new j0||null,prettyErrors:t}}function bj(e,t={}){const{lineCounter:n,prettyErrors:r}=I0(t),i=new Ef(n==null?void 0:n.addNewLine),l=new Cf(t),s=Array.from(l.compose(i.parse(e)));if(r&&n)for(const o of s)o.errors.forEach(Zs(e,n)),o.warnings.forEach(Zs(e,n));return s.length>0?s:Object.assign([],{empty:!0},l.streamInfo())}function L0(e,t={}){const{lineCounter:n,prettyErrors:r}=I0(t),i=new Ef(n==null?void 0:n.addNewLine),l=new Cf(t);let s=null;for(const o of l.compose(i.parse(e),!0,e.length))if(!s)s=o;else if(s.options.logLevel!=="silent"){s.errors.push(new Qn(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(Zs(e,n)),s.warnings.forEach(Zs(e,n))),s}function Sj(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);const i=L0(e,n);if(!i)return null;if(i.warnings.forEach(l=>Jy(i.options.logLevel,l)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function Nj(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){const{keepUndefined:i}=n??t??{};if(!i)return}return ar(e)&&!r?e.toString(n):new di(e,r,n).toString(n)}const Cj=Object.freeze(Object.defineProperty({__proto__:null,Alias:Eo,CST:vj,Composer:Cf,Document:di,Lexer:E0,LineCounter:j0,Pair:De,Parser:Ef,Scalar:V,Schema:Ro,YAMLError:Sf,YAMLMap:nt,YAMLParseError:Qn,YAMLSeq:Tn,YAMLWarning:m0,isAlias:Rn,isCollection:pe,isDocument:ar,isMap:ai,isNode:ge,isPair:fe,isScalar:ie,isSeq:ui,parse:Sj,parseAllDocuments:bj,parseDocument:L0,stringify:Nj,visit:ur,visitAsync:Co},Symbol.toStringTag,{value:"Module"})),rp={design_complete:{bg:"bg-blue-100",text:"text-blue-700",label:"设计完成"},in_progress:{bg:"bg-yellow-100",text:"text-yellow-700",label:"开发中"},done:{bg:"bg-green-100",text:"text-green-700",label:"已完成"},pending:{bg:"bg-gray-100",text:"text-gray-600",label:"待开始"}},Ej={gateway:"🌐",service:"⚙️",job:"⏰"};function jj({content:e}){const t=L.useMemo(()=>{try{return Cj.parse(e)}catch(l){return console.error("Failed to parse services.yaml:",l),null}},[e]);if(!t)return d.jsx("div",{className:"p-4 bg-red-50 text-red-600 rounded",children:"Failed to parse services.yaml"});const{feature:n,services:r,deployment:i}=t;return d.jsxs("div",{className:"space-y-6",children:[d.jsx("div",{className:"bg-gradient-to-r from-indigo-500 to-purple-600 rounded-xl p-6 text-white shadow-lg",children:d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-2xl font-bold",children:n.name}),d.jsx("p",{className:"text-indigo-100 mt-1",children:n.description})]}),d.jsxs("div",{className:"text-right text-sm",children:[n.jira&&d.jsx("a",{href:`https://tssoft.atlassian.net/browse/${n.jira}`,target:"_blank",rel:"noopener noreferrer",className:"bg-white/20 px-3 py-1 rounded-full hover:bg-white/30 transition",children:n.jira}),n.version&&d.jsxs("div",{className:"mt-2 text-indigo-200",children:["Version ",n.version]})]})]})}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"📦 Services"}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:r.map(l=>{const s=rp[l.status]||rp.pending,o=Ej[l.role]||"📦";return d.jsxs("div",{className:"bg-white border rounded-xl p-4 shadow-sm hover:shadow-md transition",children:[d.jsxs("div",{className:"flex items-start justify-between mb-3",children:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx("span",{className:"text-2xl",children:o}),d.jsxs("div",{children:[d.jsx("h4",{className:"font-semibold text-gray-900",children:l.name}),d.jsx("span",{className:"text-xs text-gray-500",children:l.role})]})]}),d.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${s.bg} ${s.text}`,children:s.label})]}),l.database&&d.jsxs("div",{className:"text-sm text-gray-600 mb-2",children:[d.jsx("span",{className:"text-gray-400",children:"💾"})," ",l.database,l.tables&&l.tables.length>0&&d.jsxs("span",{className:"text-gray-400 ml-2",children:["(",l.tables.join(", "),")"]})]}),l.changes&&l.changes.length>0&&d.jsxs("div",{className:"mt-3 space-y-1",children:[d.jsx("div",{className:"text-xs text-gray-500 font-medium",children:"Changes:"}),d.jsxs("div",{className:"max-h-32 overflow-y-auto space-y-1",children:[l.changes.slice(0,5).map((a,u)=>d.jsxs("div",{className:"text-xs bg-gray-50 px-2 py-1 rounded flex items-start",children:[d.jsx("span",{className:"text-gray-400 mr-1.5 shrink-0",children:a.type==="api"?"🔌":a.type==="ddl"?"🗄️":a.type==="service"?"⚙️":a.type==="dao"?"📊":a.type==="types"?"📝":a.type==="job"?"⏰":"•"}),d.jsx("span",{className:"text-gray-700 line-clamp-1",children:a.desc})]},u)),l.changes.length>5&&d.jsxs("div",{className:"text-xs text-gray-400 text-center",children:["+",l.changes.length-5," more"]})]})]}),l.dependencies&&l.dependencies.length>0&&d.jsxs("div",{className:"mt-3 text-xs text-gray-500",children:[d.jsx("span",{className:"text-gray-400",children:"→"})," Depends on:"," ",l.dependencies.join(", ")]})]},l.name)})})]}),(i==null?void 0:i.order)&&i.order.length>0&&d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"🚀 Deployment Order"}),d.jsx("div",{className:"flex items-center space-x-2 overflow-x-auto pb-2",children:i.order.map((l,s)=>d.jsxs("div",{className:"flex items-center",children:[d.jsxs("div",{className:"bg-white border rounded-lg px-4 py-2 shadow-sm min-w-[120px]",children:[d.jsxs("div",{className:"text-xs text-gray-400 mb-1",children:["Step ",l.step]}),d.jsx("div",{className:"font-medium text-gray-800 text-sm",children:l.name})]}),s<i.order.length-1&&d.jsx("span",{className:"text-gray-300 mx-2",children:"→"})]},l.step))})]})]})}function Tj({changeId:e}){const{lastMessage:t}=An(),[n,r]=L.useState(null),[i,l]=L.useState([]),[s,o]=L.useState(null),[a,u]=L.useState(!0),[f,c]=L.useState(null),p=L.useCallback(async()=>{try{const y=await Ht.getCrossServiceInfo(e);r(y.config),l(y.documents),y.documents.length>0&&!s&&o(y.documents[0].name)}catch(y){console.error("Failed to fetch cross-service docs:",y),c("Failed to load cross-service documents")}finally{u(!1)}},[e,s]);L.useEffect(()=>{u(!0),c(null),p()},[p]),L.useEffect(()=>{if(!t)return;const{event:y}=t;y==="cross-service:updated"&&p()},[t,p]);const h=i.find(y=>y.name===s);return a?d.jsx("div",{className:"flex justify-center items-center h-64",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})}):f?d.jsx("div",{className:"p-6 text-center",children:d.jsx("p",{className:"text-red-500",children:f})}):n?i.length===0?d.jsx("div",{className:"p-6",children:d.jsxs("div",{className:"bg-yellow-50 rounded-lg p-6 text-center",children:[d.jsx("div",{className:"text-4xl mb-4",children:"⚠️"}),d.jsx("h3",{className:"text-lg font-semibold text-yellow-700 mb-2",children:"Documents Not Found"}),d.jsx("p",{className:"text-yellow-600 text-sm",children:"Cross-service configuration exists but no documents were found at:"}),d.jsx("code",{className:"bg-yellow-100 px-2 py-1 rounded text-sm mt-2 inline-block",children:n.rootPath})]})}):d.jsxs("div",{className:"p-4",children:[d.jsx("div",{className:"mb-4 flex items-center justify-between",children:d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx("span",{className:"text-lg",children:"🔗"}),d.jsxs("span",{className:"text-sm text-gray-500",children:["from ",d.jsx("code",{className:"bg-gray-100 px-1 rounded",children:n.rootPath})]}),(h==null?void 0:h.isSnapshot)&&d.jsx("span",{className:"bg-amber-100 text-amber-700 text-xs px-2 py-0.5 rounded",children:"📦 Archived Snapshot"})]})}),d.jsx("div",{className:"flex space-x-2 mb-4 overflow-x-auto pb-2",children:i.map(y=>d.jsxs("button",{onClick:()=>o(y.name),className:`px-4 py-2 rounded-lg text-sm font-medium transition-all whitespace-nowrap ${s===y.name?"bg-blue-100 text-blue-700 shadow-sm":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:[y.name.endsWith(".yaml")||y.name.endsWith(".yml")?"📋":"📄"," ",y.name]},y.name))}),h&&d.jsxs("div",{className:"bg-gray-50 rounded-lg border",children:[d.jsx("div",{className:"px-4 py-2 bg-gray-100 border-b rounded-t-lg flex items-center justify-between",children:d.jsx("span",{className:"text-xs text-gray-500 font-mono truncate",children:h.path})}),d.jsx("div",{className:"p-6 prose prose-sm max-w-none overflow-x-auto",children:h.name==="services.yaml"||h.name==="services.yml"?d.jsx(jj,{content:h.content}):h.name.endsWith(".yaml")||h.name.endsWith(".yml")?d.jsx("pre",{className:"bg-gray-800 text-gray-100 p-4 rounded overflow-x-auto text-sm",children:d.jsx("code",{children:h.content})}):h.name.endsWith(".sql")?d.jsx("pre",{className:"bg-gray-800 text-gray-100 p-4 rounded overflow-x-auto text-sm",children:d.jsx("code",{children:h.content})}):d.jsx(Lr,{remarkPlugins:[Pr],children:h.content})})]})]}):d.jsx("div",{className:"p-6",children:d.jsxs("div",{className:"bg-gray-50 rounded-lg p-6 text-center",children:[d.jsx("div",{className:"text-4xl mb-4",children:"🔗"}),d.jsx("h3",{className:"text-lg font-semibold text-gray-700 mb-2",children:"No Cross-Service Configuration"}),d.jsx("p",{className:"text-gray-500 text-sm mb-4",children:"This change doesn't have cross-service documents configured."}),d.jsxs("div",{className:"bg-white rounded border p-4 text-left max-w-md mx-auto",children:[d.jsxs("p",{className:"text-xs text-gray-500 mb-2",children:["Add this to your ",d.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"proposal.md"})," frontmatter:"]}),d.jsx("pre",{className:"text-xs bg-gray-100 p-3 rounded overflow-x-auto",children:`---
|
|
238
|
+
crossService:
|
|
239
|
+
rootPath: "../../../../.cross-service"
|
|
240
|
+
documents:
|
|
241
|
+
- design.md
|
|
242
|
+
- flows.md
|
|
243
|
+
- services.yaml
|
|
244
|
+
---`})]})]})})}const Ij={comment:"💬",suggestion:"💡",question:"❓",issue:"🚨"},Lj={low:"bg-gray-100 text-gray-600",medium:"bg-yellow-100 text-yellow-700",high:"bg-red-100 text-red-700"};function Pj(){var S;const{id:e}=Kv(),{lastMessage:t}=An(),[n,r]=L.useState(null),[i,l]=L.useState([]),[s,o]=L.useState(null),[a,u]=L.useState(!0),[f,c]=L.useState("proposal"),[p,h]=L.useState(!1),[y,g]=L.useState([]),[w,m]=L.useState({proposal:[],design:[],tasks:[],summary:null});L.useEffect(()=>{async function j(){if(e)try{const[A,D,U,K]=await Promise.all([Ht.get(e),Li.get(e),Ht.getReviews(e),Ht.getSpecs(e)]);r(A.change),l(D.tasks),o(D.progress),m(U),g(K.specs)}catch(A){console.error("Failed to fetch change:",A)}finally{u(!1)}}j()},[e]),L.useEffect(()=>{if(!t||!e)return;const{event:j,data:A}=t;if(j==="review:added"&&A.changeId===e){const D=A.targetType;D&&A.review&&m(U=>({...U,[D]:[...U[D],A.review]}))}if(j==="review:resolved"&&A.changeId===e){const D=A.targetType;D&&A.reviewId&&m(U=>({...U,[D]:U[D].map(K=>K.id===A.reviewId?{...K,status:A.status||"resolved"}:K)}))}j==="reviews:updated"&&A.changeId===e&&Ht.getReviews(e).then(D=>{m(D)}).catch(D=>{console.error("Failed to refresh reviews:",D)}),j==="tasks:updated"&&A.changeId===e&&Li.get(e).then(D=>{l(D.tasks),o(D.progress)}).catch(D=>{console.error("Failed to refresh tasks:",D)}),j==="task:updated"&&A.changeId===e&&l(D=>D.map(U=>U.id===A.taskId?{...U,status:A.status}:U)),j==="change:content_updated"&&A.changeId===e&&Ht.get(e).then(D=>{r(D.change)}).catch(D=>{console.error("Failed to refresh change:",D)})},[t,e]);const x=async(j,A)=>{if(e)try{await Li.update(e,j,A);const D=await Li.get(e);l(D.tasks),o(D.progress)}catch(D){console.error("Failed to update task:",D)}},v=async(j,A)=>{if(e)try{await Ht.resolveReview(e,j,A),m(D=>({...D,[A]:D[A].map(U=>U.id===j?{...U,status:"resolved"}:U)}))}catch(D){console.error("Failed to resolve review:",D)}};if(a)return d.jsx("div",{className:"flex justify-center items-center h-64",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})});if(!n)return d.jsxs("div",{className:"text-center py-12",children:[d.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Change not found"}),d.jsx(Yt,{to:"/changes",className:"text-blue-500 hover:text-blue-700 mt-2 inline-block",children:"← Back to changes"})]});const C=f==="cross-service"||f==="specs"?null:f,E=C?w[C]:[],b=E.filter(j=>j.status==="open"),T=E.filter(j=>j.status!=="open"),P=p?T:b,I=((S=w.summary)==null?void 0:S.hasBlockingIssues)||!1;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex justify-between items-start",children:[d.jsxs("div",{children:[d.jsx(Yt,{to:"/changes",className:"text-blue-500 hover:text-blue-700 text-sm",children:"← Back to changes"}),d.jsx("h2",{className:"text-2xl font-bold text-gray-900 mt-2",children:n.title}),d.jsx("p",{className:"text-gray-500",children:n.id})]}),d.jsxs("div",{className:"flex items-center space-x-2",children:[I&&d.jsx("span",{className:"px-3 py-1 bg-red-100 text-red-700 rounded-full text-sm font-medium",children:"🚨 Blocking Issues"}),w.summary&&w.summary.open>0&&d.jsxs("span",{className:"px-3 py-1 bg-blue-100 text-blue-700 rounded-full text-sm font-medium",children:[w.summary.open," open reviews"]}),d.jsx("span",{className:`status-badge ${n.status==="active"?"status-implementing":"status-completed"}`,children:n.status})]})]}),s&&d.jsxs("div",{className:"bg-white rounded-lg shadow p-4",children:[d.jsxs("div",{className:"flex justify-between items-center mb-2",children:[d.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Progress"}),d.jsxs("span",{className:"text-sm text-gray-500",children:[s.completed,"/",s.total," tasks (",s.percentage,"%)"]})]}),d.jsx("div",{className:"w-full h-3 bg-gray-200 rounded-full",children:d.jsx("div",{className:"h-full bg-blue-500 rounded-full transition-all duration-300",style:{width:`${s.percentage}%`}})}),d.jsxs("div",{className:"flex justify-between mt-2 text-xs text-gray-500",children:[d.jsxs("span",{children:["✅ ",s.completed," done"]}),d.jsxs("span",{children:["🔄 ",s.inProgress," in progress"]}),d.jsxs("span",{children:["⏳ ",s.pending," pending"]})]})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[d.jsxs("div",{className:"lg:col-span-3",children:[d.jsx("div",{className:"border-b border-gray-200",children:d.jsxs("nav",{className:"flex space-x-8",children:[["proposal","tasks","design"].map(j=>{const A=w[j].filter(D=>D.status==="open");return d.jsxs("button",{onClick:()=>c(j),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center ${f===j?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[j.charAt(0).toUpperCase()+j.slice(1),A.length>0&&d.jsx("span",{className:"ml-2 bg-blue-100 text-blue-600 px-2 py-0.5 rounded-full text-xs",children:A.length})]},j)}),d.jsxs("button",{onClick:()=>c("specs"),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center ${f==="specs"?"border-green-500 text-green-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:["📋 Specs",y.length>0&&d.jsx("span",{className:"ml-2 bg-green-100 text-green-600 px-2 py-0.5 rounded-full text-xs",children:y.length})]}),d.jsx("button",{onClick:()=>c("cross-service"),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center ${f==="cross-service"?"border-purple-500 text-purple-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:"🔗 Cross-Service"})]})}),d.jsxs("div",{className:"bg-white rounded-lg shadow mt-4",children:[f==="proposal"&&d.jsx("div",{className:"p-6 prose prose-sm max-w-none",children:n.proposal?d.jsx(Lr,{remarkPlugins:[Pr],children:n.proposal}):d.jsx("p",{className:"text-gray-500",children:"No proposal content."})}),f==="tasks"&&d.jsx("div",{className:"p-6",children:i.length===0?d.jsx("p",{className:"text-gray-500",children:"No tasks defined."}):d.jsx("div",{className:"space-y-2",children:i.map(j=>d.jsxs("div",{className:"flex items-center justify-between p-3 rounded border hover:bg-gray-50",children:[d.jsxs("div",{className:"flex items-center space-x-3",children:[d.jsxs("button",{onClick:()=>{const A=j.status==="pending"?"in_progress":j.status==="in_progress"?"done":"pending";x(j.id,A)},className:`w-6 h-6 rounded-full border-2 flex items-center justify-center ${j.status==="done"?"bg-green-500 border-green-500 text-white":j.status==="in_progress"?"bg-blue-500 border-blue-500 text-white":"border-gray-300"}`,children:[j.status==="done"&&"✓",j.status==="in_progress"&&"●"]}),d.jsxs("div",{children:[d.jsxs("span",{className:"font-mono text-sm text-gray-500",children:["[",j.id,"]"]}),d.jsx("span",{className:"ml-2",children:j.title})]})]}),d.jsx("span",{className:`text-xs ${j.status==="done"?"text-green-600":j.status==="in_progress"?"text-blue-600":"text-gray-400"}`,children:j.status})]},j.id))})}),f==="design"&&d.jsx("div",{className:"p-6 prose prose-sm max-w-none",children:n.design?d.jsx(Lr,{remarkPlugins:[Pr],children:n.design}):d.jsx("p",{className:"text-gray-500",children:"No design document."})}),f==="specs"&&d.jsx("div",{className:"p-6",children:y.length===0?d.jsx("p",{className:"text-gray-500",children:"No specs defined for this change."}):d.jsx("div",{className:"space-y-6",children:y.map(j=>d.jsxs("div",{className:"border rounded-lg overflow-hidden",children:[d.jsxs("div",{className:"bg-green-50 px-4 py-2 border-b flex items-center justify-between",children:[d.jsx("h4",{className:"font-semibold text-green-800",children:j.title}),d.jsx("span",{className:"text-xs text-green-600 font-mono",children:j.id})]}),d.jsx("div",{className:"p-4 prose prose-sm max-w-none",children:d.jsx(Lr,{remarkPlugins:[Pr],children:j.content})})]},j.id))})}),f==="cross-service"&&e&&d.jsx(Tj,{changeId:e})]})]}),d.jsx("div",{className:"lg:col-span-1 h-[calc(100vh-200px)]",children:d.jsxs("div",{className:"bg-white rounded-lg shadow h-full flex flex-col",children:[d.jsxs("div",{className:"p-4 border-b border-gray-200",children:[d.jsxs("h3",{className:"font-semibold text-gray-700 mb-2",children:["Reviews ",d.jsxs("span",{className:"text-xs text-gray-400",children:["for ",f]})]}),d.jsxs("div",{className:"flex space-x-1",children:[d.jsxs("button",{onClick:()=>h(!1),className:`px-3 py-1 text-xs rounded-full transition-colors ${p?"bg-gray-100 text-gray-500 hover:bg-gray-200":"bg-blue-100 text-blue-700"}`,children:["Open (",b.length,")"]}),d.jsxs("button",{onClick:()=>h(!0),className:`px-3 py-1 text-xs rounded-full transition-colors ${p?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500 hover:bg-gray-200"}`,children:["Resolved (",T.length,")"]})]})]}),d.jsx("div",{className:"flex-1 p-4 space-y-3 overflow-y-auto",children:P.length===0?d.jsxs("div",{className:"text-center py-8",children:[d.jsx("p",{className:"text-sm text-gray-400",children:p?"No resolved reviews":"No open reviews"}),!p&&d.jsxs("p",{className:"text-xs text-gray-400 mt-1",children:["Use ",d.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"openspec_add_review"})]})]}):P.map(j=>d.jsxs("div",{className:"p-3 bg-gray-50 rounded-lg border border-gray-200 group hover:border-blue-300 transition-colors",children:[d.jsxs("div",{className:"flex justify-between items-start mb-2",children:[d.jsxs("div",{className:"flex items-center space-x-1",children:[d.jsx("span",{className:"text-lg",children:Ij[j.type]}),j.severity&&d.jsx("span",{className:`px-1.5 py-0.5 rounded text-xs ${Lj[j.severity]}`,children:j.severity}),j.lineNumber&&d.jsxs("span",{className:"text-xs text-gray-400",children:["L",j.lineNumber]})]}),j.status==="open"&&C?d.jsx("button",{onClick:()=>v(j.id,C),className:"text-green-500 hover:text-green-700 opacity-0 group-hover:opacity-100 transition-opacity",title:"Resolve",children:"✓"}):d.jsx("span",{className:`text-xs px-2 py-0.5 rounded ${j.status==="resolved"?"bg-green-100 text-green-600":"bg-gray-100 text-gray-500"}`,children:j.status==="resolved"?"✓ resolved":"⏭️ won't fix"})]}),d.jsx("div",{className:"prose prose-xs max-w-none text-gray-700 break-words overflow-hidden prose-p:my-1 prose-ul:my-1 prose-li:my-0 prose-code:break-all prose-code:text-xs",children:d.jsx(Lr,{remarkPlugins:[Pr],children:j.body})}),d.jsxs("div",{className:"text-xs text-gray-400 mt-2",children:["by ",j.author," • ",new Date(j.createdAt).toLocaleDateString()]})]},j.id))})]})})]})]})}const ip={comment:"💬",suggestion:"💡",question:"❓",issue:"🚨"},lp={low:"bg-gray-100 text-gray-600",medium:"bg-yellow-100 text-yellow-700",high:"bg-red-100 text-red-700"};function _j(){const{lastMessage:e}=An(),[t,n]=L.useState([]),[r,i]=L.useState(!0),[l,s]=L.useState(null),[o,a]=L.useState([]),[u,f]=L.useState(null),[c,p]=L.useState(""),[h,y]=L.useState("comment"),[g,w]=L.useState("medium"),m=L.useRef(null),x=async()=>{try{const I=await Bn.list();n(I.specs)}catch(I){console.error("Failed to fetch specs:",I)}};L.useEffect(()=>{x().finally(()=>i(!1))},[]),L.useEffect(()=>{if(!e)return;const{event:I,data:S}=e;(I==="file:changed"||I==="reviews:updated")&&(x(),l&&I==="reviews:updated"&&(S==null?void 0:S.targetType)==="spec"&&Bn.listReviews(l.id).then(j=>{a(j.reviews)}).catch(console.error))},[e,l]);const v=async I=>{try{const S=await Bn.get(I);s(S.spec),f(null),p("");const j=await Bn.listReviews(I);a(j.reviews)}catch(S){console.error("Failed to fetch spec:",S)}},C=()=>{const I=window.getSelection(),S=m.current;if(!I||I.isCollapsed||!S){f(null);return}const j=I.getRangeAt(0),A=k=>{var Y;return k.nodeType===Node.ELEMENT_NODE?!!k.closest("[data-review-overlay]"):!!((Y=k==null?void 0:k.parentElement)!=null&&Y.closest("[data-review-overlay]"))};if(!S.contains(j.startContainer)||!S.contains(j.endContainer)||A(j.startContainer)||A(j.endContainer)){f(null);return}const D=I.toString();if(!D.trim()){f(null);return}const U=j.cloneRange();U.selectNodeContents(S),U.setEnd(j.startContainer,j.startOffset);const xe=(U.toString().match(/\n/g)||[]).length+1,de=S.getBoundingClientRect(),z=j.getBoundingClientRect(),$=Math.max(z.top-de.top+S.scrollTop-180,12);f({text:D,lineNumber:xe,popupTop:$})},E=async()=>{const I=c.trim();if(!(!u||!I||!l))try{const S=await Bn.addReview(l.id,I,h,{lineNumber:u.lineNumber,severity:h==="issue"?g:void 0});a(j=>[...j,S.review]),f(null),p("")}catch(S){console.error("Failed to add review:",S),alert("Failed to save review")}},b=async(I,S="resolved")=>{if(l)try{await Bn.resolveReview(l.id,I,S),a(j=>j.map(A=>A.id===I?{...A,status:S,resolvedAt:new Date().toISOString()}:A))}catch(j){console.error("Failed to resolve review:",j)}};if(r)return d.jsx("div",{className:"flex justify-center items-center h-64",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-500"})});const T=o.filter(I=>I.status==="open"),P=T.some(I=>I.type==="issue"&&I.severity==="high");return d.jsxs("div",{className:"space-y-6 h-[calc(100vh-120px)] flex flex-col",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Specifications"}),l&&T.length>0&&d.jsxs("div",{className:"flex items-center space-x-2",children:[P&&d.jsx("span",{className:"px-3 py-1 bg-red-100 text-red-700 rounded-full text-sm font-medium",children:"🚨 Blocking Issues"}),d.jsxs("span",{className:"text-sm text-gray-500",children:[T.length," open review",T.length!==1?"s":""]})]})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6 flex-1 min-h-0",children:[d.jsx("div",{className:"lg:col-span-3 bg-white rounded-xl shadow-sm border border-gray-100 overflow-y-auto",children:t.length===0?d.jsx("div",{className:"p-8 text-center text-gray-500",children:"No specs found."}):d.jsx("div",{className:"divide-y divide-gray-50",children:t.map(I=>d.jsxs("button",{onClick:()=>v(I.id),className:`w-full text-left p-4 hover:bg-gray-50 transition-colors ${(l==null?void 0:l.id)===I.id?"bg-indigo-50 border-l-4 border-indigo-500":"border-l-4 border-transparent"}`,children:[d.jsx("div",{className:"font-semibold text-gray-900",children:I.title}),d.jsx("div",{className:"text-xs text-gray-500 mt-1 font-mono",children:I.id})]},I.id))})}),d.jsx("div",{className:"lg:col-span-6 bg-white rounded-xl shadow-sm border border-gray-100 flex flex-col min-h-0",children:l?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"p-4 border-b border-gray-100 bg-gray-50/50 rounded-t-xl flex justify-between items-center",children:d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-bold text-gray-900",children:l.title}),d.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"Select text to add review comment"})]})}),d.jsxs("div",{className:"flex-1 overflow-y-auto p-6 relative",ref:m,onMouseUp:C,children:[d.jsx("div",{className:"prose prose-sm max-w-none prose-headings:font-bold prose-h1:text-xl prose-h2:text-lg prose-h3:text-base prose-code:bg-gray-100 prose-code:px-1 prose-code:rounded prose-pre:bg-gray-50",children:d.jsx(Lr,{remarkPlugins:[Pr],children:l.content})}),u&&d.jsxs("div",{className:"absolute z-10 bg-white rounded-lg shadow-xl border border-gray-200 p-4 w-80 animate-fade-in","data-review-overlay":!0,style:{top:u.popupTop,right:20},children:[d.jsx("div",{className:"text-xs font-semibold text-gray-500 mb-2 uppercase tracking-wider flex justify-between items-center",children:d.jsxs("span",{children:["Add Review (Line ",u.lineNumber,")"]})}),d.jsxs("div",{className:"mb-2 p-2 bg-indigo-50 rounded text-xs text-indigo-800 border-l-2 border-indigo-300 italic truncate",children:['"',u.text.trim().substring(0,60),u.text.length>60?"...":"",'"']}),d.jsx("div",{className:"flex space-x-1 mb-2",children:["comment","suggestion","question","issue"].map(I=>d.jsxs("button",{onClick:()=>y(I),className:`px-2 py-1 text-xs rounded ${h===I?"bg-indigo-600 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:[ip[I]," ",I]},I))}),h==="issue"&&d.jsx("div",{className:"flex space-x-1 mb-2",children:["low","medium","high"].map(I=>d.jsx("button",{onClick:()=>w(I),className:`px-2 py-1 text-xs rounded ${g===I?lp[I]+" ring-2 ring-offset-1":"bg-gray-100 text-gray-600"}`,children:I},I))}),d.jsx("textarea",{autoFocus:!0,className:"w-full text-sm border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500 mb-2",rows:3,placeholder:"Your review comment...",value:c,onChange:I=>p(I.target.value)}),d.jsxs("div",{className:"flex justify-end space-x-2",children:[d.jsx("button",{onClick:()=>f(null),className:"px-3 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded",children:"Cancel"}),d.jsx("button",{onClick:E,className:"px-3 py-1 text-xs bg-indigo-600 text-white rounded hover:bg-indigo-700 font-medium",children:"Add Review"})]})]})]})]}):d.jsxs("div",{className:"flex-1 flex flex-col justify-center items-center text-gray-400 p-8",children:[d.jsx("svg",{className:"w-16 h-16 mb-4 opacity-20",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),d.jsx("p",{children:"Select a specification to view and review"})]})}),d.jsxs("div",{className:"lg:col-span-3 bg-gray-50 rounded-xl border border-gray-200 flex flex-col min-h-0",children:[d.jsx("div",{className:"p-4 border-b border-gray-200 bg-white rounded-t-xl",children:d.jsxs("h3",{className:"font-semibold text-gray-700 flex items-center",children:[d.jsx("span",{children:"Reviews"}),d.jsx("span",{className:"ml-2 bg-gray-200 text-gray-600 px-2 py-0.5 rounded-full text-xs",children:T.length})]})}),d.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:T.length===0?d.jsxs("div",{className:"text-center py-10",children:[d.jsx("p",{className:"text-sm text-gray-400",children:"No reviews yet."}),d.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Select text in the spec to add one."})]}):T.map(I=>d.jsxs("div",{className:"bg-white p-3 rounded-lg shadow-sm border border-gray-200 group hover:border-indigo-300 transition-colors",children:[d.jsxs("div",{className:"flex justify-between items-start mb-2",children:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx("span",{className:"text-lg",children:ip[I.type]}),I.severity&&d.jsx("span",{className:`px-1.5 py-0.5 rounded text-xs ${lp[I.severity]}`,children:I.severity}),I.lineNumber&&d.jsxs("span",{className:"text-xs text-gray-400",children:["L",I.lineNumber]})]}),d.jsxs("div",{className:"flex space-x-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[d.jsx("button",{className:"text-green-500 hover:text-green-700 text-xs",onClick:()=>b(I.id,"resolved"),title:"Resolve",children:"✓"}),d.jsx("button",{className:"text-gray-400 hover:text-gray-600 text-xs",onClick:()=>b(I.id,"wont_fix"),title:"Won't fix",children:"×"})]})]}),d.jsx("div",{className:"text-sm text-gray-800",children:I.body}),I.replies.length>0&&d.jsxs("div",{className:"mt-2 pt-2 border-t border-gray-100 text-xs text-gray-500",children:["💭 ",I.replies.length," replies"]})]},I.id))})]})]})]})}function Aj(){const{lastMessage:e}=An(),[t,n]=L.useState([]),[r,i]=L.useState(!0),[l,s]=L.useState(!1),[o,a]=L.useState({type:null,changeId:""}),[u,f]=L.useState({name:"",comment:""});async function c(){try{const g=l?await Pi.list():await Pi.listPending();n(g.approvals)}catch(g){console.error("Failed to fetch approvals:",g)}}L.useEffect(()=>{i(!0),c().finally(()=>i(!1))},[l]),L.useEffect(()=>{if(!e)return;const{event:g}=e;["approval:requested","approval:approved","approval:rejected"].includes(g)&&c()},[e]);const p=async()=>{if(u.name)try{await Pi.approve(o.changeId,u.name,u.comment||void 0),a({type:null,changeId:""}),f({name:"",comment:""}),c()}catch(g){console.error("Failed to approve:",g)}},h=async()=>{if(!(!u.name||!u.comment))try{await Pi.reject(o.changeId,u.name,u.comment),a({type:null,changeId:""}),f({name:"",comment:""}),c()}catch(g){console.error("Failed to reject:",g)}},y=g=>({draft:"status-draft",pending_approval:"status-pending",approved:"status-approved",rejected:"status-rejected",implementing:"status-implementing",completed:"status-completed"})[g]||"status-draft";return r?d.jsx("div",{className:"flex justify-center items-center h-64",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Approval Queue"}),d.jsxs("label",{className:"flex items-center space-x-2 text-sm",children:[d.jsx("input",{type:"checkbox",checked:l,onChange:g=>s(g.target.checked),className:"rounded border-gray-300"}),d.jsx("span",{children:"Show all"})]})]}),t.length===0?d.jsx("div",{className:"bg-white rounded-lg shadow p-8 text-center text-gray-500",children:l?"No approval records found.":"No pending approvals."}):d.jsx("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:d.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[d.jsx("thead",{className:"bg-gray-50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Change"}),d.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Status"}),d.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Requested"}),d.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Actions"})]})}),d.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:t.map(g=>d.jsxs("tr",{className:"hover:bg-gray-50",children:[d.jsxs("td",{className:"px-6 py-4",children:[d.jsx("div",{className:"font-medium text-gray-900",children:g.changeId}),g.requestedBy&&d.jsxs("div",{className:"text-sm text-gray-500",children:["by ",g.requestedBy]})]}),d.jsx("td",{className:"px-6 py-4",children:d.jsx("span",{className:`status-badge ${y(g.status)}`,children:g.status.replace("_"," ")})}),d.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:g.requestedAt?new Date(g.requestedAt).toLocaleString():"-"}),d.jsx("td",{className:"px-6 py-4",children:g.status==="pending_approval"&&d.jsxs("div",{className:"flex space-x-2",children:[d.jsx("button",{onClick:()=>a({type:"approve",changeId:g.changeId}),className:"px-3 py-1 bg-green-500 text-white text-sm rounded hover:bg-green-600",children:"Approve"}),d.jsx("button",{onClick:()=>a({type:"reject",changeId:g.changeId}),className:"px-3 py-1 bg-red-500 text-white text-sm rounded hover:bg-red-600",children:"Reject"})]})})]},g.changeId))})]})}),o.type&&d.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:d.jsxs("div",{className:"bg-white rounded-lg shadow-xl p-6 w-full max-w-md",children:[d.jsx("h3",{className:"text-lg font-semibold mb-4",children:o.type==="approve"?"Approve Change":"Reject Change"}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Your Name"}),d.jsx("input",{type:"text",value:u.name,onChange:g=>f({...u,name:g.target.value}),className:"w-full border rounded-md px-3 py-2",placeholder:"Enter your name"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:o.type==="approve"?"Comment (optional)":"Reason (required)"}),d.jsx("textarea",{value:u.comment,onChange:g=>f({...u,comment:g.target.value}),className:"w-full border rounded-md px-3 py-2",rows:3,placeholder:o.type==="approve"?"Optional comment...":"Explain why this is rejected..."})]})]}),d.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[d.jsx("button",{onClick:()=>{a({type:null,changeId:""}),f({name:"",comment:""})},className:"px-4 py-2 border rounded-md hover:bg-gray-50",children:"Cancel"}),d.jsx("button",{onClick:o.type==="approve"?p:h,className:`px-4 py-2 text-white rounded-md ${o.type==="approve"?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:o.type==="approve"?"Approve":"Reject"})]})]})})]})}function Oj(){const{lastMessage:e}=An(),[t,n]=L.useState(null),[r,i]=L.useState(!0),[l,s]=L.useState(null),[o,a]=L.useState(null),[u,f]=L.useState(null),[c,p]=L.useState(null),h=L.useCallback(async()=>{try{const x=await Jd.get();n(x),s(null)}catch(x){s(x instanceof Error?x.message:"Failed to load kanban")}},[]);L.useEffect(()=>{h().finally(()=>i(!1))},[h]),L.useEffect(()=>{if(!e)return;const{event:x}=e;["kanban:updated","change:archived","tasks:updated","approval:requested","approval:approved","approval:rejected"].includes(x)&&h()},[e,h]);const y=x=>{a(x)},g=(x,v)=>{x.preventDefault(),p(v)},w=()=>{p(null)},m=async x=>{if(p(null),!o||o.column===x){a(null);return}f(o.id);try{await Jd.moveCard(o.id,x),await h()}catch(v){s(v instanceof Error?v.message:"Failed to move card"),setTimeout(()=>s(null),5e3)}finally{a(null),f(null)}};return r?d.jsx("div",{className:"flex justify-center items-center h-96",children:d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-indigo-600"}),d.jsx("div",{className:"absolute top-0 left-0 h-12 w-12 rounded-full border-t-2 border-indigo-100 opacity-30 animate-pulse"})]})}):l&&!t?d.jsxs("div",{className:"text-center py-12",children:[d.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-red-100 mb-4",children:d.jsx(sp,{className:"w-8 h-8 text-red-600"})}),d.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Failed to load Kanban"}),d.jsx("p",{className:"text-gray-500 mb-4",children:l}),d.jsx("button",{onClick:()=>h(),className:"px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors",children:"Retry"})]}):d.jsxs("div",{className:"space-y-6 animate-fade-in",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsxs("div",{children:[d.jsxs("h2",{className:"text-3xl font-bold text-gray-900 tracking-tight flex items-center gap-3",children:[d.jsx("span",{className:"text-3xl",children:"📋"}),"Kanban Board"]}),d.jsxs("p",{className:"mt-1 text-gray-500",children:["Drag and drop cards to update status • ",(t==null?void 0:t.summary.total)||0," total changes"]})]}),d.jsx("div",{className:"flex items-center space-x-3",children:d.jsxs("button",{onClick:h,className:"px-4 py-2 text-sm font-medium text-gray-700 hover:text-gray-900 bg-white hover:bg-gray-50 border border-gray-200 rounded-lg shadow-sm transition-all hover:shadow",children:[d.jsx(Mj,{className:"w-4 h-4 inline mr-2"}),"Refresh"]})})]}),l&&d.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 flex items-start animate-fade-in",children:[d.jsx(sp,{className:"w-5 h-5 text-red-500 mt-0.5 mr-3 flex-shrink-0"}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-red-800",children:"Error"}),d.jsx("p",{className:"text-sm text-red-600 mt-1",children:l})]})]}),d.jsx("div",{className:"flex gap-4 overflow-x-auto pb-4 -mx-4 px-4",style:{scrollBehavior:"smooth"},children:t==null?void 0:t.columns.map(x=>d.jsx(Rj,{column:x,onDragStart:y,onDragOver:v=>g(v,x.id),onDragLeave:w,onDrop:()=>m(x.id),isDragOver:c===x.id&&(o==null?void 0:o.column)!==x.id,movingCardId:u},x.id))}),d.jsxs("div",{className:"bg-white rounded-xl border border-gray-100 shadow-sm p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-500 mb-3",children:"Summary"}),d.jsx("div",{className:"flex flex-wrap gap-4",children:t==null?void 0:t.columns.map(x=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:x.color}}),d.jsx("span",{className:"text-sm text-gray-600",children:x.title}),d.jsx("span",{className:"text-sm font-semibold text-gray-900 bg-gray-100 px-2 py-0.5 rounded-full",children:x.cards.length})]},x.id))})]})]})}function Rj({column:e,onDragStart:t,onDragOver:n,onDragLeave:r,onDrop:i,isDragOver:l,movingCardId:s}){return d.jsxs("div",{className:`flex-shrink-0 w-80 rounded-xl p-4 transition-all duration-200 ${l?"bg-indigo-50 ring-2 ring-indigo-300 ring-offset-2":"bg-gradient-to-b from-gray-50 to-gray-100/50"}`,onDragOver:n,onDragLeave:r,onDrop:i,children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx("div",{className:"w-3.5 h-3.5 rounded-full shadow-sm",style:{backgroundColor:e.color}}),d.jsx("h3",{className:"font-semibold text-gray-900",children:e.title})]}),d.jsx("span",{className:"px-2.5 py-1 text-xs font-bold bg-white text-gray-600 rounded-full shadow-sm border border-gray-100",children:e.cards.length})]}),d.jsx("div",{className:"space-y-3 min-h-[280px]",children:e.cards.length===0?d.jsxs("div",{className:`flex flex-col items-center justify-center h-32 border-2 border-dashed rounded-xl text-gray-400 text-sm transition-colors ${l?"border-indigo-300 bg-indigo-50":"border-gray-200"}`,children:[d.jsx(zj,{className:"w-8 h-8 mb-2 opacity-50"}),d.jsx("span",{children:"Drop here"})]}):e.cards.map(o=>d.jsx(Dj,{card:o,onDragStart:t,isMoving:s===o.id,columnColor:e.color},o.id))})]})}function Dj({card:e,onDragStart:t,isMoving:n,columnColor:r}){return d.jsx("div",{draggable:!0,onDragStart:()=>t(e),className:`group bg-white rounded-xl p-4 shadow-sm border border-gray-100 cursor-grab active:cursor-grabbing transition-all duration-200 ${n?"opacity-50 scale-95 animate-pulse":"hover:shadow-lg hover:-translate-y-0.5 hover:border-gray-200"}`,style:{borderLeftWidth:"3px",borderLeftColor:r},children:d.jsxs(Yt,{to:`/changes/${e.id}`,className:"block space-y-3",children:[d.jsx("h4",{className:"font-semibold text-gray-900 text-sm leading-snug line-clamp-2 group-hover:text-indigo-600 transition-colors",children:e.name}),e.labels.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.labels.map(i=>d.jsxs("span",{className:`px-2 py-0.5 text-xs font-medium rounded-full ${i==="complete"?"bg-green-100 text-green-700 ring-1 ring-green-200":i==="has-tasks"?"bg-blue-100 text-blue-700 ring-1 ring-blue-200":"bg-gray-100 text-gray-600"}`,children:[i==="complete"&&"✓ ",i==="has-tasks"&&"📋 ",i]},i))}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsxs("div",{className:"flex justify-between text-xs",children:[d.jsx("span",{className:"text-gray-500 font-medium",children:"Progress"}),d.jsxs("span",{className:`font-bold ${e.progress===100?"text-green-600":"text-gray-700"}`,children:[e.progress,"%"]})]}),d.jsx("div",{className:"w-full h-2 bg-gray-100 rounded-full overflow-hidden",children:d.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${e.progress===100?"bg-gradient-to-r from-green-400 to-green-500":e.progress>=50?"bg-gradient-to-r from-blue-400 to-indigo-500":"bg-gradient-to-r from-gray-300 to-gray-400"}`,style:{width:`${e.progress}%`}})})]}),d.jsxs("div",{className:"flex items-center justify-between pt-1",children:[d.jsx("span",{className:"text-xs text-gray-400 font-mono bg-gray-50 px-1.5 py-0.5 rounded truncate max-w-[140px]",children:e.id}),d.jsx(Fj,{className:"w-4 h-4 text-gray-300 group-hover:text-indigo-400 group-hover:translate-x-0.5 transition-all"})]})]})})}function Mj({className:e="w-5 h-5"}){return d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),d.jsx("path",{d:"M21 3v5h-5"}),d.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),d.jsx("path",{d:"M3 21v-5h5"})]})}function sp({className:e="w-5 h-5"}){return d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("circle",{cx:"12",cy:"12",r:"10"}),d.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),d.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}function zj({className:e="w-5 h-5"}){return d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),d.jsx("path",{d:"M9 9l6 6"}),d.jsx("path",{d:"M15 9l-6 6"})]})}function Fj({className:e="w-5 h-5"}){return d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("path",{d:"M5 12h14"}),d.jsx("path",{d:"m12 5 7 7-7 7"})]})}function $j(){const[e,t]=L.useState(null),[n,r]=L.useState(!0),[i,l]=L.useState(null),[s,o]=L.useState(!1),a=L.useCallback(async(u=!1)=>{try{u&&o(!0);const f=await ww.analyze(u);t(f),l(null)}catch(f){l(f instanceof Error?f.message:"Failed to analyze context")}finally{r(!1),o(!1)}},[]);return L.useEffect(()=>{a()},[a]),n?d.jsx("div",{className:"flex justify-center items-center h-96",children:d.jsx("div",{className:"relative",children:d.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-indigo-600"})})}):i&&!e?d.jsxs("div",{className:"text-center py-12",children:[d.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-red-100 mb-4",children:d.jsx(Bj,{className:"w-8 h-8 text-red-600"})}),d.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Failed to analyze project"}),d.jsx("p",{className:"text-gray-500 mb-4",children:i}),d.jsx("button",{onClick:()=>a(),className:"px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700",children:"Retry"})]}):e?d.jsxs("div",{className:"space-y-8 animate-fade-in",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsxs("div",{children:[d.jsxs("h2",{className:"text-3xl font-bold text-gray-900 tracking-tight flex items-center gap-3",children:[d.jsx("span",{className:"text-3xl",children:"🔍"}),"Project Context"]}),d.jsx("p",{className:"mt-1 text-gray-500",children:"AI's understanding of your project structure and tech stack"})]}),d.jsx("button",{onClick:()=>a(!0),disabled:s,className:`px-4 py-2 text-sm font-medium rounded-lg shadow-sm transition-all ${s?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-white text-gray-700 hover:bg-gray-50 border border-gray-200 hover:shadow"}`,children:s?d.jsxs(d.Fragment,{children:[d.jsx(op,{className:"w-4 h-4 inline mr-2 animate-spin"}),"Analyzing..."]}):d.jsxs(d.Fragment,{children:[d.jsx(op,{className:"w-4 h-4 inline mr-2"}),"Re-analyze"]})})]}),d.jsx("div",{className:"bg-gradient-to-r from-indigo-500 to-purple-600 rounded-2xl p-6 text-white shadow-lg",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-2xl font-bold",children:e.projectName}),d.jsx("p",{className:"text-indigo-100 mt-1 text-sm font-mono opacity-80",children:e.projectRoot})]}),d.jsxs("div",{className:"text-right",children:[d.jsx("p",{className:"text-sm text-indigo-100",children:"Analyzed"}),d.jsx("p",{className:"text-lg font-semibold",children:new Date(e.analyzedAt).toLocaleString()})]})]})}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs("div",{className:"bg-white rounded-xl border border-gray-100 shadow-sm p-6",children:[d.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[d.jsx("span",{children:"📊"})," Language Distribution"]}),d.jsx("div",{className:"space-y-3",children:e.stack.languages.slice(0,6).map(u=>d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex justify-between text-sm",children:[d.jsx("span",{className:"font-medium text-gray-700",children:u.name}),d.jsxs("span",{className:"text-gray-500",children:[u.percentage,"% • ",u.fileCount," files"]})]}),d.jsx("div",{className:"w-full h-2 bg-gray-100 rounded-full overflow-hidden",children:d.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-indigo-400 to-purple-500",style:{width:`${u.percentage}%`}})})]},u.name))})]}),d.jsxs("div",{className:"bg-white rounded-xl border border-gray-100 shadow-sm p-6",children:[d.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[d.jsx("span",{children:"🛠️"})," Tech Stack"]}),d.jsxs("div",{className:"space-y-4",children:[d.jsx(zn,{label:"Frameworks",value:e.stack.frameworks.join(", ")||"None detected"}),d.jsx(zn,{label:"Build Tools",value:e.stack.buildTools.join(", ")||"None detected"}),d.jsx(zn,{label:"Package Manager",value:e.stack.packageManager}),d.jsx(zn,{label:"Test Framework",value:e.stack.testFramework||"None detected"})]})]}),d.jsxs("div",{className:"bg-white rounded-xl border border-gray-100 shadow-sm p-6",children:[d.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[d.jsx("span",{children:"📁"})," Directory Structure"]}),d.jsx("div",{className:"space-y-2",children:e.structure.mainDirectories.slice(0,8).map(u=>d.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-gray-50 last:border-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Uj,{className:"w-4 h-4 text-blue-500"}),d.jsxs("span",{className:"font-mono text-sm text-gray-700",children:[u.name,"/"]})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"text-xs text-gray-400",children:u.purpose}),d.jsxs("span",{className:"px-2 py-0.5 text-xs bg-gray-100 text-gray-600 rounded-full",children:[u.fileCount," files"]})]})]},u.path))}),e.structure.entryPoints.length>0&&d.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100",children:d.jsxs("p",{className:"text-sm text-gray-500",children:[d.jsx("strong",{children:"Entry Points:"})," ",e.structure.entryPoints.map(u=>`\`${u}\``).join(", ")]})})]}),d.jsxs("div",{className:"bg-white rounded-xl border border-gray-100 shadow-sm p-6",children:[d.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[d.jsx("span",{children:"🧩"})," Patterns & Stats"]}),d.jsxs("div",{className:"space-y-4",children:[d.jsx(zn,{label:"Architecture",value:e.patterns.architecture}),d.jsx(zn,{label:"Code Style",value:e.patterns.codeStyle.join(", ")||"Not configured"}),d.jsx(zn,{label:"Conventions",value:e.patterns.conventions.join(", ")||"None"}),d.jsxs("div",{className:"pt-4 border-t border-gray-100 grid grid-cols-2 gap-4",children:[d.jsxs("div",{className:"text-center p-3 bg-indigo-50 rounded-lg",children:[d.jsx("p",{className:"text-2xl font-bold text-indigo-600",children:e.stats.totalFiles.toLocaleString()}),d.jsx("p",{className:"text-xs text-indigo-500",children:"Total Files"})]}),d.jsxs("div",{className:"text-center p-3 bg-purple-50 rounded-lg",children:[d.jsx("p",{className:"text-2xl font-bold text-purple-600",children:e.stats.totalLines.toLocaleString()}),d.jsx("p",{className:"text-xs text-purple-500",children:"Est. Lines"})]})]})]})]})]})]}):null}function zn({label:e,value:t}){return d.jsxs("div",{className:"flex justify-between items-start",children:[d.jsx("span",{className:"text-sm text-gray-500",children:e}),d.jsx("span",{className:"text-sm font-medium text-gray-900 text-right max-w-[60%]",children:t})]})}function op({className:e="w-5 h-5"}){return d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),d.jsx("path",{d:"M21 3v5h-5"}),d.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),d.jsx("path",{d:"M3 21v-5h5"})]})}function Bj({className:e="w-5 h-5"}){return d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("circle",{cx:"12",cy:"12",r:"10"}),d.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),d.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}function Uj({className:e="w-5 h-5"}){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:d.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function Vj(){const e=bl(),{connected:t}=An(),[n,r]=L.useState(null);L.useEffect(()=>{let l=!0;return vw.get().then(({project:s})=>{l&&r(s.name)}).catch(()=>{}),()=>{l=!1}},[]);const i=[{path:"/",label:"Dashboard"},{path:"/kanban",label:"Kanban"},{path:"/context",label:"Context"},{path:"/changes",label:"Changes"},{path:"/specs",label:"Specs"},{path:"/approvals",label:"Approvals"}];return d.jsxs("div",{className:"min-h-screen bg-gray-50",children:[d.jsx("header",{className:"bg-white shadow-sm",children:d.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:d.jsxs("div",{className:"flex justify-between items-center py-4",children:[d.jsxs("div",{className:"flex items-center space-x-4",children:[d.jsx("h1",{className:"text-xl font-bold text-gray-900",children:"OpenSpec MCP"}),n?d.jsx("span",{className:"text-sm text-gray-500",title:n,children:n}):null,d.jsx("span",{className:`inline-flex items-center px-2 py-1 rounded text-xs ${t?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:t?"● Connected":"○ Disconnected"})]}),d.jsx("nav",{className:"flex space-x-4",children:i.map(l=>d.jsx(Yt,{to:l.path,className:`px-3 py-2 rounded-md text-sm font-medium ${e.pathname===l.path?"bg-gray-100 text-gray-900":"text-gray-500 hover:text-gray-900 hover:bg-gray-50"}`,children:l.label},l.path))})]})})}),d.jsx("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:d.jsxs(ow,{children:[d.jsx(on,{path:"/",element:d.jsx(kw,{})}),d.jsx(on,{path:"/kanban",element:d.jsx(Oj,{})}),d.jsx(on,{path:"/context",element:d.jsx($j,{})}),d.jsx(on,{path:"/changes",element:d.jsx(jw,{})}),d.jsx(on,{path:"/changes/:id",element:d.jsx(Pj,{})}),d.jsx(on,{path:"/specs",element:d.jsx(_j,{})}),d.jsx(on,{path:"/approvals",element:d.jsx(Aj,{})})]})})]})}Oa.createRoot(document.getElementById("root")).render(d.jsx(xp.StrictMode,{children:d.jsx(pw,{children:d.jsx(Vj,{})})}));
|