openspec-mcp 0.3.1 → 0.3.3

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.
Files changed (103) hide show
  1. package/README.md +22 -6
  2. package/README.zh.md +36 -1
  3. package/dist/api/routes/changes.d.ts.map +1 -1
  4. package/dist/api/routes/changes.js +42 -0
  5. package/dist/api/routes/changes.js.map +1 -1
  6. package/dist/api/routes/context.d.ts +8 -0
  7. package/dist/api/routes/context.d.ts.map +1 -0
  8. package/dist/api/routes/context.js +45 -0
  9. package/dist/api/routes/context.js.map +1 -0
  10. package/dist/api/routes/kanban.d.ts +8 -0
  11. package/dist/api/routes/kanban.d.ts.map +1 -0
  12. package/dist/api/routes/kanban.js +181 -0
  13. package/dist/api/routes/kanban.js.map +1 -0
  14. package/dist/api/routes/qa.d.ts +8 -0
  15. package/dist/api/routes/qa.d.ts.map +1 -0
  16. package/dist/api/routes/qa.js +98 -0
  17. package/dist/api/routes/qa.js.map +1 -0
  18. package/dist/api/server.d.ts +1 -0
  19. package/dist/api/server.d.ts.map +1 -1
  20. package/dist/api/server.js +7 -0
  21. package/dist/api/server.js.map +1 -1
  22. package/dist/core/approval-manager.d.ts.map +1 -1
  23. package/dist/core/approval-manager.js +9 -1
  24. package/dist/core/approval-manager.js.map +1 -1
  25. package/dist/core/approval-manager.test.js +14 -0
  26. package/dist/core/approval-manager.test.js.map +1 -1
  27. package/dist/core/context-analyzer.d.ts +116 -0
  28. package/dist/core/context-analyzer.d.ts.map +1 -0
  29. package/dist/core/context-analyzer.js +495 -0
  30. package/dist/core/context-analyzer.js.map +1 -0
  31. package/dist/core/prompt-manager.d.ts +50 -0
  32. package/dist/core/prompt-manager.d.ts.map +1 -0
  33. package/dist/core/prompt-manager.js +186 -0
  34. package/dist/core/prompt-manager.js.map +1 -0
  35. package/dist/core/qa-runner.d.ts +134 -0
  36. package/dist/core/qa-runner.d.ts.map +1 -0
  37. package/dist/core/qa-runner.js +299 -0
  38. package/dist/core/qa-runner.js.map +1 -0
  39. package/dist/core/spec-critic.d.ts +118 -0
  40. package/dist/core/spec-critic.d.ts.map +1 -0
  41. package/dist/core/spec-critic.js +478 -0
  42. package/dist/core/spec-critic.js.map +1 -0
  43. package/dist/core/spec-critic.test.d.ts +5 -0
  44. package/dist/core/spec-critic.test.d.ts.map +1 -0
  45. package/dist/core/spec-critic.test.js +152 -0
  46. package/dist/core/spec-critic.test.js.map +1 -0
  47. package/dist/index.js +33 -0
  48. package/dist/index.js.map +1 -1
  49. package/dist/server/tools/ai-context.d.ts +13 -0
  50. package/dist/server/tools/ai-context.d.ts.map +1 -0
  51. package/dist/server/tools/ai-context.js +212 -0
  52. package/dist/server/tools/ai-context.js.map +1 -0
  53. package/dist/server/tools/approval.d.ts.map +1 -1
  54. package/dist/server/tools/approval.js +33 -18
  55. package/dist/server/tools/approval.js.map +1 -1
  56. package/dist/server/tools/archive.d.ts.map +1 -1
  57. package/dist/server/tools/archive.js +9 -6
  58. package/dist/server/tools/archive.js.map +1 -1
  59. package/dist/server/tools/context.d.ts +12 -0
  60. package/dist/server/tools/context.d.ts.map +1 -0
  61. package/dist/server/tools/context.js +145 -0
  62. package/dist/server/tools/context.js.map +1 -0
  63. package/dist/server/tools/critique.d.ts +12 -0
  64. package/dist/server/tools/critique.d.ts.map +1 -0
  65. package/dist/server/tools/critique.js +194 -0
  66. package/dist/server/tools/critique.js.map +1 -0
  67. package/dist/server/tools/cross-service.d.ts.map +1 -1
  68. package/dist/server/tools/cross-service.js +11 -5
  69. package/dist/server/tools/cross-service.js.map +1 -1
  70. package/dist/server/tools/generator.d.ts.map +1 -1
  71. package/dist/server/tools/generator.js +27 -18
  72. package/dist/server/tools/generator.js.map +1 -1
  73. package/dist/server/tools/guides.d.ts.map +1 -1
  74. package/dist/server/tools/guides.js +8 -2
  75. package/dist/server/tools/guides.js.map +1 -1
  76. package/dist/server/tools/hooks.d.ts.map +1 -1
  77. package/dist/server/tools/hooks.js +7 -4
  78. package/dist/server/tools/hooks.js.map +1 -1
  79. package/dist/server/tools/management.d.ts.map +1 -1
  80. package/dist/server/tools/management.js +26 -14
  81. package/dist/server/tools/management.js.map +1 -1
  82. package/dist/server/tools/qa.d.ts +12 -0
  83. package/dist/server/tools/qa.d.ts.map +1 -0
  84. package/dist/server/tools/qa.js +248 -0
  85. package/dist/server/tools/qa.js.map +1 -0
  86. package/dist/server/tools/reviews.d.ts.map +1 -1
  87. package/dist/server/tools/reviews.js +55 -37
  88. package/dist/server/tools/reviews.js.map +1 -1
  89. package/dist/server/tools/tasks.d.ts.map +1 -1
  90. package/dist/server/tools/tasks.js +29 -17
  91. package/dist/server/tools/tasks.js.map +1 -1
  92. package/dist/server/tools/templates.d.ts.map +1 -1
  93. package/dist/server/tools/templates.js +26 -17
  94. package/dist/server/tools/templates.js.map +1 -1
  95. package/dist/server/tools/validation.d.ts.map +1 -1
  96. package/dist/server/tools/validation.js +31 -22
  97. package/dist/server/tools/validation.js.map +1 -1
  98. package/package.json +1 -1
  99. package/web/dist/assets/index-Bf5mzJti.css +1 -0
  100. package/web/dist/assets/index-W9UMaaAn.js +244 -0
  101. package/web/dist/index.html +2 -2
  102. package/web/dist/assets/index-CCYunmpc.css +0 -1
  103. package/web/dist/assets/index-wgGN6sVJ.js +0 -244
@@ -0,0 +1,244 @@
1
+ function B0(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 s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{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 s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var bl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var up={exports:{}},no={},cp={exports:{}},Y={};/**
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 gs=Symbol.for("react.element"),U0=Symbol.for("react.portal"),V0=Symbol.for("react.fragment"),H0=Symbol.for("react.strict_mode"),K0=Symbol.for("react.profiler"),W0=Symbol.for("react.provider"),q0=Symbol.for("react.context"),Q0=Symbol.for("react.forward_ref"),Y0=Symbol.for("react.suspense"),J0=Symbol.for("react.memo"),G0=Symbol.for("react.lazy"),Af=Symbol.iterator;function X0(e){return e===null||typeof e!="object"?null:(e=Af&&e[Af]||e["@@iterator"],typeof e=="function"?e:null)}var fp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},dp=Object.assign,hp={};function ti(e,t,n){this.props=e,this.context=t,this.refs=hp,this.updater=n||fp}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 pp(){}pp.prototype=ti.prototype;function Ju(e,t,n){this.props=e,this.context=t,this.refs=hp,this.updater=n||fp}var Gu=Ju.prototype=new pp;Gu.constructor=Ju;dp(Gu,ti.prototype);Gu.isPureReactComponent=!0;var Of=Array.isArray,mp=Object.prototype.hasOwnProperty,Xu={current:null},gp={key:!0,ref:!0,__self:!0,__source:!0};function yp(e,t,n){var r,i={},s=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(s=""+t.key),t)mp.call(t,r)&&!gp.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:gs,type:e,key:s,ref:l,props:i,_owner:Xu.current}}function Z0(e,t){return{$$typeof:gs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Zu(e){return typeof e=="object"&&e!==null&&e.$$typeof===gs}function ex(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Rf=/\/+/g;function $o(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ex(""+e.key):t.toString(36)}function il(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case gs:case U0:l=!0}}if(l)return l=e,i=i(l),e=r===""?"."+$o(l,0):r,Of(i)?(n="",e!=null&&(n=e.replace(Rf,"$&/")+"/"),il(i,t,n,"",function(u){return u})):i!=null&&(Zu(i)&&(i=Z0(i,n+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(Rf,"$&/")+"/")+e)),t.push(i)),1;if(l=0,r=r===""?".":r+":",Of(e))for(var o=0;o<e.length;o++){s=e[o];var a=r+$o(s,o);l+=il(s,t,n,a,i)}else if(a=X0(e),typeof a=="function")for(e=a.call(e),o=0;!(s=e.next()).done;)s=s.value,a=r+$o(s,o++),l+=il(s,t,n,a,i);else if(s==="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 l}function Ls(e,t,n){if(e==null)return e;var r=[],i=0;return il(e,r,"","",function(s){return t.call(n,s,i++)}),r}function tx(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},sl={transition:null},nx={ReactCurrentDispatcher:Ve,ReactCurrentBatchConfig:sl,ReactCurrentOwner:Xu};function xp(){throw Error("act(...) is not supported in production builds of React.")}Y.Children={map:Ls,forEach:function(e,t,n){Ls(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ls(e,function(){t++}),t},toArray:function(e){return Ls(e,function(t){return t})||[]},only:function(e){if(!Zu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Y.Component=ti;Y.Fragment=V0;Y.Profiler=K0;Y.PureComponent=Ju;Y.StrictMode=H0;Y.Suspense=Y0;Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nx;Y.act=xp;Y.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=dp({},e.props),i=e.key,s=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,l=Xu.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(a in t)mp.call(t,a)&&!gp.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:gs,type:e.type,key:i,ref:s,props:r,_owner:l}};Y.createContext=function(e){return e={$$typeof:q0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:W0,_context:e},e.Consumer=e};Y.createElement=yp;Y.createFactory=function(e){var t=yp.bind(null,e);return t.type=e,t};Y.createRef=function(){return{current:null}};Y.forwardRef=function(e){return{$$typeof:Q0,render:e}};Y.isValidElement=Zu;Y.lazy=function(e){return{$$typeof:G0,_payload:{_status:-1,_result:e},_init:tx}};Y.memo=function(e,t){return{$$typeof:J0,type:e,compare:t===void 0?null:t}};Y.startTransition=function(e){var t=sl.transition;sl.transition={};try{e()}finally{sl.transition=t}};Y.unstable_act=xp;Y.useCallback=function(e,t){return Ve.current.useCallback(e,t)};Y.useContext=function(e){return Ve.current.useContext(e)};Y.useDebugValue=function(){};Y.useDeferredValue=function(e){return Ve.current.useDeferredValue(e)};Y.useEffect=function(e,t){return Ve.current.useEffect(e,t)};Y.useId=function(){return Ve.current.useId()};Y.useImperativeHandle=function(e,t,n){return Ve.current.useImperativeHandle(e,t,n)};Y.useInsertionEffect=function(e,t){return Ve.current.useInsertionEffect(e,t)};Y.useLayoutEffect=function(e,t){return Ve.current.useLayoutEffect(e,t)};Y.useMemo=function(e,t){return Ve.current.useMemo(e,t)};Y.useReducer=function(e,t,n){return Ve.current.useReducer(e,t,n)};Y.useRef=function(e){return Ve.current.useRef(e)};Y.useState=function(e){return Ve.current.useState(e)};Y.useSyncExternalStore=function(e,t,n){return Ve.current.useSyncExternalStore(e,t,n)};Y.useTransition=function(){return Ve.current.useTransition()};Y.version="18.3.1";cp.exports=Y;var T=cp.exports;const vp=Yu(T),rx=B0({__proto__:null,default:vp},[T]);/**
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 ix=T,sx=Symbol.for("react.element"),lx=Symbol.for("react.fragment"),ox=Object.prototype.hasOwnProperty,ax=ix.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ux={key:!0,ref:!0,__self:!0,__source:!0};function wp(e,t,n){var r,i={},s=null,l=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)ox.call(t,r)&&!ux.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:sx,type:e,key:s,ref:l,props:i,_owner:ax.current}}no.Fragment=lx;no.jsx=wp;no.jsxs=wp;up.exports=no;var d=up.exports,Ra={},kp={exports:{}},ot={},bp={exports:{}},Sp={};/**
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(F,$){var k=F.length;F.push($);e:for(;0<k;){var J=k-1>>>1,te=F[J];if(0<i(te,$))F[J]=$,F[k]=te,k=J;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var $=F[0],k=F.pop();if(k!==$){F[0]=k;e:for(var J=0,te=F.length,N=te>>>1;J<N;){var Ne=2*(J+1)-1,xt=F[Ne],oe=Ne+1,Lt=F[oe];if(0>i(xt,k))oe<te&&0>i(Lt,xt)?(F[J]=Lt,F[oe]=k,J=oe):(F[J]=xt,F[Ne]=k,J=Ne);else if(oe<te&&0>i(Lt,k))F[J]=Lt,F[oe]=k,J=oe;else break e}}return $}function i(F,$){var k=F.sortIndex-$.sortIndex;return k!==0?k:F.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var a=[],u=[],f=1,c=null,p=3,h=!1,x=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=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(F){for(var $=n(u);$!==null;){if($.callback===null)r(u);else if($.startTime<=F)r(u),$.sortIndex=$.expirationTime,t(a,$);else break;$=n(u)}}function C(F){if(y=!1,v(F),!x)if(n(a)!==null)x=!0,xe(j);else{var $=n(u);$!==null&&de(C,$.startTime-F)}}function j(F,$){x=!1,y&&(y=!1,m(P),P=-1),h=!0;var k=p;try{for(v($),c=n(a);c!==null&&(!(c.expirationTime>$)||F&&!E());){var J=c.callback;if(typeof J=="function"){c.callback=null,p=c.priorityLevel;var te=J(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,I=null,P=-1,L=5,S=-1;function E(){return!(e.unstable_now()-S<L)}function A(){if(I!==null){var F=e.unstable_now();S=F;var $=!0;try{$=I(!0,F)}finally{$?D():(b=!1,I=null)}}else b=!1}var D;if(typeof g=="function")D=function(){g(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(F){I=F,b||(b=!0,D())}function de(F,$){P=w(function(){F(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(F){F.callback=null},e.unstable_continueExecution=function(){x||h||(x=!0,xe(j))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(F){switch(p){case 1:case 2:case 3:var $=3;break;default:$=p}var k=p;p=$;try{return F()}finally{p=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,$){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var k=p;p=F;try{return $()}finally{p=k}},e.unstable_scheduleCallback=function(F,$,k){var J=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?J+k:J):k=J,F){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,F={id:f++,callback:$,priorityLevel:F,startTime:k,expirationTime:te,sortIndex:-1},k>J?(F.sortIndex=k,t(u,F),n(a)===null&&F===n(u)&&(y?(m(P),P=-1):y=!0,de(C,k-J))):(F.sortIndex=te,t(a,F),x||h||(x=!0,xe(j))),F},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(F){var $=p;return function(){var k=p;p=$;try{return F.apply(this,arguments)}finally{p=k}}}})(Sp);bp.exports=Sp;var cx=bp.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 fx=T,lt=cx;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 Np=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++)Np.add(t[e])}var Xt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Da=Object.prototype.hasOwnProperty,dx=/^[: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]*$/,Df={},Mf={};function hx(e){return Da.call(Mf,e)?!0:Da.call(Df,e)?!1:dx.test(e)?Mf[e]=!0:(Df[e]=!0,!1)}function px(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 mx(e,t,n,r){if(t===null||typeof t>"u"||px(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,s,l){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=s,this.removeEmptyString=l}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 ec=/[\-:]([a-z])/g;function tc(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(ec,tc);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(ec,tc);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(ec,tc);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 nc(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")&&(mx(t,n,i,r)&&(n=null),r||i===null?hx(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 nn=fx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ps=Symbol.for("react.element"),xr=Symbol.for("react.portal"),vr=Symbol.for("react.fragment"),rc=Symbol.for("react.strict_mode"),Ma=Symbol.for("react.profiler"),Cp=Symbol.for("react.provider"),jp=Symbol.for("react.context"),ic=Symbol.for("react.forward_ref"),Fa=Symbol.for("react.suspense"),za=Symbol.for("react.suspense_list"),sc=Symbol.for("react.memo"),un=Symbol.for("react.lazy"),Ep=Symbol.for("react.offscreen"),Ff=Symbol.iterator;function mi(e){return e===null||typeof e!="object"?null:(e=Ff&&e[Ff]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Object.assign,Bo;function ji(e){if(Bo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Bo=t&&t[1]||""}return`
34
+ `+Bo+e}var Uo=!1;function Vo(e,t){if(!e||Uo)return"";Uo=!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
+ `),s=r.stack.split(`
36
+ `),l=i.length-1,o=s.length-1;1<=l&&0<=o&&i[l]!==s[o];)o--;for(;1<=l&&0<=o;l--,o--)if(i[l]!==s[o]){if(l!==1||o!==1)do if(l--,o--,0>o||i[l]!==s[o]){var a=`
37
+ `+i[l].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=l&&0<=o);break}}}finally{Uo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ji(e):""}function gx(e){switch(e.tag){case 5:return ji(e.type);case 16:return ji("Lazy");case 13:return ji("Suspense");case 19:return ji("SuspenseList");case 0:case 2:case 15:return e=Vo(e.type,!1),e;case 11:return e=Vo(e.type.render,!1),e;case 1:return e=Vo(e.type,!0),e;default:return""}}function $a(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 Ma:return"Profiler";case rc:return"StrictMode";case Fa:return"Suspense";case za:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case jp:return(e.displayName||"Context")+".Consumer";case Cp:return(e._context.displayName||"Context")+".Provider";case ic:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case sc:return t=e.displayName||null,t!==null?t:$a(e.type)||"Memo";case un:t=e._payload,e=e._init;try{return $a(e(t))}catch{}}return null}function yx(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 $a(t);case 8:return t===rc?"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 Tp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xx(e){var t=Tp(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,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,s.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _s(e){e._valueTracker||(e._valueTracker=xx(e))}function Ip(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Tp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Sl(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 Ba(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 Lp(e,t){t=t.checked,t!=null&&nc(e,"checked",t,!1)}function Ua(e,t){Lp(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")?Va(e,t.type,n):t.hasOwnProperty("defaultValue")&&Va(e,t.type,En(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $f(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 Va(e,t,n){(t!=="number"||Sl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ei=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 Ha(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return ye({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Bf(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(Ei(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 Pp(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 Uf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function _p(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 Ka(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?_p(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var As,Ap=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(As=As||document.createElement("div"),As.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=As.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},vx=["Webkit","ms","Moz","O"];Object.keys(Ai).forEach(function(e){vx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ai[t]=Ai[e]})});function Op(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 Rp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Op(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var wx=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 Wa(e,t){if(t){if(wx[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 qa(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 Ya=null,Mr=null,Fr=null;function Vf(e){if(e=vs(e)){if(typeof Ya!="function")throw Error(O(280));var t=e.stateNode;t&&(t=oo(t),Ya(e.stateNode,e.type,t))}}function Dp(e){Mr?Fr?Fr.push(e):Fr=[e]:Mr=e}function Mp(){if(Mr){var e=Mr,t=Fr;if(Fr=Mr=null,Vf(e),t)for(e=0;e<t.length;e++)Vf(t[e])}}function Fp(e,t){return e(t)}function zp(){}var Ho=!1;function $p(e,t,n){if(Ho)return e(t,n);Ho=!0;try{return Fp(e,t,n)}finally{Ho=!1,(Mr!==null||Fr!==null)&&(zp(),Mp())}}function Qi(e,t){var n=e.stateNode;if(n===null)return null;var r=oo(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 Ja=!1;if(Xt)try{var gi={};Object.defineProperty(gi,"passive",{get:function(){Ja=!0}}),window.addEventListener("test",gi,gi),window.removeEventListener("test",gi,gi)}catch{Ja=!1}function kx(e,t,n,r,i,s,l,o,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var Oi=!1,Nl=null,Cl=!1,Ga=null,bx={onError:function(e){Oi=!0,Nl=e}};function Sx(e,t,n,r,i,s,l,o,a){Oi=!1,Nl=null,kx.apply(bx,arguments)}function Nx(e,t,n,r,i,s,l,o,a){if(Sx.apply(this,arguments),Oi){if(Oi){var u=Nl;Oi=!1,Nl=null}else throw Error(O(198));Cl||(Cl=!0,Ga=u)}}function sr(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 Bp(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 Hf(e){if(sr(e)!==e)throw Error(O(188))}function Cx(e){var t=e.alternate;if(!t){if(t=sr(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 s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Hf(i),e;if(s===r)return Hf(i),t;s=s.sibling}throw Error(O(188))}if(n.return!==r.return)n=i,r=s;else{for(var l=!1,o=i.child;o;){if(o===n){l=!0,n=i,r=s;break}if(o===r){l=!0,r=i,n=s;break}o=o.sibling}if(!l){for(o=s.child;o;){if(o===n){l=!0,n=s,r=i;break}if(o===r){l=!0,r=s,n=i;break}o=o.sibling}if(!l)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 Up(e){return e=Cx(e),e!==null?Vp(e):null}function Vp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Vp(e);if(t!==null)return t;e=e.sibling}return null}var Hp=lt.unstable_scheduleCallback,Kf=lt.unstable_cancelCallback,jx=lt.unstable_shouldYield,Ex=lt.unstable_requestPaint,we=lt.unstable_now,Tx=lt.unstable_getCurrentPriorityLevel,oc=lt.unstable_ImmediatePriority,Kp=lt.unstable_UserBlockingPriority,jl=lt.unstable_NormalPriority,Ix=lt.unstable_LowPriority,Wp=lt.unstable_IdlePriority,ro=null,Rt=null;function Lx(e){if(Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(ro,e,void 0,(e.current.flags&128)===128)}catch{}}var Ct=Math.clz32?Math.clz32:Ax,Px=Math.log,_x=Math.LN2;function Ax(e){return e>>>=0,e===0?32:31-(Px(e)/_x|0)|0}var Os=64,Rs=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 El(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,l=n&268435455;if(l!==0){var o=l&~i;o!==0?r=Ti(o):(s&=l,s!==0&&(r=Ti(s)))}else l=n&~i,l!==0?r=Ti(l):s!==0&&(r=Ti(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&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 Ox(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 Rx(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-Ct(s),o=1<<l,a=i[l];a===-1?(!(o&n)||o&r)&&(i[l]=Ox(o,t)):a<=t&&(e.expiredLanes|=o),s&=~o}}function Xa(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function qp(){var e=Os;return Os<<=1,!(Os&4194240)&&(Os=64),e}function Ko(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ys(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 Dx(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),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function ac(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 Yp,uc,Jp,Gp,Xp,Za=!1,Ds=[],yn=null,xn=null,vn=null,Yi=new Map,Ji=new Map,dn=[],Mx="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 Wf(e,t){switch(e){case"focusin":case"focusout":yn=null;break;case"dragenter":case"dragleave":xn=null;break;case"mouseover":case"mouseout":vn=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,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=vs(t),t!==null&&uc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Fx(e,t,n,r,i){switch(t){case"focusin":return yn=yi(yn,e,t,n,r,i),!0;case"dragenter":return xn=yi(xn,e,t,n,r,i),!0;case"mouseover":return vn=yi(vn,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Yi.set(s,yi(Yi.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Ji.set(s,yi(Ji.get(s)||null,e,t,n,r,i)),!0}return!1}function Zp(e){var t=Vn(e.target);if(t!==null){var n=sr(t);if(n!==null){if(t=n.tag,t===13){if(t=Bp(n),t!==null){e.blockedOn=t,Xp(e.priority,function(){Jp(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 ll(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=eu(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=vs(n),t!==null&&uc(t),e.blockedOn=n,!1;t.shift()}return!0}function qf(e,t,n){ll(e)&&n.delete(t)}function zx(){Za=!1,yn!==null&&ll(yn)&&(yn=null),xn!==null&&ll(xn)&&(xn=null),vn!==null&&ll(vn)&&(vn=null),Yi.forEach(qf),Ji.forEach(qf)}function xi(e,t){e.blockedOn===t&&(e.blockedOn=null,Za||(Za=!0,lt.unstable_scheduleCallback(lt.unstable_NormalPriority,zx)))}function Gi(e){function t(i){return xi(i,e)}if(0<Ds.length){xi(Ds[0],e);for(var n=1;n<Ds.length;n++){var r=Ds[n];r.blockedOn===e&&(r.blockedOn=null)}}for(yn!==null&&xi(yn,e),xn!==null&&xi(xn,e),vn!==null&&xi(vn,e),Yi.forEach(t),Ji.forEach(t),n=0;n<dn.length;n++)r=dn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<dn.length&&(n=dn[0],n.blockedOn===null);)Zp(n),n.blockedOn===null&&dn.shift()}var zr=nn.ReactCurrentBatchConfig,Tl=!0;function $x(e,t,n,r){var i=ee,s=zr.transition;zr.transition=null;try{ee=1,cc(e,t,n,r)}finally{ee=i,zr.transition=s}}function Bx(e,t,n,r){var i=ee,s=zr.transition;zr.transition=null;try{ee=4,cc(e,t,n,r)}finally{ee=i,zr.transition=s}}function cc(e,t,n,r){if(Tl){var i=eu(e,t,n,r);if(i===null)ta(e,t,r,Il,n),Wf(e,r);else if(Fx(i,e,t,n,r))r.stopPropagation();else if(Wf(e,r),t&4&&-1<Mx.indexOf(e)){for(;i!==null;){var s=vs(i);if(s!==null&&Yp(s),s=eu(e,t,n,r),s===null&&ta(e,t,r,Il,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else ta(e,t,r,null,n)}}var Il=null;function eu(e,t,n,r){if(Il=null,e=lc(r),e=Vn(e),e!==null)if(t=sr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Bp(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 Il=e,null}function em(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(Tx()){case oc:return 1;case Kp:return 4;case jl:case Ix:return 16;case Wp:return 536870912;default:return 16}default:return 16}}var pn=null,fc=null,ol=null;function tm(){if(ol)return ol;var e,t=fc,n=t.length,r,i="value"in pn?pn.value:pn.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===i[s-r];r++);return ol=i.slice(e,1<r?1-r:void 0)}function al(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 Ms(){return!0}function Qf(){return!1}function at(e){function t(n,r,i,s,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=l,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ms: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=Ms)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ms)},persist:function(){},isPersistent:Ms}),t}var ni={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dc=at(ni),xs=ye({},ni,{view:0,detail:0}),Ux=at(xs),Wo,qo,vi,io=ye({},xs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hc,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"?(Wo=e.screenX-vi.screenX,qo=e.screenY-vi.screenY):qo=Wo=0,vi=e),Wo)},movementY:function(e){return"movementY"in e?e.movementY:qo}}),Yf=at(io),Vx=ye({},io,{dataTransfer:0}),Hx=at(Vx),Kx=ye({},xs,{relatedTarget:0}),Qo=at(Kx),Wx=ye({},ni,{animationName:0,elapsedTime:0,pseudoElement:0}),qx=at(Wx),Qx=ye({},ni,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Yx=at(Qx),Jx=ye({},ni,{data:0}),Jf=at(Jx),Gx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xx={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"},Zx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ev(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zx[e])?!!t[e]:!1}function hc(){return ev}var tv=ye({},xs,{key:function(e){if(e.key){var t=Gx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=al(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Xx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hc,charCode:function(e){return e.type==="keypress"?al(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?al(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nv=at(tv),rv=ye({},io,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gf=at(rv),iv=ye({},xs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hc}),sv=at(iv),lv=ye({},ni,{propertyName:0,elapsedTime:0,pseudoElement:0}),ov=at(lv),av=ye({},io,{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}),uv=at(av),cv=[9,13,27,32],pc=Xt&&"CompositionEvent"in window,Ri=null;Xt&&"documentMode"in document&&(Ri=document.documentMode);var fv=Xt&&"TextEvent"in window&&!Ri,nm=Xt&&(!pc||Ri&&8<Ri&&11>=Ri),Xf=" ",Zf=!1;function rm(e,t){switch(e){case"keyup":return cv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function im(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wr=!1;function dv(e,t){switch(e){case"compositionend":return im(t);case"keypress":return t.which!==32?null:(Zf=!0,Xf);case"textInput":return e=t.data,e===Xf&&Zf?null:e;default:return null}}function hv(e,t){if(wr)return e==="compositionend"||!pc&&rm(e,t)?(e=tm(),ol=fc=pn=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 nm&&t.locale!=="ko"?null:t.data;default:return null}}var pv={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 ed(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!pv[e.type]:t==="textarea"}function sm(e,t,n,r){Dp(r),t=Ll(t,"onChange"),0<t.length&&(n=new dc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Di=null,Xi=null;function mv(e){gm(e,0)}function so(e){var t=Sr(e);if(Ip(t))return e}function gv(e,t){if(e==="change")return t}var lm=!1;if(Xt){var Yo;if(Xt){var Jo="oninput"in document;if(!Jo){var td=document.createElement("div");td.setAttribute("oninput","return;"),Jo=typeof td.oninput=="function"}Yo=Jo}else Yo=!1;lm=Yo&&(!document.documentMode||9<document.documentMode)}function nd(){Di&&(Di.detachEvent("onpropertychange",om),Xi=Di=null)}function om(e){if(e.propertyName==="value"&&so(Xi)){var t=[];sm(t,Xi,e,lc(e)),$p(mv,t)}}function yv(e,t,n){e==="focusin"?(nd(),Di=t,Xi=n,Di.attachEvent("onpropertychange",om)):e==="focusout"&&nd()}function xv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return so(Xi)}function vv(e,t){if(e==="click")return so(t)}function wv(e,t){if(e==="input"||e==="change")return so(t)}function kv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tt=typeof Object.is=="function"?Object.is:kv;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(!Da.call(t,i)||!Tt(e[i],t[i]))return!1}return!0}function rd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function id(e,t){var n=rd(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=rd(n)}}function am(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?am(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function um(){for(var e=window,t=Sl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Sl(e.document)}return t}function mc(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 bv(e){var t=um(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&am(n.ownerDocument.documentElement,n)){if(r!==null&&mc(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,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=id(n,s);var l=id(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.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 Sv=Xt&&"documentMode"in document&&11>=document.documentMode,kr=null,tu=null,Mi=null,nu=!1;function sd(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;nu||kr==null||kr!==Sl(r)||(r=kr,"selectionStart"in r&&mc(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=Ll(tu,"onSelect"),0<r.length&&(t=new dc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=kr)))}function Fs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var br={animationend:Fs("Animation","AnimationEnd"),animationiteration:Fs("Animation","AnimationIteration"),animationstart:Fs("Animation","AnimationStart"),transitionend:Fs("Transition","TransitionEnd")},Go={},cm={};Xt&&(cm=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(Go[e])return Go[e];if(!br[e])return e;var t=br[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in cm)return Go[e]=t[n];return e}var fm=lo("animationend"),dm=lo("animationiteration"),hm=lo("animationstart"),pm=lo("transitionend"),mm=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 Ln(e,t){mm.set(e,t),ir(t,[e])}for(var Xo=0;Xo<ld.length;Xo++){var Zo=ld[Xo],Nv=Zo.toLowerCase(),Cv=Zo[0].toUpperCase()+Zo.slice(1);Ln(Nv,"on"+Cv)}Ln(fm,"onAnimationEnd");Ln(dm,"onAnimationIteration");Ln(hm,"onAnimationStart");Ln("dblclick","onDoubleClick");Ln("focusin","onFocus");Ln("focusout","onBlur");Ln(pm,"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(" "),jv=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ii));function od(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Nx(r,t,void 0,e),e.currentTarget=null}function gm(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 s=void 0;if(t)for(var l=r.length-1;0<=l;l--){var o=r[l],a=o.instance,u=o.currentTarget;if(o=o.listener,a!==s&&i.isPropagationStopped())break e;od(i,o,u),s=a}else for(l=0;l<r.length;l++){if(o=r[l],a=o.instance,u=o.currentTarget,o=o.listener,a!==s&&i.isPropagationStopped())break e;od(i,o,u),s=a}}}if(Cl)throw e=Ga,Cl=!1,Ga=null,e}function ae(e,t){var n=t[ou];n===void 0&&(n=t[ou]=new Set);var r=e+"__bubble";n.has(r)||(ym(t,e,2,!1),n.add(r))}function ea(e,t,n){var r=0;t&&(r|=4),ym(n,e,r,t)}var zs="_reactListening"+Math.random().toString(36).slice(2);function es(e){if(!e[zs]){e[zs]=!0,Np.forEach(function(n){n!=="selectionchange"&&(jv.has(n)||ea(n,!1,e),ea(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[zs]||(t[zs]=!0,ea("selectionchange",!1,t))}}function ym(e,t,n,r){switch(em(t)){case 1:var i=$x;break;case 4:i=Bx;break;default:i=cc}n=i.bind(null,t,n,e),i=void 0,!Ja||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 ta(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var o=r.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var a=l.tag;if((a===3||a===4)&&(a=l.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;l=l.return}for(;o!==null;){if(l=Vn(o),l===null)return;if(a=l.tag,a===5||a===6){r=s=l;continue e}o=o.parentNode}}r=r.return}$p(function(){var u=s,f=lc(n),c=[];e:{var p=mm.get(e);if(p!==void 0){var h=dc,x=e;switch(e){case"keypress":if(al(n)===0)break e;case"keydown":case"keyup":h=nv;break;case"focusin":x="focus",h=Qo;break;case"focusout":x="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=Yf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Hx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=sv;break;case fm:case dm:case hm:h=qx;break;case pm:h=ov;break;case"scroll":h=Ux;break;case"wheel":h=uv;break;case"copy":case"cut":case"paste":h=Yx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Gf}var y=(t&4)!==0,w=!y&&e==="scroll",m=y?p!==null?p+"Capture":null:p;y=[];for(var g=u,v;g!==null;){v=g;var C=v.stateNode;if(v.tag===5&&C!==null&&(v=C,m!==null&&(C=Qi(g,m),C!=null&&y.push(ts(g,C,v)))),w)break;g=g.return}0<y.length&&(p=new h(p,x,null,n,f),c.push({event:p,listeners:y}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==Qa&&(x=n.relatedTarget||n.fromElement)&&(Vn(x)||x[Zt]))break e;if((h||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,h?(x=n.relatedTarget||n.toElement,h=u,x=x?Vn(x):null,x!==null&&(w=sr(x),x!==w||x.tag!==5&&x.tag!==6)&&(x=null)):(h=null,x=u),h!==x)){if(y=Yf,C="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=Gf,C="onPointerLeave",m="onPointerEnter",g="pointer"),w=h==null?p:Sr(h),v=x==null?p:Sr(x),p=new y(C,g+"leave",h,n,f),p.target=w,p.relatedTarget=v,C=null,Vn(f)===u&&(y=new y(m,g+"enter",x,n,f),y.target=v,y.relatedTarget=w,C=y),w=C,h&&x)t:{for(y=h,m=x,g=0,v=y;v;v=hr(v))g++;for(v=0,C=m;C;C=hr(C))v++;for(;0<g-v;)y=hr(y),g--;for(;0<v-g;)m=hr(m),v--;for(;g--;){if(y===m||m!==null&&y===m.alternate)break t;y=hr(y),m=hr(m)}y=null}else y=null;h!==null&&ad(c,p,h,y,!1),x!==null&&w!==null&&ad(c,w,x,y,!0)}}e:{if(p=u?Sr(u):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var j=gv;else if(ed(p))if(lm)j=wv;else{j=xv;var b=yv}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(j=vv);if(j&&(j=j(e,u))){sm(c,j,n,f);break e}b&&b(e,p,u),e==="focusout"&&(b=p._wrapperState)&&b.controlled&&p.type==="number"&&Va(p,"number",p.value)}switch(b=u?Sr(u):window,e){case"focusin":(ed(b)||b.contentEditable==="true")&&(kr=b,tu=u,Mi=null);break;case"focusout":Mi=tu=kr=null;break;case"mousedown":nu=!0;break;case"contextmenu":case"mouseup":case"dragend":nu=!1,sd(c,n,f);break;case"selectionchange":if(Sv)break;case"keydown":case"keyup":sd(c,n,f)}var I;if(pc)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?rm(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(nm&&n.locale!=="ko"&&(wr||P!=="onCompositionStart"?P==="onCompositionEnd"&&wr&&(I=tm()):(pn=f,fc="value"in pn?pn.value:pn.textContent,wr=!0)),b=Ll(u,P),0<b.length&&(P=new Jf(P,e,null,n,f),c.push({event:P,listeners:b}),I?P.data=I:(I=im(n),I!==null&&(P.data=I)))),(I=fv?dv(e,n):hv(e,n))&&(u=Ll(u,"onBeforeInput"),0<u.length&&(f=new Jf("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=I))}gm(c,t)})}function ts(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ll(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Qi(e,n),s!=null&&r.unshift(ts(e,s,i)),s=Qi(e,t),s!=null&&r.push(ts(e,s,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 ad(e,t,n,r,i){for(var s=t._reactName,l=[];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,s),a!=null&&l.unshift(ts(n,a,o))):i||(a=Qi(n,s),a!=null&&l.push(ts(n,a,o)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var Ev=/\r\n?/g,Tv=/\u0000|\uFFFD/g;function ud(e){return(typeof e=="string"?e:""+e).replace(Ev,`
38
+ `).replace(Tv,"")}function $s(e,t,n){if(t=ud(t),ud(e)!==t&&n)throw Error(O(425))}function Pl(){}var ru=null,iu=null;function su(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,Iv=typeof clearTimeout=="function"?clearTimeout:void 0,cd=typeof Promise=="function"?Promise:void 0,Lv=typeof queueMicrotask=="function"?queueMicrotask:typeof cd<"u"?function(e){return cd.resolve(null).then(e).catch(Pv)}:lu;function Pv(e){setTimeout(function(){throw e})}function na(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 wn(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 fd(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,ns="__reactProps$"+ri,Zt="__reactContainer$"+ri,ou="__reactEvents$"+ri,_v="__reactListeners$"+ri,Av="__reactHandles$"+ri;function Vn(e){var t=e[Ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zt]||n[Ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fd(e);e!==null;){if(n=e[Ot])return n;e=fd(e)}return t}e=n,n=e.parentNode}return null}function vs(e){return e=e[Ot]||e[Zt],!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 oo(e){return e[ns]||null}var au=[],Nr=-1;function Pn(e){return{current:e}}function ue(e){0>Nr||(e.current=au[Nr],au[Nr]=null,Nr--)}function le(e,t){Nr++,au[Nr]=e.current,e.current=t}var Tn={},Me=Pn(Tn),Ye=Pn(!1),Gn=Tn;function Wr(e,t){var n=e.type.contextTypes;if(!n)return Tn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Je(e){return e=e.childContextTypes,e!=null}function _l(){ue(Ye),ue(Me)}function dd(e,t,n){if(Me.current!==Tn)throw Error(O(168));le(Me,t),le(Ye,n)}function xm(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,yx(e)||"Unknown",i));return ye({},n,r)}function Al(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Tn,Gn=Me.current,le(Me,e),le(Ye,Ye.current),!0}function hd(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=xm(e,t,Gn),r.__reactInternalMemoizedMergedChildContext=e,ue(Ye),ue(Me),le(Me,e)):ue(Ye),le(Ye,n)}var Ht=null,ao=!1,ra=!1;function vm(e){Ht===null?Ht=[e]:Ht.push(e)}function Ov(e){ao=!0,vm(e)}function _n(){if(!ra&&Ht!==null){ra=!0;var e=0,t=ee;try{var n=Ht;for(ee=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ht=null,ao=!1}catch(i){throw Ht!==null&&(Ht=Ht.slice(e+1)),Hp(oc,_n),i}finally{ee=t,ra=!1}}return null}var Cr=[],jr=0,Ol=null,Rl=0,ut=[],ct=0,Xn=null,Wt=1,qt="";function zn(e,t){Cr[jr++]=Rl,Cr[jr++]=Ol,Ol=e,Rl=t}function wm(e,t,n){ut[ct++]=Wt,ut[ct++]=qt,ut[ct++]=Xn,Xn=e;var r=Wt;e=qt;var i=32-Ct(r)-1;r&=~(1<<i),n+=1;var s=32-Ct(t)+i;if(30<s){var l=i-i%5;s=(r&(1<<l)-1).toString(32),r>>=l,i-=l,Wt=1<<32-Ct(t)+i|n<<i|r,qt=s+e}else Wt=1<<s|n<<i|r,qt=e}function gc(e){e.return!==null&&(zn(e,1),wm(e,1,0))}function yc(e){for(;e===Ol;)Ol=Cr[--jr],Cr[jr]=null,Rl=Cr[--jr],Cr[jr]=null;for(;e===Xn;)Xn=ut[--ct],ut[ct]=null,qt=ut[--ct],ut[ct]=null,Wt=ut[--ct],ut[ct]=null}var it=null,rt=null,ce=!1,Nt=null;function km(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 pd(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=wn(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:Wt,overflow:qt}: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 uu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function cu(e){if(ce){var t=rt;if(t){var n=t;if(!pd(e,t)){if(uu(e))throw Error(O(418));t=wn(n.nextSibling);var r=it;t&&pd(e,t)?km(r,n):(e.flags=e.flags&-4097|2,ce=!1,it=e)}}else{if(uu(e))throw Error(O(418));e.flags=e.flags&-4097|2,ce=!1,it=e}}}function md(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;it=e}function Bs(e){if(e!==it)return!1;if(!ce)return md(e),ce=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!su(e.type,e.memoizedProps)),t&&(t=rt)){if(uu(e))throw bm(),Error(O(418));for(;t;)km(e,t),t=wn(t.nextSibling)}if(md(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=wn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}rt=null}}else rt=it?wn(e.stateNode.nextSibling):null;return!0}function bm(){for(var e=rt;e;)e=wn(e.nextSibling)}function qr(){rt=it=null,ce=!1}function xc(e){Nt===null?Nt=[e]:Nt.push(e)}var Rv=nn.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,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(l){var o=i.refs;l===null?delete o[s]:o[s]=l},t._stringRef=s,t)}if(typeof e!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,e))}return e}function Us(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function gd(e){var t=e._init;return t(e._payload)}function Sm(e){function t(m,g){if(e){var v=m.deletions;v===null?(m.deletions=[g],m.flags|=16):v.push(g)}}function n(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function r(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function i(m,g){return m=Nn(m,g),m.index=0,m.sibling=null,m}function s(m,g,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<g?(m.flags|=2,g):v):(m.flags|=2,g)):(m.flags|=1048576,g)}function l(m){return e&&m.alternate===null&&(m.flags|=2),m}function o(m,g,v,C){return g===null||g.tag!==6?(g=ca(v,m.mode,C),g.return=m,g):(g=i(g,v),g.return=m,g)}function a(m,g,v,C){var j=v.type;return j===vr?f(m,g,v.props.children,C,v.key):g!==null&&(g.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===un&&gd(j)===g.type)?(C=i(g,v.props),C.ref=wi(m,g,v),C.return=m,C):(C=ml(v.type,v.key,v.props,null,m.mode,C),C.ref=wi(m,g,v),C.return=m,C)}function u(m,g,v,C){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=fa(v,m.mode,C),g.return=m,g):(g=i(g,v.children||[]),g.return=m,g)}function f(m,g,v,C,j){return g===null||g.tag!==7?(g=Jn(v,m.mode,C,j),g.return=m,g):(g=i(g,v),g.return=m,g)}function c(m,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=ca(""+g,m.mode,v),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ps:return v=ml(g.type,g.key,g.props,null,m.mode,v),v.ref=wi(m,null,g),v.return=m,v;case xr:return g=fa(g,m.mode,v),g.return=m,g;case un:var C=g._init;return c(m,C(g._payload),v)}if(Ei(g)||mi(g))return g=Jn(g,m.mode,v,null),g.return=m,g;Us(m,g)}return null}function p(m,g,v,C){var j=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return j!==null?null:o(m,g,""+v,C);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ps:return v.key===j?a(m,g,v,C):null;case xr:return v.key===j?u(m,g,v,C):null;case un:return j=v._init,p(m,g,j(v._payload),C)}if(Ei(v)||mi(v))return j!==null?null:f(m,g,v,C,null);Us(m,v)}return null}function h(m,g,v,C,j){if(typeof C=="string"&&C!==""||typeof C=="number")return m=m.get(v)||null,o(g,m,""+C,j);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Ps:return m=m.get(C.key===null?v:C.key)||null,a(g,m,C,j);case xr:return m=m.get(C.key===null?v:C.key)||null,u(g,m,C,j);case un:var b=C._init;return h(m,g,v,b(C._payload),j)}if(Ei(C)||mi(C))return m=m.get(v)||null,f(g,m,C,j,null);Us(g,C)}return null}function x(m,g,v,C){for(var j=null,b=null,I=g,P=g=0,L=null;I!==null&&P<v.length;P++){I.index>P?(L=I,I=null):L=I.sibling;var S=p(m,I,v[P],C);if(S===null){I===null&&(I=L);break}e&&I&&S.alternate===null&&t(m,I),g=s(S,g,P),b===null?j=S:b.sibling=S,b=S,I=L}if(P===v.length)return n(m,I),ce&&zn(m,P),j;if(I===null){for(;P<v.length;P++)I=c(m,v[P],C),I!==null&&(g=s(I,g,P),b===null?j=I:b.sibling=I,b=I);return ce&&zn(m,P),j}for(I=r(m,I);P<v.length;P++)L=h(I,m,P,v[P],C),L!==null&&(e&&L.alternate!==null&&I.delete(L.key===null?P:L.key),g=s(L,g,P),b===null?j=L:b.sibling=L,b=L);return e&&I.forEach(function(E){return t(m,E)}),ce&&zn(m,P),j}function y(m,g,v,C){var j=mi(v);if(typeof j!="function")throw Error(O(150));if(v=j.call(v),v==null)throw Error(O(151));for(var b=j=null,I=g,P=g=0,L=null,S=v.next();I!==null&&!S.done;P++,S=v.next()){I.index>P?(L=I,I=null):L=I.sibling;var E=p(m,I,S.value,C);if(E===null){I===null&&(I=L);break}e&&I&&E.alternate===null&&t(m,I),g=s(E,g,P),b===null?j=E:b.sibling=E,b=E,I=L}if(S.done)return n(m,I),ce&&zn(m,P),j;if(I===null){for(;!S.done;P++,S=v.next())S=c(m,S.value,C),S!==null&&(g=s(S,g,P),b===null?j=S:b.sibling=S,b=S);return ce&&zn(m,P),j}for(I=r(m,I);!S.done;P++,S=v.next())S=h(I,m,P,S.value,C),S!==null&&(e&&S.alternate!==null&&I.delete(S.key===null?P:S.key),g=s(S,g,P),b===null?j=S:b.sibling=S,b=S);return e&&I.forEach(function(A){return t(m,A)}),ce&&zn(m,P),j}function w(m,g,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 Ps:e:{for(var j=v.key,b=g;b!==null;){if(b.key===j){if(j=v.type,j===vr){if(b.tag===7){n(m,b.sibling),g=i(b,v.props.children),g.return=m,m=g;break e}}else if(b.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===un&&gd(j)===b.type){n(m,b.sibling),g=i(b,v.props),g.ref=wi(m,b,v),g.return=m,m=g;break e}n(m,b);break}else t(m,b);b=b.sibling}v.type===vr?(g=Jn(v.props.children,m.mode,C,v.key),g.return=m,m=g):(C=ml(v.type,v.key,v.props,null,m.mode,C),C.ref=wi(m,g,v),C.return=m,m=C)}return l(m);case xr:e:{for(b=v.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(m,g.sibling),g=i(g,v.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=fa(v,m.mode,C),g.return=m,m=g}return l(m);case un:return b=v._init,w(m,g,b(v._payload),C)}if(Ei(v))return x(m,g,v,C);if(mi(v))return y(m,g,v,C);Us(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(m,g.sibling),g=i(g,v),g.return=m,m=g):(n(m,g),g=ca(v,m.mode,C),g.return=m,m=g),l(m)):n(m,g)}return w}var Qr=Sm(!0),Nm=Sm(!1),Dl=Pn(null),Ml=null,Er=null,vc=null;function wc(){vc=Er=Ml=null}function kc(e){var t=Dl.current;ue(Dl),e._currentValue=t}function fu(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){Ml=e,vc=Er=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(vc!==e)if(e={context:e,memoizedValue:t,next:null},Er===null){if(Ml===null)throw Error(O(308));Er=e,Ml.dependencies={lanes:0,firstContext:e}}else Er=Er.next=e;return t}var Hn=null;function bc(e){Hn===null?Hn=[e]:Hn.push(e)}function Cm(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,bc(t)):(n.next=i.next,i.next=n),t.interleaved=n,en(e,r)}function en(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 cn=!1;function Sc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function jm(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 Yt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function kn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Z&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,en(e,n)}return i=r.interleaved,i===null?(t.next=t,bc(r)):(t.next=i.next,i.next=t),r.interleaved=t,en(e,n)}function ul(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,ac(e,n)}}function yd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=l:s=s.next=l,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,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 Fl(e,t,n,r){var i=e.updateQueue;cn=!1;var s=i.firstBaseUpdate,l=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var a=o,u=a.next;a.next=null,l===null?s=u:l.next=u,l=a;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==l&&(o===null?f.firstBaseUpdate=u:o.next=u,f.lastBaseUpdate=a))}if(s!==null){var c=i.baseState;l=0,f=u=a=null,o=s;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 x=e,y=o;switch(p=t,h=n,y.tag){case 1:if(x=y.payload,typeof x=="function"){c=x.call(h,c,p);break e}c=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=y.payload,p=typeof x=="function"?x.call(h,c,p):x,p==null)break e;c=ye({},c,p);break e;case 2:cn=!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,l|=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 l|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);er|=l,e.lanes=l,e.memoizedState=c}}function xd(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 ws={},Dt=Pn(ws),rs=Pn(ws),is=Pn(ws);function Kn(e){if(e===ws)throw Error(O(174));return e}function Nc(e,t){switch(le(is,t),le(rs,e),le(Dt,ws),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ka(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ka(t,e)}ue(Dt),le(Dt,t)}function Yr(){ue(Dt),ue(rs),ue(is)}function Em(e){Kn(is.current);var t=Kn(Dt.current),n=Ka(t,e.type);t!==n&&(le(rs,e),le(Dt,n))}function Cc(e){rs.current===e&&(ue(Dt),ue(rs))}var he=Pn(0);function zl(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 ia=[];function jc(){for(var e=0;e<ia.length;e++)ia[e]._workInProgressVersionPrimary=null;ia.length=0}var cl=nn.ReactCurrentDispatcher,sa=nn.ReactCurrentBatchConfig,Zn=0,me=null,Ce=null,Ee=null,$l=!1,Fi=!1,ss=0,Dv=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 Tc(e,t,n,r,i,s){if(Zn=s,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,cl.current=e===null||e.memoizedState===null?$v:Bv,e=n(r,i),Fi){s=0;do{if(Fi=!1,ss=0,25<=s)throw Error(O(301));s+=1,Ee=Ce=null,t.updateQueue=null,cl.current=Uv,e=n(r,i)}while(Fi)}if(cl.current=Bl,t=Ce!==null&&Ce.next!==null,Zn=0,Ee=Ce=me=null,$l=!1,t)throw Error(O(300));return e}function Ic(){var e=ss!==0;return ss=0,e}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ee===null?me.memoizedState=Ee=e:Ee=Ee.next=e,Ee}function gt(){if(Ce===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Ce.next;var t=Ee===null?me.memoizedState:Ee.next;if(t!==null)Ee=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},Ee===null?me.memoizedState=Ee=e:Ee=Ee.next=e}return Ee}function ls(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,s=n.pending;if(s!==null){if(i!==null){var l=i.next;i.next=s.next,s.next=l}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var o=l=null,a=null,u=s;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,l=r):a=a.next=c,me.lanes|=f,er|=f}u=u.next}while(u!==null&&u!==s);a===null?l=r:a.next=o,Tt(r,t.memoizedState)||(Qe=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,me.lanes|=s,er|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function oa(e){var t=gt(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do s=e(s,l.action),l=l.next;while(l!==i);Tt(s,t.memoizedState)||(Qe=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Tm(){}function Im(e,t){var n=me,r=gt(),i=t(),s=!Tt(r.memoizedState,i);if(s&&(r.memoizedState=i,Qe=!0),r=r.queue,Lc(_m.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ee!==null&&Ee.memoizedState.tag&1){if(n.flags|=2048,os(9,Pm.bind(null,n,r,i,t),void 0,null),Te===null)throw Error(O(349));Zn&30||Lm(n,t,i)}return i}function Lm(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 Pm(e,t,n,r){t.value=n,t.getSnapshot=r,Am(t)&&Om(e)}function _m(e,t,n){return n(function(){Am(t)&&Om(e)})}function Am(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tt(e,n)}catch{return!0}}function Om(e){var t=en(e,1);t!==null&&jt(t,e,1,-1)}function vd(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:ls,lastRenderedState:e},t.queue=e,e=e.dispatch=zv.bind(null,me,e),[t.memoizedState,e]}function os(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 Rm(){return gt().memoizedState}function fl(e,t,n,r){var i=_t();me.flags|=e,i.memoizedState=os(1|t,n,void 0,r===void 0?null:r)}function uo(e,t,n,r){var i=gt();r=r===void 0?null:r;var s=void 0;if(Ce!==null){var l=Ce.memoizedState;if(s=l.destroy,r!==null&&Ec(r,l.deps)){i.memoizedState=os(t,n,s,r);return}}me.flags|=e,i.memoizedState=os(1|t,n,s,r)}function wd(e,t){return fl(8390656,8,e,t)}function Lc(e,t){return uo(2048,8,e,t)}function Dm(e,t){return uo(4,2,e,t)}function Mm(e,t){return uo(4,4,e,t)}function Fm(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,uo(4,4,Fm.bind(null,t,e),n)}function Pc(){}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]:(n.memoizedState=[e,t],e)}function Bm(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 Um(e,t,n){return Zn&21?(Tt(n,t)||(n=qp(),me.lanes|=n,er|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Qe=!0),e.memoizedState=n)}function Mv(e,t){var n=ee;ee=n!==0&&4>n?n:4,e(!0);var r=sa.transition;sa.transition={};try{e(!1),t()}finally{ee=n,sa.transition=r}}function Vm(){return gt().memoizedState}function Fv(e,t,n){var r=Sn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Hm(e))Km(t,n);else if(n=Cm(e,t,n,r),n!==null){var i=Ue();jt(n,e,r,i),Wm(n,t,r)}}function zv(e,t,n){var r=Sn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Hm(e))Km(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var l=t.lastRenderedState,o=s(l,n);if(i.hasEagerState=!0,i.eagerState=o,Tt(o,l)){var a=t.interleaved;a===null?(i.next=i,bc(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Cm(e,t,i,r),n!==null&&(i=Ue(),jt(n,e,r,i),Wm(n,t,r))}}function Hm(e){var t=e.alternate;return e===me||t!==null&&t===me}function Km(e,t){Fi=$l=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ac(e,n)}}var Bl={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},$v={readContext:mt,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:wd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fl(4194308,4,Fm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fl(4194308,4,e,t)},useInsertionEffect:function(e,t){return fl(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=Fv.bind(null,me,e),[r.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:vd,useDebugValue:Pc,useDeferredValue:function(e){return _t().memoizedState=e},useTransition:function(){var e=vd(!1),t=e[0];return e=Mv.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||Lm(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,wd(_m.bind(null,r,s,e),[e]),r.flags|=2048,os(9,Pm.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=_t(),t=Te.identifierPrefix;if(ce){var n=qt,r=Wt;n=(r&~(1<<32-Ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ss++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Dv++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Bv={readContext:mt,useCallback:$m,useContext:mt,useEffect:Lc,useImperativeHandle:zm,useInsertionEffect:Dm,useLayoutEffect:Mm,useMemo:Bm,useReducer:la,useRef:Rm,useState:function(){return la(ls)},useDebugValue:Pc,useDeferredValue:function(e){var t=gt();return Um(t,Ce.memoizedState,e)},useTransition:function(){var e=la(ls)[0],t=gt().memoizedState;return[e,t]},useMutableSource:Tm,useSyncExternalStore:Im,useId:Vm,unstable_isNewReconciler:!1},Uv={readContext:mt,useCallback:$m,useContext:mt,useEffect:Lc,useImperativeHandle:zm,useInsertionEffect:Dm,useLayoutEffect:Mm,useMemo:Bm,useReducer:oa,useRef:Rm,useState:function(){return oa(ls)},useDebugValue:Pc,useDeferredValue:function(e){var t=gt();return Ce===null?t.memoizedState=e:Um(t,Ce.memoizedState,e)},useTransition:function(){var e=oa(ls)[0],t=gt().memoizedState;return[e,t]},useMutableSource:Tm,useSyncExternalStore:Im,useId:Vm,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 du(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 co={isMounted:function(e){return(e=e._reactInternals)?sr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ue(),i=Sn(e),s=Yt(r,i);s.payload=t,n!=null&&(s.callback=n),t=kn(e,s,i),t!==null&&(jt(t,e,i,r),ul(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ue(),i=Sn(e),s=Yt(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=kn(e,s,i),t!==null&&(jt(t,e,i,r),ul(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ue(),r=Sn(e),i=Yt(n,r);i.tag=2,t!=null&&(i.callback=t),t=kn(e,i,r),t!==null&&(jt(t,e,r,n),ul(t,e,r))}};function kd(e,t,n,r,i,s,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,l):t.prototype&&t.prototype.isPureReactComponent?!Zi(n,r)||!Zi(i,s):!0}function qm(e,t,n){var r=!1,i=Tn,s=t.contextType;return typeof s=="object"&&s!==null?s=mt(s):(i=Je(t)?Gn:Me.current,r=t.contextTypes,s=(r=r!=null)?Wr(e,i):Tn),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=co,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function bd(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&&co.enqueueReplaceState(t,t.state,null)}function hu(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Sc(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=mt(s):(s=Je(t)?Gn:Me.current,i.context=Wr(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(du(e,t,s,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&&co.enqueueReplaceState(i,i.state,null),Fl(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+=gx(r),r=r.return;while(r);var i=n}catch(s){i=`
39
+ Error generating stack: `+s.message+`
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function aa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function pu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Vv=typeof WeakMap=="function"?WeakMap:Map;function Qm(e,t,n){n=Yt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vl||(Vl=!0,Nu=r),pu(e,t)},n}function Ym(e,t,n){n=Yt(-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(){pu(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){pu(e,t),typeof r!="function"&&(bn===null?bn=new Set([this]):bn.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function Sd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Vv;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=r1.bind(null,e,t,n),t.then(e,e))}function Nd(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 Cd(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=Yt(-1,1),t.tag=2,kn(n,t,1))),n.lanes|=1),e)}var Hv=nn.ReactCurrentOwner,Qe=!1;function ze(e,t,n,r){t.child=e===null?Nm(t,null,n,r):Qr(t,e.child,n,r)}function jd(e,t,n,r,i){n=n.render;var s=t.ref;return $r(t,i),r=Tc(e,t,n,r,s,i),n=Ic(),e!==null&&!Qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,tn(e,t,i)):(ce&&n&&gc(t),t.flags|=1,ze(e,t,r,i),t.child)}function Ed(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!zc(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Jm(e,t,s,r,i)):(e=ml(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var l=s.memoizedProps;if(n=n.compare,n=n!==null?n:Zi,n(l,r)&&e.ref===t.ref)return tn(e,t,i)}return t.flags|=1,e=Nn(s,r),e.ref=t.ref,e.return=t,t.child=e}function Jm(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Zi(s,r)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Qe=!0);else return t.lanes=e.lanes,tn(e,t,i)}return mu(e,t,n,r,i)}function Gm(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},le(Ir,tt),tt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,le(Ir,tt),tt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,le(Ir,tt),tt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,le(Ir,tt),tt|=r;return ze(e,t,i,n),t.child}function Xm(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function mu(e,t,n,r,i){var s=Je(n)?Gn:Me.current;return s=Wr(t,s),$r(t,i),n=Tc(e,t,n,r,s,i),r=Ic(),e!==null&&!Qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,tn(e,t,i)):(ce&&r&&gc(t),t.flags|=1,ze(e,t,n,i),t.child)}function Td(e,t,n,r,i){if(Je(n)){var s=!0;Al(t)}else s=!1;if($r(t,i),t.stateNode===null)dl(e,t),qm(t,n,r),hu(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,o=t.memoizedProps;l.props=o;var a=l.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 l.getSnapshotBeforeUpdate=="function";c||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==r||a!==u)&&bd(t,l,r,u),cn=!1;var p=t.memoizedState;l.state=p,Fl(t,r,l,i),a=t.memoizedState,o!==r||p!==a||Ye.current||cn?(typeof f=="function"&&(du(t,n,f,r),a=t.memoizedState),(o=cn||kd(t,n,o,r,p,a,u))?(c||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),l.props=r,l.state=a,l.context=u,r=o):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,jm(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:bt(t.type,o),l.props=u,c=t.pendingProps,p=l.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 l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==c||p!==a)&&bd(t,l,r,a),cn=!1,p=t.memoizedState,l.state=p,Fl(t,r,l,i);var x=t.memoizedState;o!==c||p!==x||Ye.current||cn?(typeof h=="function"&&(du(t,n,h,r),x=t.memoizedState),(u=cn||kd(t,n,u,r,p,x,a)||!1)?(f||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,x,a),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,x,a)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),l.props=r,l.state=x,l.context=a,r=u):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return gu(e,t,n,r,s,i)}function gu(e,t,n,r,i,s){Xm(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&hd(t,n,!1),tn(e,t,s);r=t.stateNode,Hv.current=t;var o=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Qr(t,e.child,null,s),t.child=Qr(t,null,o,s)):ze(e,t,o,s),t.memoizedState=r.state,i&&hd(t,n,!0),t.child}function Zm(e){var t=e.stateNode;t.pendingContext?dd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&dd(e,t.context,!1),Nc(e,t.containerInfo)}function Id(e,t,n,r,i){return qr(),xc(i),t.flags|=256,ze(e,t,n,r),t.child}var yu={dehydrated:null,treeContext:null,retryLane:0};function xu(e){return{baseLanes:e,cachePool:null,transitions:null}}function eg(e,t,n){var r=t.pendingProps,i=he.current,s=!1,l=(t.flags&128)!==0,o;if((o=l)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),le(he,i&1),e===null)return cu(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):(l=r.children,e=r.fallback,s?(r=t.mode,s=t.child,l={mode:"hidden",children:l},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=l):s=po(l,r,0,null),e=Jn(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=xu(n),t.memoizedState=yu,e):_c(t,l));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return Kv(e,t,l,r,o,i,n);if(s){s=r.fallback,l=t.mode,i=e.child,o=i.sibling;var a={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Nn(i,a),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=Nn(o,s):(s=Jn(s,l,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,l=e.child.memoizedState,l=l===null?xu(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=yu,r}return s=e.child,e=s.sibling,r=Nn(s,{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 _c(e,t){return t=po({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Vs(e,t,n,r){return r!==null&&xc(r),Qr(t,e.child,null,n),e=_c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Kv(e,t,n,r,i,s,l){if(n)return t.flags&256?(t.flags&=-257,r=aa(Error(O(422))),Vs(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=po({mode:"visible",children:r.children},i,0,null),s=Jn(s,i,l,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Qr(t,e.child,null,l),t.child.memoizedState=xu(l),t.memoizedState=yu,s);if(!(t.mode&1))return Vs(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,s=Error(O(419)),r=aa(s,r,void 0),Vs(e,t,l,r)}if(o=(l&e.childLanes)!==0,Qe||o){if(r=Te,r!==null){switch(l&-l){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|l)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,en(e,i),jt(r,e,i,-1))}return Fc(),r=aa(Error(O(421))),Vs(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=i1.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,rt=wn(i.nextSibling),it=t,ce=!0,Nt=null,e!==null&&(ut[ct++]=Wt,ut[ct++]=qt,ut[ct++]=Xn,Wt=e.id,qt=e.overflow,Xn=t),t=_c(t,r.children),t.flags|=4096,t)}function Ld(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),fu(e.return,t,n)}function ua(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function tg(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(ze(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&&Ld(e,n,t);else if(e.tag===19)Ld(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(le(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&&zl(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ua(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&zl(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ua(t,!0,n,null,s);break;case"together":ua(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function dl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function tn(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=Nn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Nn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Wv(e,t,n){switch(t.tag){case 3:Zm(t),qr();break;case 5:Em(t);break;case 1:Je(t.type)&&Al(t);break;case 4:Nc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;le(Dl,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(le(he,he.current&1),t.flags|=128,null):n&t.child.childLanes?eg(e,t,n):(le(he,he.current&1),e=tn(e,t,n),e!==null?e.sibling:null);le(he,he.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return tg(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),le(he,he.current),r)break;return null;case 22:case 23:return t.lanes=0,Gm(e,t,n)}return tn(e,t,n)}var ng,vu,rg,ig;ng=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}};vu=function(){};rg=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Kn(Dt.current);var s=null;switch(n){case"input":i=Ba(e,i),r=Ba(e,r),s=[];break;case"select":i=ye({},i,{value:void 0}),r=ye({},r,{value:void 0}),s=[];break;case"textarea":i=Ha(e,i),r=Ha(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Pl)}Wa(n,r);var l;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var o=i[u];for(l in o)o.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Wi.hasOwnProperty(u)?s||(s=[]):(s=s||[]).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(l in o)!o.hasOwnProperty(l)||a&&a.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in a)a.hasOwnProperty(l)&&o[l]!==a[l]&&(n||(n={}),n[l]=a[l])}else n||(s||(s=[]),s.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,o=o?o.__html:void 0,a!=null&&o!==a&&(s=s||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(s=s||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Wi.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&ae("scroll",e),s||o===a||(s=[])):(s=s||[]).push(u,a))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};ig=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 qv(e,t,n){var r=t.pendingProps;switch(yc(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)&&_l(),Ae(t),null;case 3:return r=t.stateNode,Yr(),ue(Ye),ue(Me),jc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Bs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Nt!==null&&(Eu(Nt),Nt=null))),vu(e,t),Ae(t),null;case 5:Cc(t);var i=Kn(is.current);if(n=t.type,e!==null&&t.stateNode!=null)rg(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),Bs(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Ot]=t,r[ns]=s,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,s),ae("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ae("invalid",r);break;case"textarea":Bf(r,s),ae("invalid",r)}Wa(n,s),i=null;for(var l in s)if(s.hasOwnProperty(l)){var o=s[l];l==="children"?typeof o=="string"?r.textContent!==o&&(s.suppressHydrationWarning!==!0&&$s(r.textContent,o,e),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&$s(r.textContent,o,e),i=["children",""+o]):Wi.hasOwnProperty(l)&&o!=null&&l==="onScroll"&&ae("scroll",r)}switch(n){case"input":_s(r),$f(r,s,!0);break;case"textarea":_s(r),Uf(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Pl)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=_p(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Ot]=t,e[ns]=r,ng(e,t,!1,!1),t.stateNode=e;e:{switch(l=qa(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=Ba(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":Bf(e,r),i=Ha(e,r),ae("invalid",e);break;default:i=r}Wa(n,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="style"?Rp(e,a):s==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Ap(e,a)):s==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&qi(e,a):typeof a=="number"&&qi(e,""+a):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Wi.hasOwnProperty(s)?a!=null&&s==="onScroll"&&ae("scroll",e):a!=null&&nc(e,s,a,l))}switch(n){case"input":_s(e),$f(e,r,!1);break;case"textarea":_s(e),Uf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+En(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Dr(e,!!r.multiple,s,!1):r.defaultValue!=null&&Dr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Pl)}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)ig(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(O(166));if(n=Kn(is.current),Kn(Dt.current),Bs(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ot]=t,(s=r.nodeValue!==n)&&(e=it,e!==null))switch(e.tag){case 3:$s(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&$s(r.nodeValue,n,(e.mode&1)!==0)}s&&(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))bm(),qr(),t.flags|=98560,s=!1;else if(s=Bs(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(O(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(O(317));s[Ot]=t}else qr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ae(t),s=!1}else Nt!==null&&(Eu(Nt),Nt=null),s=!0;if(!s)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?je===0&&(je=3):Fc())),t.updateQueue!==null&&(t.flags|=4),Ae(t),null);case 4:return Yr(),vu(e,t),e===null&&es(t.stateNode.containerInfo),Ae(t),null;case 10:return kc(t.type._context),Ae(t),null;case 17:return Je(t.type)&&_l(),Ae(t),null;case 19:if(ue(he),s=t.memoizedState,s===null)return Ae(t),null;if(r=(t.flags&128)!==0,l=s.rendering,l===null)if(r)ki(s,!1);else{if(je!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=zl(e),l!==null){for(t.flags|=128,ki(s,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,l=s.alternate,l===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return le(he,he.current&1|2),t.child}e=e.sibling}s.tail!==null&&we()>Gr&&(t.flags|=128,r=!0,ki(s,!1),t.lanes=4194304)}else{if(!r)if(e=zl(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ki(s,!0),s.tail===null&&s.tailMode==="hidden"&&!l.alternate&&!ce)return Ae(t),null}else 2*we()-s.renderingStartTime>Gr&&n!==1073741824&&(t.flags|=128,r=!0,ki(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(n=s.last,n!==null?n.sibling=l:t.child=l,s.last=l)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=we(),t.sibling=null,n=he.current,le(he,r?n&1|2:n&1),t):(Ae(t),null);case 22:case 23:return Mc(),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 Qv(e,t){switch(yc(t),t.tag){case 1:return Je(t.type)&&_l(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yr(),ue(Ye),ue(Me),jc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Cc(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 kc(t.type._context),null;case 22:case 23:return Mc(),null;case 24:return null;default:return null}}var Hs=!1,Oe=!1,Yv=typeof WeakSet=="function"?WeakSet:Set,z=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 wu(e,t,n){try{n()}catch(r){ve(e,t,r)}}var Pd=!1;function Jv(e,t){if(ru=Tl,e=um(),mc(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,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var l=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=l+i),c!==s||r!==0&&c.nodeType!==3||(a=l+r),c.nodeType===3&&(l+=c.nodeValue.length),(h=c.firstChild)!==null;)p=c,c=h;for(;;){if(c===e)break t;if(p===n&&++u===i&&(o=l),p===s&&++f===r&&(a=l),(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(iu={focusedElem:e,selectionRange:n},Tl=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var y=x.memoizedProps,w=x.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:bt(t.type,y),w);m.__reactInternalSnapshotBeforeUpdate=g}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,z=e;break}z=t.return}return x=Pd,Pd=!1,x}function zi(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 s=i.destroy;i.destroy=void 0,s!==void 0&&wu(t,n,s)}i=i.next}while(i!==r)}}function fo(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 ku(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 sg(e){var t=e.alternate;t!==null&&(e.alternate=null,sg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ot],delete t[ns],delete t[ou],delete t[_v],delete t[Av])),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 _d(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 bu(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=Pl));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}function Su(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(Su(e,t,n),e=e.sibling;e!==null;)Su(e,t,n),e=e.sibling}var Ie=null,St=!1;function on(e,t,n){for(n=n.child;n!==null;)og(e,t,n),n=n.sibling}function og(e,t,n){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(ro,n)}catch{}switch(n.tag){case 5:Oe||Tr(n,t);case 6:var r=Ie,i=St;Ie=null,on(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?na(e.parentNode,n):e.nodeType===1&&na(e,n),Gi(e)):na(Ie,n.stateNode));break;case 4:r=Ie,i=St,Ie=n.stateNode.containerInfo,St=!0,on(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 s=i,l=s.destroy;s=s.tag,l!==void 0&&(s&2||s&4)&&wu(n,t,l),i=i.next}while(i!==r)}on(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)}on(e,t,n);break;case 21:on(e,t,n);break;case 22:n.mode&1?(Oe=(r=Oe)||n.memoizedState!==null,on(e,t,n),Oe=r):on(e,t,n);break;default:on(e,t,n)}}function Ad(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Yv),t.forEach(function(r){var i=s1.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 s=e,l=t,o=l;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));og(s,l,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;)ag(t,e),t=t.sibling}function ag(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{zi(3,e,e.return),fo(3,e)}catch(y){ve(e,e.return,y)}try{zi(5,e,e.return)}catch(y){ve(e,e.return,y)}}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(y){ve(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,l=n!==null?n.memoizedProps:s,o=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&Lp(i,s),qa(o,l);var u=qa(o,s);for(l=0;l<a.length;l+=2){var f=a[l],c=a[l+1];f==="style"?Rp(i,c):f==="dangerouslySetInnerHTML"?Ap(i,c):f==="children"?qi(i,c):nc(i,f,c,u)}switch(o){case"input":Ua(i,s);break;case"textarea":Pp(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Dr(i,!!s.multiple,h,!1):p!==!!s.multiple&&(s.defaultValue!=null?Dr(i,!!s.multiple,s.defaultValue,!0):Dr(i,!!s.multiple,s.multiple?[]:"",!1))}i[ns]=s}catch(y){ve(e,e.return,y)}}break;case 6:if(wt(t,e),Pt(e),r&4){if(e.stateNode===null)throw Error(O(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){ve(e,e.return,y)}}break;case 3:if(wt(t,e),Pt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Gi(t.containerInfo)}catch(y){ve(e,e.return,y)}break;case 4:wt(t,e),Pt(e);break;case 13:wt(t,e),Pt(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Rc=we())),r&4&&Ad(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(z=e,f=e.child;f!==null;){for(c=z=f;z!==null;){switch(p=z,h=p.child,p.tag){case 0:case 11:case 14:case 15:zi(4,p,p.return);break;case 1:Tr(p,p.return);var x=p.stateNode;if(typeof x.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(y){ve(r,n,y)}}break;case 5:Tr(p,p.return);break;case 22:if(p.memoizedState!==null){Rd(c);continue}}h!==null?(h.return=p,z=h):Rd(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{i=c.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=c.stateNode,a=c.memoizedProps.style,l=a!=null&&a.hasOwnProperty("display")?a.display:null,o.style.display=Op("display",l))}catch(y){ve(e,e.return,y)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(y){ve(e,e.return,y)}}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&&Ad(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 s=_d(e);Su(e,s,i);break;case 3:case 4:var l=r.stateNode.containerInfo,o=_d(e);bu(e,o,l);break;default:throw Error(O(161))}}catch(a){ve(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Gv(e,t,n){z=e,ug(e)}function ug(e,t,n){for(var r=(e.mode&1)!==0;z!==null;){var i=z,s=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||Hs;if(!l){var o=i.alternate,a=o!==null&&o.memoizedState!==null||Oe;o=Hs;var u=Oe;if(Hs=l,(Oe=a)&&!u)for(z=i;z!==null;)l=z,a=l.child,l.tag===22&&l.memoizedState!==null?Dd(i):a!==null?(a.return=l,z=a):Dd(i);for(;s!==null;)z=s,ug(s),s=s.sibling;z=i,Hs=o,Oe=u}Od(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,z=s):Od(e)}}function Od(e){for(;z!==null;){var t=z;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Oe||fo(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 s=t.updateQueue;s!==null&&xd(t,s,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}xd(t,l,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&&ku(t)}catch(p){ve(t,t.return,p)}}if(t===e){z=null;break}if(n=t.sibling,n!==null){n.return=t.return,z=n;break}z=t.return}}function Rd(e){for(;z!==null;){var t=z;if(t===e){z=null;break}var n=t.sibling;if(n!==null){n.return=t.return,z=n;break}z=t.return}}function Dd(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{fo(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 s=t.return;try{ku(t)}catch(a){ve(t,s,a)}break;case 5:var l=t.return;try{ku(t)}catch(a){ve(t,l,a)}}}catch(a){ve(t,t.return,a)}if(t===e){z=null;break}var o=t.sibling;if(o!==null){o.return=t.return,z=o;break}z=t.return}}var Xv=Math.ceil,Ul=nn.ReactCurrentDispatcher,Ac=nn.ReactCurrentOwner,ht=nn.ReactCurrentBatchConfig,Z=0,Te=null,be=null,Le=0,tt=0,Ir=Pn(0),je=0,as=null,er=0,ho=0,Oc=0,$i=null,We=null,Rc=0,Gr=1/0,Vt=null,Vl=!1,Nu=null,bn=null,Ks=!1,mn=null,Hl=0,Bi=0,Cu=null,hl=-1,pl=0;function Ue(){return Z&6?we():hl!==-1?hl:hl=we()}function Sn(e){return e.mode&1?Z&2&&Le!==0?Le&-Le:Rv.transition!==null?(pl===0&&(pl=qp()),pl):(e=ee,e!==0||(e=window.event,e=e===void 0?16:em(e.type)),e):1}function jt(e,t,n,r){if(50<Bi)throw Bi=0,Cu=null,Error(O(185));ys(e,n,r),(!(Z&2)||e!==Te)&&(e===Te&&(!(Z&2)&&(ho|=n),je===4&&hn(e,Le)),Ge(e,r),n===1&&Z===0&&!(t.mode&1)&&(Gr=we()+500,ao&&_n()))}function Ge(e,t){var n=e.callbackNode;Rx(e,t);var r=El(e,e===Te?Le:0);if(r===0)n!==null&&Kf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Kf(n),t===1)e.tag===0?Ov(Md.bind(null,e)):vm(Md.bind(null,e)),Lv(function(){!(Z&6)&&_n()}),n=null;else{switch(Qp(r)){case 1:n=oc;break;case 4:n=Kp;break;case 16:n=jl;break;case 536870912:n=Wp;break;default:n=jl}n=yg(n,cg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function cg(e,t){if(hl=-1,pl=0,Z&6)throw Error(O(327));var n=e.callbackNode;if(Br()&&e.callbackNode!==n)return null;var r=El(e,e===Te?Le:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Kl(e,r);else{t=r;var i=Z;Z|=2;var s=dg();(Te!==e||Le!==t)&&(Vt=null,Gr=we()+500,Yn(e,t));do try{t1();break}catch(o){fg(e,o)}while(!0);wc(),Ul.current=s,Z=i,be!==null?t=0:(Te=null,Le=0,t=je)}if(t!==0){if(t===2&&(i=Xa(e),i!==0&&(r=i,t=ju(e,i))),t===1)throw n=as,Yn(e,0),hn(e,r),Ge(e,we()),n;if(t===6)hn(e,r);else{if(i=e.current.alternate,!(r&30)&&!Zv(i)&&(t=Kl(e,r),t===2&&(s=Xa(e),s!==0&&(r=s,t=ju(e,s))),t===1))throw n=as,Yn(e,0),hn(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,Vt);break;case 3:if(hn(e,r),(r&130023424)===r&&(t=Rc+500-we(),10<t)){if(El(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,Vt),t);break}$n(e,We,Vt);break;case 4:if(hn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var l=31-Ct(r);s=1<<l,l=t[l],l>i&&(i=l),r&=~s}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*Xv(r/1960))-r,10<r){e.timeoutHandle=lu($n.bind(null,e,We,Vt),r);break}$n(e,We,Vt);break;case 5:$n(e,We,Vt);break;default:throw Error(O(329))}}}return Ge(e,we()),e.callbackNode===n?cg.bind(null,e):null}function ju(e,t){var n=$i;return e.current.memoizedState.isDehydrated&&(Yn(e,t).flags|=256),e=Kl(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 Zv(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],s=i.getSnapshot;i=i.value;try{if(!Tt(s(),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 hn(e,t){for(t&=~Oc,t&=~ho,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 Md(e){if(Z&6)throw Error(O(327));Br();var t=El(e,0);if(!(t&1))return Ge(e,we()),null;var n=Kl(e,t);if(e.tag!==0&&n===2){var r=Xa(e);r!==0&&(t=r,n=ju(e,r))}if(n===1)throw n=as,Yn(e,0),hn(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,Vt),Ge(e,we()),null}function Dc(e,t){var n=Z;Z|=1;try{return e(t)}finally{Z=n,Z===0&&(Gr=we()+500,ao&&_n())}}function tr(e){mn!==null&&mn.tag===0&&!(Z&6)&&Br();var t=Z;Z|=1;var n=ht.transition,r=ee;try{if(ht.transition=null,ee=1,e)return e()}finally{ee=r,ht.transition=n,Z=t,!(Z&6)&&_n()}}function Mc(){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,Iv(n)),be!==null)for(n=be.return;n!==null;){var r=n;switch(yc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&_l();break;case 3:Yr(),ue(Ye),ue(Me),jc();break;case 5:Cc(r);break;case 4:Yr();break;case 13:ue(he);break;case 19:ue(he);break;case 10:kc(r.type._context);break;case 22:case 23:Mc()}n=n.return}if(Te=e,be=e=Nn(e.current,null),Le=tt=t,je=0,as=null,Oc=ho=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,s=n.pending;if(s!==null){var l=s.next;s.next=i,r.next=l}n.pending=r}Hn=null}return e}function fg(e,t){do{var n=be;try{if(wc(),cl.current=Bl,$l){for(var r=me.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}$l=!1}if(Zn=0,Ee=Ce=me=null,Fi=!1,ss=0,Ac.current=null,n===null||n.return===null){je=1,as=t,be=null;break}e:{var s=e,l=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=Nd(l);if(h!==null){h.flags&=-257,Cd(h,l,o,s,t),h.mode&1&&Sd(s,u,t),t=h,a=u;var x=t.updateQueue;if(x===null){var y=new Set;y.add(a),t.updateQueue=y}else x.add(a);break e}else{if(!(t&1)){Sd(s,u,t),Fc();break e}a=Error(O(426))}}else if(ce&&o.mode&1){var w=Nd(l);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Cd(w,l,o,s,t),xc(Jr(a,o));break e}}s=a=Jr(a,o),je!==4&&(je=2),$i===null?$i=[s]:$i.push(s),s=l;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var m=Qm(s,a,t);yd(s,m);break e;case 1:o=a;var g=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(bn===null||!bn.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var C=Ym(s,o,t);yd(s,C);break e}}s=s.return}while(s!==null)}pg(n)}catch(j){t=j,be===n&&n!==null&&(be=n=n.return);continue}break}while(!0)}function dg(){var e=Ul.current;return Ul.current=Bl,e===null?Bl:e}function Fc(){(je===0||je===3||je===2)&&(je=4),Te===null||!(er&268435455)&&!(ho&268435455)||hn(Te,Le)}function Kl(e,t){var n=Z;Z|=2;var r=dg();(Te!==e||Le!==t)&&(Vt=null,Yn(e,t));do try{e1();break}catch(i){fg(e,i)}while(!0);if(wc(),Z=n,Ul.current=r,be!==null)throw Error(O(261));return Te=null,Le=0,je}function e1(){for(;be!==null;)hg(be)}function t1(){for(;be!==null&&!jx();)hg(be)}function hg(e){var t=gg(e.alternate,e,tt);e.memoizedProps=e.pendingProps,t===null?pg(e):be=t,Ac.current=null}function pg(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Qv(n,t),n!==null){n.flags&=32767,be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{je=6,be=null;return}}else if(n=qv(n,t,tt),n!==null){be=n;return}if(t=t.sibling,t!==null){be=t;return}be=t=e}while(t!==null);je===0&&(je=5)}function $n(e,t,n){var r=ee,i=ht.transition;try{ht.transition=null,ee=1,n1(e,t,n,r)}finally{ht.transition=i,ee=r}return null}function n1(e,t,n,r){do Br();while(mn!==null);if(Z&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 s=n.lanes|n.childLanes;if(Dx(e,s),e===Te&&(be=Te=null,Le=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ks||(Ks=!0,yg(jl,function(){return Br(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=ht.transition,ht.transition=null;var l=ee;ee=1;var o=Z;Z|=4,Ac.current=null,Jv(e,n),ag(n,e),bv(iu),Tl=!!ru,iu=ru=null,e.current=n,Gv(n),Ex(),Z=o,ee=l,ht.transition=s}else e.current=n;if(Ks&&(Ks=!1,mn=e,Hl=i),s=e.pendingLanes,s===0&&(bn=null),Lx(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(Vl)throw Vl=!1,e=Nu,Nu=null,e;return Hl&1&&e.tag!==0&&Br(),s=e.pendingLanes,s&1?e===Cu?Bi++:(Bi=0,Cu=e):Bi=0,_n(),null}function Br(){if(mn!==null){var e=Qp(Hl),t=ht.transition,n=ee;try{if(ht.transition=null,ee=16>e?16:e,mn===null)var r=!1;else{if(e=mn,mn=null,Hl=0,Z&6)throw Error(O(331));var i=Z;for(Z|=4,z=e.current;z!==null;){var s=z,l=s.child;if(z.flags&16){var o=s.deletions;if(o!==null){for(var a=0;a<o.length;a++){var u=o[a];for(z=u;z!==null;){var f=z;switch(f.tag){case 0:case 11:case 15:zi(8,f,s)}var c=f.child;if(c!==null)c.return=f,z=c;else for(;z!==null;){f=z;var p=f.sibling,h=f.return;if(sg(f),f===u){z=null;break}if(p!==null){p.return=h,z=p;break}z=h}}}var x=s.alternate;if(x!==null){var y=x.child;if(y!==null){x.child=null;do{var w=y.sibling;y.sibling=null,y=w}while(y!==null)}}z=s}}if(s.subtreeFlags&2064&&l!==null)l.return=s,z=l;else e:for(;z!==null;){if(s=z,s.flags&2048)switch(s.tag){case 0:case 11:case 15:zi(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,z=m;break e}z=s.return}}var g=e.current;for(z=g;z!==null;){l=z;var v=l.child;if(l.subtreeFlags&2064&&v!==null)v.return=l,z=v;else e:for(l=g;z!==null;){if(o=z,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:fo(9,o)}}catch(j){ve(o,o.return,j)}if(o===l){z=null;break e}var C=o.sibling;if(C!==null){C.return=o.return,z=C;break e}z=o.return}}if(Z=i,_n(),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(ro,e)}catch{}r=!0}return r}finally{ee=n,ht.transition=t}}return!1}function Fd(e,t,n){t=Jr(n,t),t=Qm(e,t,1),e=kn(e,t,1),t=Ue(),e!==null&&(ys(e,1,t),Ge(e,t))}function ve(e,t,n){if(e.tag===3)Fd(e,e,n);else for(;t!==null;){if(t.tag===3){Fd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(bn===null||!bn.has(r))){e=Jr(n,e),e=Ym(t,e,1),t=kn(t,e,1),e=Ue(),t!==null&&(ys(t,1,e),Ge(t,e));break}}t=t.return}}function r1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ue(),e.pingedLanes|=e.suspendedLanes&n,Te===e&&(Le&n)===n&&(je===4||je===3&&(Le&130023424)===Le&&500>we()-Rc?Yn(e,0):Oc|=n),Ge(e,t)}function mg(e,t){t===0&&(e.mode&1?(t=Rs,Rs<<=1,!(Rs&130023424)&&(Rs=4194304)):t=1);var n=Ue();e=en(e,t),e!==null&&(ys(e,t,n),Ge(e,n))}function i1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),mg(e,n)}function s1(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),mg(e,n)}var gg;gg=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,Wv(e,t,n);Qe=!!(e.flags&131072)}else Qe=!1,ce&&t.flags&1048576&&wm(t,Rl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;dl(e,t),e=t.pendingProps;var i=Wr(t,Me.current);$r(t,n),i=Tc(null,t,r,e,i,n);var s=Ic();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)?(s=!0,Al(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Sc(t),i.updater=co,t.stateNode=i,i._reactInternals=t,hu(t,r,e,n),t=gu(null,t,r,!0,s,n)):(t.tag=0,ce&&s&&gc(t),ze(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(dl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=o1(r),e=bt(r,e),i){case 0:t=mu(null,t,r,e,n);break e;case 1:t=Td(null,t,r,e,n);break e;case 11:t=jd(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),mu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bt(r,i),Td(e,t,r,i,n);case 3:e:{if(Zm(t),e===null)throw Error(O(387));r=t.pendingProps,s=t.memoizedState,i=s.element,jm(e,t),Fl(t,r,null,n);var l=t.memoizedState;if(r=l.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Jr(Error(O(423)),t),t=Id(e,t,r,n,i);break e}else if(r!==i){i=Jr(Error(O(424)),t),t=Id(e,t,r,n,i);break e}else for(rt=wn(t.stateNode.containerInfo.firstChild),it=t,ce=!0,Nt=null,n=Nm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(qr(),r===i){t=tn(e,t,n);break e}ze(e,t,r,n)}t=t.child}return t;case 5:return Em(t),e===null&&cu(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,l=i.children,su(r,i)?l=null:s!==null&&su(r,s)&&(t.flags|=32),Xm(e,t),ze(e,t,l,n),t.child;case 6:return e===null&&cu(t),null;case 13:return eg(e,t,n);case 4:return Nc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qr(t,null,r,n):ze(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bt(r,i),jd(e,t,r,i,n);case 7:return ze(e,t,t.pendingProps,n),t.child;case 8:return ze(e,t,t.pendingProps.children,n),t.child;case 12:return ze(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,l=i.value,le(Dl,r._currentValue),r._currentValue=l,s!==null)if(Tt(s.value,l)){if(s.children===i.children&&!Ye.current){t=tn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var o=s.dependencies;if(o!==null){l=s.child;for(var a=o.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=Yt(-1,n&-n),a.tag=2;var u=s.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}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),fu(s.return,n,t),o.lanes|=n;break}a=a.next}}else if(s.tag===10)l=s.type===t.type?null:s.child;else if(s.tag===18){if(l=s.return,l===null)throw Error(O(341));l.lanes|=n,o=l.alternate,o!==null&&(o.lanes|=n),fu(l,n,t),l=s.sibling}else l=s.child;if(l!==null)l.return=s;else for(l=s;l!==null;){if(l===t){l=null;break}if(s=l.sibling,s!==null){s.return=l.return,l=s;break}l=l.return}s=l}ze(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,ze(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 Jm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:bt(r,i),dl(e,t),t.tag=1,Je(r)?(e=!0,Al(t)):e=!1,$r(t,n),qm(t,r,i),hu(t,r,i,n),gu(null,t,r,!0,e,n);case 19:return tg(e,t,n);case 22:return Gm(e,t,n)}throw Error(O(156,t.tag))};function yg(e,t){return Hp(e,t)}function l1(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 l1(e,t,n,r)}function zc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function o1(e){if(typeof e=="function")return zc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ic)return 11;if(e===sc)return 14}return 2}function Nn(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 ml(e,t,n,r,i,s){var l=2;if(r=e,typeof e=="function")zc(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case vr:return Jn(n.children,i,s,t);case rc:l=8,i|=8;break;case Ma:return e=dt(12,n,t,i|2),e.elementType=Ma,e.lanes=s,e;case Fa:return e=dt(13,n,t,i),e.elementType=Fa,e.lanes=s,e;case za:return e=dt(19,n,t,i),e.elementType=za,e.lanes=s,e;case Ep:return po(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Cp:l=10;break e;case jp:l=9;break e;case ic:l=11;break e;case sc:l=14;break e;case un:l=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=dt(l,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Jn(e,t,n,r){return e=dt(7,e,r,t),e.lanes=n,e}function po(e,t,n,r){return e=dt(22,e,r,t),e.elementType=Ep,e.lanes=n,e.stateNode={isHidden:!1},e}function ca(e,t,n){return e=dt(6,e,null,t),e.lanes=n,e}function fa(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 a1(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=Ko(0),this.expirationTimes=Ko(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ko(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $c(e,t,n,r,i,s,l,o,a){return e=new a1(e,t,n,o,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=dt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sc(s),e}function u1(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 xg(e){if(!e)return Tn;e=e._reactInternals;e:{if(sr(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 xm(e,n,t)}return t}function vg(e,t,n,r,i,s,l,o,a){return e=$c(n,r,!0,e,i,s,l,o,a),e.context=xg(null),n=e.current,r=Ue(),i=Sn(n),s=Yt(r,i),s.callback=t??null,kn(n,s,i),e.current.lanes=i,ys(e,i,r),Ge(e,r),e}function mo(e,t,n,r){var i=t.current,s=Ue(),l=Sn(i);return n=xg(n),t.context===null?t.context=n:t.pendingContext=n,t=Yt(s,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=kn(i,t,l),e!==null&&(jt(e,i,l,s),ul(e,i,l)),l}function Wl(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 Bc(e,t){zd(e,t),(e=e.alternate)&&zd(e,t)}function c1(){return null}var wg=typeof reportError=="function"?reportError:function(e){console.error(e)};function Uc(e){this._internalRoot=e}go.prototype.render=Uc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));mo(e,t,null,null)};go.prototype.unmount=Uc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;tr(function(){mo(null,e,null,null)}),t[Zt]=null}};function go(e){this._internalRoot=e}go.prototype.unstable_scheduleHydration=function(e){if(e){var t=Gp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<dn.length&&t!==0&&t<dn[n].priority;n++);dn.splice(n,0,e),n===0&&Zp(e)}};function Vc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function $d(){}function f1(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Wl(l);s.call(u)}}var l=vg(t,r,e,0,null,!1,!1,"",$d);return e._reactRootContainer=l,e[Zt]=l.current,es(e.nodeType===8?e.parentNode:e),tr(),l}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var u=Wl(a);o.call(u)}}var a=$c(e,0,!1,null,null,!1,!1,"",$d);return e._reactRootContainer=a,e[Zt]=a.current,es(e.nodeType===8?e.parentNode:e),tr(function(){mo(t,a,n,r)}),a}function xo(e,t,n,r,i){var s=n._reactRootContainer;if(s){var l=s;if(typeof i=="function"){var o=i;i=function(){var a=Wl(l);o.call(a)}}mo(t,l,e,i)}else l=f1(n,t,e,i,r);return Wl(l)}Yp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ti(t.pendingLanes);n!==0&&(ac(t,n|1),Ge(t,we()),!(Z&6)&&(Gr=we()+500,_n()))}break;case 13:tr(function(){var r=en(e,1);if(r!==null){var i=Ue();jt(r,e,1,i)}}),Bc(e,1)}};uc=function(e){if(e.tag===13){var t=en(e,134217728);if(t!==null){var n=Ue();jt(t,e,134217728,n)}Bc(e,134217728)}};Jp=function(e){if(e.tag===13){var t=Sn(e),n=en(e,t);if(n!==null){var r=Ue();jt(n,e,t,r)}Bc(e,t)}};Gp=function(){return ee};Xp=function(e,t){var n=ee;try{return ee=e,t()}finally{ee=n}};Ya=function(e,t,n){switch(t){case"input":if(Ua(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=oo(r);if(!i)throw Error(O(90));Ip(r),Ua(r,i)}}}break;case"textarea":Pp(e,n);break;case"select":t=n.value,t!=null&&Dr(e,!!n.multiple,t,!1)}};Fp=Dc;zp=tr;var d1={usingClientEntryPoint:!1,Events:[vs,Sr,oo,Dp,Mp,Dc]},bi={findFiberByHostInstance:Vn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},h1={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:nn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Up(e),e===null?null:e.stateNode},findFiberByHostInstance:bi.findFiberByHostInstance||c1,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 Ws=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ws.isDisabled&&Ws.supportsFiber)try{ro=Ws.inject(h1),Rt=Ws}catch{}}ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=d1;ot.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Vc(t))throw Error(O(200));return u1(e,t,null,n)};ot.createRoot=function(e,t){if(!Vc(e))throw Error(O(299));var n=!1,r="",i=wg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=$c(e,1,!1,null,null,n,!1,r,i),e[Zt]=t.current,es(e.nodeType===8?e.parentNode:e),new Uc(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=Up(t),e=e===null?null:e.stateNode,e};ot.flushSync=function(e){return tr(e)};ot.hydrate=function(e,t,n){if(!yo(t))throw Error(O(200));return xo(null,e,t,!0,n)};ot.hydrateRoot=function(e,t,n){if(!Vc(e))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",l=wg;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=vg(t,null,e,1,n??null,i,!1,s,l),e[Zt]=t.current,es(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 go(t)};ot.render=function(e,t,n){if(!yo(t))throw Error(O(200));return xo(null,e,t,!1,n)};ot.unmountComponentAtNode=function(e){if(!yo(e))throw Error(O(40));return e._reactRootContainer?(tr(function(){xo(null,null,e,!1,function(){e._reactRootContainer=null,e[Zt]=null})}),!0):!1};ot.unstable_batchedUpdates=Dc;ot.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!yo(n))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return xo(e,t,n,!1,r)};ot.version="18.3.1-next-f1338f8080-20240426";function kg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kg)}catch(e){console.error(e)}}kg(),kp.exports=ot;var p1=kp.exports,Bd=p1;Ra.createRoot=Bd.createRoot,Ra.hydrateRoot=Bd.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 us(){return us=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},us.apply(this,arguments)}var gn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(gn||(gn={}));const Ud="popstate";function m1(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:l,hash:o}=r.location;return Tu("",{pathname:s,search:l,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:ql(i)}return y1(t,n,null,e)}function Se(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Hc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function g1(){return Math.random().toString(36).substr(2,8)}function Vd(e,t){return{usr:e.state,key:e.key,idx:t}}function Tu(e,t,n,r){return n===void 0&&(n=null),us({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ii(t):t,{state:n,key:t&&t.key||r||g1()})}function ql(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 y1(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,l=i.history,o=gn.Pop,a=null,u=f();u==null&&(u=0,l.replaceState(us({},l.state,{idx:u}),""));function f(){return(l.state||{idx:null}).idx}function c(){o=gn.Pop;let w=f(),m=w==null?null:w-u;u=w,a&&a({action:o,location:y.location,delta:m})}function p(w,m){o=gn.Push;let g=Tu(y.location,w,m);u=f()+1;let v=Vd(g,u),C=y.createHref(g);try{l.pushState(v,"",C)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(C)}s&&a&&a({action:o,location:y.location,delta:1})}function h(w,m){o=gn.Replace;let g=Tu(y.location,w,m);u=f();let v=Vd(g,u),C=y.createHref(g);l.replaceState(v,"",C),s&&a&&a({action:o,location:y.location,delta:0})}function x(w){let m=i.location.origin!=="null"?i.location.origin:i.location.href,g=typeof w=="string"?w:ql(w);return g=g.replace(/ $/,"%20"),Se(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let y={get action(){return o},get location(){return e(i,l)},listen(w){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(Ud,c),a=w,()=>{i.removeEventListener(Ud,c),a=null}},createHref(w){return t(i,w)},createURL:x,encodeLocation(w){let m=x(w);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:h,go(w){return l.go(w)}};return y}var Hd;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Hd||(Hd={}));function x1(e,t,n){return n===void 0&&(n="/"),v1(e,t,n)}function v1(e,t,n,r){let i=typeof t=="string"?ii(t):t,s=Kc(i.pathname||"/",n);if(s==null)return null;let l=bg(e);w1(l);let o=null;for(let a=0;o==null&&a<l.length;++a){let u=_1(s);o=I1(l[a],u)}return o}function bg(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,l,o)=>{let a={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};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=Cn([r,a.relativePath]),f=n.concat(a);s.children&&s.children.length>0&&(Se(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),bg(s.children,t,f,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:E1(u,s.index),routesMeta:f})};return e.forEach((s,l)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))i(s,l);else for(let a of Sg(s.path))i(s,l,a)}),t}function Sg(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let l=Sg(r.join("/")),o=[];return o.push(...l.map(a=>a===""?s:[s,a].join("/"))),i&&o.push(...l),o.map(a=>e.startsWith("/")&&a===""?"/":a)}function w1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:T1(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const k1=/^:[\w-]+$/,b1=3,S1=2,N1=1,C1=10,j1=-2,Kd=e=>e==="*";function E1(e,t){let n=e.split("/"),r=n.length;return n.some(Kd)&&(r+=j1),t&&(r+=S1),n.filter(i=>!Kd(i)).reduce((i,s)=>i+(k1.test(s)?b1:s===""?N1:C1),r)}function T1(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 I1(e,t,n){let{routesMeta:r}=e,i={},s="/",l=[];for(let o=0;o<r.length;++o){let a=r[o],u=o===r.length-1,f=s==="/"?t:t.slice(s.length)||"/",c=L1({path:a.relativePath,caseSensitive:a.caseSensitive,end:u},f),p=a.route;if(!c)return null;Object.assign(i,c.params),l.push({params:i,pathname:Cn([s,c.pathname]),pathnameBase:M1(Cn([s,c.pathnameBase])),route:p}),c.pathnameBase!=="/"&&(s=Cn([s,c.pathnameBase]))}return l}function L1(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=P1(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],l=s.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:r.reduce((u,f,c)=>{let{paramName:p,isOptional:h}=f;if(p==="*"){let y=o[c]||"";l=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const x=o[c];return h&&!x?u[p]=void 0:u[p]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:l,pattern:e}}function P1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Hc(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,(l,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 _1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Hc(!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 Kc(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 A1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,O1=e=>A1.test(e);function R1(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ii(e):e,s;if(n)if(O1(n))s=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),Hc(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?s=Wd(n.substring(1),"/"):s=Wd(n,t)}else s=t;return{pathname:s,search:F1(r),hash:z1(i)}}function Wd(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 da(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 D1(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ng(e,t){let n=D1(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Cg(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ii(e):(i=us({},e),Se(!i.pathname||!i.pathname.includes("?"),da("?","pathname","search",i)),Se(!i.pathname||!i.pathname.includes("#"),da("#","pathname","hash",i)),Se(!i.search||!i.search.includes("#"),da("#","search","hash",i)));let s=e===""||i.pathname==="",l=s?"/":i.pathname,o;if(l==null)o=n;else{let c=t.length-1;if(!r&&l.startsWith("..")){let p=l.split("/");for(;p[0]==="..";)p.shift(),c-=1;i.pathname=p.join("/")}o=c>=0?t[c]:"/"}let a=R1(i,o),u=l&&l!=="/"&&l.endsWith("/"),f=(s||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||f)&&(a.pathname+="/"),a}const Cn=e=>e.join("/").replace(/\/\/+/g,"/"),M1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),F1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,z1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function $1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const jg=["post","put","patch","delete"];new Set(jg);const B1=["get",...jg];new Set(B1);/**
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 cs(){return cs=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},cs.apply(this,arguments)}const Wc=T.createContext(null),U1=T.createContext(null),lr=T.createContext(null),vo=T.createContext(null),An=T.createContext({outlet:null,matches:[],isDataRoute:!1}),Eg=T.createContext(null);function V1(e,t){let{relative:n}=t===void 0?{}:t;ks()||Se(!1);let{basename:r,navigator:i}=T.useContext(lr),{hash:s,pathname:l,search:o}=Ig(e,{relative:n}),a=l;return r!=="/"&&(a=l==="/"?r:Cn([r,l])),i.createHref({pathname:a,search:o,hash:s})}function ks(){return T.useContext(vo)!=null}function bs(){return ks()||Se(!1),T.useContext(vo).location}function Tg(e){T.useContext(lr).static||T.useLayoutEffect(e)}function H1(){let{isDataRoute:e}=T.useContext(An);return e?iw():K1()}function K1(){ks()||Se(!1);let e=T.useContext(Wc),{basename:t,future:n,navigator:r}=T.useContext(lr),{matches:i}=T.useContext(An),{pathname:s}=bs(),l=JSON.stringify(Ng(i,n.v7_relativeSplatPath)),o=T.useRef(!1);return Tg(()=>{o.current=!0}),T.useCallback(function(u,f){if(f===void 0&&(f={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let c=Cg(u,JSON.parse(l),s,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Cn([t,c.pathname])),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,l,s,e])}function W1(){let{matches:e}=T.useContext(An),t=e[e.length-1];return t?t.params:{}}function Ig(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=T.useContext(lr),{matches:i}=T.useContext(An),{pathname:s}=bs(),l=JSON.stringify(Ng(i,r.v7_relativeSplatPath));return T.useMemo(()=>Cg(e,JSON.parse(l),s,n==="path"),[e,l,s,n])}function q1(e,t){return Q1(e,t)}function Q1(e,t,n,r){ks()||Se(!1);let{navigator:i}=T.useContext(lr),{matches:s}=T.useContext(An),l=s[s.length-1],o=l?l.params:{};l&&l.pathname;let a=l?l.pathnameBase:"/";l&&l.route;let u=bs(),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 x=x1(e,{pathname:h}),y=Z1(x&&x.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:Cn([a,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?a:Cn([a,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r);return t&&y?T.createElement(vo.Provider,{value:{location:cs({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:gn.Pop}},y):y}function Y1(){let e=rw(),t=$1(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 T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},t),n?T.createElement("pre",{style:i},n):null,null)}const J1=T.createElement(Y1,null);class G1 extends T.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?T.createElement(An.Provider,{value:this.props.routeContext},T.createElement(Eg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function X1(e){let{routeContext:t,match:n,children:r}=e,i=T.useContext(Wc);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),T.createElement(An.Provider,{value:t},r)}function Z1(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,o=(i=n)==null?void 0:i.errors;if(o!=null){let f=l.findIndex(c=>c.route.id&&(o==null?void 0:o[c.route.id])!==void 0);f>=0||Se(!1),l=l.slice(0,Math.min(l.length,f+1))}let a=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<l.length;f++){let c=l[f];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=f),c.route.id){let{loaderData:p,errors:h}=n,x=c.route.loader&&p[c.route.id]===void 0&&(!h||h[c.route.id]===void 0);if(c.route.lazy||x){a=!0,u>=0?l=l.slice(0,u+1):l=[l[0]];break}}}return l.reduceRight((f,c,p)=>{let h,x=!1,y=null,w=null;n&&(h=o&&c.route.id?o[c.route.id]:void 0,y=c.route.errorElement||J1,a&&(u<0&&p===0?(sw("route-fallback"),x=!0,w=null):u===p&&(x=!0,w=c.route.hydrateFallbackElement||null)));let m=t.concat(l.slice(0,p+1)),g=()=>{let v;return h?v=y:x?v=w:c.route.Component?v=T.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=f,T.createElement(X1,{match:c,routeContext:{outlet:f,matches:m,isDataRoute:n!=null},children:v})};return n&&(c.route.ErrorBoundary||c.route.errorElement||p===0)?T.createElement(G1,{location:n.location,revalidation:n.revalidation,component:y,error:h,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var Lg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Lg||{}),Pg=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}(Pg||{});function ew(e){let t=T.useContext(Wc);return t||Se(!1),t}function tw(e){let t=T.useContext(U1);return t||Se(!1),t}function nw(e){let t=T.useContext(An);return t||Se(!1),t}function _g(e){let t=nw(),n=t.matches[t.matches.length-1];return n.route.id||Se(!1),n.route.id}function rw(){var e;let t=T.useContext(Eg),n=tw(),r=_g();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function iw(){let{router:e}=ew(Lg.UseNavigateStable),t=_g(Pg.UseNavigateStable),n=T.useRef(!1);return Tg(()=>{n.current=!0}),T.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,cs({fromRouteId:t},s)))},[e,t])}const qd={};function sw(e,t,n){qd[e]||(qd[e]=!0)}function lw(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ut(e){Se(!1)}function ow(e){let{basename:t="/",children:n=null,location:r,navigationType:i=gn.Pop,navigator:s,static:l=!1,future:o}=e;ks()&&Se(!1);let a=t.replace(/^\/*/,"/"),u=T.useMemo(()=>({basename:a,navigator:s,static:l,future:cs({v7_relativeSplatPath:!1},o)}),[a,o,s,l]);typeof r=="string"&&(r=ii(r));let{pathname:f="/",search:c="",hash:p="",state:h=null,key:x="default"}=r,y=T.useMemo(()=>{let w=Kc(f,a);return w==null?null:{location:{pathname:w,search:c,hash:p,state:h,key:x},navigationType:i}},[a,f,c,p,h,x,i]);return y==null?null:T.createElement(lr.Provider,{value:u},T.createElement(vo.Provider,{children:n,value:y}))}function aw(e){let{children:t,location:n}=e;return q1(Iu(t),n)}new Promise(()=>{});function Iu(e,t){t===void 0&&(t=[]);let n=[];return T.Children.forEach(e,(r,i)=>{if(!T.isValidElement(r))return;let s=[...t,i];if(r.type===T.Fragment){n.push.apply(n,Iu(r.props.children,s));return}r.type!==Ut&&Se(!1),!r.props.index||!r.props.children||Se(!1);let l={id:r.props.id||s.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&&(l.children=Iu(r.props.children,s)),n.push(l)}),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 Lu(){return Lu=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},Lu.apply(this,arguments)}function uw(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function cw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fw(e,t){return e.button===0&&(!t||t==="_self")&&!cw(e)}const dw=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],hw="6";try{window.__reactRouterVersion=hw}catch{}const pw="startTransition",Qd=rx[pw];function mw(e){let{basename:t,children:n,future:r,window:i}=e,s=T.useRef();s.current==null&&(s.current=m1({window:i,v5Compat:!0}));let l=s.current,[o,a]=T.useState({action:l.action,location:l.location}),{v7_startTransition:u}=r||{},f=T.useCallback(c=>{u&&Qd?Qd(()=>a(c)):a(c)},[a,u]);return T.useLayoutEffect(()=>l.listen(f),[l,f]),T.useEffect(()=>lw(r),[r]),T.createElement(ow,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:l,future:r})}const gw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jt=T.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:l,state:o,target:a,to:u,preventScrollReset:f,viewTransition:c}=t,p=uw(t,dw),{basename:h}=T.useContext(lr),x,y=!1;if(typeof u=="string"&&yw.test(u)&&(x=u,gw))try{let v=new URL(window.location.href),C=u.startsWith("//")?new URL(v.protocol+u):new URL(u),j=Kc(C.pathname,h);C.origin===v.origin&&j!=null?u=j+C.search+C.hash:y=!0}catch{}let w=V1(u,{relative:i}),m=xw(u,{replace:l,state:o,target:a,preventScrollReset:f,relative:i,viewTransition:c});function g(v){r&&r(v),v.defaultPrevented||m(v)}return T.createElement("a",Lu({},p,{href:x||w,onClick:y||s?r:g,ref:n,target:a}))});var Yd;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Yd||(Yd={}));var Jd;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Jd||(Jd={}));function xw(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:l,viewTransition:o}=t===void 0?{}:t,a=H1(),u=bs(),f=Ig(e,{relative:l});return T.useCallback(c=>{if(fw(c,n)){c.preventDefault();let p=r!==void 0?r:ql(u)===ql(f);a(e,{replace:p,state:i,preventScrollReset:s,relative:l,viewTransition:o})}},[u,a,f,r,i,n,e,s,l,o])}function rn(){const[e,t]=T.useState(!1),[n,r]=T.useState(null),i=T.useRef(null),s=T.useRef(null),l=T.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,s.current=setTimeout(()=>{console.log("Attempting to reconnect..."),l()},3e3)},f.onerror=c=>{console.error("WebSocket error:",c)},i.current=f},[]);T.useEffect(()=>(l(),()=>{s.current&&clearTimeout(s.current),i.current&&i.current.close()}),[l]);const o=T.useCallback(a=>{i.current&&i.current.readyState===WebSocket.OPEN&&i.current.send(JSON.stringify(a))},[]);return{connected:e,lastMessage:n,send:o}}const vw="/api";async function q(e,t){const n=await fetch(`${vw}${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 Kt={list:(e=!1)=>q(`/changes?includeArchived=${e}`),get:e=>q(`/changes/${e}`),validate:(e,t=!1)=>q(`/changes/${e}/validate`,{method:"POST",body:JSON.stringify({strict:t})}),archive:(e,t=!1)=>q(`/changes/${e}/archive`,{method:"POST",body:JSON.stringify({skipSpecs:t})}),getReviews:e=>q(`/changes/${e}/reviews`),addReview:(e,t,n,r,i)=>q(`/changes/${e}/reviews`,{method:"POST",body:JSON.stringify({targetType:t,body:n,type:r,...i})}),resolveReview:(e,t,n,r="resolved")=>q(`/changes/${e}/reviews/${t}`,{method:"PATCH",body:JSON.stringify({targetType:n,status:r})}),getCrossServiceInfo:e=>q(`/changes/${e}/cross-service`),getCrossServiceDoc:(e,t)=>q(`/changes/${e}/cross-service/${encodeURIComponent(t)}`),getSpecs:e=>q(`/changes/${e}/specs`)},Bn={list:()=>q("/specs"),get:e=>q(`/specs/${e}`),validate:(e,t=!1)=>q(`/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 q(`/specs/${e}/reviews${i}`)},addReview:(e,t,n,r)=>q(`/specs/${e}/reviews`,{method:"POST",body:JSON.stringify({body:t,type:n,...r})}),resolveReview:(e,t,n="resolved")=>q(`/specs/${e}/reviews/${t}`,{method:"PATCH",body:JSON.stringify({status:n})}),getDependencies:()=>q("/specs/dependencies")},Li={get:e=>q(`/changes/${e}/tasks`),update:(e,t,n)=>q(`/changes/${e}/tasks/${t}`,{method:"PATCH",body:JSON.stringify({status:n})}),getProgress:()=>q("/progress")},Pi={list:()=>q("/approvals"),listPending:()=>q("/approvals/pending"),get:e=>q(`/approvals/${e}`),request:(e,t,n)=>q(`/approvals/${e}/request`,{method:"POST",body:JSON.stringify({requestedBy:t,reviewers:n})}),approve:(e,t,n)=>q(`/approvals/${e}/approve`,{method:"POST",body:JSON.stringify({approver:t,comment:n})}),reject:(e,t,n)=>q(`/approvals/${e}/reject`,{method:"POST",body:JSON.stringify({rejector:t,reason:n})})},ww={get:()=>q("/project")},Gd={get:()=>q("/kanban"),getSummary:()=>q("/kanban/summary"),moveCard:(e,t,n)=>q(`/kanban/${e}/move`,{method:"PUT",body:JSON.stringify({toColumn:t,note:n})})},kw={analyze:(e=!1)=>q(`/context/analyze${e?"?refresh=true":""}`),getSummary:()=>q("/context/summary")},qs={getStatus:e=>q(`/qa/status/${e}`),getSummary:()=>q("/qa/summary"),getHistory:(e,t=10)=>q(`/qa/history/${e}?limit=${t}`),run:(e,t)=>q("/qa/run/"+e,{method:"POST",body:JSON.stringify({checks:t})}),stop:e=>q("/qa/stop/"+e,{method:"POST"})};function bw(){const{lastMessage:e}=rn(),[t,n]=T.useState({changes:0,specs:0,pendingApprovals:0,overallProgress:0}),[r,i]=T.useState([]),[s,l]=T.useState(!0),o=T.useCallback(async()=>{try{const[a,u,f,c]=await Promise.all([Kt.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 T.useEffect(()=>{o().finally(()=>l(!1))},[o]),T.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]),s?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(Qs,{title:"Active Changes",value:t.changes,icon:d.jsx(Sw,{}),link:"/changes",color:"blue",trend:"Updates pending"}),d.jsx(Qs,{title:"Specifications",value:t.specs,icon:d.jsx(Xd,{}),link:"/specs",color:"indigo",trend:"Project documentation"}),d.jsx(Qs,{title:"Pending Approvals",value:t.pendingApprovals,icon:d.jsx(Nw,{}),link:"/approvals",color:"amber",trend:"Requires attention",highlight:t.pendingApprovals>0}),d.jsx(Qs,{title:"Overall Progress",value:`${t.overallProgress}%`,icon:d.jsx(Cw,{}),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(Jt,{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(jw,{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(Jt,{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(Jt,{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(Xd,{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 Qs({title:e,value:t,icon:n,link:r,color:i,trend:s,highlight:l=!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
+ ${l?"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})]}),s&&d.jsx("div",{className:"mt-4 flex items-center text-xs text-gray-400 font-medium",children:s})]});return r?d.jsx(Jt,{to:r,className:"block",children:u}):u}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("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 Xd({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 Nw({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 Cw({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 jw({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 Tw(){const{lastMessage:e}=rn(),[t,n]=T.useState([]),[r,i]=T.useState(!0),[s,l]=T.useState(!1),o=async()=>{try{const a=await Kt.list(s);n(a.changes)}catch(a){console.error("Failed to fetch changes:",a)}};return T.useEffect(()=>{i(!0),o().finally(()=>i(!1))},[s]),T.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:s,onChange:a=>l(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(Jt,{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 Iw(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Lw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_w={};function Zd(e,t){return(_w.jsx?Pw:Lw).test(e)}const Aw=/[ \t\n\f\r]/g;function Ow(e){return typeof e=="object"?e.type==="text"?eh(e.value):!1:eh(e)}function eh(e){return e.replace(Aw,"")===""}let Ss=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ss.prototype.normal={};Ss.prototype.property={};Ss.prototype.space=void 0;function Ag(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ss(n,r,t)}function Pu(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 Rw=0;const W=or(),ke=or(),_u=or(),R=or(),se=or(),Ur=or(),et=or();function or(){return 2**++Rw}const Au=Object.freeze(Object.defineProperty({__proto__:null,boolean:W,booleanish:ke,commaOrSpaceSeparated:et,commaSeparated:Ur,number:R,overloadedBoolean:_u,spaceSeparated:se},Symbol.toStringTag,{value:"Module"})),ha=Object.keys(Au);class qc extends Xe{constructor(t,n,r,i){let s=-1;if(super(t,n),th(this,"space",i),typeof r=="number")for(;++s<ha.length;){const l=ha[s];th(this,ha[s],(r&Au[l])===Au[l])}}}qc.prototype.defined=!0;function th(e,t,n){n&&(e[t]=n)}function si(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new qc(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Pu(r)]=r,n[Pu(s.attribute)]=r}return new Ss(t,n,e.space)}const Og=si({properties:{ariaActiveDescendant:null,ariaAtomic:ke,ariaAutoComplete:null,ariaBusy:ke,ariaChecked:ke,ariaColCount:R,ariaColIndex:R,ariaColSpan:R,ariaControls:se,ariaCurrent:null,ariaDescribedBy:se,ariaDetails:null,ariaDisabled:ke,ariaDropEffect:se,ariaErrorMessage:null,ariaExpanded:ke,ariaFlowTo:se,ariaGrabbed:ke,ariaHasPopup:null,ariaHidden:ke,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:se,ariaLevel:R,ariaLive:null,ariaModal:ke,ariaMultiLine:ke,ariaMultiSelectable:ke,ariaOrientation:null,ariaOwns:se,ariaPlaceholder:null,ariaPosInSet:R,ariaPressed:ke,ariaReadOnly:ke,ariaRelevant:null,ariaRequired:ke,ariaRoleDescription:se,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 Rg(e,t){return t in e?e[t]:t}function Dg(e,t){return Rg(e,t.toLowerCase())}const Dw=si({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ur,acceptCharset:se,accessKey:se,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:se,autoFocus:W,autoPlay:W,blocking:se,capture:null,charSet:null,checked:W,cite:null,className:se,cols:R,colSpan:null,content:null,contentEditable:ke,controls:W,controlsList:se,coords:R|Ur,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:_u,draggable:ke,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:se,height:R,hidden:_u,high:R,href:null,hrefLang:null,htmlFor:se,httpEquiv:se,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:se,itemRef:se,itemScope:W,itemType:se,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:se,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:se,required:W,reversed:W,rows:R,rowSpan:R,sandbox:se,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:se,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:Dg}),Mw=si({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:se,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:se,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:Rg}),Mg=si({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()}}),Fg=si({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Dg}),zg=si({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Fw={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,nh=/-[a-z]/g,$w=/^data[-\w.:]+$/i;function Bw(e,t){const n=Pu(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"&&$w.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(nh,Vw);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!nh.test(s)){let l=s.replace(zw,Uw);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=qc}return new i(r,t)}function Uw(e){return"-"+e.toLowerCase()}function Vw(e){return e.charAt(1).toUpperCase()}const Hw=Ag([Og,Dw,Mg,Fg,zg],"html"),Qc=Ag([Og,Mw,Mg,Fg,zg],"svg");function Kw(e){return e.join(" ").trim()}var Yc={},rh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ww=/\n/g,qw=/^\s*/,Qw=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Yw=/^:\s*/,Jw=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Gw=/^[;\s]*/,Xw=/^\s+|\s+$/g,Zw=`
72
+ `,ih="/",sh="*",Un="",ek="comment",tk="declaration";function nk(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(x){var y=x.match(Ww);y&&(n+=y.length);var w=x.lastIndexOf(Zw);r=~w?x.length-w:r+x.length}function s(){var x={line:n,column:r};return function(y){return y.position=new l(x),u(),y}}function l(x){this.start=x,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function o(x){var y=new Error(t.source+":"+n+":"+r+": "+x);if(y.reason=x,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function a(x){var y=x.exec(e);if(y){var w=y[0];return i(w),e=e.slice(w.length),y}}function u(){a(qw)}function f(x){var y;for(x=x||[];y=c();)y!==!1&&x.push(y);return x}function c(){var x=s();if(!(ih!=e.charAt(0)||sh!=e.charAt(1))){for(var y=2;Un!=e.charAt(y)&&(sh!=e.charAt(y)||ih!=e.charAt(y+1));)++y;if(y+=2,Un===e.charAt(y-1))return o("End of comment missing");var w=e.slice(2,y-2);return r+=2,i(w),e=e.slice(y),r+=2,x({type:ek,comment:w})}}function p(){var x=s(),y=a(Qw);if(y){if(c(),!a(Yw))return o("property missing ':'");var w=a(Jw),m=x({type:tk,property:lh(y[0].replace(rh,Un)),value:w?lh(w[0].replace(rh,Un)):Un});return a(Gw),m}}function h(){var x=[];f(x);for(var y;y=p();)y!==!1&&(x.push(y),f(x));return x}return u(),h()}function lh(e){return e?e.replace(Xw,Un):Un}var rk=nk,ik=bl&&bl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yc,"__esModule",{value:!0});Yc.default=lk;const sk=ik(rk);function lk(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,sk.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:l,value:o}=s;i?t(l,o,s):o&&(n=n||{},n[l]=o)}),n}var wo={};Object.defineProperty(wo,"__esModule",{value:!0});wo.camelCase=void 0;var ok=/^--[a-zA-Z0-9_-]+$/,ak=/-([a-z])/g,uk=/^[^-]+$/,ck=/^-(webkit|moz|ms|o|khtml)-/,fk=/^-(ms)-/,dk=function(e){return!e||uk.test(e)||ok.test(e)},hk=function(e,t){return t.toUpperCase()},oh=function(e,t){return"".concat(t,"-")},pk=function(e,t){return t===void 0&&(t={}),dk(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(fk,oh):e=e.replace(ck,oh),e.replace(ak,hk))};wo.camelCase=pk;var mk=bl&&bl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gk=mk(Yc),yk=wo;function Ou(e,t){var n={};return!e||typeof e!="string"||(0,gk.default)(e,function(r,i){r&&i&&(n[(0,yk.camelCase)(r,t)]=i)}),n}Ou.default=Ou;var xk=Ou;const vk=Yu(xk),$g=Bg("end"),Jc=Bg("start");function Bg(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 wk(e){const t=Jc(e),n=$g(e);if(t&&n)return{start:t,end:n}}function Ui(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ah(e.position):"start"in e||"end"in e?ah(e):"line"in e||"column"in e?Ru(e):""}function Ru(e){return uh(e&&e.line)+":"+uh(e&&e.column)}function ah(e){return Ru(e&&e.start)+"-"+Ru(e&&e.end)}function uh(e){return e&&typeof e=="number"?e:1}class Fe extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},l=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(l=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?s.ruleId=r:(s.source=r.slice(0,a),s.ruleId=r.slice(a+1))}if(!s.place&&s.ancestors&&s.ancestors){const a=s.ancestors[s.ancestors.length-1];a&&(s.place=a.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.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(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=l&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Fe.prototype.file="";Fe.prototype.name="";Fe.prototype.reason="";Fe.prototype.message="";Fe.prototype.stack="";Fe.prototype.column=void 0;Fe.prototype.line=void 0;Fe.prototype.ancestors=void 0;Fe.prototype.cause=void 0;Fe.prototype.fatal=void 0;Fe.prototype.place=void 0;Fe.prototype.ruleId=void 0;Fe.prototype.source=void 0;const Gc={}.hasOwnProperty,kk=new Map,bk=/[A-Z]/g,Sk=new Set(["table","tbody","thead","tfoot","tr"]),Nk=new Set(["td","th"]),Ug="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ck(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=Ak(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=_k(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:Hw,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Vg(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Vg(e,t,n){if(t.type==="element")return jk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ek(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ik(e,t,n);if(t.type==="mdxjsEsm")return Tk(e,t);if(t.type==="root")return Lk(e,t,n);if(t.type==="text")return Pk(e,t)}function jk(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 s=Kg(e,t.tagName,!1),l=Ok(e,t);let o=Zc(e,t);return Sk.has(t.tagName)&&(o=o.filter(function(a){return typeof a=="string"?!Ow(a):!0})),Hg(e,l,s,t),Xc(l,o),e.ancestors.pop(),e.schema=r,e.create(t,s,l,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)}fs(e,t.position)}function Tk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);fs(e,t.position)}function Ik(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 s=t.name===null?e.Fragment:Kg(e,t.name,!0),l=Rk(e,t),o=Zc(e,t);return Hg(e,l,s,t),Xc(l,o),e.ancestors.pop(),e.schema=r,e.create(t,s,l,n)}function Lk(e,t,n){const r={};return Xc(r,Zc(e,t)),e.create(t,e.Fragment,r,n)}function Pk(e,t){return t.value}function Hg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function _k(e,t,n){return r;function r(i,s,l,o){const u=Array.isArray(l.children)?n:t;return o?u(s,l,o):u(s,l)}}function Ak(e,t){return n;function n(r,i,s,l){const o=Array.isArray(s.children),a=Jc(r);return t(i,s,l,o,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function Ok(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Gc.call(t.properties,i)){const s=Dk(e,i,t.properties[i]);if(s){const[l,o]=s;e.tableCellAlignToStyle&&l==="align"&&typeof o=="string"&&Nk.has(t.tagName)?r=o:n[l]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Rk(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const l=s.expression;l.type;const o=l.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else fs(e,t.position);else{const i=r.name;let s;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,s=e.evaluater.evaluateExpression(o.expression)}else fs(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Zc(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:kk;for(;++r<t.children.length;){const s=t.children[r];let l;if(e.passKeys){const a=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(a){const u=i.get(a)||0;l=a+"-"+u,i.set(a,u+1)}}const o=Vg(e,s,l);o!==void 0&&n.push(o)}return n}function Dk(e,t,n){const r=Bw(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Iw(n):Kw(n)),r.property==="style"){let i=typeof n=="object"?n:Mk(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Fk(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Fw[r.property]||r.property:r.attribute,n]}}function Mk(e,t){try{return vk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Fe("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=Ug+"#cannot-parse-style-attribute",i}}function Kg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,l;for(;++s<i.length;){const o=Zd(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};l=l?{type:"MemberExpression",object:l,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=l}else r=Zd(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Gc.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);fs(e)}function fs(e,t){const n=new Fe("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=Ug+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Fk(e){const t={};let n;for(n in e)Gc.call(e,n)&&(t[zk(n)]=e[n]);return t}function zk(e){let t=e.replace(bk,$k);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function $k(e){return"-"+e.toLowerCase()}const pa={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"]},Bk={};function ef(e,t){const n=Bk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Wg(e,r,i)}function Wg(e,t,n){if(Uk(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 ch(e.children,t,n)}return Array.isArray(e)?ch(e,t,n):""}function ch(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Wg(e[i],t,n);return r.join("")}function Uk(e){return!!(e&&typeof e=="object")}const fh=document.createElement("i");function tf(e){const t="&"+e+";";fh.innerHTML=t;const n=fh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function st(e,t,n,r){const i=e.length;let s=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);s<r.length;)l=r.slice(s,s+1e4),l.unshift(t,0),e.splice(...l),s+=1e4,t+=1e4}function ft(e,t){return e.length>0?(st(e,e.length,0,t),e):t}const dh={}.hasOwnProperty;function qg(e){const t={};let n=-1;for(;++n<e.length;)Vk(t,e[n]);return t}function Vk(e,t){let n;for(n in t){const i=(dh.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let l;if(s)for(l in s){dh.call(i,l)||(i[l]=[]);const o=s[l];Hk(i[l],Array.isArray(o)?o:o?[o]:[])}}}function Hk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);st(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 Et(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Be=On(/[A-Za-z]/),Re=On(/[\dA-Za-z]/),Kk=On(/[#-'*+\--9=?A-Z^-~]/);function Ql(e){return e!==null&&(e<32||e===127)}const Du=On(/\d/),Wk=On(/[\dA-Fa-f]/),qk=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 ko=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 li(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let l="";if(s===37&&Re(e.charCodeAt(n+1))&&Re(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(l=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(l=String.fromCharCode(s,o),i=1):l="�"}else l=String.fromCharCode(s);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function X(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return l;function l(a){return Q(a)?(e.enter(n),o(a)):t(a)}function o(a){return Q(a)&&s++<i?(e.consume(a),o):(e.exit(n),t(a))}}const Qk={tokenize:Yk};function Yk(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"),X(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,l(o)}function l(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return B(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),l)}}const Jk={tokenize:Gk},hh={tokenize:Xk};function Gk(e){const t=this,n=[];let r=0,i,s,l;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&&g();const C=t.events.length;let j=C,b;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){b=t.events[j][1].end;break}m(r);let I=C;for(;I<t.events.length;)t.events[I][1].end={...b},I++;return st(t.events,j+1,0,t.events.slice(C)),t.events.length=I,u(v)}return o(v)}function u(v){if(r===n.length){if(!i)return p(v);if(i.currentConstruct&&i.currentConstruct.concrete)return x(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(hh,f,c)(v)}function f(v){return i&&g(),m(r),p(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,x(v)}function p(v){return t.containerState={},e.attempt(hh,h,x)(v)}function h(v){return r++,n.push([t.currentConstruct,t.containerState]),p(v)}function x(v){if(v===null){i&&g(),m(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),y(v)}function y(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),y)}function w(v,C){const j=t.sliceStream(v);if(C&&j.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(j),t.parser.lazy[v.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const I=t.events.length;let P=I,L,S;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(L){S=t.events[P][1].end;break}L=!0}for(m(r),b=I;b<t.events.length;)t.events[b][1].end={...S},b++;st(t.events,P+1,0,t.events.slice(I)),t.events.length=b}}function m(v){let C=n.length;for(;C-- >v;){const j=n[C];t.containerState=j[1],j[0].exit.call(t,e)}n.length=v}function g(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Xk(e,t,n){return X(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(ko(e))return 2}function bo(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Mu={name:"attention",resolveAll:Zk,tokenize:eb};function Zk(e,t){let n=-1,r,i,s,l,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};ph(c,-a),ph(p,a),l={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},s={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...l.start},end:{...o.end}},e[r][1].end={...l.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",l,t],["exit",l,t],["enter",s,t]]),u=ft(u,bo(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=ft(u,[["exit",s,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,st(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 eb(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Xr(r);let s;return l;function l(a){return s=a,e.enter("attentionSequence"),o(a)}function o(a){if(a===s)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=!!(s===42?c:c&&(i||!p)),u._close=!!(s===42?p:p&&(f||!c)),t(a)}}function ph(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const tb={name:"autolink",tokenize:nb};function nb(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"),s}function s(h){return Be(h)?(e.consume(h),l):h===64?n(h):u(h)}function l(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||Ql(h)?n(h):(e.consume(h),a)}function u(h){return h===64?(e.consume(h),f):Kk(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 x=h===45?p:c;return e.consume(h),x}return n(h)}}const Ns={partial:!0,tokenize:rb};function rb(e,t,n){return r;function r(s){return Q(s)?X(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||B(s)?t(s):n(s)}}const Yg={continuation:{tokenize:sb},exit:lb,name:"blockQuote",tokenize:ib};function ib(e,t,n){const r=this;return i;function i(l){if(l===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),s}return n(l)}function s(l){return Q(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function sb(e,t,n){const r=this;return i;function i(l){return Q(l)?X(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):s(l)}function s(l){return e.attempt(Yg,t,n)(l)}}function lb(e){e.exit("blockQuote")}const Jg={name:"characterEscape",tokenize:ob};function ob(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return qk(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Gg={name:"characterReference",tokenize:ab};function ab(e,t,n){const r=this;let i=0,s,l;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"),s=31,l=Re,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,l=Wk,f):(e.enter("characterReferenceValue"),s=7,l=Du,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===Re&&!tf(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<s?(e.consume(c),f):n(c)}}const mh={partial:!0,tokenize:cb},gh={concrete:!0,name:"codeFenced",tokenize:ub};function ub(e,t,n){const r=this,i={partial:!0,tokenize:j};let s=0,l=0,o;return a;function a(b){return u(b)}function u(b){const I=r.events[r.events.length-1];return s=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,o=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===o?(l++,e.consume(b),f):l<3?n(b):(e.exit("codeFencedFenceSequence"),Q(b)?X(e,c,"whitespace")(b):c(b))}function c(b){return b===null||B(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(mh,y,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"),X(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"}),x(b))}function x(b){return b===null||B(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(b)):b===96&&b===o?n(b):(e.consume(b),x)}function y(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 s>0&&Q(b)?X(e,g,"linePrefix",s+1)(b):g(b)}function g(b){return b===null||B(b)?e.check(mh,y,C)(b):(e.enter("codeFlowValue"),v(b))}function v(b){return b===null||B(b)?(e.exit("codeFlowValue"),g(b)):(e.consume(b),v)}function C(b){return e.exit("codeFenced"),t(b)}function j(b,I,P){let L=0;return S;function S(K){return b.enter("lineEnding"),b.consume(K),b.exit("lineEnding"),E}function E(K){return b.enter("codeFencedFence"),Q(K)?X(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?(L++,b.consume(K),D):L>=l?(b.exit("codeFencedFenceSequence"),Q(K)?X(b,U,"whitespace")(K):U(K)):P(K)}function U(K){return K===null||B(K)?(b.exit("codeFencedFence"),I(K)):P(K)}}}function cb(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s)}function s(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const ma={name:"codeIndented",tokenize:db},fb={partial:!0,tokenize:hb};function db(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),X(e,s,"linePrefix",5)(u)}function s(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?a(u):B(u)?e.attempt(fb,l,a)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||B(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),o)}function a(u){return e.exit("codeIndented"),t(u)}}function hb(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):B(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):X(e,s,"linePrefix",5)(l)}function s(l){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(l):B(l)?i(l):n(l)}}const pb={name:"codeText",previous:gb,resolve:mb,tokenize:yb};function mb(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 gb(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function yb(e,t,n){let r=0,i,s;return l;function l(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?(s=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)):(s.type="codeTextData",u(c))}}class xb{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 s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Si(this.left,r),s.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 Xg(e){const t={};let n=-1,r,i,s,l,o,a,u;const f=new xb(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,s=0,s<a.length&&a[s][1].type==="lineEndingBlank"&&(s+=2),s<a.length&&a[s][1].type==="content"))for(;++s<a.length&&a[s][1].type!=="content";)a[s][1].type==="chunkText"&&(a[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,vb(f,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(l=f.get(s),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=s);else if(!(l[1].type==="linePrefix"||l[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 st(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function vb(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const o=l.events,a=[],u={};let f,c,p=-1,h=n,x=0,y=0;const w=[y];for(;h;){for(;e.get(++i)[1]!==h;);s.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._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&&(y=p+1,w.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.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]),g=s.pop();a.push([g,g+m.length-1]),e.splice(g,2,m)}for(a.reverse(),p=-1;++p<a.length;)u[x+a[p][0]]=x+a[p][1],x+=a[p][1]-a[p][0]-1;return u}const wb={resolve:bb,tokenize:Sb},kb={partial:!0,tokenize:Nb};function bb(e){return Xg(e),e}function Sb(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?s(o):B(o)?e.check(kb,l,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function l(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Nb(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),X(e,s,"linePrefix")}function s(l){if(l===null||B(l))return n(l);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(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Zg(e,t,n,r,i,s,l,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(s),e.consume(m),e.exit(s),p):m===null||m===32||m===41||Ql(m)?n(m):(e.enter(r),e.enter(l),e.enter(o),e.enter("chunkString",{contentType:"string"}),y(m))}function p(m){return m===62?(e.enter(s),e.consume(m),e.exit(s),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?x:h)}function x(m){return m===60||m===62||m===92?(e.consume(m),h):h(m)}function y(m){return!f&&(m===null||m===41||re(m))?(e.exit("chunkString"),e.exit(o),e.exit(l),e.exit(r),t(m)):f<u&&m===40?(e.consume(m),f++,y):m===41?(e.consume(m),f--,y):m===null||m===32||m===40||Ql(m)?n(m):(e.consume(m),m===92?w:y)}function w(m){return m===40||m===41||m===92?(e.consume(m),y):y(m)}}function ey(e,t,n,r,i,s){const l=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(s),f}function f(h){return o>999||h===null||h===91||h===93&&!a||h===94&&!o&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(s),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 ty(e,t,n,r,i,s){let l;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,a):n(p)}function a(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(s),u(p))}function u(p){return p===l?(e.exit(s),a(l)):p===null?n(p):B(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),X(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||B(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||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)?X(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Cb={name:"definition",tokenize:Eb},jb={partial:!0,tokenize:Tb};function Eb(e,t,n){const r=this;let i;return s;function s(h){return e.enter("definition"),l(h)}function l(h){return ey.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=Et(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 Zg(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(jb,c,c)(h)}function c(h){return Q(h)?X(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 Tb(e,t,n){return r;function r(o){return re(o)?Vi(e,i)(o):n(o)}function i(o){return ty(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return Q(o)?X(e,l,"whitespace")(o):l(o)}function l(o){return o===null||B(o)?t(o):n(o)}}const Ib={name:"hardBreakEscape",tokenize:Lb};function Lb(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return B(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Pb={name:"headingAtx",resolve:_b,tokenize:Ab};function _b(e,t){let n=e.length-2,r=3,i,s;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},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},st(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function Ab(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),s(f)}function s(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):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)?X(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 Ob=["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"],yh=["pre","script","style","textarea"],Rb={concrete:!0,name:"htmlFlow",resolveTo:Fb,tokenize:zb},Db={partial:!0,tokenize:Bb},Mb={partial:!0,tokenize:$b};function Fb(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,s,l,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),s=!0,y):N===63?(e.consume(N),i=3,r.interrupt?t:k):Be(N)?(e.consume(N),l=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,x):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 x(N){const Ne="CDATA[";return N===Ne.charCodeAt(o++)?(e.consume(N),o===Ne.length?r.interrupt?t:A:x):n(N)}function y(N){return Be(N)?(e.consume(N),l=String.fromCharCode(N),w):n(N)}function w(N){if(N===null||N===47||N===62||re(N)){const Ne=N===47,xt=l.toLowerCase();return!Ne&&!s&&yh.includes(xt)?(i=1,r.interrupt?t(N):A(N)):Ob.includes(l.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):s?g(N):v(N))}return N===45||Re(N)?(e.consume(N),l+=String.fromCharCode(N),w):n(N)}function m(N){return N===62?(e.consume(N),r.interrupt?t:A):n(N)}function g(N){return Q(N)?(e.consume(N),g):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):j(N)}function j(N){return N===61?(e.consume(N),b):Q(N)?(e.consume(N),j):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,I):Q(N)?(e.consume(N),b):P(N)}function I(N){return N===a?(e.consume(N),a=null,L):N===null||B(N)?n(N):(e.consume(N),I)}function P(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||re(N)?j(N):(e.consume(N),P)}function L(N){return N===47||N===62||Q(N)?v(N):n(N)}function S(N){return N===62?(e.consume(N),E):n(N)}function E(N){return N===null||B(N)?A(N):Q(N)?(e.consume(N),E):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),J):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(Db,te,D)(N)):N===null||B(N)?(e.exit("htmlFlowData"),D(N)):(e.consume(N),A)}function D(N){return e.check(Mb,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),l="",F):A(N)}function F(N){if(N===62){const Ne=l.toLowerCase();return yh.includes(Ne)?(e.consume(N),J):A(N)}return Be(N)&&l.length<8?(e.consume(N),l+=String.fromCharCode(N),F):A(N)}function $(N){return N===93?(e.consume(N),k):A(N)}function k(N){return N===62?(e.consume(N),J):N===45&&i===2?(e.consume(N),k):A(N)}function J(N){return N===null||B(N)?(e.exit("htmlFlowData"),te(N)):(e.consume(N),J)}function te(N){return e.exit("htmlFlow"),t(N)}}function $b(e,t,n){const r=this;return i;function i(l){return B(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):n(l)}function s(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Bb(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ns,t,n)}}const Ub={name:"htmlText",tokenize:Vb};function Vb(e,t,n){const r=this;let i,s,l;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),j):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),s=0,x):Be(k)?(e.consume(k),g):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)?(l=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 x(k){const J="CDATA[";return k===J.charCodeAt(s++)?(e.consume(k),s===J.length?y:x):n(k)}function y(k){return k===null?n(k):k===93?(e.consume(k),w):B(k)?(l=y,de(k)):(e.consume(k),y)}function w(k){return k===93?(e.consume(k),m):y(k)}function m(k){return k===62?xe(k):k===93?(e.consume(k),m):y(k)}function g(k){return k===null||k===62?xe(k):B(k)?(l=g,de(k)):(e.consume(k),g)}function v(k){return k===null?n(k):k===63?(e.consume(k),C):B(k)?(l=v,de(k)):(e.consume(k),v)}function C(k){return k===62?xe(k):v(k)}function j(k){return Be(k)?(e.consume(k),b):n(k)}function b(k){return k===45||Re(k)?(e.consume(k),b):I(k)}function I(k){return B(k)?(l=I,de(k)):Q(k)?(e.consume(k),I):xe(k)}function P(k){return k===45||Re(k)?(e.consume(k),P):k===47||k===62||re(k)?L(k):n(k)}function L(k){return k===47?(e.consume(k),xe):k===58||k===95||Be(k)?(e.consume(k),S):B(k)?(l=L,de(k)):Q(k)?(e.consume(k),L):xe(k)}function S(k){return k===45||k===46||k===58||k===95||Re(k)?(e.consume(k),S):E(k)}function E(k){return k===61?(e.consume(k),A):B(k)?(l=E,de(k)):Q(k)?(e.consume(k),E):L(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)?(l=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)?(l=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)?L(k):(e.consume(k),U)}function K(k){return k===47||k===62||re(k)?L(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"),F}function F(k){return Q(k)?X(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):$(k)}function $(k){return e.enter("htmlTextData"),l(k)}}const nf={name:"labelEnd",resolveAll:qb,resolveTo:Qb,tokenize:Yb},Hb={tokenize:Jb},Kb={tokenize:Gb},Wb={tokenize:Xb};function qb(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&&st(e,0,e.length,n),e}function Qb(e,t){let n=e.length,r=0,i,s,l,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const a={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[l-2][1].start}};return o=[["enter",a,t],["enter",u,t]],o=ft(o,e.slice(s+1,s+r+3)),o=ft(o,[["enter",f,t]]),o=ft(o,bo(t.parser.constructs.insideSpan.null,e.slice(s+r+4,l-3),t)),o=ft(o,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),o=ft(o,e.slice(l+1)),o=ft(o,[["exit",a,t]]),st(e,s,e.length,o),e}function Yb(e,t,n){const r=this;let i=r.events.length,s,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(p){return s?s._inactive?c(p):(l=r.parser.defined.includes(Et(r.sliceSerialize({start:s.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(Hb,f,l?f:c)(p):p===91?e.attempt(Kb,f,l?u:c)(p):l?f(p):c(p)}function u(p){return e.attempt(Wb,f,c)(p)}function f(p){return t(p)}function c(p){return s._balanced=!0,n(p)}}function Jb(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,s)(c):s(c)}function s(c){return c===41?f(c):Zg(e,l,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(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?ty(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 Gb(e,t,n){const r=this;return i;function i(o){return ey.call(r,e,s,l,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(Et(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function l(o){return n(o)}}function Xb(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const Zb={name:"labelStartImage",resolveAll:nf.resolveAll,tokenize:eS};function eS(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),l):n(o)}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const tS={name:"labelStartLink",resolveAll:nf.resolveAll,tokenize:nS};function nS(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const ga={name:"lineEnding",tokenize:rS};function rS(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),X(e,t,"linePrefix")}}const gl={name:"thematicBreak",tokenize:iS};function iS(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),l(u)}function l(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)?X(e,o,"whitespace")(u):o(u))}}const Ke={continuation:{tokenize:aS},exit:cS,name:"list",tokenize:oS},sS={partial:!0,tokenize:fS},lS={partial:!0,tokenize:uS};function oS(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return o;function o(h){const x=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Du(h)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(gl,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 Du(h)&&++l<10?(e.consume(h),a):(!r.interrupt||l<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(Ns,r.interrupt?n:f,e.attempt(sS,p,c))}function f(h){return r.containerState.initialBlankLine=!0,s++,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=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function aS(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ns,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,X(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!Q(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(lS,t,l)(o))}function l(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,X(e,e.attempt(Ke,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function uS(e,t,n){const r=this;return X(e,i,"listItemIndent",r.containerState.size+1);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(s):n(s)}}function cS(e){e.exit(this.containerState.type)}function fS(e,t,n){const r=this;return X(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const l=r.events[r.events.length-1];return!Q(s)&&l&&l[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const xh={name:"setextUnderline",resolveTo:dS,tokenize:hS};function dS(e,t){let n=e.length,r,i,s;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),!s&&e[n][1].type==="definition"&&(s=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",l,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function hS(e,t,n){const r=this;let i;return s;function s(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,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),Q(u)?X(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||B(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const pS={tokenize:mS};function mS(e){const t=this,n=e.attempt(Ns,r,e.attempt(this.parser.constructs.flowInitial,i,X(e,e.attempt(this.parser.constructs.flow,i,e.attempt(wb,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const gS={resolveAll:ry()},yS=ny("string"),xS=ny("text");function ny(e){return{resolveAll:ry(e==="text"?vS:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,l,o);return l;function l(f){return u(f)?s(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"),s(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 ry(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function vS(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 s=i.length,l=-1,o=0,a;for(;s--;){const u=i[s];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)o++,l--;if(l)break;l=-1}else if(u===-2)a=!0,o++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const u={type:n===e.length||a||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:r.start._bufferIndex+l,_index:r.start._index+s,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 wS={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:Yg},kS={91:Cb},bS={[-2]:ma,[-1]:ma,32:ma},SS={35:Pb,42:gl,45:[xh,gl],60:Rb,61:xh,95:gl,96:gh,126:gh},NS={38:Gg,92:Jg},CS={[-5]:ga,[-4]:ga,[-3]:ga,33:Zb,38:Gg,42:Mu,60:[tb,Ub],91:tS,92:[Ib,Jg],93:nf,95:Mu,96:pb},jS={null:[Mu,gS]},ES={null:[42,95]},TS={null:[]},IS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ES,contentInitial:kS,disable:TS,document:wS,flow:SS,flowInitial:bS,insideSpan:jS,string:NS,text:CS},Symbol.toStringTag,{value:"Module"}));function LS(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={},s=[];let l=[],o=[];const a={attempt:I(j),check:I(b),consume:g,enter:v,exit:C,interrupt:I(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:x,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=t.tokenize.call(u,a);return t.resolveAll&&s.push(t),u;function c(E){return l=ft(l,E),w(),l[l.length-1]!==null?[]:(P(t,0),u.events=bo(s,u.events,u),u.events)}function p(E,A){return _S(h(E),A)}function h(E){return PS(l,E)}function x(){const{_bufferIndex:E,_index:A,line:D,column:U,offset:K}=r;return{_bufferIndex:E,_index:A,line:D,column:U,offset:K}}function y(E){i[E.line]=E.column,S()}function w(){let E;for(;r._index<l.length;){const A=l[r._index];if(typeof A=="string")for(E=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===E&&r._bufferIndex<A.length;)m(A.charCodeAt(r._bufferIndex));else m(A)}}function m(E){f=f(E)}function g(E){B(E)?(r.line++,r.column=1,r.offset+=E===-3?2:1,S()):E!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=E}function v(E,A){const D=A||{};return D.type=E,D.start=x(),u.events.push(["enter",D,u]),o.push(D),D}function C(E){const A=o.pop();return A.end=x(),u.events.push(["exit",A,u]),A}function j(E,A){P(E,A.from)}function b(E,A){A.restore()}function I(E,A){return D;function D(U,K,xe){let de,F,$,k;return Array.isArray(U)?te(U):"tokenize"in U?te([U]):J(U);function J(oe){return Lt;function Lt(ln){const cr=ln!==null&&oe[ln],fr=ln!==null&&oe.null,Is=[...Array.isArray(cr)?cr:cr?[cr]:[],...Array.isArray(fr)?fr:fr?[fr]:[]];return te(Is)(ln)}}function te(oe){return de=oe,F=0,oe.length===0?xe:N(oe[F])}function N(oe){return Lt;function Lt(ln){return k=L(),$=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)(ln)}}function Ne(oe){return E($,k),K}function xt(oe){return k.restore(),++F<de.length?N(de[F]):xe}}}function P(E,A){E.resolveAll&&!s.includes(E)&&s.push(E),E.resolve&&st(u.events,A,u.events.length-A,E.resolve(u.events.slice(A),u)),E.resolveTo&&(u.events=E.resolveTo(u.events,u))}function L(){const E=x(),A=u.previous,D=u.currentConstruct,U=u.events.length,K=Array.from(o);return{from:U,restore:xe};function xe(){r=E,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 PS(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,s)];else{if(l=e.slice(n,i),r>-1){const o=l[0];typeof o=="string"?l[0]=o.slice(r):l.shift()}s>0&&l.push(e[i].slice(0,s))}return l}function _S(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let l;if(typeof s=="string")l=s;else switch(s){case-5:{l="\r";break}case-4:{l=`
73
+ `;break}case-3:{l=`\r
74
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(s)}i=s===-2,r.push(l)}return r.join("")}function AS(e){const r={constructs:qg([IS,...(e||{}).extensions||[]]),content:i(Qk),defined:[],document:i(Jk),flow:i(pS),lazy:{},string:i(yS),text:i(xS)};return r;function i(s){return l;function l(o){return LS(r,s,o)}}}function OS(e){for(;!Xg(e););return e}const vh=/[\0\t\n\r]/g;function RS(){let e=1,t="",n=!0,r;return i;function i(s,l,o){const a=[];let u,f,c,p,h;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(l||void 0).decode(s)),c=0,t="",n&&(s.charCodeAt(0)===65279&&c++,n=void 0);c<s.length;){if(vh.lastIndex=c,u=vh.exec(s),p=u&&u.index!==void 0?u.index:s.length,h=s.charCodeAt(p),!u){t=s.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(s.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 DS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function MS(e){return e.replace(DS,FS)}function FS(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Qg(n.slice(s?2:1),s?16:10)}return tf(n)||e}const iy={}.hasOwnProperty;function zS(e,t,n){return typeof t!="string"&&(n=t,t=void 0),$S(n)(OS(AS(n).document().write(RS()(e,t,!0))))}function $S(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Pf),autolinkProtocol:L,autolinkEmail:L,atxHeading:s(Tf),blockQuote:s(fr),characterEscape:L,characterReference:L,codeFenced:s(Is),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(Is,l),codeText:s(_0,l),codeTextData:L,data:L,codeFlowValue:L,definition:s(A0),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(O0),hardBreakEscape:s(If),hardBreakTrailing:s(If),htmlFlow:s(Lf,l),htmlFlowData:L,htmlText:s(Lf,l),htmlTextData:L,image:s(R0),label:l,link:s(Pf),listItem:s(D0),listItemValue:p,listOrdered:s(_f,c),listUnordered:s(_f),paragraph:s(M0),reference:N,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(Tf),strong:s(F0),thematicBreak:s($0)},exit:{atxHeading:a(),atxHeadingSequence:j,autolink:a(),autolinkEmail:cr,autolinkProtocol:ln,blockQuote:a(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:xt,characterReferenceMarkerNumeric:xt,characterReferenceValue:oe,characterReference:Lt,codeFenced:a(w),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:x,codeFlowValue:S,codeIndented:a(m),codeText:a(K),codeTextData:S,data:S,definition:a(),definitionDestinationString:C,definitionLabelString:g,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:F,lineEnding:E,link:a(xe),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:Ne,resourceDestinationString:k,resourceTitleString:J,resource:te,setextHeading:a(P),setextHeadingLineSequence:I,setextHeadingText:b,strong:a(),thematicBreak:a()}};sy(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:l,resume:f,data:n},G=[];let ne=-1;for(;++ne<_.length;)if(_[ne][1].type==="listOrdered"||_[ne][1].type==="listUnordered")if(_[ne][0]==="enter")G.push(ne);else{const vt=G.pop();ne=i(_,vt,ne)}for(ne=-1;++ne<_.length;){const vt=t[_[ne][0]];iy.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]||wh).call(H,void 0,vt[0])}for(M.position={start:an(_.length>0?_[0][1].start:{line:1,column:1,offset:0}),end:an(_.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 G=M-1,ne=-1,vt=!1,Dn,$t,hi,pi;for(;++G<=H;){const Ze=_[G];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=G),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=G;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||G,0,["exit",Dn,Ze[2]]),G++,H++}if(Ze[1].type==="listItemPrefix"){const dr={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Dn=dr,_.splice(G,0,["enter",dr,Ze[2]]),G++,H++,hi=void 0,pi=!0}}}return _[M][1]._spread=vt,H}function s(_,M){return H;function H(G){o.call(this,_(G),G),M&&M.call(this,G)}}function l(){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:an(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(),G=this.tokenStack.pop();if(G)G[0].type!==_.type&&(M?M.call(this,_,G[0]):(G[1]||wh).call(this,_,G[0]));else throw new Error("Cannot close `"+_.type+"` ("+Ui({start:_.start,end:_.end})+"): it’s not open");H.position.end=an(_.end)}function f(){return ef(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 x(){const _=this.resume(),M=this.stack[this.stack.length-1];M.meta=_}function y(){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 g(_){const M=this.resume(),H=this.stack[this.stack.length-1];H.label=M,H.identifier=Et(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 j(_){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 I(_){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 L(_){const H=this.stack[this.stack.length-1].children;let G=H[H.length-1];(!G||G.type!=="text")&&(G=z0(),G.position={start:an(_.start),end:void 0},H.push(G)),this.stack.push(G)}function S(_){const M=this.stack.pop();M.value+=this.sliceSerialize(_),M.position.end=an(_.end)}function E(_){const M=this.stack[this.stack.length-1];if(this.data.atHardBreak){const H=M.children[M.children.length-1];H.position.end=an(_.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(M.type)&&(L.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 F(_){const M=this.sliceSerialize(_),H=this.stack[this.stack.length-2];H.label=MS(M),H.identifier=Et(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 G=_.children;H.children=G}else H.alt=M}function k(){const _=this.resume(),M=this.stack[this.stack.length-1];M.url=_}function J(){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=Et(this.sliceSerialize(_)).toLowerCase(),this.data.referenceType="full"}function xt(_){this.data.characterReferenceType=_.type}function oe(_){const M=this.sliceSerialize(_),H=this.data.characterReferenceType;let G;H?(G=Qg(M,H==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):G=tf(M);const ne=this.stack[this.stack.length-1];ne.value+=G}function Lt(_){const M=this.stack.pop();M.position.end=an(_.end)}function ln(_){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 Is(){return{type:"code",lang:null,meta:null,value:""}}function _0(){return{type:"inlineCode",value:""}}function A0(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function O0(){return{type:"emphasis",children:[]}}function Tf(){return{type:"heading",depth:0,children:[]}}function If(){return{type:"break"}}function Lf(){return{type:"html",value:""}}function R0(){return{type:"image",title:null,url:"",alt:null}}function Pf(){return{type:"link",title:null,url:"",children:[]}}function _f(_){return{type:"list",ordered:_.type==="listOrdered",start:null,spread:_._spread,children:[]}}function D0(_){return{type:"listItem",spread:_._spread,checked:null,children:[]}}function M0(){return{type:"paragraph",children:[]}}function F0(){return{type:"strong",children:[]}}function z0(){return{type:"text",value:""}}function $0(){return{type:"thematicBreak"}}}function an(e){return{line:e.line,column:e.column,offset:e.offset}}function sy(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?sy(e,r):BS(e,r)}}function BS(e,t){let n;for(n in t)if(iy.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 wh(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 US(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 VS(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 HS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
75
+ `}]}function KS(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 s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function WS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qS(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=li(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let l,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=s+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(l)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function YS(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 JS(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),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function GS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ly(e,t);const i={src:li(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function XS(e,t){const n={src:li(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 ZS(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 eN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ly(e,t);const i={href:li(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function tN(e,t){const n={href:li(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 nN(e,t,n){const r=e.all(t),i=n?rN(n):oy(t),s={},l=[];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:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const f=r[o];(i||o!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
77
+ `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&l.push({type:"text",value:`
78
+ `});const u={type:"element",tagName:"li",properties:s,children:l};return e.patch(t,u),e.applyData(t,u)}function rN(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=oy(n[r])}return t}function oy(e){const t=e.spread;return t??e.children.length>1}function iN(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 l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function sN(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 oN(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aN(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Jc(t.children[1]),a=$g(t.children[t.children.length-1]);o&&a&&(l.position={start:o,end:a}),i.push(l)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function uN(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,o=l?l.length:t.children.length;let a=-1;const u=[];for(;++a<o;){const c=t.children[a],p={},h=l?l[a]:void 0;h&&(p.align=h);let x={type:"element",tagName:s,properties:p,children:[]};c&&(x.children=e.all(c),e.patch(c,x),x=e.applyData(c,x)),u.push(x)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function cN(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const kh=9,bh=32;function fN(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Sh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Sh(t.slice(i),i>0,!1)),s.join("")}function Sh(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===kh||s===bh;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===kh||s===bh;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function dN(e,t){const n={type:"text",value:fN(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function hN(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const pN={blockquote:VS,break:HS,code:KS,delete:WS,emphasis:qS,footnoteReference:QS,heading:YS,html:JS,imageReference:GS,image:XS,inlineCode:ZS,linkReference:eN,link:tN,listItem:nN,list:iN,paragraph:sN,root:lN,strong:oN,table:aN,tableCell:cN,tableRow:uN,text:dN,thematicBreak:hN,toml:Ys,yaml:Ys,definition:Ys,footnoteDefinition:Ys};function Ys(){}const ay=-1,So=0,Hi=1,Yl=2,rf=3,sf=4,lf=5,of=6,uy=7,cy=8,Nh=typeof self=="object"?self:globalThis,mN=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,l]=t[i];switch(s){case So:case ay:return n(l,i);case Hi:{const o=n([],i);for(const a of l)o.push(r(a));return o}case Yl:{const o=n({},i);for(const[a,u]of l)o[r(a)]=r(u);return o}case rf:return n(new Date(l),i);case sf:{const{source:o,flags:a}=l;return n(new RegExp(o,a),i)}case lf:{const o=n(new Map,i);for(const[a,u]of l)o.set(r(a),r(u));return o}case of:{const o=n(new Set,i);for(const a of l)o.add(r(a));return o}case uy:{const{name:o,message:a}=l;return n(new Nh[o](a),i)}case cy:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:o}=new Uint8Array(l);return n(new DataView(o),l)}}return n(new Nh[s](l),i)};return r},Ch=e=>mN(new Map,e)(0),pr="",{toString:gN}={},{keys:yN}=Object,Ni=e=>{const t=typeof e;if(t!=="object"||!e)return[So,t];const n=gN.call(e).slice(8,-1);switch(n){case"Array":return[Hi,pr];case"Object":return[Yl,pr];case"Date":return[rf,pr];case"RegExp":return[sf,pr];case"Map":return[lf,pr];case"Set":return[of,pr];case"DataView":return[Hi,n]}return n.includes("Array")?[Hi,n]:n.includes("Error")?[uy,n]:[Yl,n]},Js=([e,t])=>e===So&&(t==="function"||t==="symbol"),xN=(e,t,n,r)=>{const i=(l,o)=>{const a=r.push(l)-1;return n.set(o,a),a},s=l=>{if(n.has(l))return n.get(l);let[o,a]=Ni(l);switch(o){case So:{let f=l;switch(a){case"bigint":o=cy,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);f=null;break;case"undefined":return i([ay],l)}return i([o,f],l)}case Hi:{if(a){let p=l;return a==="DataView"?p=new Uint8Array(l.buffer):a==="ArrayBuffer"&&(p=new Uint8Array(l)),i([a,[...p]],l)}const f=[],c=i([o,f],l);for(const p of l)f.push(s(p));return c}case Yl:{if(a)switch(a){case"BigInt":return i([a,l.toString()],l);case"Boolean":case"Number":case"String":return i([a,l.valueOf()],l)}if(t&&"toJSON"in l)return s(l.toJSON());const f=[],c=i([o,f],l);for(const p of yN(l))(e||!Js(Ni(l[p])))&&f.push([s(p),s(l[p])]);return c}case rf:return i([o,l.toISOString()],l);case sf:{const{source:f,flags:c}=l;return i([o,{source:f,flags:c}],l)}case lf:{const f=[],c=i([o,f],l);for(const[p,h]of l)(e||!(Js(Ni(p))||Js(Ni(h))))&&f.push([s(p),s(h)]);return c}case of:{const f=[],c=i([o,f],l);for(const p of l)(e||!Js(Ni(p)))&&f.push(s(p));return c}}const{message:u}=l;return i([o,{name:a,message:u}],l)};return s},jh=(e,{json:t,lossy:n}={})=>{const r=[];return xN(!(t||n),!!t,new Map,r)(e),r},Jl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ch(jh(e,t)):structuredClone(e):(e,t)=>Ch(jh(e,t));function vN(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 wN(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function kN(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||vN,r=e.options.footnoteBackLabel||wN,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",l=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=li(c.toLowerCase());let h=0;const x=[],y=e.footnoteCounts.get(c);for(;y!==void 0&&++h<=y;){x.length>0&&x.push({type:"text",value:" "});let g=typeof n=="string"?n:n(a,h);typeof g=="string"&&(g={type:"text",value:g}),x.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(g)?g:[g]})}const w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const g=w.children[w.children.length-1];g&&g.type==="text"?g.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...x)}else f.push(...x);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:s,properties:{...Jl(l),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 No=function(e){if(e==null)return CN;if(typeof e=="function")return Co(e);if(typeof e=="object")return Array.isArray(e)?bN(e):SN(e);if(typeof e=="string")return NN(e);throw new Error("Expected function, string, or object as test")};function bN(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=No(e[n]);return Co(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function SN(e){const t=e;return Co(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function NN(e){return Co(t);function t(n){return n&&n.type===e}}function Co(e){return t;function t(n,r,i){return!!(jN(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function CN(){return!0}function jN(e){return e!==null&&typeof e=="object"&&"type"in e}const fy=[],EN=!0,Fu=!1,TN="skip";function dy(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=No(i),l=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=fy,x,y,w;if((!t||s(a,u,f[f.length-1]||void 0))&&(h=IN(n(a,f)),h[0]===Fu))return h;if("children"in a&&a.children){const m=a;if(m.children&&h[0]!==TN)for(y=(r?m.children.length:-1)+l,w=f.concat(m);y>-1&&y<m.children.length;){const g=m.children[y];if(x=o(g,y,w)(),x[0]===Fu)return x;y=typeof x[1]=="number"?x[1]:y+l}}return h}}}function IN(e){return Array.isArray(e)?e:typeof e=="number"?[EN,e]:e==null?fy:[e]}function af(e,t,n,r){let i,s,l;typeof t=="function"&&typeof n!="function"?(s=void 0,l=t,i=n):(s=t,l=n,i=r),dy(e,s,o,i);function o(a,u){const f=u[u.length-1],c=f?f.children.indexOf(a):void 0;return l(a,c,f)}}const zu={}.hasOwnProperty,LN={};function PN(e,t){const n=t||LN,r=new Map,i=new Map,s=new Map,l={...pN,...n.handlers},o={all:u,applyData:AN,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:l,one:a,options:n,patch:_N,wrap:RN};return af(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:y,...w}=f,m=Jl(w);return m.children=o.all(f),m}return Jl(f)}return(o.options.unknownHandler||ON)(o,f,c)}function u(f){const c=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const x=o.one(p[h],f);if(x){if(h&&p[h-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=Eh(x.value)),!Array.isArray(x)&&x.type==="element")){const y=x.children[0];y&&y.type==="text"&&(y.value=Eh(y.value))}Array.isArray(x)?c.push(...x):c.push(x)}}}return c}}function _N(e,t){e.position&&(t.position=wk(e))}function AN(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&s&&Object.assign(n.properties,Jl(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function ON(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 RN(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 Th(e,t){const n=PN(e,t),r=n.one(e,void 0),i=kN(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
84
+ `},i),s}function DN(e,t){return e&&"run"in e?async function(n,r){const i=Th(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Th(n,{file:r,...e||t})}}function Ih(e){if(e)throw e}var yl=Object.prototype.hasOwnProperty,hy=Object.prototype.toString,Lh=Object.defineProperty,Ph=Object.getOwnPropertyDescriptor,_h=function(t){return typeof Array.isArray=="function"?Array.isArray(t):hy.call(t)==="[object Array]"},Ah=function(t){if(!t||hy.call(t)!=="[object Object]")return!1;var n=yl.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&yl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||yl.call(t,i)},Oh=function(t,n){Lh&&n.name==="__proto__"?Lh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Rh=function(t,n){if(n==="__proto__")if(yl.call(t,n)){if(Ph)return Ph(t,n).value}else return;return t[n]},MN=function e(){var t,n,r,i,s,l,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=Rh(o,n),i=Rh(t,n),o!==i&&(f&&i&&(Ah(i)||(s=_h(i)))?(s?(s=!1,l=r&&_h(r)?r:[]):l=r&&Ah(r)?r:{},Oh(o,{name:n,newValue:e(f,l,i)})):typeof i<"u"&&Oh(o,{name:n,newValue:i}));return o};const ya=Yu(MN);function $u(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 FN(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);o(null,...i);function o(a,...u){const f=e[++s];let c=-1;if(a){l(a);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?zN(f,o)(...u):l(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(...l){const o=e.length>l.length;let a;o&&l.push(i);try{a=e.apply(this,l)}catch(u){const f=u;if(o&&n)throw f;return i(f)}o||(a&&a.then&&typeof a.then=="function"?a.then(s,i):a instanceof Error?i(a):s(a))}function i(l,...o){n||(n=!0,t(l,...o))}function s(l){i(null,l)}}const At={basename:$N,dirname:BN,extname:UN,join:VN,sep:"/"};function $N(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Cs(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else l<0&&(s=!0,l=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function BN(e){if(Cs(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 UN(e){Cs(e);let t=e.length,n=-1,r=0,i=-1,s=0,l;for(;t--;){const o=e.codePointAt(t);if(o===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function VN(...e){let t=-1,n;for(;++t<e.length;)Cs(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":HN(n)}function HN(e){Cs(e);const t=e.codePointAt(0)===47;let n=KN(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function KN(e,t){let n="",r=0,i=-1,s=0,l=-1,o,a;for(;++l<=e.length;){if(l<e.length)o=e.codePointAt(l);else{if(o===47)break;o=47}if(o===47){if(!(i===l-1||s===1))if(i!==l-1&&s===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=l,s=0;continue}}else if(n.length>0){n="",r=0,i=l,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,s=0}else o===46&&s>-1?s++:s=-1}return n}function Cs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const WN={cwd:qN};function qN(){return"/"}function Bu(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(!Bu(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 YN(e)}function YN(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 xa=["history","path","basename","stem","extname","dirname"];class py{constructor(t){let n;t?Bu(t)?n={path:t}:typeof t=="string"||JN(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":WN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<xa.length;){const s=xa[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)xa.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?At.basename(this.path):void 0}set basename(t){wa(t,"basename"),va(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){Dh(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(va(t,"extname"),Dh(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){Bu(t)&&(t=QN(t)),wa(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){wa(t,"stem"),va(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 Fe(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 va(e,t){if(e&&e.includes(At.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+At.sep+"`")}function wa(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Dh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function JN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const GN=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},XN={}.hasOwnProperty;class uf extends GN{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=FN()}copy(){const t=new uf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ya(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Sa("data",this.frozen),this.namespace[t]=n,this):XN.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Sa("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=Gs(t),r=this.parser||this.Parser;return ka("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ka("process",this.parser||this.Parser),ba("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,l){const o=Gs(t),a=r.parse(o);r.run(a,o,function(f,c,p){if(f||!c||!p)return u(f);const h=c,x=r.stringify(h,p);t2(x)?p.value=x:p.result=x,u(f,p)});function u(f,c){f||!c?l(f):s?s(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),ka("processSync",this.parser||this.Parser),ba("processSync",this.compiler||this.Compiler),this.process(t,i),Fh("processSync","process",n),r;function i(s,l){n=!0,Ih(s),r=l}}run(t,n,r){Mh(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(l,o){const a=Gs(n);i.run(t,a,u);function u(f,c,p){const h=c||t;f?o(f):l?l(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Fh("runSync","run",r),i;function s(l,o){Ih(l),i=o,r=!0}}stringify(t,n){this.freeze();const r=Gs(n),i=this.compiler||this.Compiler;return ba("stringify",i),Mh(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Sa("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;a(f,c)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(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=ya(!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];s(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,...x]=f;const y=r[p][1];$u(y)&&$u(h)&&(h=ya(!0,y,h)),r[p]=[u,h,...x]}}}}const ZN=new uf().freeze();function ka(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ba(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Sa(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 Mh(e){if(!$u(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Fh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Gs(e){return e2(e)?e:new py(e)}function e2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function t2(e){return typeof e=="string"||n2(e)}function n2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const r2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zh=[],$h={allowDangerousHtml:!0},i2=/^(https?|ircs?|mailto|xmpp)$/i,s2=[{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=o2(e);return a2(t.runSync(t.parse(n),n),e)}function l2(e){const t=e.rehypePlugins||zh,n=e.remarkPlugins||zh,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$h}:$h;return ZN().use(US).use(n).use(DN,r).use(t)}function o2(e){const t=e.children||"",n=new py;return typeof t=="string"&&(n.value=t),n}function a2(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,l=t.skipHtml,o=t.unwrapDisallowed,a=t.urlTransform||u2;for(const f of s2)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+r2+f.id,void 0);return af(e,u),Ck(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 l?p.children.splice(c,1):p.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let h;for(h in pa)if(Object.hasOwn(pa,h)&&Object.hasOwn(f.properties,h)){const x=f.properties[h],y=pa[h];(y===null||y.includes(f.tagName))&&(f.properties[h]=a(String(x||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):s?s.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 u2(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||i2.test(e.slice(0,t))?e:""}function Bh(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 c2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function f2(e,t,n){const i=No((n||{}).ignore||[]),s=d2(t);let l=-1;for(;++l<s.length;)dy(e,"text",o);function o(u,f){let c=-1,p;for(;++c<f.length;){const h=f[c],x=p?p.children:void 0;if(i(h,x?x.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=s[l][0],h=s[l][1];let x=0;const w=c.children.indexOf(u);let m=!1,g=[];p.lastIndex=0;let v=p.exec(u.value);for(;v;){const C=v.index,j={index:v.index,input:v.input,stack:[...f,u]};let b=h(...v,j);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?p.lastIndex=C+1:(x!==C&&g.push({type:"text",value:u.value.slice(x,C)}),Array.isArray(b)?g.push(...b):b&&g.push(b),x=C+v[0].length,m=!0),!p.global)break;v=p.exec(u.value)}return m?(x<u.value.length&&g.push({type:"text",value:u.value.slice(x)}),c.children.splice(w,1,...g)):g=[u],w+g.length}}function d2(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([h2(i[0]),p2(i[1])])}return t}function h2(e){return typeof e=="string"?new RegExp(c2(e),"g"):e}function p2(e){return typeof e=="function"?e:function(){return e}}const Na="phrasing",Ca=["autolink","link","image","label"];function m2(){return{transforms:[b2],enter:{literalAutolink:y2,literalAutolinkEmail:ja,literalAutolinkHttp:ja,literalAutolinkWww:ja},exit:{literalAutolink:k2,literalAutolinkEmail:w2,literalAutolinkHttp:x2,literalAutolinkWww:v2}}}function g2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Na,notInConstruct:Ca},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Na,notInConstruct:Ca},{character:":",before:"[ps]",after:"\\/",inConstruct:Na,notInConstruct:Ca}]}}function y2(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ja(e){this.config.enter.autolinkProtocol.call(this,e)}function x2(e){this.config.exit.autolinkProtocol.call(this,e)}function v2(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 w2(e){this.config.exit.autolinkEmail.call(this,e)}function k2(e){this.exit(e)}function b2(e){f2(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,S2],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),N2]],{ignore:["link","linkReference"]})}function S2(e,t,n,r,i){let s="";if(!my(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!C2(n)))return!1;const l=j2(n+r);if(!l[0])return!1;const o={type:"link",title:null,url:s+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[o,{type:"text",value:l[1]}]:o}function N2(e,t,n,r){return!my(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function C2(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 j2(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=Bh(e,"(");let s=Bh(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function my(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||nr(n)||ko(n))&&(!t||n!==47)}gy.peek=R2;function E2(){this.buffer()}function T2(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function I2(){this.buffer()}function L2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function P2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Et(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _2(e){this.exit(e)}function A2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Et(this.sliceSerialize(e)).toLowerCase(),n.label=t}function O2(e){this.exit(e)}function R2(){return"["}function gy(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const l=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),l(),s+=i.move("]"),s}function D2(){return{enter:{gfmFootnoteCallString:E2,gfmFootnoteCall:T2,gfmFootnoteDefinitionLabelString:I2,gfmFootnoteDefinition:L2},exit:{gfmFootnoteCallString:P2,gfmFootnoteCall:_2,gfmFootnoteDefinitionLabelString:A2,gfmFootnoteDefinition:O2}}}function M2(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:gy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,l){const o=s.createTracker(l);let a=o.move("[^");const u=s.enter("footnoteDefinition"),f=s.enter("label");return a+=o.move(s.safe(s.associationId(r),{before:a,after:"]"})),f(),a+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),a+=o.move((t?`
85
+ `:" ")+s.indentLines(s.containerFlow(r,o.current()),t?yy:F2))),u(),a}}function F2(e,t,n){return t===0?e:yy(e,t,n)}function yy(e,t,n){return(n?"":" ")+e}const z2=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];xy.peek=H2;function $2(){return{canContainEols:["delete"],enter:{strikethrough:U2},exit:{strikethrough:V2}}}function B2(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:z2}],handlers:{delete:xy}}}function U2(e){this.enter({type:"delete",children:[]},e)}function V2(e){this.exit(e)}function xy(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),s(),l}function H2(){return"~"}function K2(e){return e.length}function W2(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||K2,s=[],l=[],o=[],a=[];let u=0,f=-1;for(;++f<e.length;){const y=[],w=[];let m=-1;for(e[f].length>u&&(u=e[f].length);++m<e[f].length;){const g=q2(e[f][m]);if(n.alignDelimiters!==!1){const v=i(g);w[m]=v,(a[m]===void 0||v>a[m])&&(a[m]=v)}y.push(g)}l[f]=y,o[f]=w}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)s[c]=Uh(r[c]);else{const y=Uh(r);for(;++c<u;)s[c]=y}c=-1;const p=[],h=[];for(;++c<u;){const y=s[c];let w="",m="";y===99?(w=":",m=":"):y===108?w=":":y===114&&(m=":");let g=n.alignDelimiters===!1?1:Math.max(1,a[c]-w.length-m.length);const v=w+"-".repeat(g)+m;n.alignDelimiters!==!1&&(g=w.length+g+m.length,g>a[c]&&(a[c]=g),h[c]=g),p[c]=v}l.splice(1,0,p),o.splice(1,0,h),f=-1;const x=[];for(;++f<l.length;){const y=l[f],w=o[f];c=-1;const m=[];for(;++c<u;){const g=y[c]||"";let v="",C="";if(n.alignDelimiters!==!1){const j=a[c]-(w[c]||0),b=s[c];b===114?v=" ".repeat(j):b===99?j%2?(v=" ".repeat(j/2+.5),C=" ".repeat(j/2-.5)):(v=" ".repeat(j/2),C=v):C=" ".repeat(j)}n.delimiterStart!==!1&&!c&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||c)&&m.push(" "),n.alignDelimiters!==!1&&m.push(v),m.push(g),n.alignDelimiters!==!1&&m.push(C),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&m.push("|")}x.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return x.join(`
86
+ `)}function q2(e){return e==null?"":String(e)}function Uh(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"),s=n.createTracker(r);s.move("> "),s.shift(2);const l=n.indentLines(n.containerFlow(e,s.current()),Y2);return i(),l}function Y2(e,t,n){return">"+(n?"":" ")+e}function J2(e,t){return Vh(e,t.inConstruct,!0)&&!Vh(e,t.notInConstruct,!1)}function Vh(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 Hh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
87
+ `&&J2(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
88
+ `}function G2(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>l&&(l=s):s=1,i=r+t.length,r=n.indexOf(t,i);return l}function X2(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 Z2(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 eC(e,t,n,r){const i=Z2(n),s=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(X2(e,n)){const c=n.enter("codeIndented"),p=n.indentLines(s,tC);return c(),p}const o=n.createTracker(r),a=i.repeat(Math.max(G2(s,i)+1,3)),u=n.enter("codeFenced");let f=o.move(a);if(e.lang){const c=n.enter(`codeFencedLang${l}`);f+=o.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...o.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${l}`);f+=o.move(" "),f+=o.move(n.safe(e.meta,{before:f,after:`
89
+ `,encode:["`"],...o.current()})),c()}return f+=o.move(`
90
+ `),s&&(f+=o.move(s+`
91
+ `)),f+=o.move(a),u(),f}function tC(e,t,n){return(n?"":" ")+e}function cf(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 nC(e,t,n,r){const i=cf(n),s=i==='"'?"Quote":"Apostrophe",l=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${s}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),o()),l(),u}function rC(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 ds(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Gl(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}}vy.peek=iC;function vy(e,t,n,r){const i=rC(n),s=n.enter("emphasis"),l=n.createTracker(r),o=l.move(i);let a=l.move(n.containerPhrasing(e,{after:i,before:o,...l.current()}));const u=a.charCodeAt(0),f=Gl(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(a=ds(u)+a.slice(1));const c=a.charCodeAt(a.length-1),p=Gl(r.after.charCodeAt(0),c,i);p.inside&&(a=a.slice(0,-1)+ds(c));const h=l.move(i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},o+a+h}function iC(e,t,n){return n.options.emphasis||"*"}function sC(e,t){let n=!1;return af(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Fu}),!!((!e.depth||e.depth<3)&&ef(e)&&(t.options.setext||n))}function lC(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(sC(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),p=n.containerPhrasing(e,{...s.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 l="#".repeat(i),o=n.enter("headingAtx"),a=n.enter("phrasing");s.move(l+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
97
+ `,...s.current()});return/^[\t ]/.test(u)&&(u=ds(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),a(),o(),u}wy.peek=oC;function wy(e){return e.value||""}function oC(){return"<"}ky.peek=aC;function ky(e,t,n,r){const i=cf(n),s=i==='"'?"Quote":"Apostrophe",l=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${s}`),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(")"),l(),u}function aC(){return"!"}by.peek=uC;function by(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let l=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+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...o.current()});return l(),n.stack=f,s(),i==="full"||!u||u!==c?a+=o.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=o.move("]"),a}function uC(){return"!"}Sy.peek=cC;function Sy(e,t,n){let r=e.value||"",i="`",s=-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+" ");++s<n.unsafe.length;){const l=n.unsafe[s],o=n.compilePattern(l);let a;if(l.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 cC(){return"`"}function Ny(e,t){const n=ef(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))}Cy.peek=fC;function Cy(e,t,n,r){const i=cf(n),s=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let o,a;if(Ny(e,n)){const f=n.stack;n.stack=[],o=n.enter("autolink");let c=l.move("<");return c+=l.move(n.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),o(),n.stack=f,c}o=n.enter("link"),a=n.enter("label");let u=l.move("[");return u+=l.move(n.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),u+=l.move(")"),o(),u}function fC(e,t,n){return Ny(e,n)?"<":"["}jy.peek=dC;function jy(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let l=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+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:a,after:"]",...o.current()});return l(),n.stack=f,s(),i==="full"||!u||u!==c?a+=o.move(c+"]"):i==="shortcut"?a=a.slice(0,-1):a+=o.move("]"),a}function dC(){return"["}function ff(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 hC(e){const t=ff(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 pC(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 mC(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let l=e.ordered?pC(n):ff(n);const o=e.ordered?l==="."?")":".":hC(n);let a=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&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)===l&&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&&(l=o),n.bulletCurrent=l;const u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=s,i(),u}function gC(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 yC(e,t,n,r){const i=gC(n);let s=n.bulletCurrent||ff(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let l=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(l-s.length)),o.shift(l);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(l))+c:(h?s:s+" ".repeat(l-s.length))+c}}function xC(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),l=n.containerPhrasing(e,r);return s(),i(),l}const vC=No(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function wC(e,t,n,r){return(e.children.some(function(l){return vC(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function kC(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ty.peek=bC;function Ty(e,t,n,r){const i=kC(n),s=n.enter("strong"),l=n.createTracker(r),o=l.move(i+i);let a=l.move(n.containerPhrasing(e,{after:i,before:o,...l.current()}));const u=a.charCodeAt(0),f=Gl(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(a=ds(u)+a.slice(1));const c=a.charCodeAt(a.length-1),p=Gl(r.after.charCodeAt(0),c,i);p.inside&&(a=a.slice(0,-1)+ds(c));const h=l.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},o+a+h}function bC(e,t,n){return n.options.strong||"*"}function SC(e,t,n,r){return n.safe(e.value,r)}function NC(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 CC(e,t,n){const r=(Ey(n)+(n.options.ruleSpaces?" ":"")).repeat(NC(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Iy={blockquote:Q2,break:Hh,code:eC,definition:nC,emphasis:vy,hardBreak:Hh,heading:lC,html:wy,image:ky,imageReference:by,inlineCode:Sy,link:Cy,linkReference:jy,list:mC,listItem:yC,paragraph:xC,root:wC,strong:Ty,text:SC,thematicBreak:CC};function jC(){return{enter:{table:EC,tableData:Kh,tableHeader:Kh,tableRow:IC},exit:{codeText:LC,table:TC,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 TC(e){this.exit(e),this.data.inTable=void 0}function IC(e){this.enter({type:"tableRow",children:[]},e)}function Ea(e){this.exit(e)}function Kh(e){this.enter({type:"tableCell",children:[]},e)}function LC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,PC));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function PC(e,t){return t==="|"?t:e}function _C(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=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:l,tableCell:a,tableRow:o}};function l(h,x,y,w){return u(f(h,y,w),h.align)}function o(h,x,y,w){const m=c(h,y,w),g=u([m]);return g.slice(0,g.indexOf(`
99
+ `))}function a(h,x,y,w){const m=y.enter("tableCell"),g=y.enter("phrasing"),v=y.containerPhrasing(h,{...w,before:s,after:s});return g(),m(),v}function u(h,x){return W2(h,{align:x,alignDelimiters:r,padding:n,stringLength:i})}function f(h,x,y){const w=h.children;let m=-1;const g=[],v=x.enter("table");for(;++m<w.length;)g[m]=c(w[m],x,y);return v(),g}function c(h,x,y){const w=h.children;let m=-1;const g=[],v=x.enter("tableRow");for(;++m<w.length;)g[m]=a(w[m],h,x,y);return v(),g}function p(h,x,y){let w=Iy.inlineCode(h,x,y);return y.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function AC(){return{exit:{taskListCheckValueChecked:Wh,taskListCheckValueUnchecked:Wh,paragraph:RC}}}function OC(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:DC}}}function Wh(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function RC(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 s=-1,l;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){l=o;break}}l===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 DC(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(l);let a=Iy.listItem(e,t,n,{...r,...o.current()});return s&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(f){return f+l}}function MC(){return[m2(),D2(),$2(),jC(),AC()]}function FC(e){return{extensions:[g2(),M2(e),B2(),_C(e),OC()]}}const zC={tokenize:KC,partial:!0},Ly={tokenize:WC,partial:!0},Py={tokenize:qC,partial:!0},_y={tokenize:QC,partial:!0},$C={tokenize:YC,partial:!0},Ay={name:"wwwAutolink",tokenize:VC,previous:Ry},Oy={name:"protocolAutolink",tokenize:HC,previous:Dy},sn={name:"emailAutolink",tokenize:UC,previous:My},zt={};function BC(){return{text:zt}}let Mn=48;for(;Mn<123;)zt[Mn]=sn,Mn++,Mn===58?Mn=65:Mn===91&&(Mn=97);zt[43]=sn;zt[45]=sn;zt[46]=sn;zt[95]=sn;zt[72]=[sn,Oy];zt[104]=[sn,Oy];zt[87]=[sn,Ay];zt[119]=[sn,Ay];function UC(e,t,n){const r=this;let i,s;return l;function l(c){return!Uu(c)||!My.call(r,r.previous)||df(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(c))}function o(c){return Uu(c)?(e.consume(c),o):c===64?(e.consume(c),a):n(c)}function a(c){return c===46?e.check($C,f,u)(c):c===45||c===95||Re(c)?(s=!0,e.consume(c),a):f(c)}function u(c){return e.consume(c),i=!0,a}function f(c){return s&&i&&Be(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function VC(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Ry.call(r,r.previous)||df(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(zC,e.attempt(Ly,e.attempt(Py,s),n),n)(l))}function s(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function HC(e,t,n){const r=this;let i="",s=!1;return l;function l(c){return(c===72||c===104)&&Dy.call(r,r.previous)&&!df(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),s?u:(s=!0,a)):n(c)}function u(c){return c===null||Ql(c)||re(c)||nr(c)||ko(c)?n(c):e.attempt(Ly,e.attempt(Py,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function KC(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),s):n(l)}function s(l){return l===null?n(l):t(l)}}function WC(e,t,n){let r,i,s;return l;function l(u){return u===46||u===95?e.check(_y,a,o)(u):u===null||re(u)||nr(u)||u!==45&&ko(u)?a(u):(s=!0,e.consume(u),l)}function o(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function a(u){return i||r||!s?n(u):t(u)}}function qC(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?s(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(_y,t,s)(l):l===null||re(l)||nr(l)?t(l):(e.consume(l),i)}function s(l){return l===41&&r++,e.consume(l),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),s):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 s(o){return Be(o)?l(o):n(o)}function l(o){return o===59?(e.consume(o),r):Be(o)?(e.consume(o),l):n(o)}}function YC(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Re(s)?n(s):t(s)}}function Ry(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||re(e)}function Dy(e){return!Be(e)}function My(e){return!(e===47||Uu(e))}function Uu(e){return e===43||e===45||e===46||e===95||Re(e)}function df(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 JC={tokenize:ij,partial:!0};function GC(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tj,continuation:{tokenize:nj},exit:rj}},text:{91:{name:"gfmFootnoteCall",tokenize:ej},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:XC,resolveTo:ZC}}}}function XC(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){l=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(!l||!l._balanced)return n(a);const u=Et(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function ZC(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 s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function ej(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,l;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(s>999||c===93&&!l||c===null||c===91||re(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Et(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return re(c)||(l=!0),s++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),s++,u):u(c)}}function tj(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,l=0,o;return a;function a(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(x)}function f(x){if(l>999||x===93&&!o||x===null||x===91||re(x))return n(x);if(x===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return s=Et(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return re(x)||(o=!0),l++,e.consume(x),x===92?c:f}function c(x){return x===91||x===92||x===93?(e.consume(x),l++,f):f(x)}function p(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),i.includes(s)||i.push(s),X(e,h,"gfmFootnoteDefinitionWhitespace")):n(x)}function h(x){return t(x)}}function nj(e,t,n){return e.check(Ns,t,e.attempt(JC,t,n))}function rj(e){e.exit("gfmFootnoteDefinition")}function ij(e,t,n){const r=this;return X(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(s):n(s)}}function sj(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,o){let a=-1;for(;++a<l.length;)if(l[a][0]==="enter"&&l[a][1].type==="strikethroughSequenceTemporary"&&l[a][1]._close){let u=a;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[a][1].end.offset-l[a][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[a][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[a][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[a][1].start)},p=[["enter",f,o],["enter",l[u][1],o],["exit",l[u][1],o],["enter",c,o]],h=o.parser.constructs.insideSpan.null;h&&st(p,p.length,0,bo(h,l.slice(u+1,a),o)),st(p,p.length,0,[["exit",c,o],["enter",l[a][1],o],["exit",l[a][1],o],["exit",f,o]]),st(l,u-1,a-u+3,p),a=u+p.length-2;break}}for(a=-1;++a<l.length;)l[a][1].type==="strikethroughSequenceTemporary"&&(l[a][1].type="data");return l}function s(l,o,a){const u=this.previous,f=this.events;let c=0;return p;function p(x){return u===126&&f[f.length-1][1].type!=="characterEscape"?a(x):(l.enter("strikethroughSequenceTemporary"),h(x))}function h(x){const y=Xr(u);if(x===126)return c>1?a(x):(l.consume(x),c++,h);if(c<2&&!n)return a(x);const w=l.exit("strikethroughSequenceTemporary"),m=Xr(x);return w._open=!m||m===2&&!!y,w._close=!y||y===2&&!!m,o(x)}}}class lj{constructor(){this.map=[]}add(t,n,r){oj(this,t,n,r)}consume(t){if(this.map.sort(function(s,l){return s[0]-l[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 s of i)t.push(s);i=r.pop()}this.map.length=0}}function oj(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 aj(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 s=r.length-1;r[s]=r[s]==="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 uj(){return{flow:{null:{name:"table",tokenize:cj,resolveAll:fj}}}}function cj(e,t,n){const r=this;let i=0,s=0,l;return o;function o(S){let E=r.events.length-1;for(;E>-1;){const U=r.events[E][1].type;if(U==="lineEnding"||U==="linePrefix")E--;else break}const A=E>-1?r.events[E][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||(l=!0,s+=1),f(S)}function f(S){return S===null?n(S):B(S)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),h):n(S):Q(S)?X(e,f,"whitespace")(S):(s+=1,l&&(l=!1,i+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),l=!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"),l=!1,Q(S)?X(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):x(S))}function x(S){return S===45||S===58?w(S):S===124?(l=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),y):j(S)}function y(S){return Q(S)?X(e,w,"whitespace")(S):w(S)}function w(S){return S===58?(s+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),m):S===45?(s+=1,m(S)):S===null||B(S)?C(S):j(S)}function m(S){return S===45?(e.enter("tableDelimiterFiller"),g(S)):j(S)}function g(S){return S===45?(e.consume(S),g):S===58?(l=!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)?X(e,C,"whitespace")(S):C(S)}function C(S){return S===124?x(S):S===null||B(S)?!l||i!==s?j(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):j(S)}function j(S){return n(S)}function b(S){return e.enter("tableRow"),I(S)}function I(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),I):S===null||B(S)?(e.exit("tableRow"),t(S)):Q(S)?X(e,I,"whitespace")(S):(e.enter("data"),P(S))}function P(S){return S===null||S===124||re(S)?(e.exit("data"),I(S)):(e.consume(S),S===92?L:P)}function L(S){return S===92||S===124?(e.consume(S),P):P(S)}}function fj(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],l=[0,0,0,0],o=!1,a=0,u,f,c;const p=new lj;for(;++n<e.length;){const h=e[n],x=h[1];h[0]==="enter"?x.type==="tableHead"?(o=!1,a!==0&&(qh(p,t,a,u,f),f=void 0,a=0),u={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},p.add(n,0,[["enter",u,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,c=void 0,s=[0,0,0,0],l=[0,n+1,0,0],o&&(o=!1,f={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},p.add(n,0,[["enter",f,t]])),i=x.type==="tableDelimiterRow"?2:f?3:1):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(s[1]!==0&&(l[0]=l[1],c=Xs(p,t,s,i,void 0,c),s=[0,0,0,0]),l[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(l[0]=l[1],c=Xs(p,t,s,i,void 0,c)),s=l,l=[s[1],n,0,0])):x.type==="tableHead"?(o=!0,a=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(a=n,s[1]!==0?(l[0]=l[1],c=Xs(p,t,s,i,n,c)):l[1]!==0&&(c=Xs(p,t,l,i,n,c)),i=0):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(l[3]=n)}for(a!==0&&qh(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=aj(t.events,n))}return e}function Xs(e,t,n,r,i,s){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},yr(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const a=yr(t.events,n[1]);if(s={type:l,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",s,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 x=n[2]+1,y=n[3]-n[2]-1;e.add(x,y,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(s.end=Object.assign({},yr(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function qh(e,t,n,r,i){const s=[],l=yr(t.events,n);i&&(i.end=Object.assign({},l),s.push(["exit",i,t])),r.end=Object.assign({},l),s.push(["exit",r,t]),e.add(n+1,0,s)}function yr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const dj={name:"tasklistCheck",tokenize:pj};function hj(){return{text:{91:dj}}}function pj(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"),s)}function s(a){return re(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),l):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),l):n(a)}function l(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:mj},t,n)(a):n(a)}}function mj(e,t,n){return X(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function gj(e){return qg([BC(),GC(),sj(e),uj(),hj()])}const yj={};function Pr(e){const t=this,n=e||yj,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(gj(n)),s.push(MC()),l.push(FC(n))}const hf=Symbol.for("yaml.alias"),Vu=Symbol.for("yaml.document"),jn=Symbol.for("yaml.map"),Fy=Symbol.for("yaml.pair"),Ft=Symbol.for("yaml.scalar"),oi=Symbol.for("yaml.seq"),yt=Symbol.for("yaml.node.type"),Rn=e=>!!e&&typeof e=="object"&&e[yt]===hf,ar=e=>!!e&&typeof e=="object"&&e[yt]===Vu,ai=e=>!!e&&typeof e=="object"&&e[yt]===jn,fe=e=>!!e&&typeof e=="object"&&e[yt]===Fy,ie=e=>!!e&&typeof e=="object"&&e[yt]===Ft,ui=e=>!!e&&typeof e=="object"&&e[yt]===oi;function pe(e){if(e&&typeof e=="object")switch(e[yt]){case jn:case oi:return!0}return!1}function ge(e){if(e&&typeof e=="object")switch(e[yt]){case hf:case jn:case Ft:case oi:return!0}return!1}const zy=e=>(ie(e)||pe(e))&&!!e.anchor,qe=Symbol("break visit"),$y=Symbol("skip children"),Mt=Symbol("remove node");function ur(e,t){const n=By(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=$y;ur.REMOVE=Mt;function _r(e,t,n,r){const i=Uy(e,t,n,r);if(ge(i)||fe(i))return Vy(e,r,i),_r(e,i,n,r);if(typeof i!="symbol"){if(pe(t)){r=Object.freeze(r.concat(t));for(let s=0;s<t.items.length;++s){const l=_r(s,t.items[s],n,r);if(typeof l=="number")s=l-1;else{if(l===qe)return qe;l===Mt&&(t.items.splice(s,1),s-=1)}}}else if(fe(t)){r=Object.freeze(r.concat(t));const s=_r("key",t.key,n,r);if(s===qe)return qe;s===Mt&&(t.key=null);const l=_r("value",t.value,n,r);if(l===qe)return qe;l===Mt&&(t.value=null)}}return i}async function jo(e,t){const n=By(t);ar(e)?await Ar(null,e.contents,n,Object.freeze([e]))===Mt&&(e.contents=null):await Ar(null,e,n,Object.freeze([]))}jo.BREAK=qe;jo.SKIP=$y;jo.REMOVE=Mt;async function Ar(e,t,n,r){const i=await Uy(e,t,n,r);if(ge(i)||fe(i))return Vy(e,r,i),Ar(e,i,n,r);if(typeof i!="symbol"){if(pe(t)){r=Object.freeze(r.concat(t));for(let s=0;s<t.items.length;++s){const l=await Ar(s,t.items[s],n,r);if(typeof l=="number")s=l-1;else{if(l===qe)return qe;l===Mt&&(t.items.splice(s,1),s-=1)}}}else if(fe(t)){r=Object.freeze(r.concat(t));const s=await Ar("key",t.key,n,r);if(s===qe)return qe;s===Mt&&(t.key=null);const l=await Ar("value",t.value,n,r);if(l===qe)return qe;l===Mt&&(t.value=null)}}return i}function By(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 Uy(e,t,n,r){var i,s,l,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(s=n.Seq)==null?void 0:s.call(n,e,t,r);if(fe(t))return(l=n.Pair)==null?void 0:l.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 Vy(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 xj={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},vj=e=>e.replace(/[!,[\]{}]/g,t=>xj[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[s,l]=r;return this.tags[s]=l,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const l=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,l),!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 l=t.slice(2,-1);return l==="!"||l==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),l)}const[,r,i]=t.match(/^(.*!)([^!]*)$/s);i||n(`The ${t} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(l){return n(String(l)),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+vj(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 s={};ur(t.contents,(l,o)=>{ge(o)&&o.tag&&(s[o.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,l]of r)s==="!!"&&l==="tag:yaml.org,2002:"||(!t||i.some(o=>o.startsWith(l)))&&n.push(`%TAG ${s} ${l}`);return n.join(`
100
+ `)}}$e.defaultYaml={explicit:!1,version:"1.2"};$e.defaultTags={"!!":"tag:yaml.org,2002:"};function Hy(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 Ky(e){const t=new Set;return ur(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function Wy(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function wj(e,t){const n=[],r=new Map;let i=null;return{onAnchor:s=>{n.push(s),i??(i=Ky(e));const l=Wy(t,i);return i.add(l),l},setAnchors:()=>{for(const s of n){const l=r.get(s);if(typeof l=="object"&&l.anchor&&(ie(l.node)||pe(l.node)))l.node.anchor=l.anchor;else{const o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=s,o}}},sourceObjects:r}}function Or(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){const l=r[i],o=Or(e,r,String(i),l);o===void 0?delete r[i]:o!==l&&(r[i]=o)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const s=r.get(i),l=Or(e,r,i,s);l===void 0?r.delete(i):l!==s&&r.set(i,l)}else if(r instanceof Set)for(const i of Array.from(r)){const s=Or(e,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(const[i,s]of Object.entries(r)){const l=Or(e,r,i,s);l===void 0?delete r[i]:l!==s&&(r[i]=l)}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=s=>{r.res=s,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 pf{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:s}={}){if(!ar(t))throw new TypeError("A document argument is required");const l={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},o=pt(this,"",l);if(typeof i=="function")for(const{count:a,res:u}of l.anchors.values())i(u,a);return typeof s=="function"?Or(s,{"":o},"",o):o}}class Eo extends pf{constructor(t){super(hf),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:(s,l)=>{(Rn(l)||zy(l))&&r.push(l)}}),n&&(n.aliasResolveCache=r));let i;for(const s of r){if(s===this)break;s.anchor===this.source&&(i=s)}return i}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=n,l=this.resolve(i,n);if(!l){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let o=r.get(l);if(o||(pt(l,null,n),o=r.get(l)),(o==null?void 0:o.res)===void 0){const a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(s>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=xl(i,l,r)),o.count*o.aliasCount>s)){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(Hy(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(t.implicitKey)return`${i} `}return i}}function xl(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 s=xl(e,i,n);s>r&&(r=s)}return r}else if(fe(t)){const r=xl(e,t.key,n),i=xl(e,t.value,n);return Math.max(r,i)}return 1}const qy=e=>!e||typeof e!="function"&&typeof e!="object";class V extends pf{constructor(t){super(Ft),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 kj="tag:yaml.org,2002:";function bj(e,t,n){if(t){const r=n.filter(s=>s.tag===t),i=r.find(s=>!s.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 hs(e,t,n){var c,p,h;if(ar(e)&&(e=e.contents),ge(e))return e;if(fe(e)){const x=(p=(c=n.schema[jn]).createNode)==null?void 0:p.call(c,n.schema,null,n);return x.items.push(e),x}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:l,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=kj+t.slice(2));let u=bj(e,t,l.tags);if(!u){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const x=new V(e);return a&&(a.node=x),x}u=e instanceof Map?l[jn]:Symbol.iterator in Object(e)?l[oi]:l[jn]}s&&(s(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 Xl(e,t,n){let r=n;for(let i=t.length-1;i>=0;--i){const s=t[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const l=[];l[s]=r,r=l}else r=new Map([[s,r]])}return hs(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 pf{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,s=this.get(r,!0);if(pe(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,Xl(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,s=this.get(r,!0);return i.length===0?!n&&ie(s)?s.value:s:pe(s)?s.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 s=this.get(r,!0);if(pe(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,Xl(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}const Sj=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,Yy="flow",Hu="block",vl="quoted";function To(e,t,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:l,onOverflow:o}={}){if(!i||i<0)return e;i<s&&(s=0);const a=Math.max(1+s,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,s)?u.push(0):c=i-r);let p,h,x=!1,y=-1,w=-1,m=-1;n===Hu&&(y=Qh(e,y,t.length),y!==-1&&(c=y+a));for(let v;v=e[y+=1];){if(n===vl&&v==="\\"){switch(w=y,e[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}m=y}if(v===`
104
+ `)n===Hu&&(y=Qh(e,y,t.length)),c=y+t.length+a,p=void 0;else{if(v===" "&&h&&h!==" "&&h!==`
105
+ `&&h!==" "){const C=e[y+1];C&&C!==" "&&C!==`
106
+ `&&C!==" "&&(p=y)}if(y>=c)if(p)u.push(p),c=p+a,p=void 0;else if(n===vl){for(;h===" "||h===" ";)h=v,v=e[y+=1],x=!0;const C=y>m+1?y-2:w-1;if(f[C])return e;u.push(C),f[C]=!0,c=C+a,p=void 0}else x=!0}h=v}if(x&&o&&o(),u.length===0)return e;l&&l();let g=e.slice(0,u[0]);for(let v=0;v<u.length;++v){const C=u[v],j=u[v+1]||e.length;C===0?g=`
107
+ ${t}${e.slice(0,j)}`:(n===vl&&f[C]&&(g+=`${e[C]}\\`),g+=`
108
+ ${t}${e.slice(C+1,j)}`)}return g}function Qh(e,t,n){let r=t,i=t+1,s=e[i];for(;s===" "||s===" ";)if(t<i+n)s=e[++t];else{do s=e[++t];while(s&&s!==`
109
+ `);r=t,i=t+1,s=e[i]}return r}const Io=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Lo=e=>/^(%|---|\.\.\.)/m.test(e);function Nj(e,t,n){if(!t||t<0)return!1;const r=t-n,i=e.length;if(i<=r)return!1;for(let s=0,l=0;s<i;++s)if(e[s]===`
110
+ `){if(s-l>r)return!0;if(l=s+1,i-l<=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,s=t.indent||(Lo(e)?" ":"");let l="",o=0;for(let a=0,u=n[a];u;u=n[++a])if(u===" "&&n[a+1]==="\\"&&n[a+2]==="n"&&(l+=n.slice(o,a)+"\\ ",a+=1,o=a,u="\\"),u==="\\")switch(n[a+1]){case"u":{l+=n.slice(o,a);const f=n.substr(a+2,4);switch(f){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:f.substr(0,2)==="00"?l+="\\x"+f.substr(2):l+=n.substr(a,6)}a+=5,o=a+1}break;case"n":if(r||n[a+2]==='"'||n.length<i)a+=1;else{for(l+=n.slice(o,a)+`
111
+
112
+ `;n[a+2]==="\\"&&n[a+3]==="n"&&n[a+4]!=='"';)l+=`
113
+ `,a+=2;l+=s,n[a+2]===" "&&(l+="\\"),a+=1,o=a+1}break;default:a+=1}return l=o?l+n.slice(o):n,r?l:To(l,s,vl,Io(t,!1))}function Ku(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||(Lo(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
115
+ ${n}`)+"'";return t.implicitKey?r:To(r,n,Yy,Io(t,!1))}function Rr(e,t){const{singleQuote:n}=t.options;let r;if(n===!1)r=Ki;else{const i=e.includes('"'),s=e.includes("'");i&&!s?r=Ku:s&&!i?r=Ki:r=n?Ku:Ki}return r(e,t)}let Wu;try{Wu=new RegExp(`(^|(?<!
116
+ ))
117
+ +(?!
118
+ |$)`,"g")}catch{Wu=/\n+(?!\n|$)/g}function wl({comment:e,type:t,value:n},r,i,s){const{blockQuote:l,commentString:o,lineWidth:a}=r.options;if(!l||/\n[\t ]+$/.test(n))return Rr(n,r);const u=r.indent||(r.forceBlockIndent||Lo(n)?" ":""),f=l==="literal"?!0:l==="folded"||t===V.BLOCK_FOLDED?!1:t===V.BLOCK_LITERAL?!0:!Nj(n,a,u.length);if(!n)return f?`|
119
+ `:`>
120
+ `;let c,p;for(p=n.length;p>0;--p){const j=n[p-1];if(j!==`
121
+ `&&j!==" "&&j!==" ")break}let h=n.substring(p);const x=h.indexOf(`
122
+ `);x===-1?c="-":n===h||x!==h.length-1?(c="+",s&&s()):c="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
123
+ `&&(h=h.slice(0,-1)),h=h.replace(Wu,`$&${u}`));let y=!1,w,m=-1;for(w=0;w<n.length;++w){const j=n[w];if(j===" ")y=!0;else if(j===`
124
+ `)m=w;else break}let g=n.substring(0,m<w?m+1:w);g&&(n=n.substring(g.length),g=g.replace(/\n+/g,`$&${u}`));let C=(y?u?"2":"1":"")+c;if(e&&(C+=" "+o(e.replace(/ ?[\r\n]+/g," ")),i&&i()),!f){const j=n.replace(/\n+/g,`
125
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`);let b=!1;const I=Io(r,!0);l!=="folded"&&t!==V.BLOCK_FOLDED&&(I.onOverflow=()=>{b=!0});const P=To(`${g}${j}${h}`,u,Hu,I);if(!b)return`>${C}
126
+ ${u}${P}`}return n=n.replace(/\n+/g,`$&${u}`),`|${C}
127
+ ${u}${g}${n}${h}`}function Cj(e,t,n,r){const{type:i,value:s}=e,{actualString:l,implicitKey:o,indent:a,indentStep:u,inFlow:f}=t;if(o&&s.includes(`
128
+ `)||f&&/[[\]{},]/.test(s))return Rr(s,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return o||f||!s.includes(`
129
+ `)?Rr(s,t):wl(e,t,n,r);if(!o&&!f&&i!==V.PLAIN&&s.includes(`
130
+ `))return wl(e,t,n,r);if(Lo(s)){if(a==="")return t.forceBlockIndent=!0,wl(e,t,n,r);if(o&&a===u)return Rr(s,t)}const c=s.replace(/\n+/g,`$&
131
+ ${a}`);if(l){const p=y=>{var w;return y.default&&y.tag!=="tag:yaml.org,2002:str"&&((w=y.test)==null?void 0:w.test(c))},{compat:h,tags:x}=t.doc.schema;if(x.some(p)||h!=null&&h.some(p))return Rr(s,t)}return o?c:To(c,a,Yy,Io(t,!1))}function js(e,t,n,r){const{implicitKey:i,inFlow:s}=t,l=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(l.value)&&(o=V.QUOTE_DOUBLE);const a=f=>{switch(f){case V.BLOCK_FOLDED:case V.BLOCK_LITERAL:return i||s?Rr(l.value,t):wl(l,t,n,r);case V.QUOTE_DOUBLE:return Ki(l.value,t);case V.QUOTE_SINGLE:return Ku(l.value,t);case V.PLAIN:return Cj(l,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 Jy(e,t){const n=Object.assign({blockQuote:!0,commentString:Sj,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 jj(e,t){var i;if(t.tag){const s=e.filter(l=>l.tag===t.tag);if(s.length>0)return s.find(l=>l.format===t.format)??s[0]}let n,r;if(ie(t)){r=t.value;let s=e.filter(l=>{var o;return(o=l.identify)==null?void 0:o.call(l,r)});if(s.length>1){const l=s.filter(o=>o.test);l.length>0&&(s=l)}n=s.find(l=>l.format===t.format)??s.find(l=>!l.format)}else r=t,n=e.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){const s=((i=r==null?void 0:r.constructor)==null?void 0:i.name)??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${s} value`)}return n}function Ej(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],s=(ie(e)||pe(e))&&e.anchor;s&&Hy(s)&&(n.add(s),i.push(`&${s}`));const l=e.tag??(t.default?null:t.tag);return l&&i.push(r.directives.tagString(l)),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 s=ge(e)?e:t.doc.createNode(e,{onTagObj:u=>i=u});i??(i=jj(t.doc.schema.tags,s));const l=Ej(s,i,t);l.length>0&&(t.indentAtStart=(t.indentAtStart??0)+l.length+1);const o=typeof i.stringify=="function"?i.stringify(s,t,n,r):ie(s)?js(s,t,n,r):s.toString(t,n,r);return l?ie(s)||o[0]==="{"||o[0]==="["?`${l} ${o}`:`${l}
132
+ ${t.indent}${o}`:o}function Tj({key:e,value:t},n,r,i){const{allNullValues:s,doc:l,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 I="With simple keys, collection cannot be used as a key value";throw new Error(I)}}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||!s),indent:o+a});let x=!1,y=!1,w=Zr(e,n,()=>x=!0,()=>y=!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(s||t==null)return x&&r&&r(),w===""?"?":h?`? ${w}`:w}else if(s&&!c||t==null&&h)return w=`? ${w}`,p&&!x?w+=Wn(w,n.indent,u(p)):y&&i&&i(),w;x&&(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,g,v;ge(t)?(m=!!t.spaceBefore,g=t.commentBefore,v=t.comment):(m=!1,g=null,v=null,t&&typeof t=="object"&&(t=l.createNode(t))),n.implicitKey=!1,!h&&!p&&ie(t)&&(n.indentAtStart=w.length+1),y=!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 j=Zr(t,n,()=>C=!0,()=>y=!0);let b=" ";if(p||m||g){if(b=m?`
134
+ `:"",g){const I=u(g);b+=`
135
+ ${Qt(I,n.indent)}`}j===""&&!n.inFlow?b===`
136
+ `&&v&&(b=`
137
+
138
+ `):b+=`
139
+ ${n.indent}`}else if(!h&&pe(t)){const I=j[0],P=j.indexOf(`
140
+ `),L=P!==-1,S=n.inFlow??t.flow??t.items.length===0;if(L||!S){let E=!1;if(L&&(I==="&"||I==="!")){let A=j.indexOf(" ");I==="&"&&A!==-1&&A<P&&j[A+1]==="!"&&(A=j.indexOf(" ",A+1)),(A===-1||P<A)&&(E=!0)}E||(b=`
141
+ ${n.indent}`)}}else(j===""||j[0]===`
142
+ `)&&(b="");return w+=b+j,n.inFlow?C&&r&&r():v&&!C?w+=Wn(w,n.indent,u(v)):y&&i&&i(),w}function Gy(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Zs="<<",Gt={identify:e=>e===Zs||typeof e=="symbol"&&e.description===Zs,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new V(Symbol(Zs)),{addToJSMap:Xy}),stringify:()=>Zs},Ij=(e,t)=>(Gt.identify(t)||ie(t)&&(!t.type||t.type===V.PLAIN)&&Gt.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===Gt.tag&&n.default));function Xy(e,t,n){if(n=e&&Rn(n)?n.resolve(e.doc):n,ui(n))for(const r of n.items)Ta(e,t,r);else if(Array.isArray(n))for(const r of n)Ta(e,t,r);else Ta(e,t,n)}function Ta(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[s,l]of i)t instanceof Map?t.has(s)||t.set(s,l):t instanceof Set?t.add(s):Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{value:l,writable:!0,enumerable:!0,configurable:!0});return t}function Zy(e,t,{key:n,value:r}){if(ge(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(Ij(e,n))Xy(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 s=Lj(n,i,e),l=pt(r,s,e);s in t?Object.defineProperty(t,s,{value:l,writable:!0,enumerable:!0,configurable:!0}):t[s]=l}}return t}function Lj(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(ge(e)&&(n!=null&&n.doc)){const r=Jy(n.doc,{});r.anchors=new Set;for(const s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=e.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),Gy(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(t)}function mf(e,t,n){const r=hs(e,void 0,n),i=hs(t,void 0,n);return new De(r,i)}class De{constructor(t,n=null){Object.defineProperty(this,yt,{value:Fy}),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 Zy(n,r,this)}toString(t,n,r){return t!=null&&t.doc?Tj(this,t,n,r):JSON.stringify(this)}}function e0(e,t,n){return(t.inFlow??e.flow?_j:Pj)(e,t,n)}function Pj({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:l,onComment:o}){const{indent:a,options:{commentString:u}}=n,f=Object.assign({},n,{indent:s,type:null});let c=!1;const p=[];for(let x=0;x<t.length;++x){const y=t[x];let w=null;if(ge(y))!c&&y.spaceBefore&&p.push(""),Zl(n,p,y.commentBefore,c),y.comment&&(w=y.comment);else if(fe(y)){const g=ge(y.key)?y.key:null;g&&(!c&&g.spaceBefore&&p.push(""),Zl(n,p,g.commentBefore,c))}c=!1;let m=Zr(y,f,()=>w=null,()=>c=!0);w&&(m+=Wn(m,s,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 x=1;x<p.length;++x){const y=p[x];h+=y?`
143
+ ${a}${y}`:`
144
+ `}}return e?(h+=`
145
+ `+Qt(u(e),a),o&&o()):c&&l&&l(),h}function _j({items:e},t,{flowChars:n,itemIndent:r}){const{indent:i,indentStep:s,flowCollectionPadding:l,options:{commentString:o}}=t;r+=s;const a=Object.assign({},t,{indent:r,inFlow:!0,type:null});let u=!1,f=0;const c=[];for(let x=0;x<e.length;++x){const y=e[x];let w=null;if(ge(y))y.spaceBefore&&c.push(""),Zl(t,c,y.commentBefore,!1),y.comment&&(w=y.comment);else if(fe(y)){const g=ge(y.key)?y.key:null;g&&(g.spaceBefore&&c.push(""),Zl(t,c,g.commentBefore,!1),g.comment&&(u=!0));const v=ge(y.value)?y.value:null;v?(v.comment&&(w=v.comment),v.commentBefore&&(u=!0)):y.value==null&&(g!=null&&g.comment)&&(w=g.comment)}w&&(u=!0);let m=Zr(y,a,()=>w=null);x<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 x=c.reduce((y,w)=>y+w.length+2,2);u=t.options.lineWidth>0&&x>t.options.lineWidth}if(u){let x=p;for(const y of c)x+=y?`
147
+ ${s}${i}${y}`:`
148
+ `;return`${x}
149
+ ${i}${h}`}else return`${p}${l}${c.join(" ")}${l}${h}`}function Zl({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const s=Qt(t(r),e);n.push(s.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(jn,t),this.items=[]}static from(t,n,r){const{keepUndefined:i,replacer:s}=r,l=new this(t),o=(a,u)=>{if(typeof s=="function")u=s.call(n,a,u);else if(Array.isArray(s)&&!s.includes(a))return;(u!==void 0||i)&&l.items.push(mf(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"&&l.items.sort(t.sortMapEntries),l}add(t,n){var l;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),s=(l=this.schema)==null?void 0:l.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);ie(i.value)&&qy(r.value)?i.value.value=r.value:i.value=r.value}else if(s){const o=this.items.findIndex(a=>s(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 s of this.items)Zy(n,i,s);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})),e0(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 In 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=el(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=el(t);if(typeof r!="number")return;const i=this.items[r];return!n&&ie(i)?i.value:i}has(t){const n=el(t);return typeof n=="number"&&n<this.items.length}set(t,n){const r=el(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const i=this.items[r];ie(i)&&qy(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 s of this.items)r.push(pt(s,String(i++),n));return r}toString(t,n,r){return t?e0(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,s=new this(t);if(n&&Symbol.iterator in Object(n)){let l=0;for(let o of n){if(typeof i=="function"){const a=n instanceof Set?o:String(l++);o=i.call(n,a,o)}s.items.push(hs(o,void 0,r))}}return s}}function el(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:In,tag:"tag:yaml.org,2002:seq",resolve(e,t){return ui(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>In.from(e,t,n)},Po={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),js(e,t,n,r)}},_o={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"&&_o.test.test(e)?e:t.options.nullStr},gf={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&&gf.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 s=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let l=s.indexOf(".");l<0&&(l=s.length,s+=".");let o=t-(s.length-l-1);for(;o-- >0;)s+="0"}return s}const t0={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},n0={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)}},r0={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},Ao=e=>typeof e=="bigint"||Number.isInteger(e),yf=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function i0(e,t,n){const{value:r}=e;return Ao(r)&&r>=0?n+r.toString(t):It(e)}const s0={identify:e=>Ao(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>yf(e,2,8,n),stringify:e=>i0(e,8,"0o")},l0={identify:Ao,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>yf(e,0,10,n),stringify:It},o0={identify:e=>Ao(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>yf(e,2,16,n),stringify:e=>i0(e,16,"0x")},Aj=[ci,fi,Po,_o,gf,s0,l0,o0,t0,n0,r0];function Yh(e){return typeof e=="bigint"||Number.isInteger(e)}const tl=({value:e})=>JSON.stringify(e),Oj=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:tl},{identify:e=>e==null,createNode:()=>new V(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:tl},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:tl},{identify:Yh,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})=>Yh(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:tl}],Rj={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},Dj=[ci,fi].concat(Oj,Rj),xf={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,s){if(!n)return"";const l=n;let o;if(typeof btoa=="function"){let a="";for(let u=0;u<l.length;++u)a+=String.fromCharCode(l[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 js({comment:e,type:t,value:o},r,i,s)}};function a0(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 s=i.value??i.key;s.comment=s.comment?`${r.comment}
152
+ ${s.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 u0(e,t,n){const{replacer:r}=n,i=new In(e);i.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let l of t){typeof r=="function"&&(l=r.call(t,String(s++),l));let o,a;if(Array.isArray(l))if(l.length===2)o=l[0],a=l[1];else throw new TypeError(`Expected [key, value] tuple: ${l}`);else if(l&&l instanceof Object){const u=Object.keys(l);if(u.length===1)o=u[0],a=l[o];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else o=l;i.items.push(mf(o,a,n))}return i}const vf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:a0,createNode:u0};class Vr extends In{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 s,l;if(fe(i)?(s=pt(i.key,"",n),l=pt(i.value,s,n)):s=pt(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,l)}return r}static from(t,n,r){const i=u0(t,n,r),s=new this;return s.items=i.items,s}}Vr.tag="tag:yaml.org,2002:omap";const wf={collection:"seq",identify:e=>e instanceof Map,nodeClass:Vr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=a0(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 c0({value:e,source:t},n){return t&&(e?f0:d0).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const f0={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:c0},d0={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:c0},Mj={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},Fj={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)}},zj={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},Es=e=>typeof e=="bigint"||Number.isInteger(e);function Oo(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 l=BigInt(e);return i==="-"?BigInt(-1)*l:l}const s=parseInt(e,n);return i==="-"?-1*s:s}function kf(e,t,n){const{value:r}=e;if(Es(r)){const i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return It(e)}const $j={identify:Es,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Oo(e,2,2,n),stringify:e=>kf(e,2,"0b")},Bj={identify:Es,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Oo(e,1,8,n),stringify:e=>kf(e,8,"0")},Uj={identify:Es,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Oo(e,0,10,n),stringify:It},Vj={identify:Es,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Oo(e,2,16,n),stringify:e=>kf(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,s=new this(t);if(n&&Symbol.iterator in Object(n))for(let l of n)typeof i=="function"&&(l=i.call(n,l,l)),s.items.push(mf(l,null,r));return s}}Hr.tag="tag:yaml.org,2002:set";const bf={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 Sf(e,t){const n=e[0],r=n==="-"||n==="+"?e.substring(1):e,i=l=>t?BigInt(l):Number(l),s=r.replace(/_/g,"").split(":").reduce((l,o)=>l*i(60)+i(o),i(0));return n==="-"?i(-1)*s:s}function h0(e){let{value:t}=e,n=l=>l;if(typeof t=="bigint")n=l=>BigInt(l);else if(isNaN(t)||!isFinite(t))return It(e);let r="";t<0&&(r="-",t*=n(-1));const i=n(60),s=[t%i];return t<60?s.unshift(0):(t=(t-s[0])/i,s.unshift(t%i),t>=60&&(t=(t-s[0])/i,s.unshift(t))),r+s.map(l=>String(l).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const p0={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})=>Sf(e,n),stringify:h0},m0={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=>Sf(e,!1),stringify:h0},Ro={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(Ro.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,s,l,o]=t.map(Number),a=t[7]?Number((t[7]+"00").substr(1,3)):0;let u=Date.UTC(n,r-1,i,s||0,l||0,o||0,a);const f=t[8];if(f&&f!=="Z"){let c=Sf(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$/,""))??""},Jh=[ci,fi,Po,_o,f0,d0,$j,Bj,Uj,Vj,Mj,Fj,zj,xf,Gt,wf,vf,bf,p0,m0,Ro],Gh=new Map([["core",Aj],["failsafe",[ci,fi,Po]],["json",Dj],["yaml11",Jh],["yaml-1.1",Jh]]),Xh={binary:xf,bool:gf,float:r0,floatExp:n0,floatNaN:t0,floatTime:m0,int:l0,intHex:o0,intOct:s0,intTime:p0,map:ci,merge:Gt,null:_o,omap:wf,pairs:vf,seq:fi,set:bf,timestamp:Ro},Hj={"tag:yaml.org,2002:binary":xf,"tag:yaml.org,2002:merge":Gt,"tag:yaml.org,2002:omap":wf,"tag:yaml.org,2002:pairs":vf,"tag:yaml.org,2002:set":bf,"tag:yaml.org,2002:timestamp":Ro};function Ia(e,t,n){const r=Gh.get(t);if(r&&!e)return n&&!r.includes(Gt)?r.concat(Gt):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{const s=Array.from(Gh.keys()).filter(l=>l!=="yaml11").map(l=>JSON.stringify(l)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${s} or define customTags array`)}if(Array.isArray(e))for(const s of e)i=i.concat(s);else typeof e=="function"&&(i=e(i.slice()));return n&&(i=i.concat(Gt)),i.reduce((s,l)=>{const o=typeof l=="string"?Xh[l]:l;if(!o){const a=JSON.stringify(l),u=Object.keys(Xh).map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${u}`)}return s.includes(o)||s.push(o),s},[])}const Kj=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Do{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:l,toStringDefaults:o}){this.compat=Array.isArray(t)?Ia(t,"compat"):t?Ia(null,t):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?Hj:{},this.tags=Ia(n,this.name,r),this.toStringOptions=o??null,Object.defineProperty(this,jn,{value:ci}),Object.defineProperty(this,Ft,{value:Po}),Object.defineProperty(this,oi,{value:fi}),this.sortMapEntries=typeof l=="function"?l:l===!0?Kj:null}clone(){const t=Object.create(Do.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}function Wj(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=Jy(e,t),{commentString:s}=i.options;if(e.commentBefore){n.length!==1&&n.unshift("");const u=s(e.commentBefore);n.unshift(Qt(u,""))}let l=!1,o=null;if(e.contents){if(ge(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){const c=s(e.contents.commentBefore);n.push(Qt(c,""))}i.forceBlockIndent=!!e.comment,o=e.contents.comment}const u=o?void 0:()=>l=!0;let f=Zr(e.contents,i,()=>o=null,u);o&&(f+=Wn(f,"",s(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=s(e.comment);u.includes(`
153
+ `)?(n.push("..."),n.push(Qt(u,""))):n.push(`... ${u}`)}else n.push("...");else{let u=e.comment;u&&l&&(u=u.replace(/^\n+/,"")),u&&((!l||o)&&n[n.length-1]!==""&&n.push(""),n.push(Qt(s(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:Vu});let i=null;typeof n=="function"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:l}=s;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(l=this.directives.yaml.version)):this.directives=new $e({version:l}),this.setSchema(l,r),this.contents=t===void 0?null:this.createNode(t,i,r)}clone(){const t=Object.create(di.prototype,{[yt]:{value:Vu}});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=Ky(this);t.anchor=!n||r.has(n)?Wy(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=g=>typeof g=="number"||g instanceof String||g 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:s,anchorPrefix:l,flow:o,keepUndefined:a,onTagObj:u,tag:f}=r??{},{onAnchor:c,setAnchors:p,sourceObjects:h}=wj(this,l||"a"),x={aliasDuplicateObjects:s??!0,keepUndefined:a??!1,onAnchor:c,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:h},y=hs(t,f,x);return o&&pe(y)&&(y.flow=!0),p(),y}createPair(t,n,r={}){const i=this.createNode(t,null,r),s=this.createNode(n,null,r);return new De(i,s)}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=Xl(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=Xl(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 Do(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:s,reviver:l}={}){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 s=="function")for(const{count:u,res:f}of o.anchors.values())s(f,u);return typeof l=="function"?Or(l,{"":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 Wj(this,t)}}function mr(e){if(pe(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Nf extends Error{constructor(t,n,r,i){super(),this.name=t,this.code=r,this.message=i,this.pos=n}}class Qn extends Nf{constructor(t,n,r){super("YAMLParseError",t,n,r)}}class g0 extends Nf{constructor(t,n,r){super("YAMLWarning",t,n,r)}}const eo=(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 s=i-1,l=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&l.length>80){const o=Math.min(s-39,l.length-79);l="…"+l.substring(o),s-=o-1}if(l.length>80&&(l=l.substring(0,79)+"…"),r>1&&/^ *$/.test(l.substring(0,s))){let o=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);o.length>80&&(o=o.substring(0,79)+`…
156
+ `),l=o+l}if(/[^ ]/.test(l)){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-s)));const u=" ".repeat(s)+"^".repeat(o);n.message+=`:
157
+
158
+ ${l}
159
+ ${u}
160
+ `}};function ei(e,{flow:t,indicator:n,next:r,offset:i,onError:s,parentIndent:l,startOnNewline:o}){let a=!1,u=o,f=o,c="",p="",h=!1,x=!1,y=null,w=null,m=null,g=null,v=null,C=null,j=null;for(const P of e)switch(x&&(P.type!=="space"&&P.type!=="newline"&&P.type!=="comma"&&s(P.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),x=!1),y&&(u&&P.type!=="comment"&&P.type!=="newline"&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),y=null),P.type){case"space":!t&&(n!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&P.source.includes(" ")&&(y=P),f=!0;break;case"comment":{f||s(P,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const L=P.source.substring(1)||" ";c?c+=p+L:c=L,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)&&(g=P),f=!0;break;case"anchor":w&&s(P,"MULTIPLE_ANCHORS","A node can have at most one anchor"),P.source.endsWith(":")&&s(P.offset+P.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),w=P,j??(j=P.offset),u=!1,f=!1,x=!0;break;case"tag":{m&&s(P,"MULTIPLE_TAGS","A node can have at most one tag"),m=P,j??(j=P.offset),u=!1,f=!1,x=!0;break}case n:(w||m)&&s(P,"BAD_PROP_ORDER",`Anchors and tags must be after the ${P.source} indicator`),C&&s(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&&s(P,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=P,u=!1,f=!1;break}default:s(P,"UNEXPECTED_TOKEN",`Unexpected ${P.type} token`),u=!1,f=!1}const b=e[e.length-1],I=b?b.offset+b.source.length:i;return x&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y&&(u&&y.indent<=l||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:C,spaceBefore:a,comment:c,hasNewline:h,anchor:w,tag:m,newlineAfterProp:g,end:I,start:j??I}}function ps(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(ps(t.key)||ps(t.value))return!0}return!1;default:return!0}}function qu(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&ps(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function y0(e,t,n){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const i=typeof r=="function"?r:(s,l)=>s===l||ie(s)&&ie(l)&&s.value===l.value;return t.some(s=>i(s.key,n))}const Zh="All mapping items must start at the same column";function qj({composeNode:e,composeEmptyNode:t},n,r,i,s){var f;const l=(s==null?void 0:s.nodeClass)??nt,o=new l(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:x,value:y}=c,w=ei(p,{indicator:"explicit-key-ind",next:h??(x==null?void 0:x[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",Zh)),!w.anchor&&!w.tag&&!x){u=w.end,w.comment&&(o.comment?o.comment+=`
162
+ `+w.comment:o.comment=w.comment);continue}(w.newlineAfterProp||ps(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",Zh);n.atKey=!0;const g=w.end,v=h?e(n,h,w,i):t(n,g,p,null,w,i);n.schema.compat&&qu(r.indent,h,i),n.atKey=!1,y0(n,o.items,v)&&i(g,"DUPLICATE_KEY","Map keys must be unique");const C=ei(x??[],{indicator:"map-value-ind",next:y,offset:v.range[2],onError:i,parentIndent:r.indent,startOnNewline:!h||h.type==="block-scalar"});if(a=C.end,C.found){m&&((y==null?void 0:y.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 j=y?e(n,y,C,i):t(n,a,x,null,C,i);n.schema.compat&&qu(r.indent,y,i),a=j.range[2];const b=new De(v,j);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 j=new De(v);n.options.keepSourceTokens&&(j.srcToken=c),o.items.push(j)}}return u&&u<a&&i(u,"IMPOSSIBLE","Map comment with trailing content"),o.range=[r.offset,a,u??a],o}function Qj({composeNode:e,composeEmptyNode:t},n,r,i,s){const l=(s==null?void 0:s.nodeClass)??In,o=new l(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&&qu(r.indent,c,i),a=h.range[2],o.items.push(h)}return o.range=[r.offset,a,u??a],o}function Ts(e,t,n,r){let i="";if(e){let s=!1,l="";for(const o of e){const{source:a,type:u}=o;switch(u){case"space":s=!0;break;case"comment":{n&&!s&&r(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const f=a.substring(1)||" ";i?i+=l+f:i=f,l="";break}case"newline":i&&(l+=a),s=!0;break;default:r(o,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}t+=a.length}}return{comment:i,offset:t}}const La="Block collections are not allowed within flow collections",Pa=e=>e&&(e.type==="block-map"||e.type==="block-seq");function Yj({composeNode:e,composeEmptyNode:t},n,r,i,s){var w;const l=r.start.source==="{",o=l?"flow map":"flow sequence",a=(s==null?void 0:s.nodeClass)??(l?nt:In),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 g=r.items[m],{start:v,key:C,sep:j,value:b}=g,I=ei(v,{flow:o,indicator:"explicit-key-ind",next:C??(j==null?void 0:j[0]),offset:c,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!I.found){if(!I.anchor&&!I.tag&&!j&&!b){m===0&&I.comma?i(I.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):m<r.items.length-1&&i(I.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),I.comment&&(u.comment?u.comment+=`
164
+ `+I.comment:u.comment=I.comment),c=I.end;continue}!l&&n.options.strict&&ps(C)&&i(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)I.comma&&i(I.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(I.comma||i(I.start,"MISSING_CHAR",`Missing , between ${o} items`),I.comment){let P="";e:for(const L of v)switch(L.type){case"comma":case"space":break;case"comment":P=L.source.substring(1);break e;default:break e}if(P){let L=u.items[u.items.length-1];fe(L)&&(L=L.value??L.key),L.comment?L.comment+=`
165
+ `+P:L.comment=P,I.comment=I.comment.substring(P.length+1)}}if(!l&&!j&&!I.found){const P=b?e(n,b,I,i):t(n,I.end,j,null,I,i);u.items.push(P),c=P.range[2],Pa(b)&&i(P.range,"BLOCK_IN_FLOW",La)}else{n.atKey=!0;const P=I.end,L=C?e(n,C,I,i):t(n,P,v,null,I,i);Pa(C)&&i(L.range,"BLOCK_IN_FLOW",La),n.atKey=!1;const S=ei(j??[],{flow:o,indicator:"map-value-ind",next:b,offset:L.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(S.found){if(!l&&!I.found&&n.options.strict){if(j)for(const D of j){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}}I.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 E=b?e(n,b,S,i):S.found?t(n,S.end,j,null,S,i):null;E?Pa(b)&&i(E.range,"BLOCK_IN_FLOW",La):S.comment&&(L.comment?L.comment+=`
166
+ `+S.comment:L.comment=S.comment);const A=new De(L,E);if(n.options.keepSourceTokens&&(A.srcToken=g),l){const D=u;y0(n,D.items,L)&&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=(E??L).range;D.range=[L.range[0],U[1],U[2]],u.items.push(D)}c=E?E.range[2]:S.end}}const p=l?"}":"]",[h,...x]=r.end;let y=c;if((h==null?void 0:h.source)===p)y=h.offset+h.source.length;else{const m=o[0].toUpperCase()+o.substring(1),g=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",g),h&&h.source.length!==1&&x.unshift(h)}if(x.length>0){const m=Ts(x,y,n.options.strict,i);m.comment&&(u.comment?u.comment+=`
167
+ `+m.comment:u.comment=m.comment),u.range=[r.offset,y,m.offset]}else u.range=[r.offset,y,y];return u}function _a(e,t,n,r,i,s){const l=n.type==="block-map"?qj(e,t,n,r,s):n.type==="block-seq"?Qj(e,t,n,r,s):Yj(e,t,n,r,s),o=l.constructor;return i==="!"||i===o.tagName?(l.tag=o.tagName,l):(i&&(l.tag=i),l)}function Jj(e,t,n,r,i){var p;const s=r.tag,l=s?t.directives.tagName(s.source,h=>i(s,"TAG_RESOLVE_FAILED",h)):null;if(n.type==="block-seq"){const{anchor:h,newlineAfterProp:x}=r,y=h&&s?h.offset>s.offset?h:s:h??s;y&&(!x||x.offset<y.offset)&&i(y,"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(!s||!l||l==="!"||l===nt.tagName&&o==="map"||l===In.tagName&&o==="seq")return _a(e,t,n,i,l);let a=t.schema.tags.find(h=>h.tag===l&&h.collection===o);if(!a){const h=t.schema.knownTags[l];if((h==null?void 0:h.collection)===o)t.schema.tags.push(Object.assign({},h,{default:!1})),a=h;else return h?i(s,"BAD_COLLECTION_TYPE",`${h.tag} used for ${o} collection, but expects ${h.collection??"scalar"}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${l}`,!0),_a(e,t,n,i,l)}const u=_a(e,t,n,i,l,a),f=((p=a.resolve)==null?void 0:p.call(a,u,h=>i(s,"TAG_RESOLVE_FAILED",h),t.options))??u,c=ge(f)?f:new V(f);return c.range=u.range,c.tag=l,a!=null&&a.format&&(c.format=a.format),c}function x0(e,t,n){const r=t.offset,i=Gj(t,e.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const s=i.mode===">"?V.BLOCK_FOLDED:V.BLOCK_LITERAL,l=t.source?Xj(t.source):[];let o=l.length;for(let y=l.length-1;y>=0;--y){const w=l[y][1];if(w===""||w==="\r")o=y;else break}if(o===0){const y=i.chomp==="+"&&l.length>0?`
168
+ `.repeat(Math.max(1,l.length-1)):"";let w=r+i.length;return t.source&&(w+=t.source.length),{value:y,type:s,comment:i.comment,range:[r,w,w]}}let a=t.indent+i.indent,u=t.offset+i.length,f=0;for(let y=0;y<o;++y){const[w,m]=l[y];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=y,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 y=l.length-1;y>=o;--y)l[y][0].length>a&&(o=y+1);let c="",p="",h=!1;for(let y=0;y<f;++y)c+=l[y][0].slice(a)+`
169
+ `;for(let y=f;y<o;++y){let[w,m]=l[y];u+=w.length+m.length+1;const g=m[m.length-1]==="\r";if(g&&(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-(g?2:1),"BAD_INDENT",C),w=""}s===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 y=o;y<l.length;++y)c+=`
179
+ `+l[y][0].slice(a);c[c.length-1]!==`
180
+ `&&(c+=`
181
+ `);break;default:c+=`
182
+ `}const x=r+i.length+t.source.length;return{value:c,type:s,comment:i.comment,range:[r,x,x]}}function Gj({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],s=i[0];let l=0,o="",a=-1;for(let p=1;p<i.length;++p){const h=i[p];if(!o&&(h==="-"||h==="+"))o=h;else{const x=Number(h);!l&&x?l=x: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 x=`Unexpected token in block scalar header: ${h.type}`;r(h,"UNEXPECTED_TOKEN",x);const y=h.source;y&&typeof y=="string"&&(c+=y.length)}}}return{mode:s,indent:l,chomp:o,comment:f,length:c}}function Xj(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),s=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let l=1;l<t.length;l+=2)s.push([t[l],t[l+1]]);return s}function v0(e,t,n){const{offset:r,type:i,source:s,end:l}=e;let o,a;const u=(p,h,x)=>n(r+p,h,x);switch(i){case"scalar":o=V.PLAIN,a=Zj(s,u);break;case"single-quoted-scalar":o=V.QUOTE_SINGLE,a=eE(s,u);break;case"double-quoted-scalar":o=V.QUOTE_DOUBLE,a=tE(s,u);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}const f=r+s.length,c=Ts(l,f,t,n);return{value:a,type:o,comment:c.comment,range:[r,f,c.offset]}}function Zj(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}`),w0(e)}function eE(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),w0(e.slice(1,-1)).replace(/''/g,"'")}function w0(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],s=" ",l=t.lastIndex;for(n.lastIndex=l;r=n.exec(e);)r[1]===""?s===`
185
+ `?i+=s:s=`
186
+ `:(i+=s+r[1],s=" "),l=n.lastIndex;const o=/[ \t]*(.*)/sy;return o.lastIndex=l,r=o.exec(e),i+s+((r==null?void 0:r[1])??"")}function tE(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:s,offset:l}=nE(e,r);n+=s,r=l}else if(i==="\\"){let s=e[++r];const l=rE[s];if(l)n+=l;else if(s===`
189
+ `)for(s=e[r+1];s===" "||s===" ";)s=e[++r+1];else if(s==="\r"&&e[r+1]===`
190
+ `)for(s=e[++r+1];s===" "||s===" ";)s=e[++r+1];else if(s==="x"||s==="u"||s==="U"){const o={x:2,u:4,U:8}[s];n+=iE(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 s=r;let l=e[r+1];for(;l===" "||l===" ";)l=e[++r+1];l!==`
191
+ `&&!(l==="\r"&&e[r+2]===`
192
+ `)&&(n+=r>s?e.slice(s,r+1):i)}else n+=i}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function nE(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 rE={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
197
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function iE(e,t,n,r){const i=e.substr(t,n),l=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(l)){const o=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(l)}function k0(e,t,n,r){const{value:i,type:s,comment:l,range:o}=t.type==="block-scalar"?x0(e,t,r):v0(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[Ft]:a?u=sE(e.schema,i,a,n,r):t.type==="scalar"?u=lE(e,i,t,r):u=e.schema[Ft];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,s&&(f.type=s),a&&(f.tag=a),u.format&&(f.format=u.format),l&&(f.comment=l),f}function sE(e,t,n,r,i){var o;if(n==="!")return e[Ft];const s=[];for(const a of e.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)s.push(a);else return a;for(const a of s)if((o=a.test)!=null&&o.test(t))return a;const l=e.knownTags[n];return l&&!l.collection?(e.tags.push(Object.assign({},l,{default:!1,test:void 0})),l):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Ft])}function lE({atKey:e,directives:t,schema:n},r,i,s){const l=n.tags.find(o=>{var a;return(o.default===!0||e&&o.default==="key")&&((a=o.test)==null?void 0:a.test(r))})||n[Ft];if(n.compat){const o=n.compat.find(a=>{var u;return a.default&&((u=a.test)==null?void 0:u.test(r))})??n[Ft];if(l.tag!==o.tag){const a=t.tagString(l.tag),u=t.tagString(o.tag),f=`Value may be parsed as either ${a} or ${u}`;s(i,"TAG_RESOLVE_FAILED",f,!0)}}return l}function oE(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 aE={composeNode:b0,composeEmptyNode:Cf};function b0(e,t,n,r){const i=e.atKey,{spaceBefore:s,comment:l,anchor:o,tag:a}=n;let u,f=!0;switch(t.type){case"alias":u=uE(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=k0(e,t,a,r),o&&(u.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":u=Jj(aE,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=Cf(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"),s&&(u.spaceBefore=!0),l&&(t.type==="scalar"&&t.source===""?u.comment=l:u.commentBefore=l),e.options.keepSourceTokens&&f&&(u.srcToken=t),u}function Cf(e,t,n,r,{spaceBefore:i,comment:s,anchor:l,tag:o,end:a},u){const f={type:"scalar",offset:oE(t,n,r),indent:-1,source:""},c=k0(e,f,o,u);return l&&(c.anchor=l.source.substring(1),c.anchor===""&&u(l,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(c.spaceBefore=!0),s&&(c.comment=s,c.range[2]=a),c}function uE({options:e},{offset:t,source:n,end:r},i){const s=new Eo(n.substring(1));s.source===""&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const l=t+n.length,o=Ts(r,l,e.strict,i);return s.range=[t,l,o.offset],o.comment&&(s.comment=o.comment),s}function cE(e,t,{offset:n,start:r,value:i,end:s},l){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??(s==null?void 0:s[0]),offset:n,onError:l,parentIndent:0,startOnNewline:!0});f.found&&(a.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!f.hasNewline&&l(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=i?b0(u,i,f,l):Cf(u,f.end,r,null,f,l);const c=a.contents.range[2],p=Ts(s,c,!1,l);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 ep(e){var i;let t="",n=!1,r=!1;for(let s=0;s<e.length;++s){const l=e[s];switch(l[0]){case"#":t+=(t===""?"":r?`
198
+
199
+ `:`
200
+ `)+(l.substring(1)||" "),n=!0,r=!1;break;case"%":((i=e[s+1])==null?void 0:i[0])!=="#"&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}class jf{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,i,s)=>{const l=Ci(n);s?this.warnings.push(new g0(l,r,i)):this.errors.push(new Qn(l,r,i))},this.directives=new $e({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:r,afterEmptyLine:i}=ep(this.prelude);if(r){const s=t.contents;if(n)t.comment=t.comment?`${t.comment}
201
+ ${r}`:r;else if(i||t.directives.docStart||!s)t.commentBefore=r;else if(pe(s)&&!s.flow&&s.items.length>0){let l=s.items[0];fe(l)&&(l=l.key);const o=l.commentBefore;l.commentBefore=o?`${r}
202
+ ${o}`:r}else{const l=s.commentBefore;s.commentBefore=l?`${r}
203
+ ${l}`: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:ep(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 s=Ci(t);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=cE(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=Ts(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 fE(e,t=!0,n){if(e){const r=(i,s,l)=>{const o=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(o,s,l);else throw new Qn([o,o+1],s,l)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return v0(e,t,r);case"block-scalar":return x0({options:{strict:t}},e,r)}}return null}function dE(e,t){const{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:s=-1,type:l="PLAIN"}=t,o=js({type:l,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:s,indent:r,source:f}];return S0(p,a)||p.push({type:"newline",offset:-1,indent:r,source:`
208
+ `}),{type:"block-scalar",offset:s,indent:r,props:p,source:c}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:o,end:a};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:o,end:a};default:return{type:"scalar",offset:s,indent:r,source:o,end:a}}}function hE(e,t,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:l}=n,o="indent"in e?e.indent:null;if(r&&typeof o=="number"&&(o+=2),!l)switch(e.type){case"single-quoted-scalar":l="QUOTE_SINGLE";break;case"double-quoted-scalar":l="QUOTE_DOUBLE";break;case"block-scalar":{const u=e.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:l="PLAIN"}const a=js({type:l,value:t},{implicitKey:i||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":pE(e,a);break;case'"':Aa(e,a,"double-quoted-scalar");break;case"'":Aa(e,a,"single-quoted-scalar");break;default:Aa(e,a,"scalar")}}function pE(e,t){const n=t.indexOf(`
209
+ `),r=t.substring(0,n),i=t.substring(n+1)+`
210
+ `;if(e.type==="block-scalar"){const s=e.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,e.source=i}else{const{offset:s}=e,l="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:s,indent:l,source:r}];S0(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:l,source:`
211
+ `});for(const a of Object.keys(e))a!=="type"&&a!=="offset"&&delete e[a];Object.assign(e,{type:"block-scalar",indent:l,props:o,source:i})}}function S0(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 Aa(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 s of r)s.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(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(const s of Object.keys(e))s!=="type"&&s!=="offset"&&delete e[s];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}const mE=e=>"type"in e?to(e):kl(e);function to(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=to(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=kl(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=kl(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=kl(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 kl({start:e,key:t,sep:n,value:r}){let i="";for(const s of e)i+=s.source;if(t&&(i+=to(t)),n)for(const s of n)i+=s.source;return r&&(i+=to(r)),i}const Qu=Symbol("break visit"),gE=Symbol("skip children"),N0=Symbol("remove item");function rr(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),C0(Object.freeze([]),e,t)}rr.BREAK=Qu;rr.SKIP=gE;rr.REMOVE=N0;rr.itemAtPath=(e,t)=>{let n=e;for(const[r,i]of t){const s=n==null?void 0:n[r];if(s&&"items"in s)n=s.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 C0(e,t,n){let r=n(t,e);if(typeof r=="symbol")return r;for(const i of["key","value"]){const s=t[i];if(s&&"items"in s){for(let l=0;l<s.items.length;++l){const o=C0(Object.freeze(e.concat([[i,l]])),s.items[l],n);if(typeof o=="number")l=o-1;else{if(o===Qu)return Qu;o===N0&&(s.items.splice(l,1),l-=1)}}typeof r=="function"&&i==="key"&&(r=r(t,e))}}return typeof r=="function"?r(t,e):r}const Mo="\uFEFF",Fo="",zo="",ms="",yE=e=>!!e&&"items"in e,xE=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function vE(e){switch(e){case Mo:return"<BOM>";case Fo:return"<DOC>";case zo:return"<FLOW_END>";case ms:return"<SCALAR>";default:return JSON.stringify(e)}}function j0(e){switch(e){case Mo:return"byte-order-mark";case Fo:return"doc-mode";case zo:return"flow-error-end";case ms: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 wE=Object.freeze(Object.defineProperty({__proto__:null,BOM:Mo,DOCUMENT:Fo,FLOW_END:zo,SCALAR:ms,createScalarToken:dE,isCollection:yE,isScalar:xE,prettyToken:vE,resolveAsScalar:fE,setScalarValue:hE,stringify:mE,tokenType:j0,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 tp=new Set("0123456789ABCDEFabcdef"),kE=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),nl=new Set(",[]{}"),bE=new Set(` ,[]{}
216
+ \r `),Oa=e=>!e||bE.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]===Mo&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,r=t.indexOf("#");for(;r!==-1;){const s=t[r-1];if(s===" "||s===" "){n=r-1;break}else r=t.indexOf("#",r+1)}for(;;){const s=t[n-1];if(s===" "||s===" ")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 Fo,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(Oa),"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 s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-s),"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(Oa),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const l=this.charAt(1);if(this.flowKey||kt(l)||l===",")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 s=0;for(;this.buffer[n-1-s]==="\\";)s+=1;if(s%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 s=this.continueScalar(i+1);if(s===-1)break;i=r.indexOf(`
223
+ `,s)}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 s=this.pos;r=this.buffer[s];++s)switch(r){case" ":n+=1;break;case`
224
+ `:t=s,n=0;break;case"\r":{const l=this.buffer[s+1];if(!l&&!this.atEnd)return this.setNext("block-scalar");if(l===`
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 s=this.continueScalar(t+1);if(s===-1)break;t=this.buffer.indexOf(`
226
+ `,s)}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 s=t-1,l=this.buffer[s];l==="\r"&&(l=this.buffer[--s]);const o=s;for(;l===" ";)l=this.buffer[--s];if(l===`
228
+ `&&s>=this.pos&&s+1+n>o)t=s;else break}while(!0);return yield ms,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 s=this.buffer[r+1];if(kt(s)||t&&nl.has(s))break;n=r}else if(kt(i)){let s=this.buffer[r+1];if(i==="\r"&&(s===`
229
+ `?(r+=1,i=`
230
+ `,s=this.buffer[r+1]):n=r),s==="#"||t&&nl.has(s))break;if(i===`
231
+ `){const l=this.continueScalar(r+1);if(l===-1)break;r=Math.max(r,l-2)}}else{if(t&&nl.has(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield ms,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(Oa))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(kt(n)||t&&nl.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(kE.has(n))n=this.buffer[++t];else if(n==="%"&&tp.has(this.buffer[t+1])&&tp.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 T0{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,r=this.lineStarts.length;for(;n<r;){const s=n+r>>1;this.lineStarts[s]<t?n=s+1:r=s}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 fn(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function np(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 I0(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 rl(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 rp(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!fn(t.start,"explicit-key-ind")&&!fn(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,I0(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=j0(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"&&rp(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&&np(i.start)===-1&&(n.indent===0||i.start.every(s=>s.type!=="comment"||s.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":{np(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=rl(this.peek(2)),r=gr(n);let i;t.end?(i=t.end,i.push(this.sourceToken),delete t.end):i=[this.sourceToken];const s={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]=s}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,s=Array.isArray(i)?i[i.length-1]:void 0;(s==null?void 0:s.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],s=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.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,s=i&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let l=[];if(s&&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&&(l=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":s||n.value?(l.push(this.sourceToken),t.items.push({start:l}),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):s||n.value?(l.push(this.sourceToken),t.items.push({start:l,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(fn(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]});else if(I0(n.key)&&!fn(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 l.length>0?n.sep=n.sep.concat(l,this.sourceToken):n.sep.push(this.sourceToken);else if(fn(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||s?t.items.push({start:l,key:null,sep:[this.sourceToken]}):fn(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);s||n.value?(t.items.push({start:l,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&&!fn(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:l});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,s=Array.isArray(i)?i[i.length-1]:void 0;(s==null?void 0:s.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],s=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.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||fn(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=rl(r),s=gr(i);rp(t);const l=t.end.splice(1,t.end.length);l.push(this.sourceToken);const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:s,key:t,sep:l}]};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=rl(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=rl(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 L0(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new T0||null,prettyErrors:t}}function SE(e,t={}){const{lineCounter:n,prettyErrors:r}=L0(t),i=new Ef(n==null?void 0:n.addNewLine),s=new jf(t),l=Array.from(s.compose(i.parse(e)));if(r&&n)for(const o of l)o.errors.forEach(eo(e,n)),o.warnings.forEach(eo(e,n));return l.length>0?l:Object.assign([],{empty:!0},s.streamInfo())}function P0(e,t={}){const{lineCounter:n,prettyErrors:r}=L0(t),i=new Ef(n==null?void 0:n.addNewLine),s=new jf(t);let l=null;for(const o of s.compose(i.parse(e),!0,e.length))if(!l)l=o;else if(l.options.logLevel!=="silent"){l.errors.push(new Qn(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(l.errors.forEach(eo(e,n)),l.warnings.forEach(eo(e,n))),l}function NE(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);const i=P0(e,n);if(!i)return null;if(i.warnings.forEach(s=>Gy(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function CE(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 jE=Object.freeze(Object.defineProperty({__proto__:null,Alias:Eo,CST:wE,Composer:jf,Document:di,Lexer:E0,LineCounter:T0,Pair:De,Parser:Ef,Scalar:V,Schema:Do,YAMLError:Nf,YAMLMap:nt,YAMLParseError:Qn,YAMLSeq:In,YAMLWarning:g0,isAlias:Rn,isCollection:pe,isDocument:ar,isMap:ai,isNode:ge,isPair:fe,isScalar:ie,isSeq:ui,parse:NE,parseAllDocuments:SE,parseDocument:P0,stringify:CE,visit:ur,visitAsync:jo},Symbol.toStringTag,{value:"Module"})),ip={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:"待开始"}},EE={gateway:"🌐",service:"⚙️",job:"⏰"};function TE({content:e}){const t=T.useMemo(()=>{try{return jE.parse(e)}catch(s){return console.error("Failed to parse services.yaml:",s),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(s=>{const l=ip[s.status]||ip.pending,o=EE[s.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:s.name}),d.jsx("span",{className:"text-xs text-gray-500",children:s.role})]})]}),d.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${l.bg} ${l.text}`,children:l.label})]}),s.database&&d.jsxs("div",{className:"text-sm text-gray-600 mb-2",children:[d.jsx("span",{className:"text-gray-400",children:"💾"})," ",s.database,s.tables&&s.tables.length>0&&d.jsxs("span",{className:"text-gray-400 ml-2",children:["(",s.tables.join(", "),")"]})]}),s.changes&&s.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:[s.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)),s.changes.length>5&&d.jsxs("div",{className:"text-xs text-gray-400 text-center",children:["+",s.changes.length-5," more"]})]})]}),s.dependencies&&s.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:"," ",s.dependencies.join(", ")]})]},s.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((s,l)=>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 ",s.step]}),d.jsx("div",{className:"font-medium text-gray-800 text-sm",children:s.name})]}),l<i.order.length-1&&d.jsx("span",{className:"text-gray-300 mx-2",children:"→"})]},s.step))})]})]})}function IE({changeId:e}){const{lastMessage:t}=rn(),[n,r]=T.useState(null),[i,s]=T.useState([]),[l,o]=T.useState(null),[a,u]=T.useState(!0),[f,c]=T.useState(null),p=T.useCallback(async()=>{try{const x=await Kt.getCrossServiceInfo(e);r(x.config),s(x.documents),x.documents.length>0&&!l&&o(x.documents[0].name)}catch(x){console.error("Failed to fetch cross-service docs:",x),c("Failed to load cross-service documents")}finally{u(!1)}},[e,l]);T.useEffect(()=>{u(!0),c(null),p()},[p]),T.useEffect(()=>{if(!t)return;const{event:x}=t;x==="cross-service:updated"&&p()},[t,p]);const h=i.find(x=>x.name===l);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(x=>d.jsxs("button",{onClick:()=>o(x.name),className:`px-4 py-2 rounded-lg text-sm font-medium transition-all whitespace-nowrap ${l===x.name?"bg-blue-100 text-blue-700 shadow-sm":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:[x.name.endsWith(".yaml")||x.name.endsWith(".yml")?"📋":"📄"," ",x.name]},x.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(TE,{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 LE={comment:"💬",suggestion:"💡",question:"❓",issue:"🚨"},PE={low:"bg-gray-100 text-gray-600",medium:"bg-yellow-100 text-yellow-700",high:"bg-red-100 text-red-700"};function _E(){var S;const{id:e}=W1(),{lastMessage:t}=rn(),[n,r]=T.useState(null),[i,s]=T.useState([]),[l,o]=T.useState(null),[a,u]=T.useState(!0),[f,c]=T.useState("proposal"),[p,h]=T.useState(!1),[x,y]=T.useState([]),[w,m]=T.useState({proposal:[],design:[],tasks:[],summary:null});T.useEffect(()=>{async function E(){if(e)try{const[A,D,U,K]=await Promise.all([Kt.get(e),Li.get(e),Kt.getReviews(e),Kt.getSpecs(e)]);r(A.change),s(D.tasks),o(D.progress),m(U),y(K.specs)}catch(A){console.error("Failed to fetch change:",A)}finally{u(!1)}}E()},[e]),T.useEffect(()=>{if(!t||!e)return;const{event:E,data:A}=t;if(E==="review:added"&&A.changeId===e){const D=A.targetType;D&&A.review&&m(U=>({...U,[D]:[...U[D],A.review]}))}if(E==="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)}))}E==="reviews:updated"&&A.changeId===e&&Kt.getReviews(e).then(D=>{m(D)}).catch(D=>{console.error("Failed to refresh reviews:",D)}),E==="tasks:updated"&&A.changeId===e&&Li.get(e).then(D=>{s(D.tasks),o(D.progress)}).catch(D=>{console.error("Failed to refresh tasks:",D)}),E==="task:updated"&&A.changeId===e&&s(D=>D.map(U=>U.id===A.taskId?{...U,status:A.status}:U)),E==="change:content_updated"&&A.changeId===e&&Kt.get(e).then(D=>{r(D.change)}).catch(D=>{console.error("Failed to refresh change:",D)})},[t,e]);const g=async(E,A)=>{if(e)try{await Li.update(e,E,A);const D=await Li.get(e);s(D.tasks),o(D.progress)}catch(D){console.error("Failed to update task:",D)}},v=async(E,A)=>{if(e)try{await Kt.resolveReview(e,E,A),m(D=>({...D,[A]:D[A].map(U=>U.id===E?{...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(Jt,{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,j=C?w[C]:[],b=j.filter(E=>E.status==="open"),I=j.filter(E=>E.status!=="open"),P=p?I:b,L=((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(Jt,{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:[L&&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})]})]}),l&&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:[l.completed,"/",l.total," tasks (",l.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:`${l.percentage}%`}})}),d.jsxs("div",{className:"flex justify-between mt-2 text-xs text-gray-500",children:[d.jsxs("span",{children:["✅ ",l.completed," done"]}),d.jsxs("span",{children:["🔄 ",l.inProgress," in progress"]}),d.jsxs("span",{children:["⏳ ",l.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(E=>{const A=w[E].filter(D=>D.status==="open");return d.jsxs("button",{onClick:()=>c(E),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center ${f===E?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[E.charAt(0).toUpperCase()+E.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})]},E)}),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",x.length>0&&d.jsx("span",{className:"ml-2 bg-green-100 text-green-600 px-2 py-0.5 rounded-full text-xs",children:x.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(E=>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=E.status==="pending"?"in_progress":E.status==="in_progress"?"done":"pending";g(E.id,A)},className:`w-6 h-6 rounded-full border-2 flex items-center justify-center ${E.status==="done"?"bg-green-500 border-green-500 text-white":E.status==="in_progress"?"bg-blue-500 border-blue-500 text-white":"border-gray-300"}`,children:[E.status==="done"&&"✓",E.status==="in_progress"&&"●"]}),d.jsxs("div",{children:[d.jsxs("span",{className:"font-mono text-sm text-gray-500",children:["[",E.id,"]"]}),d.jsx("span",{className:"ml-2",children:E.title})]})]}),d.jsx("span",{className:`text-xs ${E.status==="done"?"text-green-600":E.status==="in_progress"?"text-blue-600":"text-gray-400"}`,children:E.status})]},E.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:x.length===0?d.jsx("p",{className:"text-gray-500",children:"No specs defined for this change."}):d.jsx("div",{className:"space-y-6",children:x.map(E=>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:E.title}),d.jsx("span",{className:"text-xs text-green-600 font-mono",children:E.id})]}),d.jsx("div",{className:"p-4 prose prose-sm max-w-none",children:d.jsx(Lr,{remarkPlugins:[Pr],children:E.content})})]},E.id))})}),f==="cross-service"&&e&&d.jsx(IE,{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 (",I.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(E=>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:LE[E.type]}),E.severity&&d.jsx("span",{className:`px-1.5 py-0.5 rounded text-xs ${PE[E.severity]}`,children:E.severity}),E.lineNumber&&d.jsxs("span",{className:"text-xs text-gray-400",children:["L",E.lineNumber]})]}),E.status==="open"&&C?d.jsx("button",{onClick:()=>v(E.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 ${E.status==="resolved"?"bg-green-100 text-green-600":"bg-gray-100 text-gray-500"}`,children:E.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:E.body})}),d.jsxs("div",{className:"text-xs text-gray-400 mt-2",children:["by ",E.author," • ",new Date(E.createdAt).toLocaleDateString()]})]},E.id))})]})})]})]})}const sp={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 AE(){const{lastMessage:e}=rn(),[t,n]=T.useState([]),[r,i]=T.useState(!0),[s,l]=T.useState(null),[o,a]=T.useState([]),[u,f]=T.useState(null),[c,p]=T.useState(""),[h,x]=T.useState("comment"),[y,w]=T.useState("medium"),m=T.useRef(null),g=async()=>{try{const L=await Bn.list();n(L.specs)}catch(L){console.error("Failed to fetch specs:",L)}};T.useEffect(()=>{g().finally(()=>i(!1))},[]),T.useEffect(()=>{if(!e)return;const{event:L,data:S}=e;(L==="file:changed"||L==="reviews:updated")&&(g(),s&&L==="reviews:updated"&&(S==null?void 0:S.targetType)==="spec"&&Bn.listReviews(s.id).then(E=>{a(E.reviews)}).catch(console.error))},[e,s]);const v=async L=>{try{const S=await Bn.get(L);l(S.spec),f(null),p("");const E=await Bn.listReviews(L);a(E.reviews)}catch(S){console.error("Failed to fetch spec:",S)}},C=()=>{const L=window.getSelection(),S=m.current;if(!L||L.isCollapsed||!S){f(null);return}const E=L.getRangeAt(0),A=k=>{var J;return k.nodeType===Node.ELEMENT_NODE?!!k.closest("[data-review-overlay]"):!!((J=k==null?void 0:k.parentElement)!=null&&J.closest("[data-review-overlay]"))};if(!S.contains(E.startContainer)||!S.contains(E.endContainer)||A(E.startContainer)||A(E.endContainer)){f(null);return}const D=L.toString();if(!D.trim()){f(null);return}const U=E.cloneRange();U.selectNodeContents(S),U.setEnd(E.startContainer,E.startOffset);const xe=(U.toString().match(/\n/g)||[]).length+1,de=S.getBoundingClientRect(),F=E.getBoundingClientRect(),$=Math.max(F.top-de.top+S.scrollTop-180,12);f({text:D,lineNumber:xe,popupTop:$})},j=async()=>{const L=c.trim();if(!(!u||!L||!s))try{const S=await Bn.addReview(s.id,L,h,{lineNumber:u.lineNumber,severity:h==="issue"?y:void 0});a(E=>[...E,S.review]),f(null),p("")}catch(S){console.error("Failed to add review:",S),alert("Failed to save review")}},b=async(L,S="resolved")=>{if(s)try{await Bn.resolveReview(s.id,L,S),a(E=>E.map(A=>A.id===L?{...A,status:S,resolvedAt:new Date().toISOString()}:A))}catch(E){console.error("Failed to resolve review:",E)}};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 I=o.filter(L=>L.status==="open"),P=I.some(L=>L.type==="issue"&&L.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"}),s&&I.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:[I.length," open review",I.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(L=>d.jsxs("button",{onClick:()=>v(L.id),className:`w-full text-left p-4 hover:bg-gray-50 transition-colors ${(s==null?void 0:s.id)===L.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:L.title}),d.jsx("div",{className:"text-xs text-gray-500 mt-1 font-mono",children:L.id})]},L.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:s?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:s.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:s.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(L=>d.jsxs("button",{onClick:()=>x(L),className:`px-2 py-1 text-xs rounded ${h===L?"bg-indigo-600 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:[sp[L]," ",L]},L))}),h==="issue"&&d.jsx("div",{className:"flex space-x-1 mb-2",children:["low","medium","high"].map(L=>d.jsx("button",{onClick:()=>w(L),className:`px-2 py-1 text-xs rounded ${y===L?lp[L]+" ring-2 ring-offset-1":"bg-gray-100 text-gray-600"}`,children:L},L))}),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:L=>p(L.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:j,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:I.length})]})}),d.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:I.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."})]}):I.map(L=>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:sp[L.type]}),L.severity&&d.jsx("span",{className:`px-1.5 py-0.5 rounded text-xs ${lp[L.severity]}`,children:L.severity}),L.lineNumber&&d.jsxs("span",{className:"text-xs text-gray-400",children:["L",L.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(L.id,"resolved"),title:"Resolve",children:"✓"}),d.jsx("button",{className:"text-gray-400 hover:text-gray-600 text-xs",onClick:()=>b(L.id,"wont_fix"),title:"Won't fix",children:"×"})]})]}),d.jsx("div",{className:"text-sm text-gray-800",children:L.body}),L.replies.length>0&&d.jsxs("div",{className:"mt-2 pt-2 border-t border-gray-100 text-xs text-gray-500",children:["💭 ",L.replies.length," replies"]})]},L.id))})]})]})]})}function OE(){const{lastMessage:e}=rn(),[t,n]=T.useState([]),[r,i]=T.useState(!0),[s,l]=T.useState(!1),[o,a]=T.useState({type:null,changeId:""}),[u,f]=T.useState({name:"",comment:""});async function c(){try{const y=s?await Pi.list():await Pi.listPending();n(y.approvals)}catch(y){console.error("Failed to fetch approvals:",y)}}T.useEffect(()=>{i(!0),c().finally(()=>i(!1))},[s]),T.useEffect(()=>{if(!e)return;const{event:y}=e;["approval:requested","approval:approved","approval:rejected"].includes(y)&&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(y){console.error("Failed to approve:",y)}},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(y){console.error("Failed to reject:",y)}},x=y=>({draft:"status-draft",pending_approval:"status-pending",approved:"status-approved",rejected:"status-rejected",implementing:"status-implementing",completed:"status-completed"})[y]||"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:s,onChange:y=>l(y.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:s?"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(y=>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:y.changeId}),y.requestedBy&&d.jsxs("div",{className:"text-sm text-gray-500",children:["by ",y.requestedBy]})]}),d.jsx("td",{className:"px-6 py-4",children:d.jsx("span",{className:`status-badge ${x(y.status)}`,children:y.status.replace("_"," ")})}),d.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:y.requestedAt?new Date(y.requestedAt).toLocaleString():"-"}),d.jsx("td",{className:"px-6 py-4",children:y.status==="pending_approval"&&d.jsxs("div",{className:"flex space-x-2",children:[d.jsx("button",{onClick:()=>a({type:"approve",changeId:y.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:y.changeId}),className:"px-3 py-1 bg-red-500 text-white text-sm rounded hover:bg-red-600",children:"Reject"})]})})]},y.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:y=>f({...u,name:y.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:y=>f({...u,comment:y.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 RE(){const{lastMessage:e}=rn(),[t,n]=T.useState(null),[r,i]=T.useState(!0),[s,l]=T.useState(null),[o,a]=T.useState(null),[u,f]=T.useState(null),[c,p]=T.useState(null),h=T.useCallback(async()=>{try{const g=await Gd.get();n(g),l(null)}catch(g){l(g instanceof Error?g.message:"Failed to load kanban")}},[]);T.useEffect(()=>{h().finally(()=>i(!1))},[h]),T.useEffect(()=>{if(!e)return;const{event:g}=e;["kanban:updated","change:archived","tasks:updated","approval:requested","approval:approved","approval:rejected"].includes(g)&&h()},[e,h]);const x=g=>{a(g)},y=(g,v)=>{g.preventDefault(),p(v)},w=()=>{p(null)},m=async g=>{if(p(null),!o||o.column===g){a(null);return}f(o.id);try{await Gd.moveCard(o.id,g),await h()}catch(v){l(v instanceof Error?v.message:"Failed to move card"),setTimeout(()=>l(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"})]})}):s&&!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(op,{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:s}),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(FE,{className:"w-4 h-4 inline mr-2"}),"Refresh"]})})]}),s&&d.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 flex items-start animate-fade-in",children:[d.jsx(op,{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:s})]})]}),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(g=>d.jsx(DE,{column:g,onDragStart:x,onDragOver:v=>y(v,g.id),onDragLeave:w,onDrop:()=>m(g.id),isDragOver:c===g.id&&(o==null?void 0:o.column)!==g.id,movingCardId:u},g.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(g=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:g.color}}),d.jsx("span",{className:"text-sm text-gray-600",children:g.title}),d.jsx("span",{className:"text-sm font-semibold text-gray-900 bg-gray-100 px-2 py-0.5 rounded-full",children:g.cards.length})]},g.id))})]})]})}function DE({column:e,onDragStart:t,onDragOver:n,onDragLeave:r,onDrop:i,isDragOver:s,movingCardId:l}){return d.jsxs("div",{className:`flex-shrink-0 w-80 rounded-xl p-4 transition-all duration-200 ${s?"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 ${s?"border-indigo-300 bg-indigo-50":"border-gray-200"}`,children:[d.jsx(zE,{className:"w-8 h-8 mb-2 opacity-50"}),d.jsx("span",{children:"Drop here"})]}):e.cards.map(o=>d.jsx(ME,{card:o,onDragStart:t,isMoving:l===o.id,columnColor:e.color},o.id))})]})}function ME({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(Jt,{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($E,{className:"w-4 h-4 text-gray-300 group-hover:text-indigo-400 group-hover:translate-x-0.5 transition-all"})]})]})})}function FE({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 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("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 zE({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 $E({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 BE(){const[e,t]=T.useState(null),[n,r]=T.useState(!0),[i,s]=T.useState(null),[l,o]=T.useState(!1),a=T.useCallback(async(u=!1)=>{try{u&&o(!0);const f=await kw.analyze(u);t(f),s(null)}catch(f){s(f instanceof Error?f.message:"Failed to analyze context")}finally{r(!1),o(!1)}},[]);return T.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(UE,{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:l,className:`px-4 py-2 text-sm font-medium rounded-lg shadow-sm transition-all ${l?"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:l?d.jsxs(d.Fragment,{children:[d.jsx(ap,{className:"w-4 h-4 inline mr-2 animate-spin"}),"Analyzing..."]}):d.jsxs(d.Fragment,{children:[d.jsx(ap,{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(Fn,{label:"Frameworks",value:e.stack.frameworks.join(", ")||"None detected"}),d.jsx(Fn,{label:"Build Tools",value:e.stack.buildTools.join(", ")||"None detected"}),d.jsx(Fn,{label:"Package Manager",value:e.stack.packageManager}),d.jsx(Fn,{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(VE,{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(Fn,{label:"Architecture",value:e.patterns.architecture}),d.jsx(Fn,{label:"Code Style",value:e.patterns.codeStyle.join(", ")||"Not configured"}),d.jsx(Fn,{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 Fn({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 ap({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 UE({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 VE({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 HE(){var y,w;const{lastMessage:e}=rn(),[t,n]=T.useState(null),[r,i]=T.useState(null),[s,l]=T.useState([]),[o,a]=T.useState(!0),[u,f]=T.useState({});T.useEffect(()=>{c()},[]),T.useEffect(()=>{r?p(r):l([])},[r]),T.useEffect(()=>{if(!e)return;const{event:m,data:g}=e;m.startsWith("qa:")&&(c(),r&&g.changeName&&g.changeName===r&&p(r))},[e,r]);const c=async()=>{try{const m=await qs.getSummary();n(m)}catch(m){console.error("Failed to fetch QA summary:",m)}finally{a(!1)}},p=async m=>{try{const g=await qs.getHistory(m);l(g.history)}catch(g){console.error(`Failed to fetch history for ${m}:`,g)}},h=async m=>{if(!u[m]){f(g=>({...g,[m]:!0}));try{await qs.run(m)}catch(g){console.error(`Failed to run QA for ${m}:`,g),alert("Failed to start QA check")}finally{f(g=>({...g,[m]:!1}))}}},x=async m=>{if(!u[m]){f(g=>({...g,[m]:!0}));try{await qs.stop(m)}catch(g){console.error(`Failed to stop QA for ${m}:`,g),alert("Failed to stop QA check")}finally{f(g=>({...g,[m]:!1}))}}};return o?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.jsxs("div",{children:[d.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"QA Dashboard"}),d.jsx("p",{className:"text-gray-500",children:"Monitor and run quality checks for your changes"})]}),d.jsxs("div",{className:"flex space-x-4 text-sm",children:[d.jsxs("div",{className:"px-3 py-1 bg-white rounded shadow border border-gray-200",children:[d.jsx("span",{className:"font-semibold text-gray-700",children:"Running: "}),d.jsx("span",{className:"text-blue-600",children:(t==null?void 0:t.running)||0})]}),d.jsxs("div",{className:"px-3 py-1 bg-white rounded shadow border border-gray-200",children:[d.jsx("span",{className:"font-semibold text-gray-700",children:"Total Runs: "}),d.jsx("span",{className:"text-gray-900",children:(t==null?void 0:t.total)||0})]})]})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[d.jsxs("div",{className:"lg:col-span-1 bg-white rounded-lg shadow overflow-hidden",children:[d.jsx("div",{className:"p-4 border-b border-gray-200 bg-gray-50",children:d.jsx("h3",{className:"font-semibold text-gray-700",children:"Changes"})}),d.jsxs("div",{className:"divide-y divide-gray-200 max-h-[calc(100vh-250px)] overflow-y-auto",children:[t==null?void 0:t.changes.map(m=>{var g,v,C,j;return d.jsxs("div",{className:`p-4 hover:bg-gray-50 cursor-pointer transition-colors ${r===m.name?"bg-blue-50 border-l-4 border-blue-500":""}`,onClick:()=>i(m.name),children:[d.jsxs("div",{className:"flex justify-between items-start mb-2",children:[d.jsx("h4",{className:"font-medium text-gray-900 truncate pr-2",title:m.name,children:m.name}),m.status.isRunning?d.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-700 animate-pulse",children:"Running"}):m.lastRun?d.jsx("span",{className:"text-xs text-gray-500",children:new Date(m.lastRun).toLocaleDateString()}):d.jsx("span",{className:"text-xs text-gray-400",children:"Never run"})]}),m.status.isRunning?d.jsxs("div",{className:"mt-2",children:[d.jsxs("div",{className:"flex justify-between text-xs text-gray-500 mb-1",children:[d.jsx("span",{children:m.status.currentCheck||"Preparing..."}),d.jsxs("span",{children:[(g=m.status.progress)==null?void 0:g.completed,"/",(v=m.status.progress)==null?void 0:v.total]})]}),d.jsx("div",{className:"w-full h-1.5 bg-gray-200 rounded-full overflow-hidden",children:d.jsx("div",{className:"h-full bg-blue-500 transition-all duration-300",style:{width:`${(((C=m.status.progress)==null?void 0:C.completed)||0)/(((j=m.status.progress)==null?void 0:j.total)||1)*100}%`}})})]}):d.jsx("div",{className:"flex justify-between items-center mt-2",children:d.jsx("button",{onClick:b=>{b.stopPropagation(),h(m.name)},disabled:u[m.name],className:"text-xs px-3 py-1 bg-blue-50 text-blue-600 rounded hover:bg-blue-100 disabled:opacity-50",children:"Run Check"})})]},m.name)}),(!(t!=null&&t.changes)||t.changes.length===0)&&d.jsx("div",{className:"p-8 text-center text-gray-500",children:"No changes found"})]})]}),d.jsx("div",{className:"lg:col-span-2 space-y-6",children:r?d.jsxs(d.Fragment,{children:[((y=t==null?void 0:t.changes.find(m=>m.name===r))==null?void 0:y.status.isRunning)&&d.jsxs("div",{className:"bg-white rounded-lg shadow p-6 border-l-4 border-blue-500",children:[d.jsxs("div",{className:"flex justify-between items-start mb-4",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Running QA Check"}),d.jsxs("p",{className:"text-sm text-gray-500",children:["Executing tests for ",r]})]}),d.jsx("button",{onClick:()=>x(r),disabled:u[r],className:"px-4 py-2 bg-red-100 text-red-700 rounded hover:bg-red-200 text-sm font-medium disabled:opacity-50",children:"Stop Execution"})]}),d.jsx("div",{className:"space-y-4"})]}),d.jsxs("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:[d.jsxs("div",{className:"p-4 border-b border-gray-200 bg-gray-50 flex justify-between items-center",children:[d.jsx("h3",{className:"font-semibold text-gray-700",children:"Run History"}),d.jsx("button",{onClick:()=>h(r),disabled:((w=t==null?void 0:t.changes.find(m=>m.name===r))==null?void 0:w.status.isRunning)||u[r],className:"text-sm px-3 py-1 bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 disabled:bg-gray-400",children:"Start New Run"})]}),d.jsx("div",{className:"divide-y divide-gray-200",children:s.length===0?d.jsx("div",{className:"p-8 text-center text-gray-500",children:"No history available for this change"}):s.map(m=>d.jsxs("div",{className:"p-4 hover:bg-gray-50 transition-colors",children:[d.jsxs("div",{className:"flex justify-between items-center mb-3",children:[d.jsxs("div",{className:"flex items-center space-x-3",children:[d.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${m.failed>0?"bg-red-500":"bg-green-500"}`}),d.jsx("span",{className:"font-mono text-sm text-gray-600",children:new Date(m.startedAt).toLocaleString()})]}),d.jsxs("div",{className:"text-sm space-x-3",children:[d.jsxs("span",{className:"text-green-600",children:[m.passed," passed"]}),d.jsxs("span",{className:"text-red-600",children:[m.failed," failed"]}),d.jsxs("span",{className:"text-gray-400",children:[m.skipped," skipped"]})]})]}),d.jsx("div",{className:"space-y-2",children:m.checks.map((g,v)=>d.jsxs("div",{className:"flex items-center text-sm border rounded p-2 bg-gray-50",children:[d.jsx("div",{className:`w-20 font-medium ${g.status==="passed"?"text-green-600":g.status==="failed"?"text-red-600":"text-gray-500"}`,children:g.type}),d.jsx("div",{className:"flex-1 mx-3 truncate text-gray-600",children:g.status==="failed"&&g.errors?d.jsx("span",{className:"text-red-500",children:g.errors[0]}):d.jsx("span",{className:"text-gray-400 italic",children:g.status})}),d.jsxs("div",{className:"text-gray-400 w-16 text-right",children:[(g.duration/1e3).toFixed(1),"s"]})]},v))})]},m.id))})]})]}):d.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-gray-400 bg-white rounded-lg shadow min-h-[400px]",children:[d.jsx("div",{className:"text-5xl mb-4",children:"👈"}),d.jsx("p",{children:"Select a change to view QA details"})]})})]})]})}function KE(){const e=bs(),{connected:t}=rn(),[n,r]=T.useState(null);T.useEffect(()=>{let s=!0;return ww.get().then(({project:l})=>{s&&r(l.name)}).catch(()=>{}),()=>{s=!1}},[]);const i=[{path:"/",label:"Dashboard"},{path:"/kanban",label:"Kanban"},{path:"/qa",label:"QA"},{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(s=>d.jsx(Jt,{to:s.path,className:`px-3 py-2 rounded-md text-sm font-medium ${e.pathname===s.path?"bg-gray-100 text-gray-900":"text-gray-500 hover:text-gray-900 hover:bg-gray-50"}`,children:s.label},s.path))})]})})}),d.jsx("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:d.jsxs(aw,{children:[d.jsx(Ut,{path:"/",element:d.jsx(bw,{})}),d.jsx(Ut,{path:"/kanban",element:d.jsx(RE,{})}),d.jsx(Ut,{path:"/qa",element:d.jsx(HE,{})}),d.jsx(Ut,{path:"/context",element:d.jsx(BE,{})}),d.jsx(Ut,{path:"/changes",element:d.jsx(Tw,{})}),d.jsx(Ut,{path:"/changes/:id",element:d.jsx(_E,{})}),d.jsx(Ut,{path:"/specs",element:d.jsx(AE,{})}),d.jsx(Ut,{path:"/approvals",element:d.jsx(OE,{})})]})})]})}Ra.createRoot(document.getElementById("root")).render(d.jsx(vp.StrictMode,{children:d.jsx(mw,{children:d.jsx(KE,{})})}));