chamba 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +49 -0
  2. package/dist/cli.js +662 -161
  3. package/dist/server.js +355 -111
  4. package/inject/annotate.js +1 -1
  5. package/package.json +1 -1
  6. package/skill/SKILL.md +91 -19
  7. package/web/assets/{abnfDiagram-VRR7QNED-aw1_rWFY.js → abnfDiagram-VRR7QNED-C5V2hrtE.js} +1 -1
  8. package/web/assets/{arc-BMhSK0Sy.js → arc-d7OTmxZy.js} +1 -1
  9. package/web/assets/{architectureDiagram-ZJ3FMSHR-BZDcNKY3.js → architectureDiagram-ZJ3FMSHR--CztaeAS.js} +1 -1
  10. package/web/assets/{blockDiagram-677ZJIJ3-CLVR_gtH.js → blockDiagram-677ZJIJ3-DkA5Z_uK.js} +1 -1
  11. package/web/assets/{c4Diagram-LMCZKHZV-YjWWkNOJ.js → c4Diagram-LMCZKHZV-C78dI0l-.js} +1 -1
  12. package/web/assets/channel-D9AxU8kk.js +1 -0
  13. package/web/assets/{chunk-2Q5K7J3B-Bd9qqRl0.js → chunk-2Q5K7J3B-LBNP12XV.js} +1 -1
  14. package/web/assets/{chunk-32BRIVSS-Cq9EhooX.js → chunk-32BRIVSS-DZoXrhCs.js} +1 -1
  15. package/web/assets/{chunk-5VM5RSS4-DYxyelz5.js → chunk-5VM5RSS4-CPjoRxF_.js} +1 -1
  16. package/web/assets/{chunk-EX3LRPZG-COaiqIlv.js → chunk-EX3LRPZG-DSlL8FE9.js} +1 -1
  17. package/web/assets/{chunk-JWPE2WC7-CMWXKnkF.js → chunk-JWPE2WC7-BjbBLYge.js} +1 -1
  18. package/web/assets/{chunk-MOJQB5TN-BRzAoPL7.js → chunk-MOJQB5TN-DCKqdaDr.js} +1 -1
  19. package/web/assets/{chunk-RYQCIY6F-BRght6pl.js → chunk-RYQCIY6F-D5yAURhE.js} +1 -1
  20. package/web/assets/{chunk-V7JOEXUC-BlbCYGxG.js → chunk-V7JOEXUC-DKY2sn06.js} +1 -1
  21. package/web/assets/{chunk-VR4S4FIN-CPoKxaoM.js → chunk-VR4S4FIN-DGiVMHh6.js} +1 -1
  22. package/web/assets/{chunk-XXDRQBXY-DeNDfu5r.js → chunk-XXDRQBXY-CUI1Tkrr.js} +1 -1
  23. package/web/assets/classDiagram-OUVF2IWQ-D7gWuzIF.js +1 -0
  24. package/web/assets/classDiagram-v2-EOCWNBFH-D7gWuzIF.js +1 -0
  25. package/web/assets/{cose-bilkent-JH36ORCC-C_V1sCw0.js → cose-bilkent-JH36ORCC-Ao3LzalV.js} +1 -1
  26. package/web/assets/{cynefin-VYW2F7L2-CtWqChj_.js → cynefin-VYW2F7L2-7JQwpRwH.js} +1 -1
  27. package/web/assets/{cynefinDiagram-TSTJHNR4-Q0g7rhQg.js → cynefinDiagram-TSTJHNR4-BfuANy_V.js} +1 -1
  28. package/web/assets/{dagre-VKFMJZFB-spMt8V5o.js → dagre-VKFMJZFB-DHVnVJCL.js} +1 -1
  29. package/web/assets/{diagram-FQU43EPY-CF7kRW9U.js → diagram-FQU43EPY-OYrtwA2f.js} +1 -1
  30. package/web/assets/{diagram-G47NLZAW-B-5ygaqt.js → diagram-G47NLZAW-CbkLZxYp.js} +1 -1
  31. package/web/assets/{diagram-NH7WQ7WH-CdOGPV2-.js → diagram-NH7WQ7WH-B0z_jTdi.js} +1 -1
  32. package/web/assets/{diagram-OA4YK3LP-D1_1pb2t.js → diagram-OA4YK3LP-BRu_2nwx.js} +1 -1
  33. package/web/assets/{diagram-WEI45ONY-gD_xjCgB.js → diagram-WEI45ONY-B9cpw86D.js} +1 -1
  34. package/web/assets/{ebnfDiagram-CCIWWBDH-aW4E-V1v.js → ebnfDiagram-CCIWWBDH-DaBQ7T4R.js} +1 -1
  35. package/web/assets/{erDiagram-Q63AITRT-BWndxFVg.js → erDiagram-Q63AITRT-D6PQiFj3.js} +1 -1
  36. package/web/assets/{flowDiagram-23GEKE2U-CVc37qLo.js → flowDiagram-23GEKE2U-p_8Wj7It.js} +1 -1
  37. package/web/assets/{ganttDiagram-NO4QXBWP-DV-2BraZ.js → ganttDiagram-NO4QXBWP-BZBwuqu3.js} +1 -1
  38. package/web/assets/{gitGraphDiagram-IHSO6WYX-YCy7dADs.js → gitGraphDiagram-IHSO6WYX-DyPcQ-91.js} +1 -1
  39. package/web/assets/{highlighted-body-OFNGDK62-q_mVDG84.js → highlighted-body-OFNGDK62-Cq7RJZcn.js} +1 -1
  40. package/web/assets/index-BN-QUr5b.js +350 -0
  41. package/web/assets/index-D6-LVQ5m.css +1 -0
  42. package/web/assets/{infoDiagram-FWYZ7A6U-ig4wRILz.js → infoDiagram-FWYZ7A6U-sAgBAeWC.js} +1 -1
  43. package/web/assets/{ishikawaDiagram-FXEZZL3T-BE8nJNWr.js → ishikawaDiagram-FXEZZL3T-COEn9wCs.js} +1 -1
  44. package/web/assets/{journeyDiagram-5HDEW3XC-_olL4LFF.js → journeyDiagram-5HDEW3XC-BPddPRXW.js} +1 -1
  45. package/web/assets/{kanban-definition-HUTT4EX6-DTFmbw9d.js → kanban-definition-HUTT4EX6-B8TW97Oy.js} +1 -1
  46. package/web/assets/{linear-CbmtQHdI.js → linear-CnW5uQ_k.js} +1 -1
  47. package/web/assets/{mermaid.core-CyLpSBwh.js → mermaid.core-bOV5iNX_.js} +4 -4
  48. package/web/assets/{mindmap-definition-LN4V7U3C-BFXQ_blT.js → mindmap-definition-LN4V7U3C-Dtr4xW_-.js} +1 -1
  49. package/web/assets/{pegDiagram-2B236MQR-BzFkomCY.js → pegDiagram-2B236MQR-DqBITK5N.js} +1 -1
  50. package/web/assets/{pieDiagram-ENE6RG2P-r6gWlwuV.js → pieDiagram-ENE6RG2P-DXjxZgy3.js} +1 -1
  51. package/web/assets/{quadrantDiagram-ABIIQ3AL-DTFxtS0e.js → quadrantDiagram-ABIIQ3AL-D4MXx3U7.js} +1 -1
  52. package/web/assets/{railroadDiagram-RFXS5EU6-CbZAYLVe.js → railroadDiagram-RFXS5EU6-LPfpHg4_.js} +1 -1
  53. package/web/assets/{requirementDiagram-TGXJPOKE-DzGi5GvN.js → requirementDiagram-TGXJPOKE-CiDswbjt.js} +1 -1
  54. package/web/assets/{sankeyDiagram-HTMAVEWB-CBWOwAUD.js → sankeyDiagram-HTMAVEWB-VfN_qTEI.js} +1 -1
  55. package/web/assets/{sequenceDiagram-DBY2YBRQ-QX9rQ9ow.js → sequenceDiagram-DBY2YBRQ-kJRIx4zm.js} +1 -1
  56. package/web/assets/{sizeCapture-X5ZJPWSS-X8SU5JUW.js → sizeCapture-X5ZJPWSS-D8vJbAt-.js} +1 -1
  57. package/web/assets/{stateDiagram-2N3HPSRC-kQgWzKK8.js → stateDiagram-2N3HPSRC-9qku-qAj.js} +1 -1
  58. package/web/assets/stateDiagram-v2-6OUMAXLB-DbOQICyv.js +1 -0
  59. package/web/assets/{swimlanes-5IMT3BWC-eKT1_uaa.js → swimlanes-5IMT3BWC-Cdb5FDUM.js} +2 -2
  60. package/web/assets/swimlanesDiagram-G3AALYLV-EDpLmqQv.js +8 -0
  61. package/web/assets/{timeline-definition-FHXFAJF6-BRKXt19C.js → timeline-definition-FHXFAJF6-D0hyJCMm.js} +1 -1
  62. package/web/assets/{vennDiagram-L72KCM5P-C-mbeAXb.js → vennDiagram-L72KCM5P-KsCkGMtr.js} +1 -1
  63. package/web/assets/{wardleyDiagram-EHGQE667-Doojx4Uh.js → wardleyDiagram-EHGQE667-B4jT_1ak.js} +1 -1
  64. package/web/assets/{xychartDiagram-FW5EYKEG-CQZh8Trp.js → xychartDiagram-FW5EYKEG-Bmy0rt8j.js} +1 -1
  65. package/web/index.html +17 -2
  66. package/web/assets/channel-8ymR7Shm.js +0 -1
  67. package/web/assets/classDiagram-OUVF2IWQ-g3gy3kDO.js +0 -1
  68. package/web/assets/classDiagram-v2-EOCWNBFH-g3gy3kDO.js +0 -1
  69. package/web/assets/index-BG6acTBk.css +0 -1
  70. package/web/assets/index-CBBSnvKL.js +0 -335
  71. package/web/assets/stateDiagram-v2-6OUMAXLB-2kXWc9Fv.js +0 -1
  72. package/web/assets/swimlanesDiagram-G3AALYLV-B5i-k7ui.js +0 -8
@@ -1,335 +0,0 @@
1
- var HS=Object.defineProperty;var US=(e,t,n)=>t in e?HS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Et=(e,t,n)=>US(e,typeof t!="symbol"?t+"":t,n);function PS(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const u in a)if(u!=="default"&&!(u in e)){const s=Object.getOwnPropertyDescriptor(a,u);s&&Object.defineProperty(e,u,s.get?s:{enumerable:!0,get:()=>a[u]})}}}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 u of document.querySelectorAll('link[rel="modulepreload"]'))a(u);new MutationObserver(u=>{for(const s of u)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&a(o)}).observe(document,{childList:!0,subtree:!0});function n(u){const s={};return u.integrity&&(s.integrity=u.integrity),u.referrerPolicy&&(s.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?s.credentials="include":u.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(u){if(u.ep)return;u.ep=!0;const s=n(u);fetch(u.href,s)}})();function jm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gh={exports:{}},Lu={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and 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 Ub;function jS(){if(Ub)return Lu;Ub=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,u,s){var o=null;if(s!==void 0&&(o=""+s),u.key!==void 0&&(o=""+u.key),"key"in u){s={};for(var f in u)f!=="key"&&(s[f]=u[f])}else s=u;return u=s.ref,{$$typeof:e,type:a,key:o,ref:u!==void 0?u:null,props:s}}return Lu.Fragment=t,Lu.jsx=n,Lu.jsxs=n,Lu}var Pb;function FS(){return Pb||(Pb=1,gh.exports=jS()),gh.exports}var _=FS(),bh={exports:{}},Ue={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and 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 jb;function qS(){if(jb)return Ue;jb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),E=Symbol.iterator;function T(M){return M===null||typeof M!="object"?null:(M=E&&M[E]||M["@@iterator"],typeof M=="function"?M:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,R={};function O(M,W,k){this.props=M,this.context=W,this.refs=R,this.updater=k||v}O.prototype.isReactComponent={},O.prototype.setState=function(M,W){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,W,"setState")},O.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function B(){}B.prototype=O.prototype;function U(M,W,k){this.props=M,this.context=W,this.refs=R,this.updater=k||v}var D=U.prototype=new B;D.constructor=U,N(D,O.prototype),D.isPureReactComponent=!0;var F=Array.isArray;function z(){}var V={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function be(M,W,k){var ne=k.ref;return{$$typeof:e,type:M,key:W,ref:ne!==void 0?ne:null,props:k}}function q(M,W){return be(M.type,W,M.props)}function ce(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function oe(M){var W={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(k){return W[k]})}var we=/\/+/g;function pe(M,W){return typeof M=="object"&&M!==null&&M.key!=null?oe(""+M.key):W.toString(36)}function ae(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(z,z):(M.status="pending",M.then(function(W){M.status==="pending"&&(M.status="fulfilled",M.value=W)},function(W){M.status==="pending"&&(M.status="rejected",M.reason=W)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function P(M,W,k,ne,ue){var ie=typeof M;(ie==="undefined"||ie==="boolean")&&(M=null);var he=!1;if(M===null)he=!0;else switch(ie){case"bigint":case"string":case"number":he=!0;break;case"object":switch(M.$$typeof){case e:case t:he=!0;break;case b:return he=M._init,P(he(M._payload),W,k,ne,ue)}}if(he)return ue=ue(M),he=ne===""?"."+pe(M,0):ne,F(ue)?(k="",he!=null&&(k=he.replace(we,"$&/")+"/"),P(ue,W,k,"",function(Ye){return Ye})):ue!=null&&(ce(ue)&&(ue=q(ue,k+(ue.key==null||M&&M.key===ue.key?"":(""+ue.key).replace(we,"$&/")+"/")+he)),W.push(ue)),1;he=0;var _e=ne===""?".":ne+":";if(F(M))for(var Te=0;Te<M.length;Te++)ne=M[Te],ie=_e+pe(ne,Te),he+=P(ne,W,k,ie,ue);else if(Te=T(M),typeof Te=="function")for(M=Te.call(M),Te=0;!(ne=M.next()).done;)ne=ne.value,ie=_e+pe(ne,Te++),he+=P(ne,W,k,ie,ue);else if(ie==="object"){if(typeof M.then=="function")return P(ae(M),W,k,ne,ue);throw W=String(M),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return he}function te(M,W,k){if(M==null)return M;var ne=[],ue=0;return P(M,ne,"","",function(ie){return W.call(k,ie,ue++)}),ne}function fe(M){if(M._status===-1){var W=M._result;W=W(),W.then(function(k){(M._status===0||M._status===-1)&&(M._status=1,M._result=k)},function(k){(M._status===0||M._status===-1)&&(M._status=2,M._result=k)}),M._status===-1&&(M._status=0,M._result=W)}if(M._status===1)return M._result.default;throw M._result}var xe=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},C={map:te,forEach:function(M,W,k){te(M,function(){W.apply(this,arguments)},k)},count:function(M){var W=0;return te(M,function(){W++}),W},toArray:function(M){return te(M,function(W){return W})||[]},only:function(M){if(!ce(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return Ue.Activity=g,Ue.Children=C,Ue.Component=O,Ue.Fragment=n,Ue.Profiler=u,Ue.PureComponent=U,Ue.StrictMode=a,Ue.Suspense=h,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(M){return V.H.useMemoCache(M)}},Ue.cache=function(M){return function(){return M.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(M,W,k){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var ne=N({},M.props),ue=M.key;if(W!=null)for(ie in W.key!==void 0&&(ue=""+W.key),W)!G.call(W,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&W.ref===void 0||(ne[ie]=W[ie]);var ie=arguments.length-2;if(ie===1)ne.children=k;else if(1<ie){for(var he=Array(ie),_e=0;_e<ie;_e++)he[_e]=arguments[_e+2];ne.children=he}return be(M.type,ue,ne)},Ue.createContext=function(M){return M={$$typeof:o,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:s,_context:M},M},Ue.createElement=function(M,W,k){var ne,ue={},ie=null;if(W!=null)for(ne in W.key!==void 0&&(ie=""+W.key),W)G.call(W,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(ue[ne]=W[ne]);var he=arguments.length-2;if(he===1)ue.children=k;else if(1<he){for(var _e=Array(he),Te=0;Te<he;Te++)_e[Te]=arguments[Te+2];ue.children=_e}if(M&&M.defaultProps)for(ne in he=M.defaultProps,he)ue[ne]===void 0&&(ue[ne]=he[ne]);return be(M,ie,ue)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(M){return{$$typeof:f,render:M}},Ue.isValidElement=ce,Ue.lazy=function(M){return{$$typeof:b,_payload:{_status:-1,_result:M},_init:fe}},Ue.memo=function(M,W){return{$$typeof:d,type:M,compare:W===void 0?null:W}},Ue.startTransition=function(M){var W=V.T,k={};V.T=k;try{var ne=M(),ue=V.S;ue!==null&&ue(k,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(z,xe)}catch(ie){xe(ie)}finally{W!==null&&k.types!==null&&(W.types=k.types),V.T=W}},Ue.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},Ue.use=function(M){return V.H.use(M)},Ue.useActionState=function(M,W,k){return V.H.useActionState(M,W,k)},Ue.useCallback=function(M,W){return V.H.useCallback(M,W)},Ue.useContext=function(M){return V.H.useContext(M)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(M,W){return V.H.useDeferredValue(M,W)},Ue.useEffect=function(M,W){return V.H.useEffect(M,W)},Ue.useEffectEvent=function(M){return V.H.useEffectEvent(M)},Ue.useId=function(){return V.H.useId()},Ue.useImperativeHandle=function(M,W,k){return V.H.useImperativeHandle(M,W,k)},Ue.useInsertionEffect=function(M,W){return V.H.useInsertionEffect(M,W)},Ue.useLayoutEffect=function(M,W){return V.H.useLayoutEffect(M,W)},Ue.useMemo=function(M,W){return V.H.useMemo(M,W)},Ue.useOptimistic=function(M,W){return V.H.useOptimistic(M,W)},Ue.useReducer=function(M,W,k){return V.H.useReducer(M,W,k)},Ue.useRef=function(M){return V.H.useRef(M)},Ue.useState=function(M){return V.H.useState(M)},Ue.useSyncExternalStore=function(M,W,k){return V.H.useSyncExternalStore(M,W,k)},Ue.useTransition=function(){return V.H.useTransition()},Ue.version="19.2.7",Ue}var Fb;function Fm(){return Fb||(Fb=1,bh.exports=qS()),bh.exports}var S=Fm();const YS=jm(S),ET=PS({__proto__:null,default:YS},[S]);var yh={exports:{}},Du={},Eh={exports:{}},Th={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var qb;function VS(){return qb||(qb=1,(function(e){function t(P,te){var fe=P.length;P.push(te);e:for(;0<fe;){var xe=fe-1>>>1,C=P[xe];if(0<u(C,te))P[xe]=te,P[fe]=C,fe=xe;else break e}}function n(P){return P.length===0?null:P[0]}function a(P){if(P.length===0)return null;var te=P[0],fe=P.pop();if(fe!==te){P[0]=fe;e:for(var xe=0,C=P.length,M=C>>>1;xe<M;){var W=2*(xe+1)-1,k=P[W],ne=W+1,ue=P[ne];if(0>u(k,fe))ne<C&&0>u(ue,k)?(P[xe]=ue,P[ne]=fe,xe=ne):(P[xe]=k,P[W]=fe,xe=W);else if(ne<C&&0>u(ue,fe))P[xe]=ue,P[ne]=fe,xe=ne;else break e}}return te}function u(P,te){var fe=P.sortIndex-te.sortIndex;return fe!==0?fe:P.id-te.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,f=o.now();e.unstable_now=function(){return o.now()-f}}var h=[],d=[],b=1,g=null,E=3,T=!1,v=!1,N=!1,R=!1,O=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function D(P){for(var te=n(d);te!==null;){if(te.callback===null)a(d);else if(te.startTime<=P)a(d),te.sortIndex=te.expirationTime,t(h,te);else break;te=n(d)}}function F(P){if(N=!1,D(P),!v)if(n(h)!==null)v=!0,z||(z=!0,oe());else{var te=n(d);te!==null&&ae(F,te.startTime-P)}}var z=!1,V=-1,G=5,be=-1;function q(){return R?!0:!(e.unstable_now()-be<G)}function ce(){if(R=!1,z){var P=e.unstable_now();be=P;var te=!0;try{e:{v=!1,N&&(N=!1,B(V),V=-1),T=!0;var fe=E;try{t:{for(D(P),g=n(h);g!==null&&!(g.expirationTime>P&&q());){var xe=g.callback;if(typeof xe=="function"){g.callback=null,E=g.priorityLevel;var C=xe(g.expirationTime<=P);if(P=e.unstable_now(),typeof C=="function"){g.callback=C,D(P),te=!0;break t}g===n(h)&&a(h),D(P)}else a(h);g=n(h)}if(g!==null)te=!0;else{var M=n(d);M!==null&&ae(F,M.startTime-P),te=!1}}break e}finally{g=null,E=fe,T=!1}te=void 0}}finally{te?oe():z=!1}}}var oe;if(typeof U=="function")oe=function(){U(ce)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,pe=we.port2;we.port1.onmessage=ce,oe=function(){pe.postMessage(null)}}else oe=function(){O(ce,0)};function ae(P,te){V=O(function(){P(e.unstable_now())},te)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return E},e.unstable_next=function(P){switch(E){case 1:case 2:case 3:var te=3;break;default:te=E}var fe=E;E=te;try{return P()}finally{E=fe}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(P,te){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var fe=E;E=P;try{return te()}finally{E=fe}},e.unstable_scheduleCallback=function(P,te,fe){var xe=e.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?xe+fe:xe):fe=xe,P){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=fe+C,P={id:b++,callback:te,priorityLevel:P,startTime:fe,expirationTime:C,sortIndex:-1},fe>xe?(P.sortIndex=fe,t(d,P),n(h)===null&&P===n(d)&&(N?(B(V),V=-1):N=!0,ae(F,fe-xe))):(P.sortIndex=C,t(h,P),v||T||(v=!0,z||(z=!0,oe()))),P},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(P){var te=E;return function(){var fe=E;E=te;try{return P.apply(this,arguments)}finally{E=fe}}}})(Th)),Th}var Yb;function $S(){return Yb||(Yb=1,Eh.exports=VS()),Eh.exports}var xh={exports:{}},sn={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and 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 Vb;function GS(){if(Vb)return sn;Vb=1;var e=Fm();function t(h){var d="https://react.dev/errors/"+h;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)d+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+h+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},u=Symbol.for("react.portal");function s(h,d,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:g==null?null:""+g,children:h,containerInfo:d,implementation:b}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,d){if(h==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return sn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,sn.createPortal=function(h,d){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return s(h,d,null,b)},sn.flushSync=function(h){var d=o.T,b=a.p;try{if(o.T=null,a.p=2,h)return h()}finally{o.T=d,a.p=b,a.d.f()}},sn.preconnect=function(h,d){typeof h=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,a.d.C(h,d))},sn.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},sn.preinit=function(h,d){if(typeof h=="string"&&d&&typeof d.as=="string"){var b=d.as,g=f(b,d.crossOrigin),E=typeof d.integrity=="string"?d.integrity:void 0,T=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;b==="style"?a.d.S(h,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:g,integrity:E,fetchPriority:T}):b==="script"&&a.d.X(h,{crossOrigin:g,integrity:E,fetchPriority:T,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},sn.preinitModule=function(h,d){if(typeof h=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var b=f(d.as,d.crossOrigin);a.d.M(h,{crossOrigin:b,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&a.d.M(h)},sn.preload=function(h,d){if(typeof h=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var b=d.as,g=f(b,d.crossOrigin);a.d.L(h,b,{crossOrigin:g,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},sn.preloadModule=function(h,d){if(typeof h=="string")if(d){var b=f(d.as,d.crossOrigin);a.d.m(h,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:b,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else a.d.m(h)},sn.requestFormReset=function(h){a.d.r(h)},sn.unstable_batchedUpdates=function(h,d){return h(d)},sn.useFormState=function(h,d,b){return o.H.useFormState(h,d,b)},sn.useFormStatus=function(){return o.H.useHostTransitionStatus()},sn.version="19.2.7",sn}var $b;function TT(){if($b)return xh.exports;$b=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),xh.exports=GS(),xh.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var Gb;function QS(){if(Gb)return Du;Gb=1;var e=$S(),t=Fm(),n=TT();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)i+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function s(r){var i=r,l=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(l=i.return),r=i.return;while(r)}return i.tag===3?l:null}function o(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function f(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function h(r){if(s(r)!==r)throw Error(a(188))}function d(r){var i=r.alternate;if(!i){if(i=s(r),i===null)throw Error(a(188));return i!==r?null:r}for(var l=r,c=i;;){var m=l.return;if(m===null)break;var p=m.alternate;if(p===null){if(c=m.return,c!==null){l=c;continue}break}if(m.child===p.child){for(p=m.child;p;){if(p===l)return h(m),r;if(p===c)return h(m),i;p=p.sibling}throw Error(a(188))}if(l.return!==c.return)l=m,c=p;else{for(var x=!1,A=m.child;A;){if(A===l){x=!0,l=m,c=p;break}if(A===c){x=!0,c=m,l=p;break}A=A.sibling}if(!x){for(A=p.child;A;){if(A===l){x=!0,l=p,c=m;break}if(A===c){x=!0,c=p,l=m;break}A=A.sibling}if(!x)throw Error(a(189))}}if(l.alternate!==c)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?r:i}function b(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=b(r),i!==null)return i;r=r.sibling}return null}var g=Object.assign,E=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),U=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),be=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),ce=Symbol.iterator;function oe(r){return r===null||typeof r!="object"?null:(r=ce&&r[ce]||r["@@iterator"],typeof r=="function"?r:null)}var we=Symbol.for("react.client.reference");function pe(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===we?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case N:return"Fragment";case O:return"Profiler";case R:return"StrictMode";case F:return"Suspense";case z:return"SuspenseList";case be:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case v:return"Portal";case U:return r.displayName||"Context";case B:return(r._context.displayName||"Context")+".Consumer";case D:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case V:return i=r.displayName||null,i!==null?i:pe(r.type)||"Memo";case G:i=r._payload,r=r._init;try{return pe(r(i))}catch{}}return null}var ae=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},xe=[],C=-1;function M(r){return{current:r}}function W(r){0>C||(r.current=xe[C],xe[C]=null,C--)}function k(r,i){C++,xe[C]=r.current,r.current=i}var ne=M(null),ue=M(null),ie=M(null),he=M(null);function _e(r,i){switch(k(ie,i),k(ue,r),k(ne,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?sb(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=sb(i),r=ob(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}W(ne),k(ne,r)}function Te(){W(ne),W(ue),W(ie)}function Ye(r){r.memoizedState!==null&&k(he,r);var i=ne.current,l=ob(i,r.type);i!==l&&(k(ue,r),k(ne,l))}function xt(r){ue.current===r&&(W(ne),W(ue)),he.current===r&&(W(he),Nu._currentValue=fe)}var wt,rt;function ht(r){if(wt===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);wt=i&&i[1]||"",rt=-1<l.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+wt+r+rt}var dn=!1;function hn(r,i){if(!r||dn)return"";dn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(K){var Z=K}Reflect.construct(r,[],se)}else{try{se.call()}catch(K){Z=K}r.call(se.prototype)}}else{try{throw Error()}catch(K){Z=K}(se=r())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(K){if(K&&Z&&typeof K.stack=="string")return[K.stack,Z.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=c.DetermineComponentFrameRoot(),x=p[0],A=p[1];if(x&&A){var H=x.split(`
44
- `),X=A.split(`
45
- `);for(m=c=0;c<H.length&&!H[c].includes("DetermineComponentFrameRoot");)c++;for(;m<X.length&&!X[m].includes("DetermineComponentFrameRoot");)m++;if(c===H.length||m===X.length)for(c=H.length-1,m=X.length-1;1<=c&&0<=m&&H[c]!==X[m];)m--;for(;1<=c&&0<=m;c--,m--)if(H[c]!==X[m]){if(c!==1||m!==1)do if(c--,m--,0>m||H[c]!==X[m]){var ee=`
46
- `+H[c].replace(" at new "," at ");return r.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",r.displayName)),ee}while(1<=c&&0<=m);break}}}finally{dn=!1,Error.prepareStackTrace=l}return(l=r?r.displayName||r.name:"")?ht(l):""}function pr(r,i){switch(r.tag){case 26:case 27:case 5:return ht(r.type);case 16:return ht("Lazy");case 13:return r.child!==i&&i!==null?ht("Suspense Fallback"):ht("Suspense");case 19:return ht("SuspenseList");case 0:case 15:return hn(r.type,!1);case 11:return hn(r.type.render,!1);case 1:return hn(r.type,!0);case 31:return ht("Activity");default:return""}}function Le(r){try{var i="",l=null;do i+=pr(r,l),l=r,r=r.return;while(r);return i}catch(c){return`
47
- Error generating stack: `+c.message+`
48
- `+c.stack}}var ut=Object.prototype.hasOwnProperty,Ut=e.unstable_scheduleCallback,Pt=e.unstable_cancelCallback,Vn=e.unstable_shouldYield,Pl=e.unstable_requestPaint,mn=e.unstable_now,nf=e.unstable_getCurrentPriorityLevel,re=e.unstable_ImmediatePriority,Ee=e.unstable_UserBlockingPriority,Me=e.unstable_NormalPriority,Xe=e.unstable_LowPriority,dt=e.unstable_IdlePriority,Ln=e.log,wr=e.unstable_setDisableYieldValue,pn=null,Xt=null;function xn(r){if(typeof Ln=="function"&&wr(r),Xt&&typeof Xt.setStrictMode=="function")try{Xt.setStrictMode(pn,r)}catch{}}var _t=Math.clz32?Math.clz32:S3,ra=Math.log,lr=Math.LN2;function S3(r){return r>>>=0,r===0?32:31-(ra(r)/lr|0)|0}var xs=256,_s=262144,vs=4194304;function Ga(r){var i=r&42;if(i!==0)return i;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Ss(r,i,l){var c=r.pendingLanes;if(c===0)return 0;var m=0,p=r.suspendedLanes,x=r.pingedLanes;r=r.warmLanes;var A=c&134217727;return A!==0?(c=A&~p,c!==0?m=Ga(c):(x&=A,x!==0?m=Ga(x):l||(l=A&~r,l!==0&&(m=Ga(l))))):(A=c&~p,A!==0?m=Ga(A):x!==0?m=Ga(x):l||(l=c&~r,l!==0&&(m=Ga(l)))),m===0?0:i!==0&&i!==m&&(i&p)===0&&(p=m&-m,l=i&-i,p>=l||p===32&&(l&4194048)!==0)?i:m}function jl(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function A3(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function q0(){var r=vs;return vs<<=1,(vs&62914560)===0&&(vs=4194304),r}function rf(r){for(var i=[],l=0;31>l;l++)i.push(r);return i}function Fl(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function k3(r,i,l,c,m,p){var x=r.pendingLanes;r.pendingLanes=l,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=l,r.entangledLanes&=l,r.errorRecoveryDisabledLanes&=l,r.shellSuspendCounter=0;var A=r.entanglements,H=r.expirationTimes,X=r.hiddenUpdates;for(l=x&~l;0<l;){var ee=31-_t(l),se=1<<ee;A[ee]=0,H[ee]=-1;var Z=X[ee];if(Z!==null)for(X[ee]=null,ee=0;ee<Z.length;ee++){var K=Z[ee];K!==null&&(K.lane&=-536870913)}l&=~se}c!==0&&Y0(r,c,0),p!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=p&~(x&~i))}function Y0(r,i,l){r.pendingLanes|=i,r.suspendedLanes&=~i;var c=31-_t(i);r.entangledLanes|=i,r.entanglements[c]=r.entanglements[c]|1073741824|l&261930}function V0(r,i){var l=r.entangledLanes|=i;for(r=r.entanglements;l;){var c=31-_t(l),m=1<<c;m&i|r[c]&i&&(r[c]|=i),l&=~m}}function $0(r,i){var l=i&-i;return l=(l&42)!==0?1:af(l),(l&(r.suspendedLanes|i))!==0?0:l}function af(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function lf(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function G0(){var r=te.p;return r!==0?r:(r=window.event,r===void 0?32:Lb(r.type))}function Q0(r,i){var l=te.p;try{return te.p=r,i()}finally{te.p=l}}var aa=Math.random().toString(36).slice(2),nn="__reactFiber$"+aa,_n="__reactProps$"+aa,Mi="__reactContainer$"+aa,uf="__reactEvents$"+aa,C3="__reactListeners$"+aa,N3="__reactHandles$"+aa,X0="__reactResources$"+aa,ql="__reactMarker$"+aa;function sf(r){delete r[nn],delete r[_n],delete r[uf],delete r[C3],delete r[N3]}function Bi(r){var i=r[nn];if(i)return i;for(var l=r.parentNode;l;){if(i=l[Mi]||l[nn]){if(l=i.alternate,i.child!==null||l!==null&&l.child!==null)for(r=gb(r);r!==null;){if(l=r[nn])return l;r=gb(r)}return i}r=l,l=r.parentNode}return null}function zi(r){if(r=r[nn]||r[Mi]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function Yl(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function Hi(r){var i=r[X0];return i||(i=r[X0]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Wt(r){r[ql]=!0}var Z0=new Set,K0={};function Qa(r,i){Ui(r,i),Ui(r+"Capture",i)}function Ui(r,i){for(K0[r]=i,r=0;r<i.length;r++)Z0.add(i[r])}var w3=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),W0={},J0={};function R3(r){return ut.call(J0,r)?!0:ut.call(W0,r)?!1:w3.test(r)?J0[r]=!0:(W0[r]=!0,!1)}function As(r,i,l){if(R3(i))if(l===null)r.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+l)}}function ks(r,i,l){if(l===null)r.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+l)}}function Rr(r,i,l,c){if(c===null)r.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(l);return}r.setAttributeNS(i,l,""+c)}}function $n(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ep(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function O3(r,i,l){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,p=c.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return m.call(this)},set:function(x){l=""+x,p.call(this,x)}}),Object.defineProperty(r,i,{enumerable:c.enumerable}),{getValue:function(){return l},setValue:function(x){l=""+x},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function of(r){if(!r._valueTracker){var i=ep(r)?"checked":"value";r._valueTracker=O3(r,i,""+r[i])}}function tp(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var l=i.getValue(),c="";return r&&(c=ep(r)?r.checked?"true":"false":r.value),r=c,r!==l?(i.setValue(r),!0):!1}function Cs(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var L3=/[\n"\\]/g;function Gn(r){return r.replace(L3,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function cf(r,i,l,c,m,p,x,A){r.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?r.type=x:r.removeAttribute("type"),i!=null?x==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+$n(i)):r.value!==""+$n(i)&&(r.value=""+$n(i)):x!=="submit"&&x!=="reset"||r.removeAttribute("value"),i!=null?ff(r,x,$n(i)):l!=null?ff(r,x,$n(l)):c!=null&&r.removeAttribute("value"),m==null&&p!=null&&(r.defaultChecked=!!p),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?r.name=""+$n(A):r.removeAttribute("name")}function np(r,i,l,c,m,p,x,A){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(r.type=p),i!=null||l!=null){if(!(p!=="submit"&&p!=="reset"||i!=null)){of(r);return}l=l!=null?""+$n(l):"",i=i!=null?""+$n(i):l,A||i===r.value||(r.value=i),r.defaultValue=i}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=A?r.checked:!!c,r.defaultChecked=!!c,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(r.name=x),of(r)}function ff(r,i,l){i==="number"&&Cs(r.ownerDocument)===r||r.defaultValue===""+l||(r.defaultValue=""+l)}function Pi(r,i,l,c){if(r=r.options,i){i={};for(var m=0;m<l.length;m++)i["$"+l[m]]=!0;for(l=0;l<r.length;l++)m=i.hasOwnProperty("$"+r[l].value),r[l].selected!==m&&(r[l].selected=m),m&&c&&(r[l].defaultSelected=!0)}else{for(l=""+$n(l),i=null,m=0;m<r.length;m++){if(r[m].value===l){r[m].selected=!0,c&&(r[m].defaultSelected=!0);return}i!==null||r[m].disabled||(i=r[m])}i!==null&&(i.selected=!0)}}function rp(r,i,l){if(i!=null&&(i=""+$n(i),i!==r.value&&(r.value=i),l==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=l!=null?""+$n(l):""}function ap(r,i,l,c){if(i==null){if(c!=null){if(l!=null)throw Error(a(92));if(ae(c)){if(1<c.length)throw Error(a(93));c=c[0]}l=c}l==null&&(l=""),i=l}l=$n(i),r.defaultValue=l,c=r.textContent,c===l&&c!==""&&c!==null&&(r.value=c),of(r)}function ji(r,i){if(i){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=i;return}}r.textContent=i}var D3=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ip(r,i,l){var c=i.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":c?r.setProperty(i,l):typeof l!="number"||l===0||D3.has(i)?i==="float"?r.cssFloat=l:r[i]=(""+l).trim():r[i]=l+"px"}function lp(r,i,l){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var m in i)c=i[m],i.hasOwnProperty(m)&&l[m]!==c&&ip(r,m,c)}else for(var p in i)i.hasOwnProperty(p)&&ip(r,p,i[p])}function df(r){if(r.indexOf("-")===-1)return!1;switch(r){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 I3=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),M3=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ns(r){return M3.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Or(){}var hf=null;function mf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Fi=null,qi=null;function up(r){var i=zi(r);if(i&&(r=i.stateNode)){var l=r[_n]||null;e:switch(r=i.stateNode,i.type){case"input":if(cf(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),i=l.name,l.type==="radio"&&i!=null){for(l=r;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Gn(""+i)+'"][type="radio"]'),i=0;i<l.length;i++){var c=l[i];if(c!==r&&c.form===r.form){var m=c[_n]||null;if(!m)throw Error(a(90));cf(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<l.length;i++)c=l[i],c.form===r.form&&tp(c)}break e;case"textarea":rp(r,l.value,l.defaultValue);break e;case"select":i=l.value,i!=null&&Pi(r,!!l.multiple,i,!1)}}}var pf=!1;function sp(r,i,l){if(pf)return r(i,l);pf=!0;try{var c=r(i);return c}finally{if(pf=!1,(Fi!==null||qi!==null)&&(go(),Fi&&(i=Fi,r=qi,qi=Fi=null,up(i),r)))for(i=0;i<r.length;i++)up(r[i])}}function Vl(r,i){var l=r.stateNode;if(l===null)return null;var c=l[_n]||null;if(c===null)return null;l=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(l&&typeof l!="function")throw Error(a(231,i,typeof l));return l}var Lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gf=!1;if(Lr)try{var $l={};Object.defineProperty($l,"passive",{get:function(){gf=!0}}),window.addEventListener("test",$l,$l),window.removeEventListener("test",$l,$l)}catch{gf=!1}var ia=null,bf=null,ws=null;function op(){if(ws)return ws;var r,i=bf,l=i.length,c,m="value"in ia?ia.value:ia.textContent,p=m.length;for(r=0;r<l&&i[r]===m[r];r++);var x=l-r;for(c=1;c<=x&&i[l-c]===m[p-c];c++);return ws=m.slice(r,1<c?1-c:void 0)}function Rs(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function Os(){return!0}function cp(){return!1}function vn(r){function i(l,c,m,p,x){this._reactName=l,this._targetInst=m,this.type=c,this.nativeEvent=p,this.target=x,this.currentTarget=null;for(var A in r)r.hasOwnProperty(A)&&(l=r[A],this[A]=l?l(p):p[A]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Os:cp,this.isPropagationStopped=cp,this}return g(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Os)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Os)},persist:function(){},isPersistent:Os}),i}var Xa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ls=vn(Xa),Gl=g({},Xa,{view:0,detail:0}),B3=vn(Gl),yf,Ef,Ql,Ds=g({},Gl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xf,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Ql&&(Ql&&r.type==="mousemove"?(yf=r.screenX-Ql.screenX,Ef=r.screenY-Ql.screenY):Ef=yf=0,Ql=r),yf)},movementY:function(r){return"movementY"in r?r.movementY:Ef}}),fp=vn(Ds),z3=g({},Ds,{dataTransfer:0}),H3=vn(z3),U3=g({},Gl,{relatedTarget:0}),Tf=vn(U3),P3=g({},Xa,{animationName:0,elapsedTime:0,pseudoElement:0}),j3=vn(P3),F3=g({},Xa,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),q3=vn(F3),Y3=g({},Xa,{data:0}),dp=vn(Y3),V3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$3={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"},G3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Q3(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=G3[r])?!!i[r]:!1}function xf(){return Q3}var X3=g({},Gl,{key:function(r){if(r.key){var i=V3[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Rs(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?$3[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xf,charCode:function(r){return r.type==="keypress"?Rs(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Rs(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),Z3=vn(X3),K3=g({},Ds,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hp=vn(K3),W3=g({},Gl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xf}),J3=vn(W3),ev=g({},Xa,{propertyName:0,elapsedTime:0,pseudoElement:0}),tv=vn(ev),nv=g({},Ds,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),rv=vn(nv),av=g({},Xa,{newState:0,oldState:0}),iv=vn(av),lv=[9,13,27,32],_f=Lr&&"CompositionEvent"in window,Xl=null;Lr&&"documentMode"in document&&(Xl=document.documentMode);var uv=Lr&&"TextEvent"in window&&!Xl,mp=Lr&&(!_f||Xl&&8<Xl&&11>=Xl),pp=" ",gp=!1;function bp(r,i){switch(r){case"keyup":return lv.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yp(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Yi=!1;function sv(r,i){switch(r){case"compositionend":return yp(i);case"keypress":return i.which!==32?null:(gp=!0,pp);case"textInput":return r=i.data,r===pp&&gp?null:r;default:return null}}function ov(r,i){if(Yi)return r==="compositionend"||!_f&&bp(r,i)?(r=op(),ws=bf=ia=null,Yi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return mp&&i.locale!=="ko"?null:i.data;default:return null}}var cv={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 Ep(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!cv[r.type]:i==="textarea"}function Tp(r,i,l,c){Fi?qi?qi.push(c):qi=[c]:Fi=c,i=vo(i,"onChange"),0<i.length&&(l=new Ls("onChange","change",null,l,c),r.push({event:l,listeners:i}))}var Zl=null,Kl=null;function fv(r){nb(r,0)}function Is(r){var i=Yl(r);if(tp(i))return r}function xp(r,i){if(r==="change")return i}var _p=!1;if(Lr){var vf;if(Lr){var Sf="oninput"in document;if(!Sf){var vp=document.createElement("div");vp.setAttribute("oninput","return;"),Sf=typeof vp.oninput=="function"}vf=Sf}else vf=!1;_p=vf&&(!document.documentMode||9<document.documentMode)}function Sp(){Zl&&(Zl.detachEvent("onpropertychange",Ap),Kl=Zl=null)}function Ap(r){if(r.propertyName==="value"&&Is(Kl)){var i=[];Tp(i,Kl,r,mf(r)),sp(fv,i)}}function dv(r,i,l){r==="focusin"?(Sp(),Zl=i,Kl=l,Zl.attachEvent("onpropertychange",Ap)):r==="focusout"&&Sp()}function hv(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Is(Kl)}function mv(r,i){if(r==="click")return Is(i)}function pv(r,i){if(r==="input"||r==="change")return Is(i)}function gv(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var Dn=typeof Object.is=="function"?Object.is:gv;function Wl(r,i){if(Dn(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var l=Object.keys(r),c=Object.keys(i);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var m=l[c];if(!ut.call(i,m)||!Dn(r[m],i[m]))return!1}return!0}function kp(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Cp(r,i){var l=kp(r);r=0;for(var c;l;){if(l.nodeType===3){if(c=r+l.textContent.length,r<=i&&c>=i)return{node:l,offset:i-r};r=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=kp(l)}}function Np(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Np(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function wp(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Cs(r.document);i instanceof r.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)r=i.contentWindow;else break;i=Cs(r.document)}return i}function Af(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var bv=Lr&&"documentMode"in document&&11>=document.documentMode,Vi=null,kf=null,Jl=null,Cf=!1;function Rp(r,i,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Cf||Vi==null||Vi!==Cs(c)||(c=Vi,"selectionStart"in c&&Af(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Jl&&Wl(Jl,c)||(Jl=c,c=vo(kf,"onSelect"),0<c.length&&(i=new Ls("onSelect","select",null,i,l),r.push({event:i,listeners:c}),i.target=Vi)))}function Za(r,i){var l={};return l[r.toLowerCase()]=i.toLowerCase(),l["Webkit"+r]="webkit"+i,l["Moz"+r]="moz"+i,l}var $i={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionrun:Za("Transition","TransitionRun"),transitionstart:Za("Transition","TransitionStart"),transitioncancel:Za("Transition","TransitionCancel"),transitionend:Za("Transition","TransitionEnd")},Nf={},Op={};Lr&&(Op=document.createElement("div").style,"AnimationEvent"in window||(delete $i.animationend.animation,delete $i.animationiteration.animation,delete $i.animationstart.animation),"TransitionEvent"in window||delete $i.transitionend.transition);function Ka(r){if(Nf[r])return Nf[r];if(!$i[r])return r;var i=$i[r],l;for(l in i)if(i.hasOwnProperty(l)&&l in Op)return Nf[r]=i[l];return r}var Lp=Ka("animationend"),Dp=Ka("animationiteration"),Ip=Ka("animationstart"),yv=Ka("transitionrun"),Ev=Ka("transitionstart"),Tv=Ka("transitioncancel"),Mp=Ka("transitionend"),Bp=new Map,wf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");wf.push("scrollEnd");function ur(r,i){Bp.set(r,i),Qa(i,[r])}var Ms=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Qn=[],Gi=0,Rf=0;function Bs(){for(var r=Gi,i=Rf=Gi=0;i<r;){var l=Qn[i];Qn[i++]=null;var c=Qn[i];Qn[i++]=null;var m=Qn[i];Qn[i++]=null;var p=Qn[i];if(Qn[i++]=null,c!==null&&m!==null){var x=c.pending;x===null?m.next=m:(m.next=x.next,x.next=m),c.pending=m}p!==0&&zp(l,m,p)}}function zs(r,i,l,c){Qn[Gi++]=r,Qn[Gi++]=i,Qn[Gi++]=l,Qn[Gi++]=c,Rf|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function Of(r,i,l,c){return zs(r,i,l,c),Hs(r)}function Wa(r,i){return zs(r,null,null,i),Hs(r)}function zp(r,i,l){r.lanes|=l;var c=r.alternate;c!==null&&(c.lanes|=l);for(var m=!1,p=r.return;p!==null;)p.childLanes|=l,c=p.alternate,c!==null&&(c.childLanes|=l),p.tag===22&&(r=p.stateNode,r===null||r._visibility&1||(m=!0)),r=p,p=p.return;return r.tag===3?(p=r.stateNode,m&&i!==null&&(m=31-_t(l),r=p.hiddenUpdates,c=r[m],c===null?r[m]=[i]:c.push(i),i.lane=l|536870912),p):null}function Hs(r){if(50<xu)throw xu=0,Pd=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var Qi={};function xv(r,i,l,c){this.tag=r,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function In(r,i,l,c){return new xv(r,i,l,c)}function Lf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Dr(r,i){var l=r.alternate;return l===null?(l=In(r.tag,i,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=i,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&65011712,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,i=r.dependencies,l.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l.refCleanup=r.refCleanup,l}function Hp(r,i){r.flags&=65011714;var l=r.alternate;return l===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=l.childLanes,r.lanes=l.lanes,r.child=l.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=l.memoizedProps,r.memoizedState=l.memoizedState,r.updateQueue=l.updateQueue,r.type=l.type,i=l.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function Us(r,i,l,c,m,p){var x=0;if(c=r,typeof r=="function")Lf(r)&&(x=1);else if(typeof r=="string")x=kS(r,l,ne.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case be:return r=In(31,l,i,m),r.elementType=be,r.lanes=p,r;case N:return Ja(l.children,m,p,i);case R:x=8,m|=24;break;case O:return r=In(12,l,i,m|2),r.elementType=O,r.lanes=p,r;case F:return r=In(13,l,i,m),r.elementType=F,r.lanes=p,r;case z:return r=In(19,l,i,m),r.elementType=z,r.lanes=p,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case U:x=10;break e;case B:x=9;break e;case D:x=11;break e;case V:x=14;break e;case G:x=16,c=null;break e}x=29,l=Error(a(130,r===null?"null":typeof r,"")),c=null}return i=In(x,l,i,m),i.elementType=r,i.type=c,i.lanes=p,i}function Ja(r,i,l,c){return r=In(7,r,c,i),r.lanes=l,r}function Df(r,i,l){return r=In(6,r,null,i),r.lanes=l,r}function Up(r){var i=In(18,null,null,0);return i.stateNode=r,i}function If(r,i,l){return i=In(4,r.children!==null?r.children:[],r.key,i),i.lanes=l,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var Pp=new WeakMap;function Xn(r,i){if(typeof r=="object"&&r!==null){var l=Pp.get(r);return l!==void 0?l:(i={value:r,source:i,stack:Le(i)},Pp.set(r,i),i)}return{value:r,source:i,stack:Le(i)}}var Xi=[],Zi=0,Ps=null,eu=0,Zn=[],Kn=0,la=null,gr=1,br="";function Ir(r,i){Xi[Zi++]=eu,Xi[Zi++]=Ps,Ps=r,eu=i}function jp(r,i,l){Zn[Kn++]=gr,Zn[Kn++]=br,Zn[Kn++]=la,la=r;var c=gr;r=br;var m=32-_t(c)-1;c&=~(1<<m),l+=1;var p=32-_t(i)+m;if(30<p){var x=m-m%5;p=(c&(1<<x)-1).toString(32),c>>=x,m-=x,gr=1<<32-_t(i)+m|l<<m|c,br=p+r}else gr=1<<p|l<<m|c,br=r}function Mf(r){r.return!==null&&(Ir(r,1),jp(r,1,0))}function Bf(r){for(;r===Ps;)Ps=Xi[--Zi],Xi[Zi]=null,eu=Xi[--Zi],Xi[Zi]=null;for(;r===la;)la=Zn[--Kn],Zn[Kn]=null,br=Zn[--Kn],Zn[Kn]=null,gr=Zn[--Kn],Zn[Kn]=null}function Fp(r,i){Zn[Kn++]=gr,Zn[Kn++]=br,Zn[Kn++]=la,gr=i.id,br=i.overflow,la=r}var rn=null,Ct=null,nt=!1,ua=null,Wn=!1,zf=Error(a(519));function sa(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tu(Xn(i,r)),zf}function qp(r){var i=r.stateNode,l=r.type,c=r.memoizedProps;switch(i[nn]=r,i[_n]=c,l){case"dialog":Ke("cancel",i),Ke("close",i);break;case"iframe":case"object":case"embed":Ke("load",i);break;case"video":case"audio":for(l=0;l<vu.length;l++)Ke(vu[l],i);break;case"source":Ke("error",i);break;case"img":case"image":case"link":Ke("error",i),Ke("load",i);break;case"details":Ke("toggle",i);break;case"input":Ke("invalid",i),np(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ke("invalid",i);break;case"textarea":Ke("invalid",i),ap(i,c.value,c.defaultValue,c.children)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||i.textContent===""+l||c.suppressHydrationWarning===!0||lb(i.textContent,l)?(c.popover!=null&&(Ke("beforetoggle",i),Ke("toggle",i)),c.onScroll!=null&&Ke("scroll",i),c.onScrollEnd!=null&&Ke("scrollend",i),c.onClick!=null&&(i.onclick=Or),i=!0):i=!1,i||sa(r,!0)}function Yp(r){for(rn=r.return;rn;)switch(rn.tag){case 5:case 31:case 13:Wn=!1;return;case 27:case 3:Wn=!0;return;default:rn=rn.return}}function Ki(r){if(r!==rn)return!1;if(!nt)return Yp(r),nt=!0,!1;var i=r.tag,l;if((l=i!==3&&i!==27)&&((l=i===5)&&(l=r.type,l=!(l!=="form"&&l!=="button")||th(r.type,r.memoizedProps)),l=!l),l&&Ct&&sa(r),Yp(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Ct=pb(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Ct=pb(r)}else i===27?(i=Ct,_a(r.type)?(r=lh,lh=null,Ct=r):Ct=i):Ct=rn?er(r.stateNode.nextSibling):null;return!0}function ei(){Ct=rn=null,nt=!1}function Hf(){var r=ua;return r!==null&&(Cn===null?Cn=r:Cn.push.apply(Cn,r),ua=null),r}function tu(r){ua===null?ua=[r]:ua.push(r)}var Uf=M(null),ti=null,Mr=null;function oa(r,i,l){k(Uf,i._currentValue),i._currentValue=l}function Br(r){r._currentValue=Uf.current,W(Uf)}function Pf(r,i,l){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===l)break;r=r.return}}function jf(r,i,l,c){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var p=m.dependencies;if(p!==null){var x=m.child;p=p.firstContext;e:for(;p!==null;){var A=p;p=m;for(var H=0;H<i.length;H++)if(A.context===i[H]){p.lanes|=l,A=p.alternate,A!==null&&(A.lanes|=l),Pf(p.return,l,r),c||(x=null);break e}p=A.next}}else if(m.tag===18){if(x=m.return,x===null)throw Error(a(341));x.lanes|=l,p=x.alternate,p!==null&&(p.lanes|=l),Pf(x,l,r),x=null}else x=m.child;if(x!==null)x.return=m;else for(x=m;x!==null;){if(x===r){x=null;break}if(m=x.sibling,m!==null){m.return=x.return,x=m;break}x=x.return}m=x}}function Wi(r,i,l,c){r=null;for(var m=i,p=!1;m!==null;){if(!p){if((m.flags&524288)!==0)p=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var x=m.alternate;if(x===null)throw Error(a(387));if(x=x.memoizedProps,x!==null){var A=m.type;Dn(m.pendingProps.value,x.value)||(r!==null?r.push(A):r=[A])}}else if(m===he.current){if(x=m.alternate,x===null)throw Error(a(387));x.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Nu):r=[Nu])}m=m.return}r!==null&&jf(i,r,l,c),i.flags|=262144}function js(r){for(r=r.firstContext;r!==null;){if(!Dn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function ni(r){ti=r,Mr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function an(r){return Vp(ti,r)}function Fs(r,i){return ti===null&&ni(r),Vp(r,i)}function Vp(r,i){var l=i._currentValue;if(i={context:i,memoizedValue:l,next:null},Mr===null){if(r===null)throw Error(a(308));Mr=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else Mr=Mr.next=i;return l}var _v=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(l,c){r.push(c)}};this.abort=function(){i.aborted=!0,r.forEach(function(l){return l()})}},vv=e.unstable_scheduleCallback,Sv=e.unstable_NormalPriority,jt={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ff(){return{controller:new _v,data:new Map,refCount:0}}function nu(r){r.refCount--,r.refCount===0&&vv(Sv,function(){r.controller.abort()})}var ru=null,qf=0,Ji=0,el=null;function Av(r,i){if(ru===null){var l=ru=[];qf=0,Ji=$d(),el={status:"pending",value:void 0,then:function(c){l.push(c)}}}return qf++,i.then($p,$p),i}function $p(){if(--qf===0&&ru!==null){el!==null&&(el.status="fulfilled");var r=ru;ru=null,Ji=0,el=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function kv(r,i){var l=[],c={status:"pending",value:null,reason:null,then:function(m){l.push(m)}};return r.then(function(){c.status="fulfilled",c.value=i;for(var m=0;m<l.length;m++)(0,l[m])(i)},function(m){for(c.status="rejected",c.reason=m,m=0;m<l.length;m++)(0,l[m])(void 0)}),c}var Gp=P.S;P.S=function(r,i){Rg=mn(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Av(r,i),Gp!==null&&Gp(r,i)};var ri=M(null);function Yf(){var r=ri.current;return r!==null?r:vt.pooledCache}function qs(r,i){i===null?k(ri,ri.current):k(ri,i.pool)}function Qp(){var r=Yf();return r===null?null:{parent:jt._currentValue,pool:r}}var tl=Error(a(460)),Vf=Error(a(474)),Ys=Error(a(542)),Vs={then:function(){}};function Xp(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Zp(r,i,l){switch(l=r[l],l===void 0?r.push(i):l!==i&&(i.then(Or,Or),i=l),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Wp(r),r;default:if(typeof i.status=="string")i.then(Or,Or);else{if(r=vt,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(c){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=c}},function(c){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Wp(r),r}throw ii=i,tl}}function ai(r){try{var i=r._init;return i(r._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ii=l,tl):l}}var ii=null;function Kp(){if(ii===null)throw Error(a(459));var r=ii;return ii=null,r}function Wp(r){if(r===tl||r===Ys)throw Error(a(483))}var nl=null,au=0;function $s(r){var i=au;return au+=1,nl===null&&(nl=[]),Zp(nl,r,i)}function iu(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function Gs(r,i){throw i.$$typeof===E?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function Jp(r){function i(Y,j){if(r){var Q=Y.deletions;Q===null?(Y.deletions=[j],Y.flags|=16):Q.push(j)}}function l(Y,j){if(!r)return null;for(;j!==null;)i(Y,j),j=j.sibling;return null}function c(Y){for(var j=new Map;Y!==null;)Y.key!==null?j.set(Y.key,Y):j.set(Y.index,Y),Y=Y.sibling;return j}function m(Y,j){return Y=Dr(Y,j),Y.index=0,Y.sibling=null,Y}function p(Y,j,Q){return Y.index=Q,r?(Q=Y.alternate,Q!==null?(Q=Q.index,Q<j?(Y.flags|=67108866,j):Q):(Y.flags|=67108866,j)):(Y.flags|=1048576,j)}function x(Y){return r&&Y.alternate===null&&(Y.flags|=67108866),Y}function A(Y,j,Q,le){return j===null||j.tag!==6?(j=Df(Q,Y.mode,le),j.return=Y,j):(j=m(j,Q),j.return=Y,j)}function H(Y,j,Q,le){var Oe=Q.type;return Oe===N?ee(Y,j,Q.props.children,le,Q.key):j!==null&&(j.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===G&&ai(Oe)===j.type)?(j=m(j,Q.props),iu(j,Q),j.return=Y,j):(j=Us(Q.type,Q.key,Q.props,null,Y.mode,le),iu(j,Q),j.return=Y,j)}function X(Y,j,Q,le){return j===null||j.tag!==4||j.stateNode.containerInfo!==Q.containerInfo||j.stateNode.implementation!==Q.implementation?(j=If(Q,Y.mode,le),j.return=Y,j):(j=m(j,Q.children||[]),j.return=Y,j)}function ee(Y,j,Q,le,Oe){return j===null||j.tag!==7?(j=Ja(Q,Y.mode,le,Oe),j.return=Y,j):(j=m(j,Q),j.return=Y,j)}function se(Y,j,Q){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Df(""+j,Y.mode,Q),j.return=Y,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case T:return Q=Us(j.type,j.key,j.props,null,Y.mode,Q),iu(Q,j),Q.return=Y,Q;case v:return j=If(j,Y.mode,Q),j.return=Y,j;case G:return j=ai(j),se(Y,j,Q)}if(ae(j)||oe(j))return j=Ja(j,Y.mode,Q,null),j.return=Y,j;if(typeof j.then=="function")return se(Y,$s(j),Q);if(j.$$typeof===U)return se(Y,Fs(Y,j),Q);Gs(Y,j)}return null}function Z(Y,j,Q,le){var Oe=j!==null?j.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Oe!==null?null:A(Y,j,""+Q,le);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case T:return Q.key===Oe?H(Y,j,Q,le):null;case v:return Q.key===Oe?X(Y,j,Q,le):null;case G:return Q=ai(Q),Z(Y,j,Q,le)}if(ae(Q)||oe(Q))return Oe!==null?null:ee(Y,j,Q,le,null);if(typeof Q.then=="function")return Z(Y,j,$s(Q),le);if(Q.$$typeof===U)return Z(Y,j,Fs(Y,Q),le);Gs(Y,Q)}return null}function K(Y,j,Q,le,Oe){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Y=Y.get(Q)||null,A(j,Y,""+le,Oe);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case T:return Y=Y.get(le.key===null?Q:le.key)||null,H(j,Y,le,Oe);case v:return Y=Y.get(le.key===null?Q:le.key)||null,X(j,Y,le,Oe);case G:return le=ai(le),K(Y,j,Q,le,Oe)}if(ae(le)||oe(le))return Y=Y.get(Q)||null,ee(j,Y,le,Oe,null);if(typeof le.then=="function")return K(Y,j,Q,$s(le),Oe);if(le.$$typeof===U)return K(Y,j,Q,Fs(j,le),Oe);Gs(j,le)}return null}function ke(Y,j,Q,le){for(var Oe=null,ot=null,Ne=j,Fe=j=0,tt=null;Ne!==null&&Fe<Q.length;Fe++){Ne.index>Fe?(tt=Ne,Ne=null):tt=Ne.sibling;var ct=Z(Y,Ne,Q[Fe],le);if(ct===null){Ne===null&&(Ne=tt);break}r&&Ne&&ct.alternate===null&&i(Y,Ne),j=p(ct,j,Fe),ot===null?Oe=ct:ot.sibling=ct,ot=ct,Ne=tt}if(Fe===Q.length)return l(Y,Ne),nt&&Ir(Y,Fe),Oe;if(Ne===null){for(;Fe<Q.length;Fe++)Ne=se(Y,Q[Fe],le),Ne!==null&&(j=p(Ne,j,Fe),ot===null?Oe=Ne:ot.sibling=Ne,ot=Ne);return nt&&Ir(Y,Fe),Oe}for(Ne=c(Ne);Fe<Q.length;Fe++)tt=K(Ne,Y,Fe,Q[Fe],le),tt!==null&&(r&&tt.alternate!==null&&Ne.delete(tt.key===null?Fe:tt.key),j=p(tt,j,Fe),ot===null?Oe=tt:ot.sibling=tt,ot=tt);return r&&Ne.forEach(function(Ca){return i(Y,Ca)}),nt&&Ir(Y,Fe),Oe}function Ie(Y,j,Q,le){if(Q==null)throw Error(a(151));for(var Oe=null,ot=null,Ne=j,Fe=j=0,tt=null,ct=Q.next();Ne!==null&&!ct.done;Fe++,ct=Q.next()){Ne.index>Fe?(tt=Ne,Ne=null):tt=Ne.sibling;var Ca=Z(Y,Ne,ct.value,le);if(Ca===null){Ne===null&&(Ne=tt);break}r&&Ne&&Ca.alternate===null&&i(Y,Ne),j=p(Ca,j,Fe),ot===null?Oe=Ca:ot.sibling=Ca,ot=Ca,Ne=tt}if(ct.done)return l(Y,Ne),nt&&Ir(Y,Fe),Oe;if(Ne===null){for(;!ct.done;Fe++,ct=Q.next())ct=se(Y,ct.value,le),ct!==null&&(j=p(ct,j,Fe),ot===null?Oe=ct:ot.sibling=ct,ot=ct);return nt&&Ir(Y,Fe),Oe}for(Ne=c(Ne);!ct.done;Fe++,ct=Q.next())ct=K(Ne,Y,Fe,ct.value,le),ct!==null&&(r&&ct.alternate!==null&&Ne.delete(ct.key===null?Fe:ct.key),j=p(ct,j,Fe),ot===null?Oe=ct:ot.sibling=ct,ot=ct);return r&&Ne.forEach(function(zS){return i(Y,zS)}),nt&&Ir(Y,Fe),Oe}function yt(Y,j,Q,le){if(typeof Q=="object"&&Q!==null&&Q.type===N&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case T:e:{for(var Oe=Q.key;j!==null;){if(j.key===Oe){if(Oe=Q.type,Oe===N){if(j.tag===7){l(Y,j.sibling),le=m(j,Q.props.children),le.return=Y,Y=le;break e}}else if(j.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===G&&ai(Oe)===j.type){l(Y,j.sibling),le=m(j,Q.props),iu(le,Q),le.return=Y,Y=le;break e}l(Y,j);break}else i(Y,j);j=j.sibling}Q.type===N?(le=Ja(Q.props.children,Y.mode,le,Q.key),le.return=Y,Y=le):(le=Us(Q.type,Q.key,Q.props,null,Y.mode,le),iu(le,Q),le.return=Y,Y=le)}return x(Y);case v:e:{for(Oe=Q.key;j!==null;){if(j.key===Oe)if(j.tag===4&&j.stateNode.containerInfo===Q.containerInfo&&j.stateNode.implementation===Q.implementation){l(Y,j.sibling),le=m(j,Q.children||[]),le.return=Y,Y=le;break e}else{l(Y,j);break}else i(Y,j);j=j.sibling}le=If(Q,Y.mode,le),le.return=Y,Y=le}return x(Y);case G:return Q=ai(Q),yt(Y,j,Q,le)}if(ae(Q))return ke(Y,j,Q,le);if(oe(Q)){if(Oe=oe(Q),typeof Oe!="function")throw Error(a(150));return Q=Oe.call(Q),Ie(Y,j,Q,le)}if(typeof Q.then=="function")return yt(Y,j,$s(Q),le);if(Q.$$typeof===U)return yt(Y,j,Fs(Y,Q),le);Gs(Y,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,j!==null&&j.tag===6?(l(Y,j.sibling),le=m(j,Q),le.return=Y,Y=le):(l(Y,j),le=Df(Q,Y.mode,le),le.return=Y,Y=le),x(Y)):l(Y,j)}return function(Y,j,Q,le){try{au=0;var Oe=yt(Y,j,Q,le);return nl=null,Oe}catch(Ne){if(Ne===tl||Ne===Ys)throw Ne;var ot=In(29,Ne,null,Y.mode);return ot.lanes=le,ot.return=Y,ot}finally{}}}var li=Jp(!0),e1=Jp(!1),ca=!1;function $f(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gf(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function fa(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function da(r,i,l){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(ft&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,i=Hs(r),zp(r,null,l),i}return zs(r,c,i,l),Hs(r)}function lu(r,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194048)!==0)){var c=i.lanes;c&=r.pendingLanes,l|=c,i.lanes=l,V0(r,l)}}function Qf(r,i){var l=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var m=null,p=null;if(l=l.firstBaseUpdate,l!==null){do{var x={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};p===null?m=p=x:p=p.next=x,l=l.next}while(l!==null);p===null?m=p=i:p=p.next=i}else m=p=i;l={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:p,shared:c.shared,callbacks:c.callbacks},r.updateQueue=l;return}r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=i:r.next=i,l.lastBaseUpdate=i}var Xf=!1;function uu(){if(Xf){var r=el;if(r!==null)throw r}}function su(r,i,l,c){Xf=!1;var m=r.updateQueue;ca=!1;var p=m.firstBaseUpdate,x=m.lastBaseUpdate,A=m.shared.pending;if(A!==null){m.shared.pending=null;var H=A,X=H.next;H.next=null,x===null?p=X:x.next=X,x=H;var ee=r.alternate;ee!==null&&(ee=ee.updateQueue,A=ee.lastBaseUpdate,A!==x&&(A===null?ee.firstBaseUpdate=X:A.next=X,ee.lastBaseUpdate=H))}if(p!==null){var se=m.baseState;x=0,ee=X=H=null,A=p;do{var Z=A.lane&-536870913,K=Z!==A.lane;if(K?(et&Z)===Z:(c&Z)===Z){Z!==0&&Z===Ji&&(Xf=!0),ee!==null&&(ee=ee.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var ke=r,Ie=A;Z=i;var yt=l;switch(Ie.tag){case 1:if(ke=Ie.payload,typeof ke=="function"){se=ke.call(yt,se,Z);break e}se=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Ie.payload,Z=typeof ke=="function"?ke.call(yt,se,Z):ke,Z==null)break e;se=g({},se,Z);break e;case 2:ca=!0}}Z=A.callback,Z!==null&&(r.flags|=64,K&&(r.flags|=8192),K=m.callbacks,K===null?m.callbacks=[Z]:K.push(Z))}else K={lane:Z,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ee===null?(X=ee=K,H=se):ee=ee.next=K,x|=Z;if(A=A.next,A===null){if(A=m.shared.pending,A===null)break;K=A,A=K.next,K.next=null,m.lastBaseUpdate=K,m.shared.pending=null}}while(!0);ee===null&&(H=se),m.baseState=H,m.firstBaseUpdate=X,m.lastBaseUpdate=ee,p===null&&(m.shared.lanes=0),ba|=x,r.lanes=x,r.memoizedState=se}}function t1(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function n1(r,i){var l=r.callbacks;if(l!==null)for(r.callbacks=null,r=0;r<l.length;r++)t1(l[r],i)}var rl=M(null),Qs=M(0);function r1(r,i){r=Vr,k(Qs,r),k(rl,i),Vr=r|i.baseLanes}function Zf(){k(Qs,Vr),k(rl,rl.current)}function Kf(){Vr=Qs.current,W(rl),W(Qs)}var Mn=M(null),Jn=null;function ha(r){var i=r.alternate;k(Bt,Bt.current&1),k(Mn,r),Jn===null&&(i===null||rl.current!==null||i.memoizedState!==null)&&(Jn=r)}function Wf(r){k(Bt,Bt.current),k(Mn,r),Jn===null&&(Jn=r)}function a1(r){r.tag===22?(k(Bt,Bt.current),k(Mn,r),Jn===null&&(Jn=r)):ma()}function ma(){k(Bt,Bt.current),k(Mn,Mn.current)}function Bn(r){W(Mn),Jn===r&&(Jn=null),W(Bt)}var Bt=M(0);function Xs(r){for(var i=r;i!==null;){if(i.tag===13){var l=i.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ah(l)||ih(l)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var zr=0,je=null,gt=null,Ft=null,Zs=!1,al=!1,ui=!1,Ks=0,ou=0,il=null,Cv=0;function Lt(){throw Error(a(321))}function Jf(r,i){if(i===null)return!1;for(var l=0;l<i.length&&l<r.length;l++)if(!Dn(r[l],i[l]))return!1;return!0}function ed(r,i,l,c,m,p){return zr=p,je=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,P.H=r===null||r.memoizedState===null?j1:pd,ui=!1,p=l(c,m),ui=!1,al&&(p=l1(i,l,c,m)),i1(r),p}function i1(r){P.H=du;var i=gt!==null&&gt.next!==null;if(zr=0,Ft=gt=je=null,Zs=!1,ou=0,il=null,i)throw Error(a(300));r===null||qt||(r=r.dependencies,r!==null&&js(r)&&(qt=!0))}function l1(r,i,l,c){je=r;var m=0;do{if(al&&(il=null),ou=0,al=!1,25<=m)throw Error(a(301));if(m+=1,Ft=gt=null,r.updateQueue!=null){var p=r.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}P.H=F1,p=i(l,c)}while(al);return p}function Nv(){var r=P.H,i=r.useState()[0];return i=typeof i.then=="function"?cu(i):i,r=r.useState()[0],(gt!==null?gt.memoizedState:null)!==r&&(je.flags|=1024),i}function td(){var r=Ks!==0;return Ks=0,r}function nd(r,i,l){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~l}function rd(r){if(Zs){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Zs=!1}zr=0,Ft=gt=je=null,al=!1,ou=Ks=0,il=null}function gn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ft===null?je.memoizedState=Ft=r:Ft=Ft.next=r,Ft}function zt(){if(gt===null){var r=je.alternate;r=r!==null?r.memoizedState:null}else r=gt.next;var i=Ft===null?je.memoizedState:Ft.next;if(i!==null)Ft=i,gt=r;else{if(r===null)throw je.alternate===null?Error(a(467)):Error(a(310));gt=r,r={memoizedState:gt.memoizedState,baseState:gt.baseState,baseQueue:gt.baseQueue,queue:gt.queue,next:null},Ft===null?je.memoizedState=Ft=r:Ft=Ft.next=r}return Ft}function Ws(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cu(r){var i=ou;return ou+=1,il===null&&(il=[]),r=Zp(il,r,i),i=je,(Ft===null?i.memoizedState:Ft.next)===null&&(i=i.alternate,P.H=i===null||i.memoizedState===null?j1:pd),r}function Js(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return cu(r);if(r.$$typeof===U)return an(r)}throw Error(a(438,String(r)))}function ad(r){var i=null,l=je.updateQueue;if(l!==null&&(i=l.memoCache),i==null){var c=je.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),l===null&&(l=Ws(),je.updateQueue=l),l.memoCache=i,l=i.data[i.index],l===void 0)for(l=i.data[i.index]=Array(r),c=0;c<r;c++)l[c]=q;return i.index++,l}function Hr(r,i){return typeof i=="function"?i(r):i}function eo(r){var i=zt();return id(i,gt,r)}function id(r,i,l){var c=r.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=l;var m=r.baseQueue,p=c.pending;if(p!==null){if(m!==null){var x=m.next;m.next=p.next,p.next=x}i.baseQueue=m=p,c.pending=null}if(p=r.baseState,m===null)r.memoizedState=p;else{i=m.next;var A=x=null,H=null,X=i,ee=!1;do{var se=X.lane&-536870913;if(se!==X.lane?(et&se)===se:(zr&se)===se){var Z=X.revertLane;if(Z===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),se===Ji&&(ee=!0);else if((zr&Z)===Z){X=X.next,Z===Ji&&(ee=!0);continue}else se={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},H===null?(A=H=se,x=p):H=H.next=se,je.lanes|=Z,ba|=Z;se=X.action,ui&&l(p,se),p=X.hasEagerState?X.eagerState:l(p,se)}else Z={lane:se,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},H===null?(A=H=Z,x=p):H=H.next=Z,je.lanes|=se,ba|=se;X=X.next}while(X!==null&&X!==i);if(H===null?x=p:H.next=A,!Dn(p,r.memoizedState)&&(qt=!0,ee&&(l=el,l!==null)))throw l;r.memoizedState=p,r.baseState=x,r.baseQueue=H,c.lastRenderedState=p}return m===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function ld(r){var i=zt(),l=i.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=r;var c=l.dispatch,m=l.pending,p=i.memoizedState;if(m!==null){l.pending=null;var x=m=m.next;do p=r(p,x.action),x=x.next;while(x!==m);Dn(p,i.memoizedState)||(qt=!0),i.memoizedState=p,i.baseQueue===null&&(i.baseState=p),l.lastRenderedState=p}return[p,c]}function u1(r,i,l){var c=je,m=zt(),p=nt;if(p){if(l===void 0)throw Error(a(407));l=l()}else l=i();var x=!Dn((gt||m).memoizedState,l);if(x&&(m.memoizedState=l,qt=!0),m=m.queue,od(c1.bind(null,c,m,r),[r]),m.getSnapshot!==i||x||Ft!==null&&Ft.memoizedState.tag&1){if(c.flags|=2048,ll(9,{destroy:void 0},o1.bind(null,c,m,l,i),null),vt===null)throw Error(a(349));p||(zr&127)!==0||s1(c,i,l)}return l}function s1(r,i,l){r.flags|=16384,r={getSnapshot:i,value:l},i=je.updateQueue,i===null?(i=Ws(),je.updateQueue=i,i.stores=[r]):(l=i.stores,l===null?i.stores=[r]:l.push(r))}function o1(r,i,l,c){i.value=l,i.getSnapshot=c,f1(i)&&d1(r)}function c1(r,i,l){return l(function(){f1(i)&&d1(r)})}function f1(r){var i=r.getSnapshot;r=r.value;try{var l=i();return!Dn(r,l)}catch{return!0}}function d1(r){var i=Wa(r,2);i!==null&&Nn(i,r,2)}function ud(r){var i=gn();if(typeof r=="function"){var l=r;if(r=l(),ui){xn(!0);try{l()}finally{xn(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:r},i}function h1(r,i,l,c){return r.baseState=l,id(r,gt,typeof c=="function"?c:Hr)}function wv(r,i,l,c,m){if(ro(r))throw Error(a(485));if(r=i.action,r!==null){var p={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){p.listeners.push(x)}};P.T!==null?l(!0):p.isTransition=!1,c(p),l=i.pending,l===null?(p.next=i.pending=p,m1(i,p)):(p.next=l.next,i.pending=l.next=p)}}function m1(r,i){var l=i.action,c=i.payload,m=r.state;if(i.isTransition){var p=P.T,x={};P.T=x;try{var A=l(m,c),H=P.S;H!==null&&H(x,A),p1(r,i,A)}catch(X){sd(r,i,X)}finally{p!==null&&x.types!==null&&(p.types=x.types),P.T=p}}else try{p=l(m,c),p1(r,i,p)}catch(X){sd(r,i,X)}}function p1(r,i,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){g1(r,i,c)},function(c){return sd(r,i,c)}):g1(r,i,l)}function g1(r,i,l){i.status="fulfilled",i.value=l,b1(i),r.state=l,i=r.pending,i!==null&&(l=i.next,l===i?r.pending=null:(l=l.next,i.next=l,m1(r,l)))}function sd(r,i,l){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=l,b1(i),i=i.next;while(i!==c)}r.action=null}function b1(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function y1(r,i){return i}function E1(r,i){if(nt){var l=vt.formState;if(l!==null){e:{var c=je;if(nt){if(Ct){t:{for(var m=Ct,p=Wn;m.nodeType!==8;){if(!p){m=null;break t}if(m=er(m.nextSibling),m===null){m=null;break t}}p=m.data,m=p==="F!"||p==="F"?m:null}if(m){Ct=er(m.nextSibling),c=m.data==="F!";break e}}sa(c)}c=!1}c&&(i=l[0])}}return l=gn(),l.memoizedState=l.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:y1,lastRenderedState:i},l.queue=c,l=H1.bind(null,je,c),c.dispatch=l,c=ud(!1),p=md.bind(null,je,!1,c.queue),c=gn(),m={state:i,dispatch:null,action:r,pending:null},c.queue=m,l=wv.bind(null,je,m,p,l),m.dispatch=l,c.memoizedState=r,[i,l,!1]}function T1(r){var i=zt();return x1(i,gt,r)}function x1(r,i,l){if(i=id(r,i,y1)[0],r=eo(Hr)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=cu(i)}catch(x){throw x===tl?Ys:x}else c=i;i=zt();var m=i.queue,p=m.dispatch;return l!==i.memoizedState&&(je.flags|=2048,ll(9,{destroy:void 0},Rv.bind(null,m,l),null)),[c,p,r]}function Rv(r,i){r.action=i}function _1(r){var i=zt(),l=gt;if(l!==null)return x1(i,l,r);zt(),i=i.memoizedState,l=zt();var c=l.queue.dispatch;return l.memoizedState=r,[i,c,!1]}function ll(r,i,l,c){return r={tag:r,create:l,deps:c,inst:i,next:null},i=je.updateQueue,i===null&&(i=Ws(),je.updateQueue=i),l=i.lastEffect,l===null?i.lastEffect=r.next=r:(c=l.next,l.next=r,r.next=c,i.lastEffect=r),r}function v1(){return zt().memoizedState}function to(r,i,l,c){var m=gn();je.flags|=r,m.memoizedState=ll(1|i,{destroy:void 0},l,c===void 0?null:c)}function no(r,i,l,c){var m=zt();c=c===void 0?null:c;var p=m.memoizedState.inst;gt!==null&&c!==null&&Jf(c,gt.memoizedState.deps)?m.memoizedState=ll(i,p,l,c):(je.flags|=r,m.memoizedState=ll(1|i,p,l,c))}function S1(r,i){to(8390656,8,r,i)}function od(r,i){no(2048,8,r,i)}function Ov(r){je.flags|=4;var i=je.updateQueue;if(i===null)i=Ws(),je.updateQueue=i,i.events=[r];else{var l=i.events;l===null?i.events=[r]:l.push(r)}}function A1(r){var i=zt().memoizedState;return Ov({ref:i,nextImpl:r}),function(){if((ft&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function k1(r,i){return no(4,2,r,i)}function C1(r,i){return no(4,4,r,i)}function N1(r,i){if(typeof i=="function"){r=r();var l=i(r);return function(){typeof l=="function"?l():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function w1(r,i,l){l=l!=null?l.concat([r]):null,no(4,4,N1.bind(null,i,r),l)}function cd(){}function R1(r,i){var l=zt();i=i===void 0?null:i;var c=l.memoizedState;return i!==null&&Jf(i,c[1])?c[0]:(l.memoizedState=[r,i],r)}function O1(r,i){var l=zt();i=i===void 0?null:i;var c=l.memoizedState;if(i!==null&&Jf(i,c[1]))return c[0];if(c=r(),ui){xn(!0);try{r()}finally{xn(!1)}}return l.memoizedState=[c,i],c}function fd(r,i,l){return l===void 0||(zr&1073741824)!==0&&(et&261930)===0?r.memoizedState=i:(r.memoizedState=l,r=Lg(),je.lanes|=r,ba|=r,l)}function L1(r,i,l,c){return Dn(l,i)?l:rl.current!==null?(r=fd(r,l,c),Dn(r,i)||(qt=!0),r):(zr&42)===0||(zr&1073741824)!==0&&(et&261930)===0?(qt=!0,r.memoizedState=l):(r=Lg(),je.lanes|=r,ba|=r,i)}function D1(r,i,l,c,m){var p=te.p;te.p=p!==0&&8>p?p:8;var x=P.T,A={};P.T=A,md(r,!1,i,l);try{var H=m(),X=P.S;if(X!==null&&X(A,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var ee=kv(H,c);fu(r,i,ee,Un(r))}else fu(r,i,c,Un(r))}catch(se){fu(r,i,{then:function(){},status:"rejected",reason:se},Un())}finally{te.p=p,x!==null&&A.types!==null&&(x.types=A.types),P.T=x}}function Lv(){}function dd(r,i,l,c){if(r.tag!==5)throw Error(a(476));var m=I1(r).queue;D1(r,m,i,fe,l===null?Lv:function(){return M1(r),l(c)})}function I1(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:fe},next:null};var l={};return i.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:l},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function M1(r){var i=I1(r);i.next===null&&(i=r.alternate.memoizedState),fu(r,i.next.queue,{},Un())}function hd(){return an(Nu)}function B1(){return zt().memoizedState}function z1(){return zt().memoizedState}function Dv(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var l=Un();r=fa(l);var c=da(i,r,l);c!==null&&(Nn(c,i,l),lu(c,i,l)),i={cache:Ff()},r.payload=i;return}i=i.return}}function Iv(r,i,l){var c=Un();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ro(r)?U1(i,l):(l=Of(r,i,l,c),l!==null&&(Nn(l,r,c),P1(l,i,c)))}function H1(r,i,l){var c=Un();fu(r,i,l,c)}function fu(r,i,l,c){var m={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ro(r))U1(i,m);else{var p=r.alternate;if(r.lanes===0&&(p===null||p.lanes===0)&&(p=i.lastRenderedReducer,p!==null))try{var x=i.lastRenderedState,A=p(x,l);if(m.hasEagerState=!0,m.eagerState=A,Dn(A,x))return zs(r,i,m,0),vt===null&&Bs(),!1}catch{}finally{}if(l=Of(r,i,m,c),l!==null)return Nn(l,r,c),P1(l,i,c),!0}return!1}function md(r,i,l,c){if(c={lane:2,revertLane:$d(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},ro(r)){if(i)throw Error(a(479))}else i=Of(r,l,c,2),i!==null&&Nn(i,r,2)}function ro(r){var i=r.alternate;return r===je||i!==null&&i===je}function U1(r,i){al=Zs=!0;var l=r.pending;l===null?i.next=i:(i.next=l.next,l.next=i),r.pending=i}function P1(r,i,l){if((l&4194048)!==0){var c=i.lanes;c&=r.pendingLanes,l|=c,i.lanes=l,V0(r,l)}}var du={readContext:an,use:Js,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useLayoutEffect:Lt,useInsertionEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useSyncExternalStore:Lt,useId:Lt,useHostTransitionStatus:Lt,useFormState:Lt,useActionState:Lt,useOptimistic:Lt,useMemoCache:Lt,useCacheRefresh:Lt};du.useEffectEvent=Lt;var j1={readContext:an,use:Js,useCallback:function(r,i){return gn().memoizedState=[r,i===void 0?null:i],r},useContext:an,useEffect:S1,useImperativeHandle:function(r,i,l){l=l!=null?l.concat([r]):null,to(4194308,4,N1.bind(null,i,r),l)},useLayoutEffect:function(r,i){return to(4194308,4,r,i)},useInsertionEffect:function(r,i){to(4,2,r,i)},useMemo:function(r,i){var l=gn();i=i===void 0?null:i;var c=r();if(ui){xn(!0);try{r()}finally{xn(!1)}}return l.memoizedState=[c,i],c},useReducer:function(r,i,l){var c=gn();if(l!==void 0){var m=l(i);if(ui){xn(!0);try{l(i)}finally{xn(!1)}}}else m=i;return c.memoizedState=c.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},c.queue=r,r=r.dispatch=Iv.bind(null,je,r),[c.memoizedState,r]},useRef:function(r){var i=gn();return r={current:r},i.memoizedState=r},useState:function(r){r=ud(r);var i=r.queue,l=H1.bind(null,je,i);return i.dispatch=l,[r.memoizedState,l]},useDebugValue:cd,useDeferredValue:function(r,i){var l=gn();return fd(l,r,i)},useTransition:function(){var r=ud(!1);return r=D1.bind(null,je,r.queue,!0,!1),gn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,l){var c=je,m=gn();if(nt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=i(),vt===null)throw Error(a(349));(et&127)!==0||s1(c,i,l)}m.memoizedState=l;var p={value:l,getSnapshot:i};return m.queue=p,S1(c1.bind(null,c,p,r),[r]),c.flags|=2048,ll(9,{destroy:void 0},o1.bind(null,c,p,l,i),null),l},useId:function(){var r=gn(),i=vt.identifierPrefix;if(nt){var l=br,c=gr;l=(c&~(1<<32-_t(c)-1)).toString(32)+l,i="_"+i+"R_"+l,l=Ks++,0<l&&(i+="H"+l.toString(32)),i+="_"}else l=Cv++,i="_"+i+"r_"+l.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:hd,useFormState:E1,useActionState:E1,useOptimistic:function(r){var i=gn();i.memoizedState=i.baseState=r;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=l,i=md.bind(null,je,!0,l),l.dispatch=i,[r,i]},useMemoCache:ad,useCacheRefresh:function(){return gn().memoizedState=Dv.bind(null,je)},useEffectEvent:function(r){var i=gn(),l={impl:r};return i.memoizedState=l,function(){if((ft&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},pd={readContext:an,use:Js,useCallback:R1,useContext:an,useEffect:od,useImperativeHandle:w1,useInsertionEffect:k1,useLayoutEffect:C1,useMemo:O1,useReducer:eo,useRef:v1,useState:function(){return eo(Hr)},useDebugValue:cd,useDeferredValue:function(r,i){var l=zt();return L1(l,gt.memoizedState,r,i)},useTransition:function(){var r=eo(Hr)[0],i=zt().memoizedState;return[typeof r=="boolean"?r:cu(r),i]},useSyncExternalStore:u1,useId:B1,useHostTransitionStatus:hd,useFormState:T1,useActionState:T1,useOptimistic:function(r,i){var l=zt();return h1(l,gt,r,i)},useMemoCache:ad,useCacheRefresh:z1};pd.useEffectEvent=A1;var F1={readContext:an,use:Js,useCallback:R1,useContext:an,useEffect:od,useImperativeHandle:w1,useInsertionEffect:k1,useLayoutEffect:C1,useMemo:O1,useReducer:ld,useRef:v1,useState:function(){return ld(Hr)},useDebugValue:cd,useDeferredValue:function(r,i){var l=zt();return gt===null?fd(l,r,i):L1(l,gt.memoizedState,r,i)},useTransition:function(){var r=ld(Hr)[0],i=zt().memoizedState;return[typeof r=="boolean"?r:cu(r),i]},useSyncExternalStore:u1,useId:B1,useHostTransitionStatus:hd,useFormState:_1,useActionState:_1,useOptimistic:function(r,i){var l=zt();return gt!==null?h1(l,gt,r,i):(l.baseState=r,[r,l.queue.dispatch])},useMemoCache:ad,useCacheRefresh:z1};F1.useEffectEvent=A1;function gd(r,i,l,c){i=r.memoizedState,l=l(c,i),l=l==null?i:g({},i,l),r.memoizedState=l,r.lanes===0&&(r.updateQueue.baseState=l)}var bd={enqueueSetState:function(r,i,l){r=r._reactInternals;var c=Un(),m=fa(c);m.payload=i,l!=null&&(m.callback=l),i=da(r,m,c),i!==null&&(Nn(i,r,c),lu(i,r,c))},enqueueReplaceState:function(r,i,l){r=r._reactInternals;var c=Un(),m=fa(c);m.tag=1,m.payload=i,l!=null&&(m.callback=l),i=da(r,m,c),i!==null&&(Nn(i,r,c),lu(i,r,c))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var l=Un(),c=fa(l);c.tag=2,i!=null&&(c.callback=i),i=da(r,c,l),i!==null&&(Nn(i,r,l),lu(i,r,l))}};function q1(r,i,l,c,m,p,x){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,p,x):i.prototype&&i.prototype.isPureReactComponent?!Wl(l,c)||!Wl(m,p):!0}function Y1(r,i,l,c){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(l,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(l,c),i.state!==r&&bd.enqueueReplaceState(i,i.state,null)}function si(r,i){var l=i;if("ref"in i){l={};for(var c in i)c!=="ref"&&(l[c]=i[c])}if(r=r.defaultProps){l===i&&(l=g({},l));for(var m in r)l[m]===void 0&&(l[m]=r[m])}return l}function V1(r){Ms(r)}function $1(r){console.error(r)}function G1(r){Ms(r)}function ao(r,i){try{var l=r.onUncaughtError;l(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function Q1(r,i,l){try{var c=r.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function yd(r,i,l){return l=fa(l),l.tag=3,l.payload={element:null},l.callback=function(){ao(r,i)},l}function X1(r){return r=fa(r),r.tag=3,r}function Z1(r,i,l,c){var m=l.type.getDerivedStateFromError;if(typeof m=="function"){var p=c.value;r.payload=function(){return m(p)},r.callback=function(){Q1(i,l,c)}}var x=l.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(r.callback=function(){Q1(i,l,c),typeof m!="function"&&(ya===null?ya=new Set([this]):ya.add(this));var A=c.stack;this.componentDidCatch(c.value,{componentStack:A!==null?A:""})})}function Mv(r,i,l,c,m){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=l.alternate,i!==null&&Wi(i,l,m,!0),l=Mn.current,l!==null){switch(l.tag){case 31:case 13:return Jn===null?bo():l.alternate===null&&Dt===0&&(Dt=3),l.flags&=-257,l.flags|=65536,l.lanes=m,c===Vs?l.flags|=16384:(i=l.updateQueue,i===null?l.updateQueue=new Set([c]):i.add(c),qd(r,c,m)),!1;case 22:return l.flags|=65536,c===Vs?l.flags|=16384:(i=l.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=i):(l=i.retryQueue,l===null?i.retryQueue=new Set([c]):l.add(c)),qd(r,c,m)),!1}throw Error(a(435,l.tag))}return qd(r,c,m),bo(),!1}if(nt)return i=Mn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,c!==zf&&(r=Error(a(422),{cause:c}),tu(Xn(r,l)))):(c!==zf&&(i=Error(a(423),{cause:c}),tu(Xn(i,l))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,c=Xn(c,l),m=yd(r.stateNode,c,m),Qf(r,m),Dt!==4&&(Dt=2)),!1;var p=Error(a(520),{cause:c});if(p=Xn(p,l),Tu===null?Tu=[p]:Tu.push(p),Dt!==4&&(Dt=2),i===null)return!0;c=Xn(c,l),l=i;do{switch(l.tag){case 3:return l.flags|=65536,r=m&-m,l.lanes|=r,r=yd(l.stateNode,c,r),Qf(l,r),!1;case 1:if(i=l.type,p=l.stateNode,(l.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(ya===null||!ya.has(p))))return l.flags|=65536,m&=-m,l.lanes|=m,m=X1(m),Z1(m,r,l,c),Qf(l,m),!1}l=l.return}while(l!==null);return!1}var Ed=Error(a(461)),qt=!1;function ln(r,i,l,c){i.child=r===null?e1(i,null,l,c):li(i,r.child,l,c)}function K1(r,i,l,c,m){l=l.render;var p=i.ref;if("ref"in c){var x={};for(var A in c)A!=="ref"&&(x[A]=c[A])}else x=c;return ni(i),c=ed(r,i,l,x,p,m),A=td(),r!==null&&!qt?(nd(r,i,m),Ur(r,i,m)):(nt&&A&&Mf(i),i.flags|=1,ln(r,i,c,m),i.child)}function W1(r,i,l,c,m){if(r===null){var p=l.type;return typeof p=="function"&&!Lf(p)&&p.defaultProps===void 0&&l.compare===null?(i.tag=15,i.type=p,J1(r,i,p,c,m)):(r=Us(l.type,null,c,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(p=r.child,!Cd(r,m)){var x=p.memoizedProps;if(l=l.compare,l=l!==null?l:Wl,l(x,c)&&r.ref===i.ref)return Ur(r,i,m)}return i.flags|=1,r=Dr(p,c),r.ref=i.ref,r.return=i,i.child=r}function J1(r,i,l,c,m){if(r!==null){var p=r.memoizedProps;if(Wl(p,c)&&r.ref===i.ref)if(qt=!1,i.pendingProps=c=p,Cd(r,m))(r.flags&131072)!==0&&(qt=!0);else return i.lanes=r.lanes,Ur(r,i,m)}return Td(r,i,l,c,m)}function eg(r,i,l,c){var m=c.children,p=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(p=p!==null?p.baseLanes|l:l,r!==null){for(c=i.child=r.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~p}else c=0,i.child=null;return tg(r,i,p,l,c)}if((l&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&qs(i,p!==null?p.cachePool:null),p!==null?r1(i,p):Zf(),a1(i);else return c=i.lanes=536870912,tg(r,i,p!==null?p.baseLanes|l:l,l,c)}else p!==null?(qs(i,p.cachePool),r1(i,p),ma(),i.memoizedState=null):(r!==null&&qs(i,null),Zf(),ma());return ln(r,i,m,l),i.child}function hu(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function tg(r,i,l,c,m){var p=Yf();return p=p===null?null:{parent:jt._currentValue,pool:p},i.memoizedState={baseLanes:l,cachePool:p},r!==null&&qs(i,null),Zf(),a1(i),r!==null&&Wi(r,i,c,!0),i.childLanes=m,null}function io(r,i){return i=uo({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function ng(r,i,l){return li(i,r.child,null,l),r=io(i,i.pendingProps),r.flags|=2,Bn(i),i.memoizedState=null,r}function Bv(r,i,l){var c=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(nt){if(c.mode==="hidden")return r=io(i,c),i.lanes=536870912,hu(null,r);if(Wf(i),(r=Ct)?(r=mb(r,Wn),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:la!==null?{id:gr,overflow:br}:null,retryLane:536870912,hydrationErrors:null},l=Up(r),l.return=i,i.child=l,rn=i,Ct=null)):r=null,r===null)throw sa(i);return i.lanes=536870912,null}return io(i,c)}var p=r.memoizedState;if(p!==null){var x=p.dehydrated;if(Wf(i),m)if(i.flags&256)i.flags&=-257,i=ng(r,i,l);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(qt||Wi(r,i,l,!1),m=(l&r.childLanes)!==0,qt||m){if(c=vt,c!==null&&(x=$0(c,l),x!==0&&x!==p.retryLane))throw p.retryLane=x,Wa(r,x),Nn(c,r,x),Ed;bo(),i=ng(r,i,l)}else r=p.treeContext,Ct=er(x.nextSibling),rn=i,nt=!0,ua=null,Wn=!1,r!==null&&Fp(i,r),i=io(i,c),i.flags|=4096;return i}return r=Dr(r.child,{mode:c.mode,children:c.children}),r.ref=i.ref,i.child=r,r.return=i,r}function lo(r,i){var l=i.ref;if(l===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(r===null||r.ref!==l)&&(i.flags|=4194816)}}function Td(r,i,l,c,m){return ni(i),l=ed(r,i,l,c,void 0,m),c=td(),r!==null&&!qt?(nd(r,i,m),Ur(r,i,m)):(nt&&c&&Mf(i),i.flags|=1,ln(r,i,l,m),i.child)}function rg(r,i,l,c,m,p){return ni(i),i.updateQueue=null,l=l1(i,c,l,m),i1(r),c=td(),r!==null&&!qt?(nd(r,i,p),Ur(r,i,p)):(nt&&c&&Mf(i),i.flags|=1,ln(r,i,l,p),i.child)}function ag(r,i,l,c,m){if(ni(i),i.stateNode===null){var p=Qi,x=l.contextType;typeof x=="object"&&x!==null&&(p=an(x)),p=new l(c,p),i.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=bd,i.stateNode=p,p._reactInternals=i,p=i.stateNode,p.props=c,p.state=i.memoizedState,p.refs={},$f(i),x=l.contextType,p.context=typeof x=="object"&&x!==null?an(x):Qi,p.state=i.memoizedState,x=l.getDerivedStateFromProps,typeof x=="function"&&(gd(i,l,x,c),p.state=i.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(x=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),x!==p.state&&bd.enqueueReplaceState(p,p.state,null),su(i,c,p,m),uu(),p.state=i.memoizedState),typeof p.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(r===null){p=i.stateNode;var A=i.memoizedProps,H=si(l,A);p.props=H;var X=p.context,ee=l.contextType;x=Qi,typeof ee=="object"&&ee!==null&&(x=an(ee));var se=l.getDerivedStateFromProps;ee=typeof se=="function"||typeof p.getSnapshotBeforeUpdate=="function",A=i.pendingProps!==A,ee||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(A||X!==x)&&Y1(i,p,c,x),ca=!1;var Z=i.memoizedState;p.state=Z,su(i,c,p,m),uu(),X=i.memoizedState,A||Z!==X||ca?(typeof se=="function"&&(gd(i,l,se,c),X=i.memoizedState),(H=ca||q1(i,l,H,c,Z,X,x))?(ee||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(i.flags|=4194308)):(typeof p.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=X),p.props=c,p.state=X,p.context=x,c=H):(typeof p.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{p=i.stateNode,Gf(r,i),x=i.memoizedProps,ee=si(l,x),p.props=ee,se=i.pendingProps,Z=p.context,X=l.contextType,H=Qi,typeof X=="object"&&X!==null&&(H=an(X)),A=l.getDerivedStateFromProps,(X=typeof A=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(x!==se||Z!==H)&&Y1(i,p,c,H),ca=!1,Z=i.memoizedState,p.state=Z,su(i,c,p,m),uu();var K=i.memoizedState;x!==se||Z!==K||ca||r!==null&&r.dependencies!==null&&js(r.dependencies)?(typeof A=="function"&&(gd(i,l,A,c),K=i.memoizedState),(ee=ca||q1(i,l,ee,c,Z,K,H)||r!==null&&r.dependencies!==null&&js(r.dependencies))?(X||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(c,K,H),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(c,K,H)),typeof p.componentDidUpdate=="function"&&(i.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof p.componentDidUpdate!="function"||x===r.memoizedProps&&Z===r.memoizedState||(i.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&Z===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=K),p.props=c,p.state=K,p.context=H,c=ee):(typeof p.componentDidUpdate!="function"||x===r.memoizedProps&&Z===r.memoizedState||(i.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&Z===r.memoizedState||(i.flags|=1024),c=!1)}return p=c,lo(r,i),c=(i.flags&128)!==0,p||c?(p=i.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:p.render(),i.flags|=1,r!==null&&c?(i.child=li(i,r.child,null,m),i.child=li(i,null,l,m)):ln(r,i,l,m),i.memoizedState=p.state,r=i.child):r=Ur(r,i,m),r}function ig(r,i,l,c){return ei(),i.flags|=256,ln(r,i,l,c),i.child}var xd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _d(r){return{baseLanes:r,cachePool:Qp()}}function vd(r,i,l){return r=r!==null?r.childLanes&~l:0,i&&(r|=Hn),r}function lg(r,i,l){var c=i.pendingProps,m=!1,p=(i.flags&128)!==0,x;if((x=p)||(x=r!==null&&r.memoizedState===null?!1:(Bt.current&2)!==0),x&&(m=!0,i.flags&=-129),x=(i.flags&32)!==0,i.flags&=-33,r===null){if(nt){if(m?ha(i):ma(),(r=Ct)?(r=mb(r,Wn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:la!==null?{id:gr,overflow:br}:null,retryLane:536870912,hydrationErrors:null},l=Up(r),l.return=i,i.child=l,rn=i,Ct=null)):r=null,r===null)throw sa(i);return ih(r)?i.lanes=32:i.lanes=536870912,null}var A=c.children;return c=c.fallback,m?(ma(),m=i.mode,A=uo({mode:"hidden",children:A},m),c=Ja(c,m,l,null),A.return=i,c.return=i,A.sibling=c,i.child=A,c=i.child,c.memoizedState=_d(l),c.childLanes=vd(r,x,l),i.memoizedState=xd,hu(null,c)):(ha(i),Sd(i,A))}var H=r.memoizedState;if(H!==null&&(A=H.dehydrated,A!==null)){if(p)i.flags&256?(ha(i),i.flags&=-257,i=Ad(r,i,l)):i.memoizedState!==null?(ma(),i.child=r.child,i.flags|=128,i=null):(ma(),A=c.fallback,m=i.mode,c=uo({mode:"visible",children:c.children},m),A=Ja(A,m,l,null),A.flags|=2,c.return=i,A.return=i,c.sibling=A,i.child=c,li(i,r.child,null,l),c=i.child,c.memoizedState=_d(l),c.childLanes=vd(r,x,l),i.memoizedState=xd,i=hu(null,c));else if(ha(i),ih(A)){if(x=A.nextSibling&&A.nextSibling.dataset,x)var X=x.dgst;x=X,c=Error(a(419)),c.stack="",c.digest=x,tu({value:c,source:null,stack:null}),i=Ad(r,i,l)}else if(qt||Wi(r,i,l,!1),x=(l&r.childLanes)!==0,qt||x){if(x=vt,x!==null&&(c=$0(x,l),c!==0&&c!==H.retryLane))throw H.retryLane=c,Wa(r,c),Nn(x,r,c),Ed;ah(A)||bo(),i=Ad(r,i,l)}else ah(A)?(i.flags|=192,i.child=r.child,i=null):(r=H.treeContext,Ct=er(A.nextSibling),rn=i,nt=!0,ua=null,Wn=!1,r!==null&&Fp(i,r),i=Sd(i,c.children),i.flags|=4096);return i}return m?(ma(),A=c.fallback,m=i.mode,H=r.child,X=H.sibling,c=Dr(H,{mode:"hidden",children:c.children}),c.subtreeFlags=H.subtreeFlags&65011712,X!==null?A=Dr(X,A):(A=Ja(A,m,l,null),A.flags|=2),A.return=i,c.return=i,c.sibling=A,i.child=c,hu(null,c),c=i.child,A=r.child.memoizedState,A===null?A=_d(l):(m=A.cachePool,m!==null?(H=jt._currentValue,m=m.parent!==H?{parent:H,pool:H}:m):m=Qp(),A={baseLanes:A.baseLanes|l,cachePool:m}),c.memoizedState=A,c.childLanes=vd(r,x,l),i.memoizedState=xd,hu(r.child,c)):(ha(i),l=r.child,r=l.sibling,l=Dr(l,{mode:"visible",children:c.children}),l.return=i,l.sibling=null,r!==null&&(x=i.deletions,x===null?(i.deletions=[r],i.flags|=16):x.push(r)),i.child=l,i.memoizedState=null,l)}function Sd(r,i){return i=uo({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function uo(r,i){return r=In(22,r,null,i),r.lanes=0,r}function Ad(r,i,l){return li(i,r.child,null,l),r=Sd(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function ug(r,i,l){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),Pf(r.return,i,l)}function kd(r,i,l,c,m,p){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:m,treeForkCount:p}:(x.isBackwards=i,x.rendering=null,x.renderingStartTime=0,x.last=c,x.tail=l,x.tailMode=m,x.treeForkCount=p)}function sg(r,i,l){var c=i.pendingProps,m=c.revealOrder,p=c.tail;c=c.children;var x=Bt.current,A=(x&2)!==0;if(A?(x=x&1|2,i.flags|=128):x&=1,k(Bt,x),ln(r,i,c,l),c=nt?eu:0,!A&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&ug(r,l,i);else if(r.tag===19)ug(r,l,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(l=i.child,m=null;l!==null;)r=l.alternate,r!==null&&Xs(r)===null&&(m=l),l=l.sibling;l=m,l===null?(m=i.child,i.child=null):(m=l.sibling,l.sibling=null),kd(i,!1,m,l,p,c);break;case"backwards":case"unstable_legacy-backwards":for(l=null,m=i.child,i.child=null;m!==null;){if(r=m.alternate,r!==null&&Xs(r)===null){i.child=m;break}r=m.sibling,m.sibling=l,l=m,m=r}kd(i,!0,l,null,p,c);break;case"together":kd(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function Ur(r,i,l){if(r!==null&&(i.dependencies=r.dependencies),ba|=i.lanes,(l&i.childLanes)===0)if(r!==null){if(Wi(r,i,l,!1),(l&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,l=Dr(r,r.pendingProps),i.child=l,l.return=i;r.sibling!==null;)r=r.sibling,l=l.sibling=Dr(r,r.pendingProps),l.return=i;l.sibling=null}return i.child}function Cd(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&js(r)))}function zv(r,i,l){switch(i.tag){case 3:_e(i,i.stateNode.containerInfo),oa(i,jt,r.memoizedState.cache),ei();break;case 27:case 5:Ye(i);break;case 4:_e(i,i.stateNode.containerInfo);break;case 10:oa(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Wf(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(ha(i),i.flags|=128,null):(l&i.child.childLanes)!==0?lg(r,i,l):(ha(i),r=Ur(r,i,l),r!==null?r.sibling:null);ha(i);break;case 19:var m=(r.flags&128)!==0;if(c=(l&i.childLanes)!==0,c||(Wi(r,i,l,!1),c=(l&i.childLanes)!==0),m){if(c)return sg(r,i,l);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),k(Bt,Bt.current),c)break;return null;case 22:return i.lanes=0,eg(r,i,l,i.pendingProps);case 24:oa(i,jt,r.memoizedState.cache)}return Ur(r,i,l)}function og(r,i,l){if(r!==null)if(r.memoizedProps!==i.pendingProps)qt=!0;else{if(!Cd(r,l)&&(i.flags&128)===0)return qt=!1,zv(r,i,l);qt=(r.flags&131072)!==0}else qt=!1,nt&&(i.flags&1048576)!==0&&jp(i,eu,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(r=ai(i.elementType),i.type=r,typeof r=="function")Lf(r)?(c=si(r,c),i.tag=1,i=ag(null,i,r,c,l)):(i.tag=0,i=Td(null,i,r,c,l));else{if(r!=null){var m=r.$$typeof;if(m===D){i.tag=11,i=K1(null,i,r,c,l);break e}else if(m===V){i.tag=14,i=W1(null,i,r,c,l);break e}}throw i=pe(r)||r,Error(a(306,i,""))}}return i;case 0:return Td(r,i,i.type,i.pendingProps,l);case 1:return c=i.type,m=si(c,i.pendingProps),ag(r,i,c,m,l);case 3:e:{if(_e(i,i.stateNode.containerInfo),r===null)throw Error(a(387));c=i.pendingProps;var p=i.memoizedState;m=p.element,Gf(r,i),su(i,c,null,l);var x=i.memoizedState;if(c=x.cache,oa(i,jt,c),c!==p.cache&&jf(i,[jt],l,!0),uu(),c=x.element,p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:x.cache},i.updateQueue.baseState=p,i.memoizedState=p,i.flags&256){i=ig(r,i,c,l);break e}else if(c!==m){m=Xn(Error(a(424)),i),tu(m),i=ig(r,i,c,l);break e}else{switch(r=i.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(Ct=er(r.firstChild),rn=i,nt=!0,ua=null,Wn=!0,l=e1(i,null,c,l),i.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ei(),c===m){i=Ur(r,i,l);break e}ln(r,i,c,l)}i=i.child}return i;case 26:return lo(r,i),r===null?(l=Tb(i.type,null,i.pendingProps,null))?i.memoizedState=l:nt||(l=i.type,r=i.pendingProps,c=So(ie.current).createElement(l),c[nn]=i,c[_n]=r,un(c,l,r),Wt(c),i.stateNode=c):i.memoizedState=Tb(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return Ye(i),r===null&&nt&&(c=i.stateNode=bb(i.type,i.pendingProps,ie.current),rn=i,Wn=!0,m=Ct,_a(i.type)?(lh=m,Ct=er(c.firstChild)):Ct=m),ln(r,i,i.pendingProps.children,l),lo(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&nt&&((m=c=Ct)&&(c=hS(c,i.type,i.pendingProps,Wn),c!==null?(i.stateNode=c,rn=i,Ct=er(c.firstChild),Wn=!1,m=!0):m=!1),m||sa(i)),Ye(i),m=i.type,p=i.pendingProps,x=r!==null?r.memoizedProps:null,c=p.children,th(m,p)?c=null:x!==null&&th(m,x)&&(i.flags|=32),i.memoizedState!==null&&(m=ed(r,i,Nv,null,null,l),Nu._currentValue=m),lo(r,i),ln(r,i,c,l),i.child;case 6:return r===null&&nt&&((r=l=Ct)&&(l=mS(l,i.pendingProps,Wn),l!==null?(i.stateNode=l,rn=i,Ct=null,r=!0):r=!1),r||sa(i)),null;case 13:return lg(r,i,l);case 4:return _e(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=li(i,null,c,l):ln(r,i,c,l),i.child;case 11:return K1(r,i,i.type,i.pendingProps,l);case 7:return ln(r,i,i.pendingProps,l),i.child;case 8:return ln(r,i,i.pendingProps.children,l),i.child;case 12:return ln(r,i,i.pendingProps.children,l),i.child;case 10:return c=i.pendingProps,oa(i,i.type,c.value),ln(r,i,c.children,l),i.child;case 9:return m=i.type._context,c=i.pendingProps.children,ni(i),m=an(m),c=c(m),i.flags|=1,ln(r,i,c,l),i.child;case 14:return W1(r,i,i.type,i.pendingProps,l);case 15:return J1(r,i,i.type,i.pendingProps,l);case 19:return sg(r,i,l);case 31:return Bv(r,i,l);case 22:return eg(r,i,l,i.pendingProps);case 24:return ni(i),c=an(jt),r===null?(m=Yf(),m===null&&(m=vt,p=Ff(),m.pooledCache=p,p.refCount++,p!==null&&(m.pooledCacheLanes|=l),m=p),i.memoizedState={parent:c,cache:m},$f(i),oa(i,jt,m)):((r.lanes&l)!==0&&(Gf(r,i),su(i,null,null,l),uu()),m=r.memoizedState,p=i.memoizedState,m.parent!==c?(m={parent:c,cache:c},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),oa(i,jt,c)):(c=p.cache,oa(i,jt,c),c!==m.cache&&jf(i,[jt],l,!0))),ln(r,i,i.pendingProps.children,l),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Pr(r){r.flags|=4}function Nd(r,i,l,c,m){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(Bg())r.flags|=8192;else throw ii=Vs,Vf}else r.flags&=-16777217}function cg(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Ab(i))if(Bg())r.flags|=8192;else throw ii=Vs,Vf}function so(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?q0():536870912,r.lanes|=i,cl|=i)}function mu(r,i){if(!nt)switch(r.tailMode){case"hidden":i=r.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r.tail=null:l.sibling=null;break;case"collapsed":l=r.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function Nt(r){var i=r.alternate!==null&&r.alternate.child===r.child,l=0,c=0;if(i)for(var m=r.child;m!==null;)l|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)l|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=c,r.childLanes=l,i}function Hv(r,i,l){var c=i.pendingProps;switch(Bf(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nt(i),null;case 1:return Nt(i),null;case 3:return l=i.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Br(jt),Te(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(r===null||r.child===null)&&(Ki(i)?Pr(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Hf())),Nt(i),null;case 26:var m=i.type,p=i.memoizedState;return r===null?(Pr(i),p!==null?(Nt(i),cg(i,p)):(Nt(i),Nd(i,m,null,c,l))):p?p!==r.memoizedState?(Pr(i),Nt(i),cg(i,p)):(Nt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==c&&Pr(i),Nt(i),Nd(i,m,r,c,l)),null;case 27:if(xt(i),l=ie.current,m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Pr(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Nt(i),null}r=ne.current,Ki(i)?qp(i):(r=bb(m,c,l),i.stateNode=r,Pr(i))}return Nt(i),null;case 5:if(xt(i),m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Pr(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Nt(i),null}if(p=ne.current,Ki(i))qp(i);else{var x=So(ie.current);switch(p){case 1:p=x.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:p=x.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":p=x.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":p=x.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":p=x.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof c.is=="string"?x.createElement("select",{is:c.is}):x.createElement("select"),c.multiple?p.multiple=!0:c.size&&(p.size=c.size);break;default:p=typeof c.is=="string"?x.createElement(m,{is:c.is}):x.createElement(m)}}p[nn]=i,p[_n]=c;e:for(x=i.child;x!==null;){if(x.tag===5||x.tag===6)p.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===i)break e;for(;x.sibling===null;){if(x.return===null||x.return===i)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}i.stateNode=p;e:switch(un(p,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Pr(i)}}return Nt(i),Nd(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,l),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==c&&Pr(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(r=ie.current,Ki(i)){if(r=i.stateNode,l=i.memoizedProps,c=null,m=rn,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}r[nn]=i,r=!!(r.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||lb(r.nodeValue,l)),r||sa(i,!0)}else r=So(r).createTextNode(c),r[nn]=i,i.stateNode=r}return Nt(i),null;case 31:if(l=i.memoizedState,r===null||r.memoizedState!==null){if(c=Ki(i),l!==null){if(r===null){if(!c)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[nn]=i}else ei(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Nt(i),r=!1}else l=Hf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=l),r=!0;if(!r)return i.flags&256?(Bn(i),i):(Bn(i),null);if((i.flags&128)!==0)throw Error(a(558))}return Nt(i),null;case 13:if(c=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Ki(i),c!==null&&c.dehydrated!==null){if(r===null){if(!m)throw Error(a(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[nn]=i}else ei(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Nt(i),m=!1}else m=Hf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(Bn(i),i):(Bn(i),null)}return Bn(i),(i.flags&128)!==0?(i.lanes=l,i):(l=c!==null,r=r!==null&&r.memoizedState!==null,l&&(c=i.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),p=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(p=c.memoizedState.cachePool.pool),p!==m&&(c.flags|=2048)),l!==r&&l&&(i.child.flags|=8192),so(i,i.updateQueue),Nt(i),null);case 4:return Te(),r===null&&Zd(i.stateNode.containerInfo),Nt(i),null;case 10:return Br(i.type),Nt(i),null;case 19:if(W(Bt),c=i.memoizedState,c===null)return Nt(i),null;if(m=(i.flags&128)!==0,p=c.rendering,p===null)if(m)mu(c,!1);else{if(Dt!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(p=Xs(r),p!==null){for(i.flags|=128,mu(c,!1),r=p.updateQueue,i.updateQueue=r,so(i,r),i.subtreeFlags=0,r=l,l=i.child;l!==null;)Hp(l,r),l=l.sibling;return k(Bt,Bt.current&1|2),nt&&Ir(i,c.treeForkCount),i.child}r=r.sibling}c.tail!==null&&mn()>mo&&(i.flags|=128,m=!0,mu(c,!1),i.lanes=4194304)}else{if(!m)if(r=Xs(p),r!==null){if(i.flags|=128,m=!0,r=r.updateQueue,i.updateQueue=r,so(i,r),mu(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!nt)return Nt(i),null}else 2*mn()-c.renderingStartTime>mo&&l!==536870912&&(i.flags|=128,m=!0,mu(c,!1),i.lanes=4194304);c.isBackwards?(p.sibling=i.child,i.child=p):(r=c.last,r!==null?r.sibling=p:i.child=p,c.last=p)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=mn(),r.sibling=null,l=Bt.current,k(Bt,m?l&1|2:l&1),nt&&Ir(i,c.treeForkCount),r):(Nt(i),null);case 22:case 23:return Bn(i),Kf(),c=i.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(l&536870912)!==0&&(i.flags&128)===0&&(Nt(i),i.subtreeFlags&6&&(i.flags|=8192)):Nt(i),l=i.updateQueue,l!==null&&so(i,l.retryQueue),l=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==l&&(i.flags|=2048),r!==null&&W(ri),null;case 24:return l=null,r!==null&&(l=r.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),Br(jt),Nt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function Uv(r,i){switch(Bf(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Br(jt),Te(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return xt(i),null;case 31:if(i.memoizedState!==null){if(Bn(i),i.alternate===null)throw Error(a(340));ei()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(Bn(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));ei()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return W(Bt),null;case 4:return Te(),null;case 10:return Br(i.type),null;case 22:case 23:return Bn(i),Kf(),r!==null&&W(ri),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return Br(jt),null;case 25:return null;default:return null}}function fg(r,i){switch(Bf(i),i.tag){case 3:Br(jt),Te();break;case 26:case 27:case 5:xt(i);break;case 4:Te();break;case 31:i.memoizedState!==null&&Bn(i);break;case 13:Bn(i);break;case 19:W(Bt);break;case 10:Br(i.type);break;case 22:case 23:Bn(i),Kf(),r!==null&&W(ri);break;case 24:Br(jt)}}function pu(r,i){try{var l=i.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var m=c.next;l=m;do{if((l.tag&r)===r){c=void 0;var p=l.create,x=l.inst;c=p(),x.destroy=c}l=l.next}while(l!==m)}}catch(A){pt(i,i.return,A)}}function pa(r,i,l){try{var c=i.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var p=m.next;c=p;do{if((c.tag&r)===r){var x=c.inst,A=x.destroy;if(A!==void 0){x.destroy=void 0,m=i;var H=l,X=A;try{X()}catch(ee){pt(m,H,ee)}}}c=c.next}while(c!==p)}}catch(ee){pt(i,i.return,ee)}}function dg(r){var i=r.updateQueue;if(i!==null){var l=r.stateNode;try{n1(i,l)}catch(c){pt(r,r.return,c)}}}function hg(r,i,l){l.props=si(r.type,r.memoizedProps),l.state=r.memoizedState;try{l.componentWillUnmount()}catch(c){pt(r,i,c)}}function gu(r,i){try{var l=r.ref;if(l!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof l=="function"?r.refCleanup=l(c):l.current=c}}catch(m){pt(r,i,m)}}function yr(r,i){var l=r.ref,c=r.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(m){pt(r,i,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(m){pt(r,i,m)}else l.current=null}function mg(r){var i=r.type,l=r.memoizedProps,c=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(m){pt(r,r.return,m)}}function wd(r,i,l){try{var c=r.stateNode;uS(c,r.type,l,i),c[_n]=i}catch(m){pt(r,r.return,m)}}function pg(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&_a(r.type)||r.tag===4}function Rd(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||pg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&_a(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Od(r,i,l){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(r,i):(i=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,i.appendChild(r),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=Or));else if(c!==4&&(c===27&&_a(r.type)&&(l=r.stateNode,i=null),r=r.child,r!==null))for(Od(r,i,l),r=r.sibling;r!==null;)Od(r,i,l),r=r.sibling}function oo(r,i,l){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?l.insertBefore(r,i):l.appendChild(r);else if(c!==4&&(c===27&&_a(r.type)&&(l=r.stateNode),r=r.child,r!==null))for(oo(r,i,l),r=r.sibling;r!==null;)oo(r,i,l),r=r.sibling}function gg(r){var i=r.stateNode,l=r.memoizedProps;try{for(var c=r.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);un(i,c,l),i[nn]=r,i[_n]=l}catch(p){pt(r,r.return,p)}}var jr=!1,Yt=!1,Ld=!1,bg=typeof WeakSet=="function"?WeakSet:Set,Jt=null;function Pv(r,i){if(r=r.containerInfo,Jd=Oo,r=wp(r),Af(r)){if("selectionStart"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var m=c.anchorOffset,p=c.focusNode;c=c.focusOffset;try{l.nodeType,p.nodeType}catch{l=null;break e}var x=0,A=-1,H=-1,X=0,ee=0,se=r,Z=null;t:for(;;){for(var K;se!==l||m!==0&&se.nodeType!==3||(A=x+m),se!==p||c!==0&&se.nodeType!==3||(H=x+c),se.nodeType===3&&(x+=se.nodeValue.length),(K=se.firstChild)!==null;)Z=se,se=K;for(;;){if(se===r)break t;if(Z===l&&++X===m&&(A=x),Z===p&&++ee===c&&(H=x),(K=se.nextSibling)!==null)break;se=Z,Z=se.parentNode}se=K}l=A===-1||H===-1?null:{start:A,end:H}}else l=null}l=l||{start:0,end:0}}else l=null;for(eh={focusedElem:r,selectionRange:l},Oo=!1,Jt=i;Jt!==null;)if(i=Jt,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Jt=r;else for(;Jt!==null;){switch(i=Jt,p=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(l=0;l<r.length;l++)m=r[l],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&p!==null){r=void 0,l=i,m=p.memoizedProps,p=p.memoizedState,c=l.stateNode;try{var ke=si(l.type,m);r=c.getSnapshotBeforeUpdate(ke,p),c.__reactInternalSnapshotBeforeUpdate=r}catch(Ie){pt(l,l.return,Ie)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,l=r.nodeType,l===9)rh(r);else if(l===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":rh(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=i.sibling,r!==null){r.return=i.return,Jt=r;break}Jt=i.return}}function yg(r,i,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:qr(r,l),c&4&&pu(5,l);break;case 1:if(qr(r,l),c&4)if(r=l.stateNode,i===null)try{r.componentDidMount()}catch(x){pt(l,l.return,x)}else{var m=si(l.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(m,i,r.__reactInternalSnapshotBeforeUpdate)}catch(x){pt(l,l.return,x)}}c&64&&dg(l),c&512&&gu(l,l.return);break;case 3:if(qr(r,l),c&64&&(r=l.updateQueue,r!==null)){if(i=null,l.child!==null)switch(l.child.tag){case 27:case 5:i=l.child.stateNode;break;case 1:i=l.child.stateNode}try{n1(r,i)}catch(x){pt(l,l.return,x)}}break;case 27:i===null&&c&4&&gg(l);case 26:case 5:qr(r,l),i===null&&c&4&&mg(l),c&512&&gu(l,l.return);break;case 12:qr(r,l);break;case 31:qr(r,l),c&4&&xg(r,l);break;case 13:qr(r,l),c&4&&_g(r,l),c&64&&(r=l.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(l=Xv.bind(null,l),pS(r,l))));break;case 22:if(c=l.memoizedState!==null||jr,!c){i=i!==null&&i.memoizedState!==null||Yt,m=jr;var p=Yt;jr=c,(Yt=i)&&!p?Yr(r,l,(l.subtreeFlags&8772)!==0):qr(r,l),jr=m,Yt=p}break;case 30:break;default:qr(r,l)}}function Eg(r){var i=r.alternate;i!==null&&(r.alternate=null,Eg(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&sf(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Rt=null,Sn=!1;function Fr(r,i,l){for(l=l.child;l!==null;)Tg(r,i,l),l=l.sibling}function Tg(r,i,l){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(pn,l)}catch{}switch(l.tag){case 26:Yt||yr(l,i),Fr(r,i,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Yt||yr(l,i);var c=Rt,m=Sn;_a(l.type)&&(Rt=l.stateNode,Sn=!1),Fr(r,i,l),Au(l.stateNode),Rt=c,Sn=m;break;case 5:Yt||yr(l,i);case 6:if(c=Rt,m=Sn,Rt=null,Fr(r,i,l),Rt=c,Sn=m,Rt!==null)if(Sn)try{(Rt.nodeType===9?Rt.body:Rt.nodeName==="HTML"?Rt.ownerDocument.body:Rt).removeChild(l.stateNode)}catch(p){pt(l,i,p)}else try{Rt.removeChild(l.stateNode)}catch(p){pt(l,i,p)}break;case 18:Rt!==null&&(Sn?(r=Rt,db(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,l.stateNode),yl(r)):db(Rt,l.stateNode));break;case 4:c=Rt,m=Sn,Rt=l.stateNode.containerInfo,Sn=!0,Fr(r,i,l),Rt=c,Sn=m;break;case 0:case 11:case 14:case 15:pa(2,l,i),Yt||pa(4,l,i),Fr(r,i,l);break;case 1:Yt||(yr(l,i),c=l.stateNode,typeof c.componentWillUnmount=="function"&&hg(l,i,c)),Fr(r,i,l);break;case 21:Fr(r,i,l);break;case 22:Yt=(c=Yt)||l.memoizedState!==null,Fr(r,i,l),Yt=c;break;default:Fr(r,i,l)}}function xg(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{yl(r)}catch(l){pt(i,i.return,l)}}}function _g(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{yl(r)}catch(l){pt(i,i.return,l)}}function jv(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new bg),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new bg),i;default:throw Error(a(435,r.tag))}}function co(r,i){var l=jv(r);i.forEach(function(c){if(!l.has(c)){l.add(c);var m=Zv.bind(null,r,c);c.then(m,m)}})}function An(r,i){var l=i.deletions;if(l!==null)for(var c=0;c<l.length;c++){var m=l[c],p=r,x=i,A=x;e:for(;A!==null;){switch(A.tag){case 27:if(_a(A.type)){Rt=A.stateNode,Sn=!1;break e}break;case 5:Rt=A.stateNode,Sn=!1;break e;case 3:case 4:Rt=A.stateNode.containerInfo,Sn=!0;break e}A=A.return}if(Rt===null)throw Error(a(160));Tg(p,x,m),Rt=null,Sn=!1,p=m.alternate,p!==null&&(p.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)vg(i,r),i=i.sibling}var sr=null;function vg(r,i){var l=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:An(i,r),kn(r),c&4&&(pa(3,r,r.return),pu(3,r),pa(5,r,r.return));break;case 1:An(i,r),kn(r),c&512&&(Yt||l===null||yr(l,l.return)),c&64&&jr&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(l=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var m=sr;if(An(i,r),kn(r),c&512&&(Yt||l===null||yr(l,l.return)),c&4){var p=l!==null?l.memoizedState:null;if(c=r.memoizedState,l===null)if(c===null)if(r.stateNode===null){e:{c=r.type,l=r.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":p=m.getElementsByTagName("title")[0],(!p||p[ql]||p[nn]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=m.createElement(c),m.head.insertBefore(p,m.querySelector("head > title"))),un(p,c,l),p[nn]=r,Wt(p),c=p;break e;case"link":var x=vb("link","href",m).get(c+(l.href||""));if(x){for(var A=0;A<x.length;A++)if(p=x[A],p.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&p.getAttribute("rel")===(l.rel==null?null:l.rel)&&p.getAttribute("title")===(l.title==null?null:l.title)&&p.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){x.splice(A,1);break t}}p=m.createElement(c),un(p,c,l),m.head.appendChild(p);break;case"meta":if(x=vb("meta","content",m).get(c+(l.content||""))){for(A=0;A<x.length;A++)if(p=x[A],p.getAttribute("content")===(l.content==null?null:""+l.content)&&p.getAttribute("name")===(l.name==null?null:l.name)&&p.getAttribute("property")===(l.property==null?null:l.property)&&p.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&p.getAttribute("charset")===(l.charSet==null?null:l.charSet)){x.splice(A,1);break t}}p=m.createElement(c),un(p,c,l),m.head.appendChild(p);break;default:throw Error(a(468,c))}p[nn]=r,Wt(p),c=p}r.stateNode=c}else Sb(m,r.type,r.stateNode);else r.stateNode=_b(m,c,r.memoizedProps);else p!==c?(p===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):p.count--,c===null?Sb(m,r.type,r.stateNode):_b(m,c,r.memoizedProps)):c===null&&r.stateNode!==null&&wd(r,r.memoizedProps,l.memoizedProps)}break;case 27:An(i,r),kn(r),c&512&&(Yt||l===null||yr(l,l.return)),l!==null&&c&4&&wd(r,r.memoizedProps,l.memoizedProps);break;case 5:if(An(i,r),kn(r),c&512&&(Yt||l===null||yr(l,l.return)),r.flags&32){m=r.stateNode;try{ji(m,"")}catch(ke){pt(r,r.return,ke)}}c&4&&r.stateNode!=null&&(m=r.memoizedProps,wd(r,m,l!==null?l.memoizedProps:m)),c&1024&&(Ld=!0);break;case 6:if(An(i,r),kn(r),c&4){if(r.stateNode===null)throw Error(a(162));c=r.memoizedProps,l=r.stateNode;try{l.nodeValue=c}catch(ke){pt(r,r.return,ke)}}break;case 3:if(Co=null,m=sr,sr=Ao(i.containerInfo),An(i,r),sr=m,kn(r),c&4&&l!==null&&l.memoizedState.isDehydrated)try{yl(i.containerInfo)}catch(ke){pt(r,r.return,ke)}Ld&&(Ld=!1,Sg(r));break;case 4:c=sr,sr=Ao(r.stateNode.containerInfo),An(i,r),kn(r),sr=c;break;case 12:An(i,r),kn(r);break;case 31:An(i,r),kn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,co(r,c)));break;case 13:An(i,r),kn(r),r.child.flags&8192&&r.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ho=mn()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,co(r,c)));break;case 22:m=r.memoizedState!==null;var H=l!==null&&l.memoizedState!==null,X=jr,ee=Yt;if(jr=X||m,Yt=ee||H,An(i,r),Yt=ee,jr=X,kn(r),c&8192)e:for(i=r.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(l===null||H||jr||Yt||oi(r)),l=null,i=r;;){if(i.tag===5||i.tag===26){if(l===null){H=l=i;try{if(p=H.stateNode,m)x=p.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{A=H.stateNode;var se=H.memoizedProps.style,Z=se!=null&&se.hasOwnProperty("display")?se.display:null;A.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(ke){pt(H,H.return,ke)}}}else if(i.tag===6){if(l===null){H=i;try{H.stateNode.nodeValue=m?"":H.memoizedProps}catch(ke){pt(H,H.return,ke)}}}else if(i.tag===18){if(l===null){H=i;try{var K=H.stateNode;m?hb(K,!0):hb(H.stateNode,!1)}catch(ke){pt(H,H.return,ke)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;l===i&&(l=null),i=i.return}l===i&&(l=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=r.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,co(r,l))));break;case 19:An(i,r),kn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,co(r,c)));break;case 30:break;case 21:break;default:An(i,r),kn(r)}}function kn(r){var i=r.flags;if(i&2){try{for(var l,c=r.return;c!==null;){if(pg(c)){l=c;break}c=c.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var m=l.stateNode,p=Rd(r);oo(r,p,m);break;case 5:var x=l.stateNode;l.flags&32&&(ji(x,""),l.flags&=-33);var A=Rd(r);oo(r,A,x);break;case 3:case 4:var H=l.stateNode.containerInfo,X=Rd(r);Od(r,X,H);break;default:throw Error(a(161))}}catch(ee){pt(r,r.return,ee)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function Sg(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;Sg(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function qr(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)yg(r,i.alternate,i),i=i.sibling}function oi(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:pa(4,i,i.return),oi(i);break;case 1:yr(i,i.return);var l=i.stateNode;typeof l.componentWillUnmount=="function"&&hg(i,i.return,l),oi(i);break;case 27:Au(i.stateNode);case 26:case 5:yr(i,i.return),oi(i);break;case 22:i.memoizedState===null&&oi(i);break;case 30:oi(i);break;default:oi(i)}r=r.sibling}}function Yr(r,i,l){for(l=l&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,m=r,p=i,x=p.flags;switch(p.tag){case 0:case 11:case 15:Yr(m,p,l),pu(4,p);break;case 1:if(Yr(m,p,l),c=p,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(X){pt(c,c.return,X)}if(c=p,m=c.updateQueue,m!==null){var A=c.stateNode;try{var H=m.shared.hiddenCallbacks;if(H!==null)for(m.shared.hiddenCallbacks=null,m=0;m<H.length;m++)t1(H[m],A)}catch(X){pt(c,c.return,X)}}l&&x&64&&dg(p),gu(p,p.return);break;case 27:gg(p);case 26:case 5:Yr(m,p,l),l&&c===null&&x&4&&mg(p),gu(p,p.return);break;case 12:Yr(m,p,l);break;case 31:Yr(m,p,l),l&&x&4&&xg(m,p);break;case 13:Yr(m,p,l),l&&x&4&&_g(m,p);break;case 22:p.memoizedState===null&&Yr(m,p,l),gu(p,p.return);break;case 30:break;default:Yr(m,p,l)}i=i.sibling}}function Dd(r,i){var l=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==l&&(r!=null&&r.refCount++,l!=null&&nu(l))}function Id(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&nu(r))}function or(r,i,l,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Ag(r,i,l,c),i=i.sibling}function Ag(r,i,l,c){var m=i.flags;switch(i.tag){case 0:case 11:case 15:or(r,i,l,c),m&2048&&pu(9,i);break;case 1:or(r,i,l,c);break;case 3:or(r,i,l,c),m&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&nu(r)));break;case 12:if(m&2048){or(r,i,l,c),r=i.stateNode;try{var p=i.memoizedProps,x=p.id,A=p.onPostCommit;typeof A=="function"&&A(x,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(H){pt(i,i.return,H)}}else or(r,i,l,c);break;case 31:or(r,i,l,c);break;case 13:or(r,i,l,c);break;case 23:break;case 22:p=i.stateNode,x=i.alternate,i.memoizedState!==null?p._visibility&2?or(r,i,l,c):bu(r,i):p._visibility&2?or(r,i,l,c):(p._visibility|=2,ul(r,i,l,c,(i.subtreeFlags&10256)!==0||!1)),m&2048&&Dd(x,i);break;case 24:or(r,i,l,c),m&2048&&Id(i.alternate,i);break;default:or(r,i,l,c)}}function ul(r,i,l,c,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var p=r,x=i,A=l,H=c,X=x.flags;switch(x.tag){case 0:case 11:case 15:ul(p,x,A,H,m),pu(8,x);break;case 23:break;case 22:var ee=x.stateNode;x.memoizedState!==null?ee._visibility&2?ul(p,x,A,H,m):bu(p,x):(ee._visibility|=2,ul(p,x,A,H,m)),m&&X&2048&&Dd(x.alternate,x);break;case 24:ul(p,x,A,H,m),m&&X&2048&&Id(x.alternate,x);break;default:ul(p,x,A,H,m)}i=i.sibling}}function bu(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var l=r,c=i,m=c.flags;switch(c.tag){case 22:bu(l,c),m&2048&&Dd(c.alternate,c);break;case 24:bu(l,c),m&2048&&Id(c.alternate,c);break;default:bu(l,c)}i=i.sibling}}var yu=8192;function sl(r,i,l){if(r.subtreeFlags&yu)for(r=r.child;r!==null;)kg(r,i,l),r=r.sibling}function kg(r,i,l){switch(r.tag){case 26:sl(r,i,l),r.flags&yu&&r.memoizedState!==null&&CS(l,sr,r.memoizedState,r.memoizedProps);break;case 5:sl(r,i,l);break;case 3:case 4:var c=sr;sr=Ao(r.stateNode.containerInfo),sl(r,i,l),sr=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=yu,yu=16777216,sl(r,i,l),yu=c):sl(r,i,l));break;default:sl(r,i,l)}}function Cg(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function Eu(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var c=i[l];Jt=c,wg(c,r)}Cg(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Ng(r),r=r.sibling}function Ng(r){switch(r.tag){case 0:case 11:case 15:Eu(r),r.flags&2048&&pa(9,r,r.return);break;case 3:Eu(r);break;case 12:Eu(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,fo(r)):Eu(r);break;default:Eu(r)}}function fo(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var c=i[l];Jt=c,wg(c,r)}Cg(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:pa(8,i,i.return),fo(i);break;case 22:l=i.stateNode,l._visibility&2&&(l._visibility&=-3,fo(i));break;default:fo(i)}r=r.sibling}}function wg(r,i){for(;Jt!==null;){var l=Jt;switch(l.tag){case 0:case 11:case 15:pa(8,l,i);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:nu(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,Jt=c;else e:for(l=r;Jt!==null;){c=Jt;var m=c.sibling,p=c.return;if(Eg(c),c===l){Jt=null;break e}if(m!==null){m.return=p,Jt=m;break e}Jt=p}}}var Fv={getCacheForType:function(r){var i=an(jt),l=i.data.get(r);return l===void 0&&(l=r(),i.data.set(r,l)),l},cacheSignal:function(){return an(jt).controller.signal}},qv=typeof WeakMap=="function"?WeakMap:Map,ft=0,vt=null,Ze=null,et=0,mt=0,zn=null,ga=!1,ol=!1,Md=!1,Vr=0,Dt=0,ba=0,ci=0,Bd=0,Hn=0,cl=0,Tu=null,Cn=null,zd=!1,ho=0,Rg=0,mo=1/0,po=null,ya=null,Zt=0,Ea=null,fl=null,$r=0,Hd=0,Ud=null,Og=null,xu=0,Pd=null;function Un(){return(ft&2)!==0&&et!==0?et&-et:P.T!==null?$d():G0()}function Lg(){if(Hn===0)if((et&536870912)===0||nt){var r=_s;_s<<=1,(_s&3932160)===0&&(_s=262144),Hn=r}else Hn=536870912;return r=Mn.current,r!==null&&(r.flags|=32),Hn}function Nn(r,i,l){(r===vt&&(mt===2||mt===9)||r.cancelPendingCommit!==null)&&(dl(r,0),Ta(r,et,Hn,!1)),Fl(r,l),((ft&2)===0||r!==vt)&&(r===vt&&((ft&2)===0&&(ci|=l),Dt===4&&Ta(r,et,Hn,!1)),Er(r))}function Dg(r,i,l){if((ft&6)!==0)throw Error(a(327));var c=!l&&(i&127)===0&&(i&r.expiredLanes)===0||jl(r,i),m=c?$v(r,i):Fd(r,i,!0),p=c;do{if(m===0){ol&&!c&&Ta(r,i,0,!1);break}else{if(l=r.current.alternate,p&&!Yv(l)){m=Fd(r,i,!1),p=!1;continue}if(m===2){if(p=i,r.errorRecoveryDisabledLanes&p)var x=0;else x=r.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){i=x;e:{var A=r;m=Tu;var H=A.current.memoizedState.isDehydrated;if(H&&(dl(A,x).flags|=256),x=Fd(A,x,!1),x!==2){if(Md&&!H){A.errorRecoveryDisabledLanes|=p,ci|=p,m=4;break e}p=Cn,Cn=m,p!==null&&(Cn===null?Cn=p:Cn.push.apply(Cn,p))}m=x}if(p=!1,m!==2)continue}}if(m===1){dl(r,0),Ta(r,i,0,!0);break}e:{switch(c=r,p=m,p){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:Ta(c,i,Hn,!ga);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(m=ho+300-mn(),10<m)){if(Ta(c,i,Hn,!ga),Ss(c,0,!0)!==0)break e;$r=i,c.timeoutHandle=cb(Ig.bind(null,c,l,Cn,po,zd,i,Hn,ci,cl,ga,p,"Throttled",-0,0),m);break e}Ig(c,l,Cn,po,zd,i,Hn,ci,cl,ga,p,null,-0,0)}}break}while(!0);Er(r)}function Ig(r,i,l,c,m,p,x,A,H,X,ee,se,Z,K){if(r.timeoutHandle=-1,se=i.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Or},kg(i,p,se);var ke=(p&62914560)===p?ho-mn():(p&4194048)===p?Rg-mn():0;if(ke=NS(se,ke),ke!==null){$r=p,r.cancelPendingCommit=ke(Fg.bind(null,r,i,p,l,c,m,x,A,H,ee,se,null,Z,K)),Ta(r,p,x,!X);return}}Fg(r,i,p,l,c,m,x,A,H)}function Yv(r){for(var i=r;;){var l=i.tag;if((l===0||l===11||l===15)&&i.flags&16384&&(l=i.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var c=0;c<l.length;c++){var m=l[c],p=m.getSnapshot;m=m.value;try{if(!Dn(p(),m))return!1}catch{return!1}}if(l=i.child,i.subtreeFlags&16384&&l!==null)l.return=i,i=l;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Ta(r,i,l,c){i&=~Bd,i&=~ci,r.suspendedLanes|=i,r.pingedLanes&=~i,c&&(r.warmLanes|=i),c=r.expirationTimes;for(var m=i;0<m;){var p=31-_t(m),x=1<<p;c[p]=-1,m&=~x}l!==0&&Y0(r,l,i)}function go(){return(ft&6)===0?(_u(0),!1):!0}function jd(){if(Ze!==null){if(mt===0)var r=Ze.return;else r=Ze,Mr=ti=null,rd(r),nl=null,au=0,r=Ze;for(;r!==null;)fg(r.alternate,r),r=r.return;Ze=null}}function dl(r,i){var l=r.timeoutHandle;l!==-1&&(r.timeoutHandle=-1,cS(l)),l=r.cancelPendingCommit,l!==null&&(r.cancelPendingCommit=null,l()),$r=0,jd(),vt=r,Ze=l=Dr(r.current,null),et=i,mt=0,zn=null,ga=!1,ol=jl(r,i),Md=!1,cl=Hn=Bd=ci=ba=Dt=0,Cn=Tu=null,zd=!1,(i&8)!==0&&(i|=i&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=i;0<c;){var m=31-_t(c),p=1<<m;i|=r[m],c&=~p}return Vr=i,Bs(),l}function Mg(r,i){je=null,P.H=du,i===tl||i===Ys?(i=Kp(),mt=3):i===Vf?(i=Kp(),mt=4):mt=i===Ed?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,zn=i,Ze===null&&(Dt=1,ao(r,Xn(i,r.current)))}function Bg(){var r=Mn.current;return r===null?!0:(et&4194048)===et?Jn===null:(et&62914560)===et||(et&536870912)!==0?r===Jn:!1}function zg(){var r=P.H;return P.H=du,r===null?du:r}function Hg(){var r=P.A;return P.A=Fv,r}function bo(){Dt=4,ga||(et&4194048)!==et&&Mn.current!==null||(ol=!0),(ba&134217727)===0&&(ci&134217727)===0||vt===null||Ta(vt,et,Hn,!1)}function Fd(r,i,l){var c=ft;ft|=2;var m=zg(),p=Hg();(vt!==r||et!==i)&&(po=null,dl(r,i)),i=!1;var x=Dt;e:do try{if(mt!==0&&Ze!==null){var A=Ze,H=zn;switch(mt){case 8:jd(),x=6;break e;case 3:case 2:case 9:case 6:Mn.current===null&&(i=!0);var X=mt;if(mt=0,zn=null,hl(r,A,H,X),l&&ol){x=0;break e}break;default:X=mt,mt=0,zn=null,hl(r,A,H,X)}}Vv(),x=Dt;break}catch(ee){Mg(r,ee)}while(!0);return i&&r.shellSuspendCounter++,Mr=ti=null,ft=c,P.H=m,P.A=p,Ze===null&&(vt=null,et=0,Bs()),x}function Vv(){for(;Ze!==null;)Ug(Ze)}function $v(r,i){var l=ft;ft|=2;var c=zg(),m=Hg();vt!==r||et!==i?(po=null,mo=mn()+500,dl(r,i)):ol=jl(r,i);e:do try{if(mt!==0&&Ze!==null){i=Ze;var p=zn;t:switch(mt){case 1:mt=0,zn=null,hl(r,i,p,1);break;case 2:case 9:if(Xp(p)){mt=0,zn=null,Pg(i);break}i=function(){mt!==2&&mt!==9||vt!==r||(mt=7),Er(r)},p.then(i,i);break e;case 3:mt=7;break e;case 4:mt=5;break e;case 7:Xp(p)?(mt=0,zn=null,Pg(i)):(mt=0,zn=null,hl(r,i,p,7));break;case 5:var x=null;switch(Ze.tag){case 26:x=Ze.memoizedState;case 5:case 27:var A=Ze;if(x?Ab(x):A.stateNode.complete){mt=0,zn=null;var H=A.sibling;if(H!==null)Ze=H;else{var X=A.return;X!==null?(Ze=X,yo(X)):Ze=null}break t}}mt=0,zn=null,hl(r,i,p,5);break;case 6:mt=0,zn=null,hl(r,i,p,6);break;case 8:jd(),Dt=6;break e;default:throw Error(a(462))}}Gv();break}catch(ee){Mg(r,ee)}while(!0);return Mr=ti=null,P.H=c,P.A=m,ft=l,Ze!==null?0:(vt=null,et=0,Bs(),Dt)}function Gv(){for(;Ze!==null&&!Vn();)Ug(Ze)}function Ug(r){var i=og(r.alternate,r,Vr);r.memoizedProps=r.pendingProps,i===null?yo(r):Ze=i}function Pg(r){var i=r,l=i.alternate;switch(i.tag){case 15:case 0:i=rg(l,i,i.pendingProps,i.type,void 0,et);break;case 11:i=rg(l,i,i.pendingProps,i.type.render,i.ref,et);break;case 5:rd(i);default:fg(l,i),i=Ze=Hp(i,Vr),i=og(l,i,Vr)}r.memoizedProps=r.pendingProps,i===null?yo(r):Ze=i}function hl(r,i,l,c){Mr=ti=null,rd(i),nl=null,au=0;var m=i.return;try{if(Mv(r,m,i,l,et)){Dt=1,ao(r,Xn(l,r.current)),Ze=null;return}}catch(p){if(m!==null)throw Ze=m,p;Dt=1,ao(r,Xn(l,r.current)),Ze=null;return}i.flags&32768?(nt||c===1?r=!0:ol||(et&536870912)!==0?r=!1:(ga=r=!0,(c===2||c===9||c===3||c===6)&&(c=Mn.current,c!==null&&c.tag===13&&(c.flags|=16384))),jg(i,r)):yo(i)}function yo(r){var i=r;do{if((i.flags&32768)!==0){jg(i,ga);return}r=i.return;var l=Hv(i.alternate,i,Vr);if(l!==null){Ze=l;return}if(i=i.sibling,i!==null){Ze=i;return}Ze=i=r}while(i!==null);Dt===0&&(Dt=5)}function jg(r,i){do{var l=Uv(r.alternate,r);if(l!==null){l.flags&=32767,Ze=l;return}if(l=r.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!i&&(r=r.sibling,r!==null)){Ze=r;return}Ze=r=l}while(r!==null);Dt=6,Ze=null}function Fg(r,i,l,c,m,p,x,A,H){r.cancelPendingCommit=null;do Eo();while(Zt!==0);if((ft&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(p=i.lanes|i.childLanes,p|=Rf,k3(r,l,p,x,A,H),r===vt&&(Ze=vt=null,et=0),fl=i,Ea=r,$r=l,Hd=p,Ud=m,Og=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,Kv(Me,function(){return Gg(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=P.T,P.T=null,m=te.p,te.p=2,x=ft,ft|=4;try{Pv(r,i,l)}finally{ft=x,te.p=m,P.T=c}}Zt=1,qg(),Yg(),Vg()}}function qg(){if(Zt===1){Zt=0;var r=Ea,i=fl,l=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||l){l=P.T,P.T=null;var c=te.p;te.p=2;var m=ft;ft|=4;try{vg(i,r);var p=eh,x=wp(r.containerInfo),A=p.focusedElem,H=p.selectionRange;if(x!==A&&A&&A.ownerDocument&&Np(A.ownerDocument.documentElement,A)){if(H!==null&&Af(A)){var X=H.start,ee=H.end;if(ee===void 0&&(ee=X),"selectionStart"in A)A.selectionStart=X,A.selectionEnd=Math.min(ee,A.value.length);else{var se=A.ownerDocument||document,Z=se&&se.defaultView||window;if(Z.getSelection){var K=Z.getSelection(),ke=A.textContent.length,Ie=Math.min(H.start,ke),yt=H.end===void 0?Ie:Math.min(H.end,ke);!K.extend&&Ie>yt&&(x=yt,yt=Ie,Ie=x);var Y=Cp(A,Ie),j=Cp(A,yt);if(Y&&j&&(K.rangeCount!==1||K.anchorNode!==Y.node||K.anchorOffset!==Y.offset||K.focusNode!==j.node||K.focusOffset!==j.offset)){var Q=se.createRange();Q.setStart(Y.node,Y.offset),K.removeAllRanges(),Ie>yt?(K.addRange(Q),K.extend(j.node,j.offset)):(Q.setEnd(j.node,j.offset),K.addRange(Q))}}}}for(se=[],K=A;K=K.parentNode;)K.nodeType===1&&se.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<se.length;A++){var le=se[A];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Oo=!!Jd,eh=Jd=null}finally{ft=m,te.p=c,P.T=l}}r.current=i,Zt=2}}function Yg(){if(Zt===2){Zt=0;var r=Ea,i=fl,l=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||l){l=P.T,P.T=null;var c=te.p;te.p=2;var m=ft;ft|=4;try{yg(r,i.alternate,i)}finally{ft=m,te.p=c,P.T=l}}Zt=3}}function Vg(){if(Zt===4||Zt===3){Zt=0,Pl();var r=Ea,i=fl,l=$r,c=Og;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Zt=5:(Zt=0,fl=Ea=null,$g(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(ya=null),lf(l),i=i.stateNode,Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(pn,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=P.T,m=te.p,te.p=2,P.T=null;try{for(var p=r.onRecoverableError,x=0;x<c.length;x++){var A=c[x];p(A.value,{componentStack:A.stack})}}finally{P.T=i,te.p=m}}($r&3)!==0&&Eo(),Er(r),m=r.pendingLanes,(l&261930)!==0&&(m&42)!==0?r===Pd?xu++:(xu=0,Pd=r):xu=0,_u(0)}}function $g(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,nu(i)))}function Eo(){return qg(),Yg(),Vg(),Gg()}function Gg(){if(Zt!==5)return!1;var r=Ea,i=Hd;Hd=0;var l=lf($r),c=P.T,m=te.p;try{te.p=32>l?32:l,P.T=null,l=Ud,Ud=null;var p=Ea,x=$r;if(Zt=0,fl=Ea=null,$r=0,(ft&6)!==0)throw Error(a(331));var A=ft;if(ft|=4,Ng(p.current),Ag(p,p.current,x,l),ft=A,_u(0,!1),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(pn,p)}catch{}return!0}finally{te.p=m,P.T=c,$g(r,i)}}function Qg(r,i,l){i=Xn(l,i),i=yd(r.stateNode,i,2),r=da(r,i,2),r!==null&&(Fl(r,2),Er(r))}function pt(r,i,l){if(r.tag===3)Qg(r,r,l);else for(;i!==null;){if(i.tag===3){Qg(i,r,l);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ya===null||!ya.has(c))){r=Xn(l,r),l=X1(2),c=da(i,l,2),c!==null&&(Z1(l,c,i,r),Fl(c,2),Er(c));break}}i=i.return}}function qd(r,i,l){var c=r.pingCache;if(c===null){c=r.pingCache=new qv;var m=new Set;c.set(i,m)}else m=c.get(i),m===void 0&&(m=new Set,c.set(i,m));m.has(l)||(Md=!0,m.add(l),r=Qv.bind(null,r,i,l),i.then(r,r))}function Qv(r,i,l){var c=r.pingCache;c!==null&&c.delete(i),r.pingedLanes|=r.suspendedLanes&l,r.warmLanes&=~l,vt===r&&(et&l)===l&&(Dt===4||Dt===3&&(et&62914560)===et&&300>mn()-ho?(ft&2)===0&&dl(r,0):Bd|=l,cl===et&&(cl=0)),Er(r)}function Xg(r,i){i===0&&(i=q0()),r=Wa(r,i),r!==null&&(Fl(r,i),Er(r))}function Xv(r){var i=r.memoizedState,l=0;i!==null&&(l=i.retryLane),Xg(r,l)}function Zv(r,i){var l=0;switch(r.tag){case 31:case 13:var c=r.stateNode,m=r.memoizedState;m!==null&&(l=m.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),Xg(r,l)}function Kv(r,i){return Ut(r,i)}var To=null,ml=null,Yd=!1,xo=!1,Vd=!1,xa=0;function Er(r){r!==ml&&r.next===null&&(ml===null?To=ml=r:ml=ml.next=r),xo=!0,Yd||(Yd=!0,Jv())}function _u(r,i){if(!Vd&&xo){Vd=!0;do for(var l=!1,c=To;c!==null;){if(r!==0){var m=c.pendingLanes;if(m===0)var p=0;else{var x=c.suspendedLanes,A=c.pingedLanes;p=(1<<31-_t(42|r)+1)-1,p&=m&~(x&~A),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(l=!0,Jg(c,p))}else p=et,p=Ss(c,c===vt?p:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(p&3)===0||jl(c,p)||(l=!0,Jg(c,p));c=c.next}while(l);Vd=!1}}function Wv(){Zg()}function Zg(){xo=Yd=!1;var r=0;xa!==0&&oS()&&(r=xa);for(var i=mn(),l=null,c=To;c!==null;){var m=c.next,p=Kg(c,i);p===0?(c.next=null,l===null?To=m:l.next=m,m===null&&(ml=l)):(l=c,(r!==0||(p&3)!==0)&&(xo=!0)),c=m}Zt!==0&&Zt!==5||_u(r),xa!==0&&(xa=0)}function Kg(r,i){for(var l=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,p=r.pendingLanes&-62914561;0<p;){var x=31-_t(p),A=1<<x,H=m[x];H===-1?((A&l)===0||(A&c)!==0)&&(m[x]=A3(A,i)):H<=i&&(r.expiredLanes|=A),p&=~A}if(i=vt,l=et,l=Ss(r,r===i?l:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,l===0||r===i&&(mt===2||mt===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&Pt(c),r.callbackNode=null,r.callbackPriority=0;if((l&3)===0||jl(r,l)){if(i=l&-l,i===r.callbackPriority)return i;switch(c!==null&&Pt(c),lf(l)){case 2:case 8:l=Ee;break;case 32:l=Me;break;case 268435456:l=dt;break;default:l=Me}return c=Wg.bind(null,r),l=Ut(l,c),r.callbackPriority=i,r.callbackNode=l,i}return c!==null&&c!==null&&Pt(c),r.callbackPriority=2,r.callbackNode=null,2}function Wg(r,i){if(Zt!==0&&Zt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var l=r.callbackNode;if(Eo()&&r.callbackNode!==l)return null;var c=et;return c=Ss(r,r===vt?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(Dg(r,c,i),Kg(r,mn()),r.callbackNode!=null&&r.callbackNode===l?Wg.bind(null,r):null)}function Jg(r,i){if(Eo())return null;Dg(r,i,!0)}function Jv(){fS(function(){(ft&6)!==0?Ut(re,Wv):Zg()})}function $d(){if(xa===0){var r=Ji;r===0&&(r=xs,xs<<=1,(xs&261888)===0&&(xs=256)),xa=r}return xa}function eb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Ns(""+r)}function tb(r,i){var l=i.ownerDocument.createElement("input");return l.name=i.name,l.value=i.value,r.id&&l.setAttribute("form",r.id),i.parentNode.insertBefore(l,i),r=new FormData(r),l.parentNode.removeChild(l),r}function eS(r,i,l,c,m){if(i==="submit"&&l&&l.stateNode===m){var p=eb((m[_n]||null).action),x=c.submitter;x&&(i=(i=x[_n]||null)?eb(i.formAction):x.getAttribute("formAction"),i!==null&&(p=i,x=null));var A=new Ls("action","action",null,c,m);r.push({event:A,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(xa!==0){var H=x?tb(m,x):new FormData(m);dd(l,{pending:!0,data:H,method:m.method,action:p},null,H)}}else typeof p=="function"&&(A.preventDefault(),H=x?tb(m,x):new FormData(m),dd(l,{pending:!0,data:H,method:m.method,action:p},p,H))},currentTarget:m}]})}}for(var Gd=0;Gd<wf.length;Gd++){var Qd=wf[Gd],tS=Qd.toLowerCase(),nS=Qd[0].toUpperCase()+Qd.slice(1);ur(tS,"on"+nS)}ur(Lp,"onAnimationEnd"),ur(Dp,"onAnimationIteration"),ur(Ip,"onAnimationStart"),ur("dblclick","onDoubleClick"),ur("focusin","onFocus"),ur("focusout","onBlur"),ur(yv,"onTransitionRun"),ur(Ev,"onTransitionStart"),ur(Tv,"onTransitionCancel"),ur(Mp,"onTransitionEnd"),Ui("onMouseEnter",["mouseout","mouseover"]),Ui("onMouseLeave",["mouseout","mouseover"]),Ui("onPointerEnter",["pointerout","pointerover"]),Ui("onPointerLeave",["pointerout","pointerover"]),Qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vu="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(" "),rS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vu));function nb(r,i){i=(i&4)!==0;for(var l=0;l<r.length;l++){var c=r[l],m=c.event;c=c.listeners;e:{var p=void 0;if(i)for(var x=c.length-1;0<=x;x--){var A=c[x],H=A.instance,X=A.currentTarget;if(A=A.listener,H!==p&&m.isPropagationStopped())break e;p=A,m.currentTarget=X;try{p(m)}catch(ee){Ms(ee)}m.currentTarget=null,p=H}else for(x=0;x<c.length;x++){if(A=c[x],H=A.instance,X=A.currentTarget,A=A.listener,H!==p&&m.isPropagationStopped())break e;p=A,m.currentTarget=X;try{p(m)}catch(ee){Ms(ee)}m.currentTarget=null,p=H}}}}function Ke(r,i){var l=i[uf];l===void 0&&(l=i[uf]=new Set);var c=r+"__bubble";l.has(c)||(rb(i,r,2,!1),l.add(c))}function Xd(r,i,l){var c=0;i&&(c|=4),rb(l,r,c,i)}var _o="_reactListening"+Math.random().toString(36).slice(2);function Zd(r){if(!r[_o]){r[_o]=!0,Z0.forEach(function(l){l!=="selectionchange"&&(rS.has(l)||Xd(l,!1,r),Xd(l,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[_o]||(i[_o]=!0,Xd("selectionchange",!1,i))}}function rb(r,i,l,c){switch(Lb(i)){case 2:var m=OS;break;case 8:m=LS;break;default:m=fh}l=m.bind(null,i,l,r),m=void 0,!gf||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),c?m!==void 0?r.addEventListener(i,l,{capture:!0,passive:m}):r.addEventListener(i,l,!0):m!==void 0?r.addEventListener(i,l,{passive:m}):r.addEventListener(i,l,!1)}function Kd(r,i,l,c,m){var p=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var x=c.tag;if(x===3||x===4){var A=c.stateNode.containerInfo;if(A===m)break;if(x===4)for(x=c.return;x!==null;){var H=x.tag;if((H===3||H===4)&&x.stateNode.containerInfo===m)return;x=x.return}for(;A!==null;){if(x=Bi(A),x===null)return;if(H=x.tag,H===5||H===6||H===26||H===27){c=p=x;continue e}A=A.parentNode}}c=c.return}sp(function(){var X=p,ee=mf(l),se=[];e:{var Z=Bp.get(r);if(Z!==void 0){var K=Ls,ke=r;switch(r){case"keypress":if(Rs(l)===0)break e;case"keydown":case"keyup":K=Z3;break;case"focusin":ke="focus",K=Tf;break;case"focusout":ke="blur",K=Tf;break;case"beforeblur":case"afterblur":K=Tf;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=fp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=H3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=J3;break;case Lp:case Dp:case Ip:K=j3;break;case Mp:K=tv;break;case"scroll":case"scrollend":K=B3;break;case"wheel":K=rv;break;case"copy":case"cut":case"paste":K=q3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=hp;break;case"toggle":case"beforetoggle":K=iv}var Ie=(i&4)!==0,yt=!Ie&&(r==="scroll"||r==="scrollend"),Y=Ie?Z!==null?Z+"Capture":null:Z;Ie=[];for(var j=X,Q;j!==null;){var le=j;if(Q=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||Q===null||Y===null||(le=Vl(j,Y),le!=null&&Ie.push(Su(j,le,Q))),yt)break;j=j.return}0<Ie.length&&(Z=new K(Z,ke,null,l,ee),se.push({event:Z,listeners:Ie}))}}if((i&7)===0){e:{if(Z=r==="mouseover"||r==="pointerover",K=r==="mouseout"||r==="pointerout",Z&&l!==hf&&(ke=l.relatedTarget||l.fromElement)&&(Bi(ke)||ke[Mi]))break e;if((K||Z)&&(Z=ee.window===ee?ee:(Z=ee.ownerDocument)?Z.defaultView||Z.parentWindow:window,K?(ke=l.relatedTarget||l.toElement,K=X,ke=ke?Bi(ke):null,ke!==null&&(yt=s(ke),Ie=ke.tag,ke!==yt||Ie!==5&&Ie!==27&&Ie!==6)&&(ke=null)):(K=null,ke=X),K!==ke)){if(Ie=fp,le="onMouseLeave",Y="onMouseEnter",j="mouse",(r==="pointerout"||r==="pointerover")&&(Ie=hp,le="onPointerLeave",Y="onPointerEnter",j="pointer"),yt=K==null?Z:Yl(K),Q=ke==null?Z:Yl(ke),Z=new Ie(le,j+"leave",K,l,ee),Z.target=yt,Z.relatedTarget=Q,le=null,Bi(ee)===X&&(Ie=new Ie(Y,j+"enter",ke,l,ee),Ie.target=Q,Ie.relatedTarget=yt,le=Ie),yt=le,K&&ke)t:{for(Ie=aS,Y=K,j=ke,Q=0,le=Y;le;le=Ie(le))Q++;le=0;for(var Oe=j;Oe;Oe=Ie(Oe))le++;for(;0<Q-le;)Y=Ie(Y),Q--;for(;0<le-Q;)j=Ie(j),le--;for(;Q--;){if(Y===j||j!==null&&Y===j.alternate){Ie=Y;break t}Y=Ie(Y),j=Ie(j)}Ie=null}else Ie=null;K!==null&&ab(se,Z,K,Ie,!1),ke!==null&&yt!==null&&ab(se,yt,ke,Ie,!0)}}e:{if(Z=X?Yl(X):window,K=Z.nodeName&&Z.nodeName.toLowerCase(),K==="select"||K==="input"&&Z.type==="file")var ot=xp;else if(Ep(Z))if(_p)ot=pv;else{ot=hv;var Ne=dv}else K=Z.nodeName,!K||K.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?X&&df(X.elementType)&&(ot=xp):ot=mv;if(ot&&(ot=ot(r,X))){Tp(se,ot,l,ee);break e}Ne&&Ne(r,Z,X),r==="focusout"&&X&&Z.type==="number"&&X.memoizedProps.value!=null&&ff(Z,"number",Z.value)}switch(Ne=X?Yl(X):window,r){case"focusin":(Ep(Ne)||Ne.contentEditable==="true")&&(Vi=Ne,kf=X,Jl=null);break;case"focusout":Jl=kf=Vi=null;break;case"mousedown":Cf=!0;break;case"contextmenu":case"mouseup":case"dragend":Cf=!1,Rp(se,l,ee);break;case"selectionchange":if(bv)break;case"keydown":case"keyup":Rp(se,l,ee)}var Fe;if(_f)e:{switch(r){case"compositionstart":var tt="onCompositionStart";break e;case"compositionend":tt="onCompositionEnd";break e;case"compositionupdate":tt="onCompositionUpdate";break e}tt=void 0}else Yi?bp(r,l)&&(tt="onCompositionEnd"):r==="keydown"&&l.keyCode===229&&(tt="onCompositionStart");tt&&(mp&&l.locale!=="ko"&&(Yi||tt!=="onCompositionStart"?tt==="onCompositionEnd"&&Yi&&(Fe=op()):(ia=ee,bf="value"in ia?ia.value:ia.textContent,Yi=!0)),Ne=vo(X,tt),0<Ne.length&&(tt=new dp(tt,r,null,l,ee),se.push({event:tt,listeners:Ne}),Fe?tt.data=Fe:(Fe=yp(l),Fe!==null&&(tt.data=Fe)))),(Fe=uv?sv(r,l):ov(r,l))&&(tt=vo(X,"onBeforeInput"),0<tt.length&&(Ne=new dp("onBeforeInput","beforeinput",null,l,ee),se.push({event:Ne,listeners:tt}),Ne.data=Fe)),eS(se,r,X,l,ee)}nb(se,i)})}function Su(r,i,l){return{instance:r,listener:i,currentTarget:l}}function vo(r,i){for(var l=i+"Capture",c=[];r!==null;){var m=r,p=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||p===null||(m=Vl(r,l),m!=null&&c.unshift(Su(r,m,p)),m=Vl(r,i),m!=null&&c.push(Su(r,m,p))),r.tag===3)return c;r=r.return}return[]}function aS(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function ab(r,i,l,c,m){for(var p=i._reactName,x=[];l!==null&&l!==c;){var A=l,H=A.alternate,X=A.stateNode;if(A=A.tag,H!==null&&H===c)break;A!==5&&A!==26&&A!==27||X===null||(H=X,m?(X=Vl(l,p),X!=null&&x.unshift(Su(l,X,H))):m||(X=Vl(l,p),X!=null&&x.push(Su(l,X,H)))),l=l.return}x.length!==0&&r.push({event:i,listeners:x})}var iS=/\r\n?/g,lS=/\u0000|\uFFFD/g;function ib(r){return(typeof r=="string"?r:""+r).replace(iS,`
49
- `).replace(lS,"")}function lb(r,i){return i=ib(i),ib(r)===i}function bt(r,i,l,c,m,p){switch(l){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||ji(r,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&ji(r,""+c);break;case"className":ks(r,"class",c);break;case"tabIndex":ks(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":ks(r,l,c);break;case"style":lp(r,c,p);break;case"data":if(i!=="object"){ks(r,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||l!=="href")){r.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(l);break}c=Ns(""+c),r.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(l==="formAction"?(i!=="input"&&bt(r,i,"name",m.name,m,null),bt(r,i,"formEncType",m.formEncType,m,null),bt(r,i,"formMethod",m.formMethod,m,null),bt(r,i,"formTarget",m.formTarget,m,null)):(bt(r,i,"encType",m.encType,m,null),bt(r,i,"method",m.method,m,null),bt(r,i,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(l);break}c=Ns(""+c),r.setAttribute(l,c);break;case"onClick":c!=null&&(r.onclick=Or);break;case"onScroll":c!=null&&Ke("scroll",r);break;case"onScrollEnd":c!=null&&Ke("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(l=c.__html,l!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}l=Ns(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(l,""+c):r.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(l,""):r.removeAttribute(l);break;case"capture":case"download":c===!0?r.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(l,c):r.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(l,c):r.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(l):r.setAttribute(l,c);break;case"popover":Ke("beforetoggle",r),Ke("toggle",r),As(r,"popover",c);break;case"xlinkActuate":Rr(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Rr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Rr(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Rr(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Rr(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Rr(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Rr(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Rr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Rr(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":As(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=I3.get(l)||l,As(r,l,c))}}function Wd(r,i,l,c,m,p){switch(l){case"style":lp(r,c,p);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(l=c.__html,l!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"children":typeof c=="string"?ji(r,c):(typeof c=="number"||typeof c=="bigint")&&ji(r,""+c);break;case"onScroll":c!=null&&Ke("scroll",r);break;case"onScrollEnd":c!=null&&Ke("scrollend",r);break;case"onClick":c!=null&&(r.onclick=Or);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!K0.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(m=l.endsWith("Capture"),i=l.slice(2,m?l.length-7:void 0),p=r[_n]||null,p=p!=null?p[l]:null,typeof p=="function"&&r.removeEventListener(i,p,m),typeof c=="function")){typeof p!="function"&&p!==null&&(l in r?r[l]=null:r.hasAttribute(l)&&r.removeAttribute(l)),r.addEventListener(i,c,m);break e}l in r?r[l]=c:c===!0?r.setAttribute(l,""):As(r,l,c)}}}function un(r,i,l){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ke("error",r),Ke("load",r);var c=!1,m=!1,p;for(p in l)if(l.hasOwnProperty(p)){var x=l[p];if(x!=null)switch(p){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:bt(r,i,p,x,l,null)}}m&&bt(r,i,"srcSet",l.srcSet,l,null),c&&bt(r,i,"src",l.src,l,null);return;case"input":Ke("invalid",r);var A=p=x=m=null,H=null,X=null;for(c in l)if(l.hasOwnProperty(c)){var ee=l[c];if(ee!=null)switch(c){case"name":m=ee;break;case"type":x=ee;break;case"checked":H=ee;break;case"defaultChecked":X=ee;break;case"value":p=ee;break;case"defaultValue":A=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,i));break;default:bt(r,i,c,ee,l,null)}}np(r,p,A,H,X,x,m,!1);return;case"select":Ke("invalid",r),c=x=p=null;for(m in l)if(l.hasOwnProperty(m)&&(A=l[m],A!=null))switch(m){case"value":p=A;break;case"defaultValue":x=A;break;case"multiple":c=A;default:bt(r,i,m,A,l,null)}i=p,l=x,r.multiple=!!c,i!=null?Pi(r,!!c,i,!1):l!=null&&Pi(r,!!c,l,!0);return;case"textarea":Ke("invalid",r),p=m=c=null;for(x in l)if(l.hasOwnProperty(x)&&(A=l[x],A!=null))switch(x){case"value":c=A;break;case"defaultValue":m=A;break;case"children":p=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(a(91));break;default:bt(r,i,x,A,l,null)}ap(r,c,m,p);return;case"option":for(H in l)if(l.hasOwnProperty(H)&&(c=l[H],c!=null))switch(H){case"selected":r.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:bt(r,i,H,c,l,null)}return;case"dialog":Ke("beforetoggle",r),Ke("toggle",r),Ke("cancel",r),Ke("close",r);break;case"iframe":case"object":Ke("load",r);break;case"video":case"audio":for(c=0;c<vu.length;c++)Ke(vu[c],r);break;case"image":Ke("error",r),Ke("load",r);break;case"details":Ke("toggle",r);break;case"embed":case"source":case"link":Ke("error",r),Ke("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in l)if(l.hasOwnProperty(X)&&(c=l[X],c!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:bt(r,i,X,c,l,null)}return;default:if(df(i)){for(ee in l)l.hasOwnProperty(ee)&&(c=l[ee],c!==void 0&&Wd(r,i,ee,c,l,void 0));return}}for(A in l)l.hasOwnProperty(A)&&(c=l[A],c!=null&&bt(r,i,A,c,l,null))}function uS(r,i,l,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,p=null,x=null,A=null,H=null,X=null,ee=null;for(K in l){var se=l[K];if(l.hasOwnProperty(K)&&se!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":H=se;default:c.hasOwnProperty(K)||bt(r,i,K,null,c,se)}}for(var Z in c){var K=c[Z];if(se=l[Z],c.hasOwnProperty(Z)&&(K!=null||se!=null))switch(Z){case"type":p=K;break;case"name":m=K;break;case"checked":X=K;break;case"defaultChecked":ee=K;break;case"value":x=K;break;case"defaultValue":A=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(a(137,i));break;default:K!==se&&bt(r,i,Z,K,c,se)}}cf(r,x,A,H,X,ee,p,m);return;case"select":K=x=A=Z=null;for(p in l)if(H=l[p],l.hasOwnProperty(p)&&H!=null)switch(p){case"value":break;case"multiple":K=H;default:c.hasOwnProperty(p)||bt(r,i,p,null,c,H)}for(m in c)if(p=c[m],H=l[m],c.hasOwnProperty(m)&&(p!=null||H!=null))switch(m){case"value":Z=p;break;case"defaultValue":A=p;break;case"multiple":x=p;default:p!==H&&bt(r,i,m,p,c,H)}i=A,l=x,c=K,Z!=null?Pi(r,!!l,Z,!1):!!c!=!!l&&(i!=null?Pi(r,!!l,i,!0):Pi(r,!!l,l?[]:"",!1));return;case"textarea":K=Z=null;for(A in l)if(m=l[A],l.hasOwnProperty(A)&&m!=null&&!c.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:bt(r,i,A,null,c,m)}for(x in c)if(m=c[x],p=l[x],c.hasOwnProperty(x)&&(m!=null||p!=null))switch(x){case"value":Z=m;break;case"defaultValue":K=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==p&&bt(r,i,x,m,c,p)}rp(r,Z,K);return;case"option":for(var ke in l)if(Z=l[ke],l.hasOwnProperty(ke)&&Z!=null&&!c.hasOwnProperty(ke))switch(ke){case"selected":r.selected=!1;break;default:bt(r,i,ke,null,c,Z)}for(H in c)if(Z=c[H],K=l[H],c.hasOwnProperty(H)&&Z!==K&&(Z!=null||K!=null))switch(H){case"selected":r.selected=Z&&typeof Z!="function"&&typeof Z!="symbol";break;default:bt(r,i,H,Z,c,K)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ie in l)Z=l[Ie],l.hasOwnProperty(Ie)&&Z!=null&&!c.hasOwnProperty(Ie)&&bt(r,i,Ie,null,c,Z);for(X in c)if(Z=c[X],K=l[X],c.hasOwnProperty(X)&&Z!==K&&(Z!=null||K!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(a(137,i));break;default:bt(r,i,X,Z,c,K)}return;default:if(df(i)){for(var yt in l)Z=l[yt],l.hasOwnProperty(yt)&&Z!==void 0&&!c.hasOwnProperty(yt)&&Wd(r,i,yt,void 0,c,Z);for(ee in c)Z=c[ee],K=l[ee],!c.hasOwnProperty(ee)||Z===K||Z===void 0&&K===void 0||Wd(r,i,ee,Z,c,K);return}}for(var Y in l)Z=l[Y],l.hasOwnProperty(Y)&&Z!=null&&!c.hasOwnProperty(Y)&&bt(r,i,Y,null,c,Z);for(se in c)Z=c[se],K=l[se],!c.hasOwnProperty(se)||Z===K||Z==null&&K==null||bt(r,i,se,Z,c,K)}function ub(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sS(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,l=performance.getEntriesByType("resource"),c=0;c<l.length;c++){var m=l[c],p=m.transferSize,x=m.initiatorType,A=m.duration;if(p&&A&&ub(x)){for(x=0,A=m.responseEnd,c+=1;c<l.length;c++){var H=l[c],X=H.startTime;if(X>A)break;var ee=H.transferSize,se=H.initiatorType;ee&&ub(se)&&(H=H.responseEnd,x+=ee*(H<A?1:(A-X)/(H-X)))}if(--c,i+=8*(p+x)/(m.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Jd=null,eh=null;function So(r){return r.nodeType===9?r:r.ownerDocument}function sb(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ob(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function th(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var nh=null;function oS(){var r=window.event;return r&&r.type==="popstate"?r===nh?!1:(nh=r,!0):(nh=null,!1)}var cb=typeof setTimeout=="function"?setTimeout:void 0,cS=typeof clearTimeout=="function"?clearTimeout:void 0,fb=typeof Promise=="function"?Promise:void 0,fS=typeof queueMicrotask=="function"?queueMicrotask:typeof fb<"u"?function(r){return fb.resolve(null).then(r).catch(dS)}:cb;function dS(r){setTimeout(function(){throw r})}function _a(r){return r==="head"}function db(r,i){var l=i,c=0;do{var m=l.nextSibling;if(r.removeChild(l),m&&m.nodeType===8)if(l=m.data,l==="/$"||l==="/&"){if(c===0){r.removeChild(m),yl(i);return}c--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")c++;else if(l==="html")Au(r.ownerDocument.documentElement);else if(l==="head"){l=r.ownerDocument.head,Au(l);for(var p=l.firstChild;p;){var x=p.nextSibling,A=p.nodeName;p[ql]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&p.rel.toLowerCase()==="stylesheet"||l.removeChild(p),p=x}}else l==="body"&&Au(r.ownerDocument.body);l=m}while(l);yl(i)}function hb(r,i){var l=r;r=0;do{var c=l.nextSibling;if(l.nodeType===1?i?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(i?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),c&&c.nodeType===8)if(l=c.data,l==="/$"){if(r===0)break;r--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||r++;l=c}while(l)}function rh(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var l=i;switch(i=i.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":rh(l),sf(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}r.removeChild(l)}}function hS(r,i,l,c){for(;r.nodeType===1;){var m=l;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[ql])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(p=r.getAttribute("rel"),p==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(p!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(p=r.getAttribute("src"),(p!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&p&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var p=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===p)return r}else return r;if(r=er(r.nextSibling),r===null)break}return null}function mS(r,i,l){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!l||(r=er(r.nextSibling),r===null))return null;return r}function mb(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=er(r.nextSibling),r===null))return null;return r}function ah(r){return r.data==="$?"||r.data==="$~"}function ih(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function pS(r,i){var l=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||l.readyState!=="loading")i();else{var c=function(){i(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function er(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var lh=null;function pb(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="/$"||l==="/&"){if(i===0)return er(r.nextSibling);i--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||i++}r=r.nextSibling}return null}function gb(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(i===0)return r;i--}else l!=="/$"&&l!=="/&"||i++}r=r.previousSibling}return null}function bb(r,i,l){switch(i=So(l),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Au(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);sf(r)}var tr=new Map,yb=new Set;function Ao(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Gr=te.d;te.d={f:gS,r:bS,D:yS,C:ES,L:TS,m:xS,X:vS,S:_S,M:SS};function gS(){var r=Gr.f(),i=go();return r||i}function bS(r){var i=zi(r);i!==null&&i.tag===5&&i.type==="form"?M1(i):Gr.r(r)}var pl=typeof document>"u"?null:document;function Eb(r,i,l){var c=pl;if(c&&typeof i=="string"&&i){var m=Gn(i);m='link[rel="'+r+'"][href="'+m+'"]',typeof l=="string"&&(m+='[crossorigin="'+l+'"]'),yb.has(m)||(yb.add(m),r={rel:r,crossOrigin:l,href:i},c.querySelector(m)===null&&(i=c.createElement("link"),un(i,"link",r),Wt(i),c.head.appendChild(i)))}}function yS(r){Gr.D(r),Eb("dns-prefetch",r,null)}function ES(r,i){Gr.C(r,i),Eb("preconnect",r,i)}function TS(r,i,l){Gr.L(r,i,l);var c=pl;if(c&&r&&i){var m='link[rel="preload"][as="'+Gn(i)+'"]';i==="image"&&l&&l.imageSrcSet?(m+='[imagesrcset="'+Gn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(m+='[imagesizes="'+Gn(l.imageSizes)+'"]')):m+='[href="'+Gn(r)+'"]';var p=m;switch(i){case"style":p=gl(r);break;case"script":p=bl(r)}tr.has(p)||(r=g({rel:"preload",href:i==="image"&&l&&l.imageSrcSet?void 0:r,as:i},l),tr.set(p,r),c.querySelector(m)!==null||i==="style"&&c.querySelector(ku(p))||i==="script"&&c.querySelector(Cu(p))||(i=c.createElement("link"),un(i,"link",r),Wt(i),c.head.appendChild(i)))}}function xS(r,i){Gr.m(r,i);var l=pl;if(l&&r){var c=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+Gn(c)+'"][href="'+Gn(r)+'"]',p=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=bl(r)}if(!tr.has(p)&&(r=g({rel:"modulepreload",href:r},i),tr.set(p,r),l.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Cu(p)))return}c=l.createElement("link"),un(c,"link",r),Wt(c),l.head.appendChild(c)}}}function _S(r,i,l){Gr.S(r,i,l);var c=pl;if(c&&r){var m=Hi(c).hoistableStyles,p=gl(r);i=i||"default";var x=m.get(p);if(!x){var A={loading:0,preload:null};if(x=c.querySelector(ku(p)))A.loading=5;else{r=g({rel:"stylesheet",href:r,"data-precedence":i},l),(l=tr.get(p))&&uh(r,l);var H=x=c.createElement("link");Wt(H),un(H,"link",r),H._p=new Promise(function(X,ee){H.onload=X,H.onerror=ee}),H.addEventListener("load",function(){A.loading|=1}),H.addEventListener("error",function(){A.loading|=2}),A.loading|=4,ko(x,i,c)}x={type:"stylesheet",instance:x,count:1,state:A},m.set(p,x)}}}function vS(r,i){Gr.X(r,i);var l=pl;if(l&&r){var c=Hi(l).hoistableScripts,m=bl(r),p=c.get(m);p||(p=l.querySelector(Cu(m)),p||(r=g({src:r,async:!0},i),(i=tr.get(m))&&sh(r,i),p=l.createElement("script"),Wt(p),un(p,"link",r),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(m,p))}}function SS(r,i){Gr.M(r,i);var l=pl;if(l&&r){var c=Hi(l).hoistableScripts,m=bl(r),p=c.get(m);p||(p=l.querySelector(Cu(m)),p||(r=g({src:r,async:!0,type:"module"},i),(i=tr.get(m))&&sh(r,i),p=l.createElement("script"),Wt(p),un(p,"link",r),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(m,p))}}function Tb(r,i,l,c){var m=(m=ie.current)?Ao(m):null;if(!m)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(i=gl(l.href),l=Hi(m).hoistableStyles,c=l.get(i),c||(c={type:"style",instance:null,count:0,state:null},l.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){r=gl(l.href);var p=Hi(m).hoistableStyles,x=p.get(r);if(x||(m=m.ownerDocument||m,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(r,x),(p=m.querySelector(ku(r)))&&!p._p&&(x.instance=p,x.state.loading=5),tr.has(r)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},tr.set(r,l),p||AS(m,r,l,x.state))),i&&c===null)throw Error(a(528,""));return x}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=l.async,l=l.src,typeof l=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=bl(l),l=Hi(m).hoistableScripts,c=l.get(i),c||(c={type:"script",instance:null,count:0,state:null},l.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function gl(r){return'href="'+Gn(r)+'"'}function ku(r){return'link[rel="stylesheet"]['+r+"]"}function xb(r){return g({},r,{"data-precedence":r.precedence,precedence:null})}function AS(r,i,l,c){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=r.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),un(i,"link",l),Wt(i),r.head.appendChild(i))}function bl(r){return'[src="'+Gn(r)+'"]'}function Cu(r){return"script[async]"+r}function _b(r,i,l){if(i.count++,i.instance===null)switch(i.type){case"style":var c=r.querySelector('style[data-href~="'+Gn(l.href)+'"]');if(c)return i.instance=c,Wt(c),c;var m=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),Wt(c),un(c,"style",m),ko(c,l.precedence,r),i.instance=c;case"stylesheet":m=gl(l.href);var p=r.querySelector(ku(m));if(p)return i.state.loading|=4,i.instance=p,Wt(p),p;c=xb(l),(m=tr.get(m))&&uh(c,m),p=(r.ownerDocument||r).createElement("link"),Wt(p);var x=p;return x._p=new Promise(function(A,H){x.onload=A,x.onerror=H}),un(p,"link",c),i.state.loading|=4,ko(p,l.precedence,r),i.instance=p;case"script":return p=bl(l.src),(m=r.querySelector(Cu(p)))?(i.instance=m,Wt(m),m):(c=l,(m=tr.get(p))&&(c=g({},l),sh(c,m)),r=r.ownerDocument||r,m=r.createElement("script"),Wt(m),un(m,"link",c),r.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,ko(c,l.precedence,r));return i.instance}function ko(r,i,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,p=m,x=0;x<c.length;x++){var A=c[x];if(A.dataset.precedence===i)p=A;else if(p!==m)break}p?p.parentNode.insertBefore(r,p.nextSibling):(i=l.nodeType===9?l.head:l,i.insertBefore(r,i.firstChild))}function uh(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function sh(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Co=null;function vb(r,i,l){if(Co===null){var c=new Map,m=Co=new Map;m.set(l,c)}else m=Co,c=m.get(l),c||(c=new Map,m.set(l,c));if(c.has(r))return c;for(c.set(r,null),l=l.getElementsByTagName(r),m=0;m<l.length;m++){var p=l[m];if(!(p[ql]||p[nn]||r==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var x=p.getAttribute(i)||"";x=r+x;var A=c.get(x);A?A.push(p):c.set(x,[p])}}return c}function Sb(r,i,l){r=r.ownerDocument||r,r.head.insertBefore(l,i==="title"?r.querySelector("head > title"):null)}function kS(r,i,l){if(l===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return r=i.disabled,typeof i.precedence=="string"&&r==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Ab(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function CS(r,i,l,c){if(l.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var m=gl(c.href),p=i.querySelector(ku(m));if(p){i=p._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=No.bind(r),i.then(r,r)),l.state.loading|=4,l.instance=p,Wt(p);return}p=i.ownerDocument||i,c=xb(c),(m=tr.get(m))&&uh(c,m),p=p.createElement("link"),Wt(p);var x=p;x._p=new Promise(function(A,H){x.onload=A,x.onerror=H}),un(p,"link",c),l.instance=p}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(l,i),(i=l.state.preload)&&(l.state.loading&3)===0&&(r.count++,l=No.bind(r),i.addEventListener("load",l),i.addEventListener("error",l))}}var oh=0;function NS(r,i){return r.stylesheets&&r.count===0&&Ro(r,r.stylesheets),0<r.count||0<r.imgCount?function(l){var c=setTimeout(function(){if(r.stylesheets&&Ro(r,r.stylesheets),r.unsuspend){var p=r.unsuspend;r.unsuspend=null,p()}},6e4+i);0<r.imgBytes&&oh===0&&(oh=62500*sS());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Ro(r,r.stylesheets),r.unsuspend)){var p=r.unsuspend;r.unsuspend=null,p()}},(r.imgBytes>oh?50:800)+i);return r.unsuspend=l,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function No(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ro(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var wo=null;function Ro(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,wo=new Map,i.forEach(wS,r),wo=null,No.call(r))}function wS(r,i){if(!(i.state.loading&4)){var l=wo.get(r);if(l)var c=l.get(null);else{l=new Map,wo.set(r,l);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<m.length;p++){var x=m[p];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(l.set(x.dataset.precedence,x),c=x)}c&&l.set(null,c)}m=i.instance,x=m.getAttribute("data-precedence"),p=l.get(x)||c,p===c&&l.set(null,m),l.set(x,m),this.count++,c=No.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),p?p.parentNode.insertBefore(m,p.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),i.state.loading|=4}}var Nu={$$typeof:U,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function RS(r,i,l,c,m,p,x,A,H){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=rf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rf(0),this.hiddenUpdates=rf(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=p,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function kb(r,i,l,c,m,p,x,A,H,X,ee,se){return r=new RS(r,i,l,x,H,X,ee,se,A),i=1,p===!0&&(i|=24),p=In(3,null,null,i),r.current=p,p.stateNode=r,i=Ff(),i.refCount++,r.pooledCache=i,i.refCount++,p.memoizedState={element:c,isDehydrated:l,cache:i},$f(p),r}function Cb(r){return r?(r=Qi,r):Qi}function Nb(r,i,l,c,m,p){m=Cb(m),c.context===null?c.context=m:c.pendingContext=m,c=fa(i),c.payload={element:l},p=p===void 0?null:p,p!==null&&(c.callback=p),l=da(r,c,i),l!==null&&(Nn(l,r,i),lu(l,r,i))}function wb(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<i?l:i}}function ch(r,i){wb(r,i),(r=r.alternate)&&wb(r,i)}function Rb(r){if(r.tag===13||r.tag===31){var i=Wa(r,67108864);i!==null&&Nn(i,r,67108864),ch(r,67108864)}}function Ob(r){if(r.tag===13||r.tag===31){var i=Un();i=af(i);var l=Wa(r,i);l!==null&&Nn(l,r,i),ch(r,i)}}var Oo=!0;function OS(r,i,l,c){var m=P.T;P.T=null;var p=te.p;try{te.p=2,fh(r,i,l,c)}finally{te.p=p,P.T=m}}function LS(r,i,l,c){var m=P.T;P.T=null;var p=te.p;try{te.p=8,fh(r,i,l,c)}finally{te.p=p,P.T=m}}function fh(r,i,l,c){if(Oo){var m=dh(c);if(m===null)Kd(r,i,c,Lo,l),Db(r,c);else if(IS(m,r,i,l,c))c.stopPropagation();else if(Db(r,c),i&4&&-1<DS.indexOf(r)){for(;m!==null;){var p=zi(m);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var x=Ga(p.pendingLanes);if(x!==0){var A=p;for(A.pendingLanes|=2,A.entangledLanes|=2;x;){var H=1<<31-_t(x);A.entanglements[1]|=H,x&=~H}Er(p),(ft&6)===0&&(mo=mn()+500,_u(0))}}break;case 31:case 13:A=Wa(p,2),A!==null&&Nn(A,p,2),go(),ch(p,2)}if(p=dh(c),p===null&&Kd(r,i,c,Lo,l),p===m)break;m=p}m!==null&&c.stopPropagation()}else Kd(r,i,c,null,l)}}function dh(r){return r=mf(r),hh(r)}var Lo=null;function hh(r){if(Lo=null,r=Bi(r),r!==null){var i=s(r);if(i===null)r=null;else{var l=i.tag;if(l===13){if(r=o(i),r!==null)return r;r=null}else if(l===31){if(r=f(i),r!==null)return r;r=null}else if(l===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return Lo=r,null}function Lb(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(nf()){case re:return 2;case Ee:return 8;case Me:case Xe:return 32;case dt:return 268435456;default:return 32}default:return 32}}var mh=!1,va=null,Sa=null,Aa=null,wu=new Map,Ru=new Map,ka=[],DS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Db(r,i){switch(r){case"focusin":case"focusout":va=null;break;case"dragenter":case"dragleave":Sa=null;break;case"mouseover":case"mouseout":Aa=null;break;case"pointerover":case"pointerout":wu.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ru.delete(i.pointerId)}}function Ou(r,i,l,c,m,p){return r===null||r.nativeEvent!==p?(r={blockedOn:i,domEventName:l,eventSystemFlags:c,nativeEvent:p,targetContainers:[m]},i!==null&&(i=zi(i),i!==null&&Rb(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function IS(r,i,l,c,m){switch(i){case"focusin":return va=Ou(va,r,i,l,c,m),!0;case"dragenter":return Sa=Ou(Sa,r,i,l,c,m),!0;case"mouseover":return Aa=Ou(Aa,r,i,l,c,m),!0;case"pointerover":var p=m.pointerId;return wu.set(p,Ou(wu.get(p)||null,r,i,l,c,m)),!0;case"gotpointercapture":return p=m.pointerId,Ru.set(p,Ou(Ru.get(p)||null,r,i,l,c,m)),!0}return!1}function Ib(r){var i=Bi(r.target);if(i!==null){var l=s(i);if(l!==null){if(i=l.tag,i===13){if(i=o(l),i!==null){r.blockedOn=i,Q0(r.priority,function(){Ob(l)});return}}else if(i===31){if(i=f(l),i!==null){r.blockedOn=i,Q0(r.priority,function(){Ob(l)});return}}else if(i===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Do(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var l=dh(r.nativeEvent);if(l===null){l=r.nativeEvent;var c=new l.constructor(l.type,l);hf=c,l.target.dispatchEvent(c),hf=null}else return i=zi(l),i!==null&&Rb(i),r.blockedOn=l,!1;i.shift()}return!0}function Mb(r,i,l){Do(r)&&l.delete(i)}function MS(){mh=!1,va!==null&&Do(va)&&(va=null),Sa!==null&&Do(Sa)&&(Sa=null),Aa!==null&&Do(Aa)&&(Aa=null),wu.forEach(Mb),Ru.forEach(Mb)}function Io(r,i){r.blockedOn===i&&(r.blockedOn=null,mh||(mh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,MS)))}var Mo=null;function Bb(r){Mo!==r&&(Mo=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Mo===r&&(Mo=null);for(var i=0;i<r.length;i+=3){var l=r[i],c=r[i+1],m=r[i+2];if(typeof c!="function"){if(hh(c||l)===null)continue;break}var p=zi(l);p!==null&&(r.splice(i,3),i-=3,dd(p,{pending:!0,data:m,method:l.method,action:c},c,m))}}))}function yl(r){function i(H){return Io(H,r)}va!==null&&Io(va,r),Sa!==null&&Io(Sa,r),Aa!==null&&Io(Aa,r),wu.forEach(i),Ru.forEach(i);for(var l=0;l<ka.length;l++){var c=ka[l];c.blockedOn===r&&(c.blockedOn=null)}for(;0<ka.length&&(l=ka[0],l.blockedOn===null);)Ib(l),l.blockedOn===null&&ka.shift();if(l=(r.ownerDocument||r).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var m=l[c],p=l[c+1],x=m[_n]||null;if(typeof p=="function")x||Bb(l);else if(x){var A=null;if(p&&p.hasAttribute("formAction")){if(m=p,x=p[_n]||null)A=x.formAction;else if(hh(m)!==null)continue}else A=x.action;typeof A=="function"?l[c+1]=A:(l.splice(c,3),c-=3),Bb(l)}}}function zb(){function r(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(x){return m=x})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),c||setTimeout(l,20)}function l(){if(!c&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(l,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function ph(r){this._internalRoot=r}Bo.prototype.render=ph.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var l=i.current,c=Un();Nb(l,c,r,i,null,null)},Bo.prototype.unmount=ph.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Nb(r.current,2,null,r,null,null),go(),i[Mi]=null}};function Bo(r){this._internalRoot=r}Bo.prototype.unstable_scheduleHydration=function(r){if(r){var i=G0();r={blockedOn:null,target:r,priority:i};for(var l=0;l<ka.length&&i!==0&&i<ka[l].priority;l++);ka.splice(l,0,r),l===0&&Ib(r)}};var Hb=t.version;if(Hb!=="19.2.7")throw Error(a(527,Hb,"19.2.7"));te.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=d(i),r=r!==null?b(r):null,r=r===null?null:r.stateNode,r};var BS={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zo.isDisabled&&zo.supportsFiber)try{pn=zo.inject(BS),Xt=zo}catch{}}return Du.createRoot=function(r,i){if(!u(r))throw Error(a(299));var l=!1,c="",m=V1,p=$1,x=G1;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(p=i.onCaughtError),i.onRecoverableError!==void 0&&(x=i.onRecoverableError)),i=kb(r,1,!1,null,null,l,c,null,m,p,x,zb),r[Mi]=i.current,Zd(r),new ph(i)},Du.hydrateRoot=function(r,i,l){if(!u(r))throw Error(a(299));var c=!1,m="",p=V1,x=$1,A=G1,H=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(p=l.onUncaughtError),l.onCaughtError!==void 0&&(x=l.onCaughtError),l.onRecoverableError!==void 0&&(A=l.onRecoverableError),l.formState!==void 0&&(H=l.formState)),i=kb(r,1,!0,i,l??null,c,m,H,p,x,A,zb),i.context=Cb(null),l=i.current,c=Un(),c=af(c),m=fa(c),m.callback=null,da(l,m,c),l=c,i.current.lanes=l,Fl(i,l),Er(i),r[Mi]=i.current,Zd(r),new Bo(i)},Du.version="19.2.7",Du}var Qb;function XS(){if(Qb)return yh.exports;Qb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),yh.exports=QS(),yh.exports}var ZS=XS(),st;(function(e){e.assertEqual=u=>{};function t(u){}e.assertIs=t;function n(u){throw new Error}e.assertNever=n,e.arrayToEnum=u=>{const s={};for(const o of u)s[o]=o;return s},e.getValidEnumValues=u=>{const s=e.objectKeys(u).filter(f=>typeof u[u[f]]!="number"),o={};for(const f of s)o[f]=u[f];return e.objectValues(o)},e.objectValues=u=>e.objectKeys(u).map(function(s){return u[s]}),e.objectKeys=typeof Object.keys=="function"?u=>Object.keys(u):u=>{const s=[];for(const o in u)Object.prototype.hasOwnProperty.call(u,o)&&s.push(o);return s},e.find=(u,s)=>{for(const o of u)if(s(o))return o},e.isInteger=typeof Number.isInteger=="function"?u=>Number.isInteger(u):u=>typeof u=="number"&&Number.isFinite(u)&&Math.floor(u)===u;function a(u,s=" | "){return u.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}e.joinValues=a,e.jsonStringifyReplacer=(u,s)=>typeof s=="bigint"?s.toString():s})(st||(st={}));var Xb;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Xb||(Xb={}));const Ce=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),La=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return Number.isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},ye=st.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Jr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(s){return s.message},a={_errors:[]},u=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(u);else if(o.code==="invalid_return_type")u(o.returnTypeError);else if(o.code==="invalid_arguments")u(o.argumentsError);else if(o.path.length===0)a._errors.push(n(o));else{let f=a,h=0;for(;h<o.path.length;){const d=o.path[h];h===o.path.length-1?(f[d]=f[d]||{_errors:[]},f[d]._errors.push(n(o))):f[d]=f[d]||{_errors:[]},f=f[d],h++}}};return u(this),a}static assert(t){if(!(t instanceof Jr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,st.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},a=[];for(const u of this.issues)if(u.path.length>0){const s=u.path[0];n[s]=n[s]||[],n[s].push(t(u))}else a.push(t(u));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}Jr.create=e=>new Jr(e);const am=(e,t)=>{let n;switch(e.code){case ye.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ye.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,st.jsonStringifyReplacer)}`;break;case ye.unrecognized_keys:n=`Unrecognized key(s) in object: ${st.joinValues(e.keys,", ")}`;break;case ye.invalid_union:n="Invalid input";break;case ye.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${st.joinValues(e.options)}`;break;case ye.invalid_enum_value:n=`Invalid enum value. Expected ${st.joinValues(e.options)}, received '${e.received}'`;break;case ye.invalid_arguments:n="Invalid function arguments";break;case ye.invalid_return_type:n="Invalid function return type";break;case ye.invalid_date:n="Invalid date";break;case ye.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:st.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ye.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ye.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ye.custom:n="Invalid input";break;case ye.invalid_intersection_types:n="Intersection results could not be merged";break;case ye.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ye.not_finite:n="Number must be finite";break;default:n=t.defaultError,st.assertNever(e)}return{message:n}};let KS=am;function WS(){return KS}const JS=e=>{const{data:t,path:n,errorMaps:a,issueData:u}=e,s=[...n,...u.path||[]],o={...u,path:s};if(u.message!==void 0)return{...u,path:s,message:u.message};let f="";const h=a.filter(d=>!!d).slice().reverse();for(const d of h)f=d(o,{data:t,defaultError:f}).message;return{...u,path:s,message:f}};function ve(e,t){const n=WS(),a=JS({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===am?void 0:am].filter(u=>!!u)});e.common.issues.push(a)}class qn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const a=[];for(const u of n){if(u.status==="aborted")return Be;u.status==="dirty"&&t.dirty(),a.push(u.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,n){const a=[];for(const u of n){const s=await u.key,o=await u.value;a.push({key:s,value:o})}return qn.mergeObjectSync(t,a)}static mergeObjectSync(t,n){const a={};for(const u of n){const{key:s,value:o}=u;if(s.status==="aborted"||o.status==="aborted")return Be;s.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||u.alwaysSet)&&(a[s.value]=o.value)}return{status:t.value,value:a}}}const Be=Object.freeze({status:"aborted"}),qu=e=>({status:"dirty",value:e}),ir=e=>({status:"valid",value:e}),Zb=e=>e.status==="aborted",Kb=e=>e.status==="dirty",wl=e=>e.status==="valid",rc=e=>typeof Promise<"u"&&e instanceof Promise;var Re;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Re||(Re={}));class Ha{constructor(t,n,a,u){this._cachedPath=[],this.parent=t,this.data=n,this._path=a,this._key=u}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Wb=(e,t)=>{if(wl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Jr(e.common.issues);return this._error=n,this._error}}};function $e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:a,description:u}=e;if(t&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:u}:{errorMap:(o,f)=>{const{message:h}=e;return o.code==="invalid_enum_value"?{message:h??f.defaultError}:typeof f.data>"u"?{message:h??a??f.defaultError}:o.code!=="invalid_type"?{message:f.defaultError}:{message:h??n??f.defaultError}},description:u}}class lt{get description(){return this._def.description}_getType(t){return La(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:La(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qn,ctx:{common:t.parent.common,data:t.data,parsedType:La(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(rc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const a=this.safeParse(t,n);if(a.success)return a.data;throw a.error}safeParse(t,n){const a={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:La(t)},u=this._parseSync({data:t,path:a.path,parent:a});return Wb(a,u)}"~validate"(t){var a,u;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:La(t)};if(!this["~standard"].async)try{const s=this._parseSync({data:t,path:[],parent:n});return wl(s)?{value:s.value}:{issues:n.common.issues}}catch(s){(u=(a=s==null?void 0:s.message)==null?void 0:a.toLowerCase())!=null&&u.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(s=>wl(s)?{value:s.value}:{issues:n.common.issues})}async parseAsync(t,n){const a=await this.safeParseAsync(t,n);if(a.success)return a.data;throw a.error}async safeParseAsync(t,n){const a={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:La(t)},u=this._parse({data:t,path:a.path,parent:a}),s=await(rc(u)?u:Promise.resolve(u));return Wb(a,s)}refine(t,n){const a=u=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(u):n;return this._refinement((u,s)=>{const o=t(u),f=()=>s.addIssue({code:ye.custom,...a(u)});return typeof Promise<"u"&&o instanceof Promise?o.then(h=>h?!0:(f(),!1)):o?!0:(f(),!1)})}refinement(t,n){return this._refinement((a,u)=>t(a)?!0:(u.addIssue(typeof n=="function"?n(a,u):n),!1))}_refinement(t){return new Si({schema:this,typeName:He.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Wr.create(this,this._def)}nullable(){return Ai.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Sr.create(this)}promise(){return sc.create(this,this._def)}or(t){return ic.create([this,t],this._def)}and(t){return lc.create(this,t,this._def)}transform(t){return new Si({...$e(this._def),schema:this,typeName:He.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new oc({...$e(this._def),innerType:this,defaultValue:n,typeName:He.ZodDefault})}brand(){return new ST({typeName:He.ZodBranded,type:this,...$e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new cc({...$e(this._def),innerType:this,catchValue:n,typeName:He.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ym.create(this,t)}readonly(){return fc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const eA=/^c[^\s-]{8,}$/i,tA=/^[0-9a-z]+$/,nA=/^[0-9A-HJKMNP-TV-Z]{26}$/i,rA=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,aA=/^[a-z0-9_-]{21}$/i,iA=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,lA=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,uA=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _h;const oA=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,cA=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,fA=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,dA=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,hA=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,mA=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,xT="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",pA=new RegExp(`^${xT}$`);function _T(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function gA(e){return new RegExp(`^${_T(e)}$`)}function bA(e){let t=`${xT}T${_T(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function yA(e,t){return!!((t==="v4"||!t)&&oA.test(e)||(t==="v6"||!t)&&fA.test(e))}function EA(e,t){if(!iA.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),u=JSON.parse(atob(a));return!(typeof u!="object"||u===null||"typ"in u&&(u==null?void 0:u.typ)!=="JWT"||!u.alg||t&&u.alg!==t)}catch{return!1}}function TA(e,t){return!!((t==="v4"||!t)&&cA.test(e)||(t==="v6"||!t)&&dA.test(e))}class Ba extends lt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const s=this._getOrReturnCtx(t);return ve(s,{code:ye.invalid_type,expected:Ce.string,received:s.parsedType}),Be}const a=new qn;let u;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(u=this._getOrReturnCtx(t,u),ve(u,{code:ye.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),a.dirty());else if(s.kind==="max")t.data.length>s.value&&(u=this._getOrReturnCtx(t,u),ve(u,{code:ye.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),a.dirty());else if(s.kind==="length"){const o=t.data.length>s.value,f=t.data.length<s.value;(o||f)&&(u=this._getOrReturnCtx(t,u),o?ve(u,{code:ye.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):f&&ve(u,{code:ye.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),a.dirty())}else if(s.kind==="email")uA.test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"email",code:ye.invalid_string,message:s.message}),a.dirty());else if(s.kind==="emoji")_h||(_h=new RegExp(sA,"u")),_h.test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"emoji",code:ye.invalid_string,message:s.message}),a.dirty());else if(s.kind==="uuid")rA.test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"uuid",code:ye.invalid_string,message:s.message}),a.dirty());else if(s.kind==="nanoid")aA.test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"nanoid",code:ye.invalid_string,message:s.message}),a.dirty());else if(s.kind==="cuid")eA.test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"cuid",code:ye.invalid_string,message:s.message}),a.dirty());else if(s.kind==="cuid2")tA.test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"cuid2",code:ye.invalid_string,message:s.message}),a.dirty());else if(s.kind==="ulid")nA.test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"ulid",code:ye.invalid_string,message:s.message}),a.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{u=this._getOrReturnCtx(t,u),ve(u,{validation:"url",code:ye.invalid_string,message:s.message}),a.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"regex",code:ye.invalid_string,message:s.message}),a.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(u=this._getOrReturnCtx(t,u),ve(u,{code:ye.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),a.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(u=this._getOrReturnCtx(t,u),ve(u,{code:ye.invalid_string,validation:{startsWith:s.value},message:s.message}),a.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(u=this._getOrReturnCtx(t,u),ve(u,{code:ye.invalid_string,validation:{endsWith:s.value},message:s.message}),a.dirty()):s.kind==="datetime"?bA(s).test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{code:ye.invalid_string,validation:"datetime",message:s.message}),a.dirty()):s.kind==="date"?pA.test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{code:ye.invalid_string,validation:"date",message:s.message}),a.dirty()):s.kind==="time"?gA(s).test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{code:ye.invalid_string,validation:"time",message:s.message}),a.dirty()):s.kind==="duration"?lA.test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"duration",code:ye.invalid_string,message:s.message}),a.dirty()):s.kind==="ip"?yA(t.data,s.version)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"ip",code:ye.invalid_string,message:s.message}),a.dirty()):s.kind==="jwt"?EA(t.data,s.alg)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"jwt",code:ye.invalid_string,message:s.message}),a.dirty()):s.kind==="cidr"?TA(t.data,s.version)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"cidr",code:ye.invalid_string,message:s.message}),a.dirty()):s.kind==="base64"?hA.test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"base64",code:ye.invalid_string,message:s.message}),a.dirty()):s.kind==="base64url"?mA.test(t.data)||(u=this._getOrReturnCtx(t,u),ve(u,{validation:"base64url",code:ye.invalid_string,message:s.message}),a.dirty()):st.assertNever(s);return{status:a.value,value:t.data}}_regex(t,n,a){return this.refinement(u=>t.test(u),{validation:n,code:ye.invalid_string,...Re.errToObj(a)})}_addCheck(t){return new Ba({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Re.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Re.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Re.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Re.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Re.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Re.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Re.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Re.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Re.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Re.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Re.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Re.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Re.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Re.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Re.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Re.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Re.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Re.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Re.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Re.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Re.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Re.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Re.errToObj(n)})}nonempty(t){return this.min(1,Re.errToObj(t))}trim(){return new Ba({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ba({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ba({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ba.create=e=>new Ba({checks:[],typeName:He.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...$e(e)});function xA(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,u=n>a?n:a,s=Number.parseInt(e.toFixed(u).replace(".","")),o=Number.parseInt(t.toFixed(u).replace(".",""));return s%o/10**u}class Rl extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const s=this._getOrReturnCtx(t);return ve(s,{code:ye.invalid_type,expected:Ce.number,received:s.parsedType}),Be}let a;const u=new qn;for(const s of this._def.checks)s.kind==="int"?st.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),ve(a,{code:ye.invalid_type,expected:"integer",received:"float",message:s.message}),u.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(a=this._getOrReturnCtx(t,a),ve(a,{code:ye.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),u.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(a=this._getOrReturnCtx(t,a),ve(a,{code:ye.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),u.dirty()):s.kind==="multipleOf"?xA(t.data,s.value)!==0&&(a=this._getOrReturnCtx(t,a),ve(a,{code:ye.not_multiple_of,multipleOf:s.value,message:s.message}),u.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),ve(a,{code:ye.not_finite,message:s.message}),u.dirty()):st.assertNever(s);return{status:u.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Re.toString(n))}setLimit(t,n,a,u){return new Rl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Re.toString(u)}]})}_addCheck(t){return new Rl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Re.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Re.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Re.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Re.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Re.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&st.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(t===null||a.value<t)&&(t=a.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Rl.create=e=>new Rl({checks:[],typeName:He.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class is extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ce.bigint)return this._getInvalidInput(t);let a;const u=new qn;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(a=this._getOrReturnCtx(t,a),ve(a,{code:ye.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),u.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(a=this._getOrReturnCtx(t,a),ve(a,{code:ye.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),u.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),ve(a,{code:ye.not_multiple_of,multipleOf:s.value,message:s.message}),u.dirty()):st.assertNever(s);return{status:u.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ve(n,{code:ye.invalid_type,expected:Ce.bigint,received:n.parsedType}),Be}gte(t,n){return this.setLimit("min",t,!0,Re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Re.toString(n))}setLimit(t,n,a,u){return new is({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Re.toString(u)}]})}_addCheck(t){return new is({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Re.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}is.create=e=>new is({checks:[],typeName:He.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...$e(e)});class im extends lt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const a=this._getOrReturnCtx(t);return ve(a,{code:ye.invalid_type,expected:Ce.boolean,received:a.parsedType}),Be}return ir(t.data)}}im.create=e=>new im({typeName:He.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class ac extends lt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const s=this._getOrReturnCtx(t);return ve(s,{code:ye.invalid_type,expected:Ce.date,received:s.parsedType}),Be}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return ve(s,{code:ye.invalid_date}),Be}const a=new qn;let u;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(u=this._getOrReturnCtx(t,u),ve(u,{code:ye.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),a.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(u=this._getOrReturnCtx(t,u),ve(u,{code:ye.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),a.dirty()):st.assertNever(s);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ac({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Re.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Re.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ac.create=e=>new ac({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:He.ZodDate,...$e(e)});class Jb extends lt{_parse(t){if(this._getType(t)!==Ce.symbol){const a=this._getOrReturnCtx(t);return ve(a,{code:ye.invalid_type,expected:Ce.symbol,received:a.parsedType}),Be}return ir(t.data)}}Jb.create=e=>new Jb({typeName:He.ZodSymbol,...$e(e)});class lm extends lt{_parse(t){if(this._getType(t)!==Ce.undefined){const a=this._getOrReturnCtx(t);return ve(a,{code:ye.invalid_type,expected:Ce.undefined,received:a.parsedType}),Be}return ir(t.data)}}lm.create=e=>new lm({typeName:He.ZodUndefined,...$e(e)});class um extends lt{_parse(t){if(this._getType(t)!==Ce.null){const a=this._getOrReturnCtx(t);return ve(a,{code:ye.invalid_type,expected:Ce.null,received:a.parsedType}),Be}return ir(t.data)}}um.create=e=>new um({typeName:He.ZodNull,...$e(e)});class ey extends lt{constructor(){super(...arguments),this._any=!0}_parse(t){return ir(t.data)}}ey.create=e=>new ey({typeName:He.ZodAny,...$e(e)});class sm extends lt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ir(t.data)}}sm.create=e=>new sm({typeName:He.ZodUnknown,...$e(e)});class Ua extends lt{_parse(t){const n=this._getOrReturnCtx(t);return ve(n,{code:ye.invalid_type,expected:Ce.never,received:n.parsedType}),Be}}Ua.create=e=>new Ua({typeName:He.ZodNever,...$e(e)});class ty extends lt{_parse(t){if(this._getType(t)!==Ce.undefined){const a=this._getOrReturnCtx(t);return ve(a,{code:ye.invalid_type,expected:Ce.void,received:a.parsedType}),Be}return ir(t.data)}}ty.create=e=>new ty({typeName:He.ZodVoid,...$e(e)});class Sr extends lt{_parse(t){const{ctx:n,status:a}=this._processInputParams(t),u=this._def;if(n.parsedType!==Ce.array)return ve(n,{code:ye.invalid_type,expected:Ce.array,received:n.parsedType}),Be;if(u.exactLength!==null){const o=n.data.length>u.exactLength.value,f=n.data.length<u.exactLength.value;(o||f)&&(ve(n,{code:o?ye.too_big:ye.too_small,minimum:f?u.exactLength.value:void 0,maximum:o?u.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:u.exactLength.message}),a.dirty())}if(u.minLength!==null&&n.data.length<u.minLength.value&&(ve(n,{code:ye.too_small,minimum:u.minLength.value,type:"array",inclusive:!0,exact:!1,message:u.minLength.message}),a.dirty()),u.maxLength!==null&&n.data.length>u.maxLength.value&&(ve(n,{code:ye.too_big,maximum:u.maxLength.value,type:"array",inclusive:!0,exact:!1,message:u.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((o,f)=>u.type._parseAsync(new Ha(n,o,n.path,f)))).then(o=>qn.mergeArray(a,o));const s=[...n.data].map((o,f)=>u.type._parseSync(new Ha(n,o,n.path,f)));return qn.mergeArray(a,s)}get element(){return this._def.type}min(t,n){return new Sr({...this._def,minLength:{value:t,message:Re.toString(n)}})}max(t,n){return new Sr({...this._def,maxLength:{value:t,message:Re.toString(n)}})}length(t,n){return new Sr({...this._def,exactLength:{value:t,message:Re.toString(n)}})}nonempty(t){return this.min(1,t)}}Sr.create=(e,t)=>new Sr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:He.ZodArray,...$e(t)});function xl(e){if(e instanceof $t){const t={};for(const n in e.shape){const a=e.shape[n];t[n]=Wr.create(xl(a))}return new $t({...e._def,shape:()=>t})}else return e instanceof Sr?new Sr({...e._def,type:xl(e.element)}):e instanceof Wr?Wr.create(xl(e.unwrap())):e instanceof Ai?Ai.create(xl(e.unwrap())):e instanceof _i?_i.create(e.items.map(t=>xl(t))):e}class $t extends lt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=st.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ce.object){const d=this._getOrReturnCtx(t);return ve(d,{code:ye.invalid_type,expected:Ce.object,received:d.parsedType}),Be}const{status:a,ctx:u}=this._processInputParams(t),{shape:s,keys:o}=this._getCached(),f=[];if(!(this._def.catchall instanceof Ua&&this._def.unknownKeys==="strip"))for(const d in u.data)o.includes(d)||f.push(d);const h=[];for(const d of o){const b=s[d],g=u.data[d];h.push({key:{status:"valid",value:d},value:b._parse(new Ha(u,g,u.path,d)),alwaysSet:d in u.data})}if(this._def.catchall instanceof Ua){const d=this._def.unknownKeys;if(d==="passthrough")for(const b of f)h.push({key:{status:"valid",value:b},value:{status:"valid",value:u.data[b]}});else if(d==="strict")f.length>0&&(ve(u,{code:ye.unrecognized_keys,keys:f}),a.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const b of f){const g=u.data[b];h.push({key:{status:"valid",value:b},value:d._parse(new Ha(u,g,u.path,b)),alwaysSet:b in u.data})}}return u.common.async?Promise.resolve().then(async()=>{const d=[];for(const b of h){const g=await b.key,E=await b.value;d.push({key:g,value:E,alwaysSet:b.alwaysSet})}return d}).then(d=>qn.mergeObjectSync(a,d)):qn.mergeObjectSync(a,h)}get shape(){return this._def.shape()}strict(t){return Re.errToObj,new $t({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,a)=>{var s,o;const u=((o=(s=this._def).errorMap)==null?void 0:o.call(s,n,a).message)??a.defaultError;return n.code==="unrecognized_keys"?{message:Re.errToObj(t).message??u}:{message:u}}}:{}})}strip(){return new $t({...this._def,unknownKeys:"strip"})}passthrough(){return new $t({...this._def,unknownKeys:"passthrough"})}extend(t){return new $t({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new $t({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:He.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new $t({...this._def,catchall:t})}pick(t){const n={};for(const a of st.objectKeys(t))t[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new $t({...this._def,shape:()=>n})}omit(t){const n={};for(const a of st.objectKeys(this.shape))t[a]||(n[a]=this.shape[a]);return new $t({...this._def,shape:()=>n})}deepPartial(){return xl(this)}partial(t){const n={};for(const a of st.objectKeys(this.shape)){const u=this.shape[a];t&&!t[a]?n[a]=u:n[a]=u.optional()}return new $t({...this._def,shape:()=>n})}required(t){const n={};for(const a of st.objectKeys(this.shape))if(t&&!t[a])n[a]=this.shape[a];else{let s=this.shape[a];for(;s instanceof Wr;)s=s._def.innerType;n[a]=s}return new $t({...this._def,shape:()=>n})}keyof(){return vT(st.objectKeys(this.shape))}}$t.create=(e,t)=>new $t({shape:()=>e,unknownKeys:"strip",catchall:Ua.create(),typeName:He.ZodObject,...$e(t)});$t.strictCreate=(e,t)=>new $t({shape:()=>e,unknownKeys:"strict",catchall:Ua.create(),typeName:He.ZodObject,...$e(t)});$t.lazycreate=(e,t)=>new $t({shape:e,unknownKeys:"strip",catchall:Ua.create(),typeName:He.ZodObject,...$e(t)});class ic extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a=this._def.options;function u(s){for(const f of s)if(f.result.status==="valid")return f.result;for(const f of s)if(f.result.status==="dirty")return n.common.issues.push(...f.ctx.common.issues),f.result;const o=s.map(f=>new Jr(f.ctx.common.issues));return ve(n,{code:ye.invalid_union,unionErrors:o}),Be}if(n.common.async)return Promise.all(a.map(async s=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(u);{let s;const o=[];for(const h of a){const d={...n,common:{...n.common,issues:[]},parent:null},b=h._parseSync({data:n.data,path:n.path,parent:d});if(b.status==="valid")return b;b.status==="dirty"&&!s&&(s={result:b,ctx:d}),d.common.issues.length&&o.push(d.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const f=o.map(h=>new Jr(h));return ve(n,{code:ye.invalid_union,unionErrors:f}),Be}}get options(){return this._def.options}}ic.create=(e,t)=>new ic({options:e,typeName:He.ZodUnion,...$e(t)});const Xr=e=>e instanceof cm?Xr(e.schema):e instanceof Si?Xr(e.innerType()):e instanceof uc?[e.value]:e instanceof vi?e.options:e instanceof fm?st.objectValues(e.enum):e instanceof oc?Xr(e._def.innerType):e instanceof lm?[void 0]:e instanceof um?[null]:e instanceof Wr?[void 0,...Xr(e.unwrap())]:e instanceof Ai?[null,...Xr(e.unwrap())]:e instanceof ST||e instanceof fc?Xr(e.unwrap()):e instanceof cc?Xr(e._def.innerType):[];class qm extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.object)return ve(n,{code:ye.invalid_type,expected:Ce.object,received:n.parsedType}),Be;const a=this.discriminator,u=n.data[a],s=this.optionsMap.get(u);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ve(n,{code:ye.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),Be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,a){const u=new Map;for(const s of n){const o=Xr(s.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const f of o){if(u.has(f))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(f)}`);u.set(f,s)}}return new qm({typeName:He.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:u,...$e(a)})}}function om(e,t){const n=La(e),a=La(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&a===Ce.object){const u=st.objectKeys(t),s=st.objectKeys(e).filter(f=>u.indexOf(f)!==-1),o={...e,...t};for(const f of s){const h=om(e[f],t[f]);if(!h.valid)return{valid:!1};o[f]=h.data}return{valid:!0,data:o}}else if(n===Ce.array&&a===Ce.array){if(e.length!==t.length)return{valid:!1};const u=[];for(let s=0;s<e.length;s++){const o=e[s],f=t[s],h=om(o,f);if(!h.valid)return{valid:!1};u.push(h.data)}return{valid:!0,data:u}}else return n===Ce.date&&a===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class lc extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t),u=(s,o)=>{if(Zb(s)||Zb(o))return Be;const f=om(s.value,o.value);return f.valid?((Kb(s)||Kb(o))&&n.dirty(),{status:n.value,value:f.data}):(ve(a,{code:ye.invalid_intersection_types}),Be)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([s,o])=>u(s,o)):u(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}lc.create=(e,t,n)=>new lc({left:e,right:t,typeName:He.ZodIntersection,...$e(n)});class _i extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Ce.array)return ve(a,{code:ye.invalid_type,expected:Ce.array,received:a.parsedType}),Be;if(a.data.length<this._def.items.length)return ve(a,{code:ye.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Be;!this._def.rest&&a.data.length>this._def.items.length&&(ve(a,{code:ye.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...a.data].map((o,f)=>{const h=this._def.items[f]||this._def.rest;return h?h._parse(new Ha(a,o,a.path,f)):null}).filter(o=>!!o);return a.common.async?Promise.all(s).then(o=>qn.mergeArray(n,o)):qn.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new _i({...this._def,rest:t})}}_i.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _i({items:e,typeName:He.ZodTuple,rest:null,...$e(t)})};class ny extends lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Ce.map)return ve(a,{code:ye.invalid_type,expected:Ce.map,received:a.parsedType}),Be;const u=this._def.keyType,s=this._def.valueType,o=[...a.data.entries()].map(([f,h],d)=>({key:u._parse(new Ha(a,f,a.path,[d,"key"])),value:s._parse(new Ha(a,h,a.path,[d,"value"]))}));if(a.common.async){const f=new Map;return Promise.resolve().then(async()=>{for(const h of o){const d=await h.key,b=await h.value;if(d.status==="aborted"||b.status==="aborted")return Be;(d.status==="dirty"||b.status==="dirty")&&n.dirty(),f.set(d.value,b.value)}return{status:n.value,value:f}})}else{const f=new Map;for(const h of o){const d=h.key,b=h.value;if(d.status==="aborted"||b.status==="aborted")return Be;(d.status==="dirty"||b.status==="dirty")&&n.dirty(),f.set(d.value,b.value)}return{status:n.value,value:f}}}}ny.create=(e,t,n)=>new ny({valueType:t,keyType:e,typeName:He.ZodMap,...$e(n)});class ls extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Ce.set)return ve(a,{code:ye.invalid_type,expected:Ce.set,received:a.parsedType}),Be;const u=this._def;u.minSize!==null&&a.data.size<u.minSize.value&&(ve(a,{code:ye.too_small,minimum:u.minSize.value,type:"set",inclusive:!0,exact:!1,message:u.minSize.message}),n.dirty()),u.maxSize!==null&&a.data.size>u.maxSize.value&&(ve(a,{code:ye.too_big,maximum:u.maxSize.value,type:"set",inclusive:!0,exact:!1,message:u.maxSize.message}),n.dirty());const s=this._def.valueType;function o(h){const d=new Set;for(const b of h){if(b.status==="aborted")return Be;b.status==="dirty"&&n.dirty(),d.add(b.value)}return{status:n.value,value:d}}const f=[...a.data.values()].map((h,d)=>s._parse(new Ha(a,h,a.path,d)));return a.common.async?Promise.all(f).then(h=>o(h)):o(f)}min(t,n){return new ls({...this._def,minSize:{value:t,message:Re.toString(n)}})}max(t,n){return new ls({...this._def,maxSize:{value:t,message:Re.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ls.create=(e,t)=>new ls({valueType:e,minSize:null,maxSize:null,typeName:He.ZodSet,...$e(t)});class cm extends lt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}cm.create=(e,t)=>new cm({getter:e,typeName:He.ZodLazy,...$e(t)});class uc extends lt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ve(n,{received:n.data,code:ye.invalid_literal,expected:this._def.value}),Be}return{status:"valid",value:t.data}}get value(){return this._def.value}}uc.create=(e,t)=>new uc({value:e,typeName:He.ZodLiteral,...$e(t)});function vT(e,t){return new vi({values:e,typeName:He.ZodEnum,...$e(t)})}class vi extends lt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),a=this._def.values;return ve(n,{expected:st.joinValues(a),received:n.parsedType,code:ye.invalid_type}),Be}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),a=this._def.values;return ve(n,{received:n.data,code:ye.invalid_enum_value,options:a}),Be}return ir(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return vi.create(t,{...this._def,...n})}exclude(t,n=this._def){return vi.create(this.options.filter(a=>!t.includes(a)),{...this._def,...n})}}vi.create=vT;class fm extends lt{_parse(t){const n=st.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==Ce.string&&a.parsedType!==Ce.number){const u=st.objectValues(n);return ve(a,{expected:st.joinValues(u),received:a.parsedType,code:ye.invalid_type}),Be}if(this._cache||(this._cache=new Set(st.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const u=st.objectValues(n);return ve(a,{received:a.data,code:ye.invalid_enum_value,options:u}),Be}return ir(t.data)}get enum(){return this._def.values}}fm.create=(e,t)=>new fm({values:e,typeName:He.ZodNativeEnum,...$e(t)});class sc extends lt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return ve(n,{code:ye.invalid_type,expected:Ce.promise,received:n.parsedType}),Be;const a=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return ir(a.then(u=>this._def.type.parseAsync(u,{path:n.path,errorMap:n.common.contextualErrorMap})))}}sc.create=(e,t)=>new sc({type:e,typeName:He.ZodPromise,...$e(t)});class Si extends lt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===He.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:a}=this._processInputParams(t),u=this._def.effect||null,s={addIssue:o=>{ve(a,o),o.fatal?n.abort():n.dirty()},get path(){return a.path}};if(s.addIssue=s.addIssue.bind(s),u.type==="preprocess"){const o=u.transform(a.data,s);if(a.common.async)return Promise.resolve(o).then(async f=>{if(n.value==="aborted")return Be;const h=await this._def.schema._parseAsync({data:f,path:a.path,parent:a});return h.status==="aborted"?Be:h.status==="dirty"||n.value==="dirty"?qu(h.value):h});{if(n.value==="aborted")return Be;const f=this._def.schema._parseSync({data:o,path:a.path,parent:a});return f.status==="aborted"?Be:f.status==="dirty"||n.value==="dirty"?qu(f.value):f}}if(u.type==="refinement"){const o=f=>{const h=u.refinement(f,s);if(a.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(a.common.async===!1){const f=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return f.status==="aborted"?Be:(f.status==="dirty"&&n.dirty(),o(f.value),{status:n.value,value:f.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(f=>f.status==="aborted"?Be:(f.status==="dirty"&&n.dirty(),o(f.value).then(()=>({status:n.value,value:f.value}))))}if(u.type==="transform")if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!wl(o))return Be;const f=u.transform(o.value,s);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:f}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>wl(o)?Promise.resolve(u.transform(o.value,s)).then(f=>({status:n.value,value:f})):Be);st.assertNever(u)}}Si.create=(e,t,n)=>new Si({schema:e,typeName:He.ZodEffects,effect:t,...$e(n)});Si.createWithPreprocess=(e,t,n)=>new Si({schema:t,effect:{type:"preprocess",transform:e},typeName:He.ZodEffects,...$e(n)});class Wr extends lt{_parse(t){return this._getType(t)===Ce.undefined?ir(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Wr.create=(e,t)=>new Wr({innerType:e,typeName:He.ZodOptional,...$e(t)});class Ai extends lt{_parse(t){return this._getType(t)===Ce.null?ir(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ai.create=(e,t)=>new Ai({innerType:e,typeName:He.ZodNullable,...$e(t)});class oc extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);let a=n.data;return n.parsedType===Ce.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}oc.create=(e,t)=>new oc({innerType:e,typeName:He.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class cc extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a={...n,common:{...n.common,issues:[]}},u=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return rc(u)?u.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Jr(a.common.issues)},input:a.data})})):{status:"valid",value:u.status==="valid"?u.value:this._def.catchValue({get error(){return new Jr(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}cc.create=(e,t)=>new cc({innerType:e,typeName:He.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class ry extends lt{_parse(t){if(this._getType(t)!==Ce.nan){const a=this._getOrReturnCtx(t);return ve(a,{code:ye.invalid_type,expected:Ce.nan,received:a.parsedType}),Be}return{status:"valid",value:t.data}}}ry.create=e=>new ry({typeName:He.ZodNaN,...$e(e)});class ST extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ym extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?Be:s.status==="dirty"?(n.dirty(),qu(s.value)):this._def.out._parseAsync({data:s.value,path:a.path,parent:a})})();{const u=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return u.status==="aborted"?Be:u.status==="dirty"?(n.dirty(),{status:"dirty",value:u.value}):this._def.out._parseSync({data:u.value,path:a.path,parent:a})}}static create(t,n){return new Ym({in:t,out:n,typeName:He.ZodPipeline})}}class fc extends lt{_parse(t){const n=this._def.innerType._parse(t),a=u=>(wl(u)&&(u.value=Object.freeze(u.value)),u);return rc(n)?n.then(u=>a(u)):a(n)}unwrap(){return this._def.innerType}}fc.create=(e,t)=>new fc({innerType:e,typeName:He.ZodReadonly,...$e(t)});var He;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(He||(He={}));const Pe=Ba.create,Pa=Rl.create,Vm=im.create,_A=sm.create;Ua.create;const ea=Sr.create,Je=$t.create;ic.create;const vA=qm.create;lc.create;_i.create;const Ho=uc.create,qa=vi.create;sc.create;Wr.create;Ai.create;const Nc=Je({id:Pe().min(1),name:Pe().min(1),relPath:Pe().min(1),contentType:Pe().min(1),size:Pa().int().nonnegative()});Je({text:Pe().min(1).optional(),attachments:ea(Nc).optional()}).refine(e=>{var t,n;return(((t=e.text)==null?void 0:t.length)??0)>0||(((n=e.attachments)==null?void 0:n.length)??0)>0},{message:"a message needs text or at least one attachment"});const SA=qa(["session-created","user-moved-away","session-ended"]);Je({reason:SA,to:Pe().min(1).optional()});const AA="annotation-batch",kA=Je({file:Pe().min(1),line:Pa().int().positive().optional(),column:Pa().int().positive().optional()}),CA=Je({name:Pe().min(1),source:kA.optional()}),$m=Je({selector:Pe().min(1),pageUrl:Pe().min(1),viewport:Je({width:Pa().int().positive(),height:Pa().int().positive()}),label:Pe().optional(),component:CA.optional()}),NA=Je({note:Pe().min(1).optional(),target:$m,screenshot:Nc.optional()}),wA=Je({items:ea(NA).min(1)}),RA=qa(["user","agent","system"]),wc=Je({id:Pe().uuid(),seq:Pa().int().nonnegative(),sessionId:Pe().min(1),ts:Pe().datetime(),type:Pe().min(1),source:RA,payload:_A()}),dc=qa(["listening","away"]),AT=qa(["everyday","spec"]),OA=qa(["active","ended"]),hc=Je({id:Pe().min(1),kind:AT,title:Pe().optional(),status:OA,createdAt:Pe().datetime(),updatedAt:Pe().datetime()}),kT="question-card",LA="decision",CT="artifact",DA=Je({label:Pe().min(1),description:Pe().min(1),recommended:Vm().optional()}),IA=Je({cardId:Pe().uuid(),question:Pe().min(1),options:ea(DA).min(2).max(6),stopHint:Pe().min(1).optional()}),MA=qa(["confirmed","assumed"]),BA=Je({summary:Pe().min(1),status:MA,detail:Pe().min(1).optional()}),NT=qa(["draft","mock","diagram"]),wT=Je({kind:NT,name:Pe().min(1),relPath:Pe().min(1),contentType:Pe().min(1),size:Pa().int().nonnegative()}),zA=Je({artifact:wT}),Rc=Pa().int().nonnegative();Je({kind:AT.optional(),title:Pe().min(1).optional()});Je({text:Pe().min(1).optional(),attachmentIds:ea(Pe().min(1)).optional()}).refine(e=>{var t,n;return(((t=e.text)==null?void 0:t.length)??0)>0||(((n=e.attachmentIds)==null?void 0:n.length)??0)>0},{message:"a message needs text or at least one attachment"});const HA=Je({note:Pe().min(1).optional(),target:$m,screenshotAttachmentId:Pe().min(1).optional()});Je({items:ea(HA).min(1)});Je({to:Pe().min(1).optional()});Je({kind:NT,name:Pe().min(1),content:Pe().min(1)});const UA=Je({attachment:Nc});Je({event:wc});const PA=Je({events:ea(wc),cursor:Rc}),jA=Je({hasMore:Vm(),earliestLoadedSeq:Rc,hint:Pe()});Je({meta:hc,presence:dc,tail:ea(wc),cursor:Rc,fetchMore:jA});const RT=Je({meta:hc,presence:dc}),FA=Je({sessions:ea(RT)}),OT=Je({session:RT});Je({ok:Vm(),sessions:Rc});const vh="chamba-annotate/1",qA=qa(["bug","feature"]);Je({type:qA,text:Pe().min(1),screenshotAttachmentIds:ea(Pe().min(1)).optional()});const YA=Je({id:Pe().min(1),path:Pe().min(1)}),VA=vA("t",[Je({t:Ho("hello"),meta:hc,presence:dc}),Je({t:Ho("append"),event:wc}),Je({t:Ho("presence"),state:dc}),Je({t:Ho("ended"),meta:hc})]);function ay(){const e=new URLSearchParams(window.location.search).get("s");return e&&e.length>0?e:null}async function $A(e,t=0){const n=await fetch(`/api/sessions/${encodeURIComponent(e)}/events?since=${t}`);if(!n.ok)throw new Error(await kr(n,"could not load history"));return PA.parse(await n.json())}async function GA(e){const t=await fetch(`/api/sessions/${encodeURIComponent(e)}`);if(!t.ok)throw new Error(await kr(t,"could not load session"));return OT.parse(await t.json()).session}async function Gm(){const e=await fetch("/api/sessions");if(!e.ok)throw new Error(await kr(e,"could not list sessions"));return FA.parse(await e.json()).sessions}async function QA(e,t){const n=await fetch(`/api/sessions/${encodeURIComponent(e)}/messages`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await kr(n,"could not send message"))}async function XA(e,t){const n=await fetch(`/api/sessions/${encodeURIComponent(e)}/annotations`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await kr(n,"could not send annotations"))}function dm(){return`${window.location.origin}/inject/annotate.js`}async function Qm(e,t){const n=new FormData;n.append("file",t,t.name);const a=await fetch(`/api/sessions/${encodeURIComponent(e)}/attachments`,{method:"POST",body:n});if(!a.ok)throw new Error(await kr(a,"could not upload file"));return UA.parse(await a.json()).attachment}async function ZA(e,t){const n=await fetch(`/api/sessions/${encodeURIComponent(e)}/issues`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await kr(n,"could not file issue"));return YA.parse(await n.json())}async function LT(e,t){const n=await fetch(`/api/sessions/${encodeURIComponent(e)}/move-away`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({to:t})});if(!n.ok)throw new Error(await kr(n,"could not hand off"))}async function KA(e){const t=await fetch(`/api/sessions/${encodeURIComponent(e)}/end`,{method:"POST"});if(!t.ok)throw new Error(await kr(t,"could not end session"));return OT.parse(await t.json()).session}function DT(e,t){return`/api/sessions/${encodeURIComponent(e)}/attachments/${encodeURIComponent(t)}`}function IT(e,t){return`/api/sessions/${encodeURIComponent(e)}/artifacts/${encodeURIComponent(t)}`}function WA(e,t){return`${IT(e,t)}?raw=1`}async function JA(e,t){const n=await fetch(WA(e,t));if(!n.ok)throw new Error(await kr(n,"could not load artifact"));return n.text()}function ek(e){return`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/ws?s=${encodeURIComponent(e)}`}async function kr(e,t){try{const n=await e.json();if(typeof n.error=="string")return n.error}catch{}return`${t} (${e.status})`}function tk({onOpen:e}){const[t,n]=S.useState(null),[a,u]=S.useState(null);return S.useEffect(()=>{Gm().then(n).catch(s=>u(s.message))},[]),_.jsxs("main",{className:"mx-auto flex h-full w-full max-w-lg flex-col gap-4 p-8",children:[_.jsxs("div",{className:"space-y-1 pt-4 text-center",children:[_.jsx("h1",{className:"font-semibold text-xl",children:"chamba"}),_.jsxs("p",{className:"text-muted-foreground text-sm",children:["Start a session from your terminal with ",_.jsx("code",{children:"chamba open"}),", or reopen one below."]})]}),_.jsx("div",{className:"min-h-0 flex-1 overflow-auto rounded-lg border",children:a?_.jsx("div",{className:"p-4 text-destructive text-sm",children:a}):t===null?_.jsx("div",{className:"p-4 text-muted-foreground text-sm",children:"Loading sessions…"}):t.length===0?_.jsxs("div",{className:"p-4 text-muted-foreground text-sm",children:["No sessions yet. Run ",_.jsx("code",{children:"chamba open"})," in your terminal."]}):_.jsx("ul",{className:"divide-y",children:t.map(({meta:s,presence:o})=>_.jsx("li",{children:_.jsxs("button",{type:"button",onClick:()=>e(s.id),className:"flex w-full flex-col items-start gap-0.5 px-4 py-3 text-left hover:bg-accent hover:text-accent-foreground",children:[_.jsx("span",{className:"w-full truncate font-medium text-sm",children:s.title??s.id}),_.jsxs("span",{className:"text-muted-foreground text-xs",children:[s.kind,s.status==="ended"?" · read-only":` · agent ${o}`]})]})},s.id))})})]})}/**
50
- * @license lucide-react v1.23.0 - ISC
51
- *
52
- * This source code is licensed under the ISC license.
53
- * See the LICENSE file in the root directory of this source tree.
54
- */const MT=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();/**
55
- * @license lucide-react v1.23.0 - ISC
56
- *
57
- * This source code is licensed under the ISC license.
58
- * See the LICENSE file in the root directory of this source tree.
59
- */const nk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
60
- * @license lucide-react v1.23.0 - ISC
61
- *
62
- * This source code is licensed under the ISC license.
63
- * See the LICENSE file in the root directory of this source tree.
64
- */const rk=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase());/**
65
- * @license lucide-react v1.23.0 - ISC
66
- *
67
- * This source code is licensed under the ISC license.
68
- * See the LICENSE file in the root directory of this source tree.
69
- */const iy=e=>{const t=rk(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
70
- * @license lucide-react v1.23.0 - ISC
71
- *
72
- * This source code is licensed under the ISC license.
73
- * See the LICENSE file in the root directory of this source tree.
74
- */var Sh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
75
- * @license lucide-react v1.23.0 - ISC
76
- *
77
- * This source code is licensed under the ISC license.
78
- * See the LICENSE file in the root directory of this source tree.
79
- */const ak=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},ik=S.createContext({}),lk=()=>S.useContext(ik),uk=S.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:a,className:u="",children:s,iconNode:o,...f},h)=>{const{size:d=24,strokeWidth:b=2,absoluteStrokeWidth:g=!1,color:E="currentColor",className:T=""}=lk()??{},v=a??g?Number(n??b)*24/Number(t??d):n??b;return S.createElement("svg",{ref:h,...Sh,width:t??d??Sh.width,height:t??d??Sh.height,stroke:e??E,strokeWidth:v,className:MT("lucide",T,u),...!s&&!ak(f)&&{"aria-hidden":"true"},...f},[...o.map(([N,R])=>S.createElement(N,R)),...Array.isArray(s)?s:[s]])});/**
80
- * @license lucide-react v1.23.0 - ISC
81
- *
82
- * This source code is licensed under the ISC license.
83
- * See the LICENSE file in the root directory of this source tree.
84
- */const Qt=(e,t)=>{const n=S.forwardRef(({className:a,...u},s)=>S.createElement(uk,{ref:s,iconNode:t,className:MT(`lucide-${nk(iy(e))}`,`lucide-${e}`,a),...u}));return n.displayName=iy(e),n};/**
85
- * @license lucide-react v1.23.0 - ISC
86
- *
87
- * This source code is licensed under the ISC license.
88
- * See the LICENSE file in the root directory of this source tree.
89
- */const sk=[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]],ok=Qt("app-window",sk);/**
90
- * @license lucide-react v1.23.0 - ISC
91
- *
92
- * This source code is licensed under the ISC license.
93
- * See the LICENSE file in the root directory of this source tree.
94
- */const ck=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],fk=Qt("arrow-down",ck);/**
95
- * @license lucide-react v1.23.0 - ISC
96
- *
97
- * This source code is licensed under the ISC license.
98
- * See the LICENSE file in the root directory of this source tree.
99
- */const dk=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],hk=Qt("bug",dk);/**
100
- * @license lucide-react v1.23.0 - ISC
101
- *
102
- * This source code is licensed under the ISC license.
103
- * See the LICENSE file in the root directory of this source tree.
104
- */const mk=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Oc=Qt("check",mk);/**
105
- * @license lucide-react v1.23.0 - ISC
106
- *
107
- * This source code is licensed under the ISC license.
108
- * See the LICENSE file in the root directory of this source tree.
109
- */const pk=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],gk=Qt("chevrons-up-down",pk);/**
110
- * @license lucide-react v1.23.0 - ISC
111
- *
112
- * This source code is licensed under the ISC license.
113
- * See the LICENSE file in the root directory of this source tree.
114
- */const bk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],yk=Qt("circle-check",bk);/**
115
- * @license lucide-react v1.23.0 - ISC
116
- *
117
- * This source code is licensed under the ISC license.
118
- * See the LICENSE file in the root directory of this source tree.
119
- */const Ek=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Tk=Qt("circle-question-mark",Ek);/**
120
- * @license lucide-react v1.23.0 - ISC
121
- *
122
- * This source code is licensed under the ISC license.
123
- * See the LICENSE file in the root directory of this source tree.
124
- */const xk=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],_k=Qt("columns-2",xk);/**
125
- * @license lucide-react v1.23.0 - ISC
126
- *
127
- * This source code is licensed under the ISC license.
128
- * See the LICENSE file in the root directory of this source tree.
129
- */const vk=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Xm=Qt("copy",vk);/**
130
- * @license lucide-react v1.23.0 - ISC
131
- *
132
- * This source code is licensed under the ISC license.
133
- * See the LICENSE file in the root directory of this source tree.
134
- */const Sk=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Ak=Qt("grip-vertical",Sk);/**
135
- * @license lucide-react v1.23.0 - ISC
136
- *
137
- * This source code is licensed under the ISC license.
138
- * See the LICENSE file in the root directory of this source tree.
139
- */const kk=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],Ck=Qt("lightbulb",kk);/**
140
- * @license lucide-react v1.23.0 - ISC
141
- *
142
- * This source code is licensed under the ISC license.
143
- * See the LICENSE file in the root directory of this source tree.
144
- */const Nk=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],wk=Qt("message-square",Nk);/**
145
- * @license lucide-react v1.23.0 - ISC
146
- *
147
- * This source code is licensed under the ISC license.
148
- * See the LICENSE file in the root directory of this source tree.
149
- */const Rk=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],Ok=Qt("messages-square",Rk);/**
150
- * @license lucide-react v1.23.0 - ISC
151
- *
152
- * This source code is licensed under the ISC license.
153
- * See the LICENSE file in the root directory of this source tree.
154
- */const Lk=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],Lc=Qt("mic",Lk);/**
155
- * @license lucide-react v1.23.0 - ISC
156
- *
157
- * This source code is licensed under the ISC license.
158
- * See the LICENSE file in the root directory of this source tree.
159
- */const Dk=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],Ik=Qt("mouse-pointer-click",Dk);/**
160
- * @license lucide-react v1.23.0 - ISC
161
- *
162
- * This source code is licensed under the ISC license.
163
- * See the LICENSE file in the root directory of this source tree.
164
- */const Mk=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],BT=Qt("paperclip",Mk);/**
165
- * @license lucide-react v1.23.0 - ISC
166
- *
167
- * This source code is licensed under the ISC license.
168
- * See the LICENSE file in the root directory of this source tree.
169
- */const Bk=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],zk=Qt("rotate-cw",Bk);/**
170
- * @license lucide-react v1.23.0 - ISC
171
- *
172
- * This source code is licensed under the ISC license.
173
- * See the LICENSE file in the root directory of this source tree.
174
- */const Hk=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]],Uk=Qt("scan",Hk);/**
175
- * @license lucide-react v1.23.0 - ISC
176
- *
177
- * This source code is licensed under the ISC license.
178
- * See the LICENSE file in the root directory of this source tree.
179
- */const Pk=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Zm=Qt("send",Pk);/**
180
- * @license lucide-react v1.23.0 - ISC
181
- *
182
- * This source code is licensed under the ISC license.
183
- * See the LICENSE file in the root directory of this source tree.
184
- */const jk=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],mc=Qt("x",jk);function zT(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var u=e.length;for(t=0;t<u;t++)e[t]&&(n=zT(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function Dc(){for(var e,t,n=0,a="",u=arguments.length;n<u;n++)(e=arguments[n])&&(t=zT(e))&&(a&&(a+=" "),a+=t);return a}const Fk=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},qk=(e,t)=>({classGroupId:e,validator:t}),HT=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),pc="-",ly=[],Yk="arbitrary..",Vk=e=>{const t=Gk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return $k(o);const f=o.split(pc),h=f[0]===""&&f.length>1?1:0;return UT(f,h,t)},getConflictingClassGroupIds:(o,f)=>{if(f){const h=a[o],d=n[o];return h?d?Fk(d,h):h:d||ly}return n[o]||ly}}},UT=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const u=e[t],s=n.nextPart.get(u);if(s){const d=UT(e,t+1,s);if(d)return d}const o=n.validators;if(o===null)return;const f=t===0?e.join(pc):e.slice(t).join(pc),h=o.length;for(let d=0;d<h;d++){const b=o[d];if(b.validator(f))return b.classGroupId}},$k=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?Yk+a:void 0})(),Gk=e=>{const{theme:t,classGroups:n}=e;return Qk(n,t)},Qk=(e,t)=>{const n=HT();for(const a in e){const u=e[a];Km(u,n,a,t)}return n},Km=(e,t,n,a)=>{const u=e.length;for(let s=0;s<u;s++){const o=e[s];Xk(o,t,n,a)}},Xk=(e,t,n,a)=>{if(typeof e=="string"){Zk(e,t,n);return}if(typeof e=="function"){Kk(e,t,n,a);return}Wk(e,t,n,a)},Zk=(e,t,n)=>{const a=e===""?t:PT(t,e);a.classGroupId=n},Kk=(e,t,n,a)=>{if(Jk(e)){Km(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(qk(n,e))},Wk=(e,t,n,a)=>{const u=Object.entries(e),s=u.length;for(let o=0;o<s;o++){const[f,h]=u[o];Km(h,PT(t,f),n,a)}},PT=(e,t)=>{let n=e;const a=t.split(pc),u=a.length;for(let s=0;s<u;s++){const o=a[s];let f=n.nextPart.get(o);f||(f=HT(),n.nextPart.set(o,f)),n=f}return n},Jk=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,eC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const u=(s,o)=>{n[s]=o,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(s){let o=n[s];if(o!==void 0)return o;if((o=a[s])!==void 0)return u(s,o),o},set(s,o){s in n?n[s]=o:u(s,o)}}},hm="!",uy=":",tC=[],sy=(e,t,n,a,u)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:u}),nC=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=u=>{const s=[];let o=0,f=0,h=0,d;const b=u.length;for(let N=0;N<b;N++){const R=u[N];if(o===0&&f===0){if(R===uy){s.push(u.slice(h,N)),h=N+1;continue}if(R==="/"){d=N;continue}}R==="["?o++:R==="]"?o--:R==="("?f++:R===")"&&f--}const g=s.length===0?u:u.slice(h);let E=g,T=!1;g.endsWith(hm)?(E=g.slice(0,-1),T=!0):g.startsWith(hm)&&(E=g.slice(1),T=!0);const v=d&&d>h?d-h:void 0;return sy(s,T,E,v)};if(t){const u=t+uy,s=a;a=o=>o.startsWith(u)?s(o.slice(u.length)):sy(tC,!1,o,void 0,!0)}if(n){const u=a;a=s=>n({className:s,parseClassName:u})}return a},rC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let u=[];for(let s=0;s<n.length;s++){const o=n[s],f=o[0]==="[",h=t.has(o);f||h?(u.length>0&&(u.sort(),a.push(...u),u=[]),a.push(o)):u.push(o)}return u.length>0&&(u.sort(),a.push(...u)),a}},aC=e=>({cache:eC(e.cacheSize),parseClassName:nC(e),sortModifiers:rC(e),postfixLookupClassGroupIds:iC(e),...Vk(e)}),iC=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let a=0;a<n.length;a++)t[n[a]]=!0;return t},lC=/\s+/,uC=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:u,sortModifiers:s,postfixLookupClassGroupIds:o}=t,f=[],h=e.trim().split(lC);let d="";for(let b=h.length-1;b>=0;b-=1){const g=h[b],{isExternal:E,modifiers:T,hasImportantModifier:v,baseClassName:N,maybePostfixModifierPosition:R}=n(g);if(E){d=g+(d.length>0?" "+d:d);continue}let O=!!R,B;if(O){const V=N.substring(0,R);B=a(V);const G=B&&o[B]?a(N):void 0;G&&G!==B&&(B=G,O=!1)}else B=a(N);if(!B){if(!O){d=g+(d.length>0?" "+d:d);continue}if(B=a(N),!B){d=g+(d.length>0?" "+d:d);continue}O=!1}const U=T.length===0?"":T.length===1?T[0]:s(T).join(":"),D=v?U+hm:U,F=D+B;if(f.indexOf(F)>-1)continue;f.push(F);const z=u(B,O);for(let V=0;V<z.length;++V){const G=z[V];f.push(D+G)}d=g+(d.length>0?" "+d:d)}return d},sC=(...e)=>{let t=0,n,a,u="";for(;t<e.length;)(n=e[t++])&&(a=jT(n))&&(u&&(u+=" "),u+=a);return u},jT=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=jT(e[a]))&&(n&&(n+=" "),n+=t);return n},oC=(e,...t)=>{let n,a,u,s;const o=h=>{const d=t.reduce((b,g)=>g(b),e());return n=aC(d),a=n.cache.get,u=n.cache.set,s=f,f(h)},f=h=>{const d=a(h);if(d)return d;const b=uC(h,n);return u(h,b),b};return s=o,(...h)=>s(sC(...h))},cC=[],Kt=e=>{const t=n=>n[e]||cC;return t.isThemeGetter=!0,t},FT=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qT=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,dC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,mC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Na=e=>fC.test(e),Ve=e=>!!e&&!Number.isNaN(Number(e)),Tr=e=>!!e&&Number.isInteger(Number(e)),Ah=e=>e.endsWith("%")&&Ve(e.slice(0,-1)),Qr=e=>dC.test(e),YT=()=>!0,bC=e=>hC.test(e)&&!mC.test(e),Wm=()=>!1,yC=e=>pC.test(e),EC=e=>gC.test(e),TC=e=>!Se(e)&&!Ae(e),xC=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),_C=e=>Ya(e,GT,Wm),Se=e=>FT.test(e),fi=e=>Ya(e,QT,bC),oy=e=>Ya(e,RC,Ve),vC=e=>Ya(e,ZT,YT),SC=e=>Ya(e,XT,Wm),cy=e=>Ya(e,VT,Wm),AC=e=>Ya(e,$T,EC),Uo=e=>Ya(e,KT,yC),Ae=e=>qT.test(e),Iu=e=>Ri(e,QT),kC=e=>Ri(e,XT),fy=e=>Ri(e,VT),CC=e=>Ri(e,GT),NC=e=>Ri(e,$T),Po=e=>Ri(e,KT,!0),wC=e=>Ri(e,ZT,!0),Ya=(e,t,n)=>{const a=FT.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Ri=(e,t,n=!1)=>{const a=qT.exec(e);return a?a[1]?t(a[1]):n:!1},VT=e=>e==="position"||e==="percentage",$T=e=>e==="image"||e==="url",GT=e=>e==="length"||e==="size"||e==="bg-size",QT=e=>e==="length",RC=e=>e==="number",XT=e=>e==="family-name",ZT=e=>e==="number"||e==="weight",KT=e=>e==="shadow",OC=()=>{const e=Kt("color"),t=Kt("font"),n=Kt("text"),a=Kt("font-weight"),u=Kt("tracking"),s=Kt("leading"),o=Kt("breakpoint"),f=Kt("container"),h=Kt("spacing"),d=Kt("radius"),b=Kt("shadow"),g=Kt("inset-shadow"),E=Kt("text-shadow"),T=Kt("drop-shadow"),v=Kt("blur"),N=Kt("perspective"),R=Kt("aspect"),O=Kt("ease"),B=Kt("animate"),U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...D(),Ae,Se],z=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],G=()=>[Ae,Se,h],be=()=>[Na,"full","auto",...G()],q=()=>[Tr,"none","subgrid",Ae,Se],ce=()=>["auto",{span:["full",Tr,Ae,Se]},Tr,Ae,Se],oe=()=>[Tr,"auto",Ae,Se],we=()=>["auto","min","max","fr",Ae,Se],pe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...G()],te=()=>[Na,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],fe=()=>[Na,"screen","full","dvw","lvw","svw","min","max","fit",...G()],xe=()=>[Na,"screen","full","lh","dvh","lvh","svh","min","max","fit",...G()],C=()=>[e,Ae,Se],M=()=>[...D(),fy,cy,{position:[Ae,Se]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",CC,_C,{size:[Ae,Se]}],ne=()=>[Ah,Iu,fi],ue=()=>["","none","full",d,Ae,Se],ie=()=>["",Ve,Iu,fi],he=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Te=()=>[Ve,Ah,fy,cy],Ye=()=>["","none",v,Ae,Se],xt=()=>["none",Ve,Ae,Se],wt=()=>["none",Ve,Ae,Se],rt=()=>[Ve,Ae,Se],ht=()=>[Na,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qr],breakpoint:[Qr],color:[YT],container:[Qr],"drop-shadow":[Qr],ease:["in","out","in-out"],font:[TC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qr],shadow:[Qr],spacing:["px",Ve],text:[Qr],"text-shadow":[Qr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Na,Se,Ae,R]}],container:["container"],"container-type":[{"@container":["","normal","size",Ae,Se]}],"container-named":[xC],columns:[{columns:[Ve,Se,Ae,f]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:be()}],"inset-x":[{"inset-x":be()}],"inset-y":[{"inset-y":be()}],start:[{"inset-s":be(),start:be()}],end:[{"inset-e":be(),end:be()}],"inset-bs":[{"inset-bs":be()}],"inset-be":[{"inset-be":be()}],top:[{top:be()}],right:[{right:be()}],bottom:[{bottom:be()}],left:[{left:be()}],visibility:["visible","invisible","collapse"],z:[{z:[Tr,"auto",Ae,Se]}],basis:[{basis:[Na,"full","auto",f,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ve,Na,"auto","initial","none",Se]}],grow:[{grow:["",Ve,Ae,Se]}],shrink:[{shrink:["",Ve,Ae,Se]}],order:[{order:[Tr,"first","last","none",Ae,Se]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:ce()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:ce()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":we()}],"auto-rows":[{"auto-rows":we()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...pe(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...pe()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":pe()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:G()}],px:[{px:G()}],py:[{py:G()}],ps:[{ps:G()}],pe:[{pe:G()}],pbs:[{pbs:G()}],pbe:[{pbe:G()}],pt:[{pt:G()}],pr:[{pr:G()}],pb:[{pb:G()}],pl:[{pl:G()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],"inline-size":[{inline:["auto",...fe()]}],"min-inline-size":[{"min-inline":["auto",...fe()]}],"max-inline-size":[{"max-inline":["none",...fe()]}],"block-size":[{block:["auto",...xe()]}],"min-block-size":[{"min-block":["auto",...xe()]}],"max-block-size":[{"max-block":["none",...xe()]}],w:[{w:[f,"screen",...te()]}],"min-w":[{"min-w":[f,"screen","none",...te()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[o]},...te()]}],h:[{h:["screen","lh",...te()]}],"min-h":[{"min-h":["screen","lh","none",...te()]}],"max-h":[{"max-h":["screen","lh",...te()]}],"font-size":[{text:["base",n,Iu,fi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,wC,vC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ah,Se]}],"font-family":[{font:[kC,SC,t]}],"font-features":[{"font-features":[Se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,Ae,Se]}],"line-clamp":[{"line-clamp":[Ve,"none",Ae,oy]}],leading:[{leading:[s,...G()]}],"list-image":[{"list-image":["none",Ae,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ae,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ve,"from-font","auto",Ae,fi]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[Ve,"auto",Ae,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"tab-size":[{tab:[Tr,Ae,Se]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ae,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tr,Ae,Se],radial:["",Ae,Se],conic:[Tr,Ae,Se]},NC,AC]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-bs":[{"border-bs":C()}],"border-color-be":[{"border-be":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ve,Ae,Se]}],"outline-w":[{outline:["",Ve,Iu,fi]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",b,Po,Uo]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",g,Po,Uo]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[Ve,fi]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",E,Po,Uo]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[Ve,Ae,Se]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":Te()}],"mask-image-linear-to-pos":[{"mask-linear-to":Te()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":Te()}],"mask-image-t-to-pos":[{"mask-t-to":Te()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":Te()}],"mask-image-r-to-pos":[{"mask-r-to":Te()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":Te()}],"mask-image-b-to-pos":[{"mask-b-to":Te()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":Te()}],"mask-image-l-to-pos":[{"mask-l-to":Te()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":Te()}],"mask-image-x-to-pos":[{"mask-x-to":Te()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":Te()}],"mask-image-y-to-pos":[{"mask-y-to":Te()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Ae,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":Te()}],"mask-image-radial-to-pos":[{"mask-radial-to":Te()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[Ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":Te()}],"mask-image-conic-to-pos":[{"mask-conic-to":Te()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:k()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ae,Se]}],filter:[{filter:["","none",Ae,Se]}],blur:[{blur:Ye()}],brightness:[{brightness:[Ve,Ae,Se]}],contrast:[{contrast:[Ve,Ae,Se]}],"drop-shadow":[{"drop-shadow":["","none",T,Po,Uo]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",Ve,Ae,Se]}],"hue-rotate":[{"hue-rotate":[Ve,Ae,Se]}],invert:[{invert:["",Ve,Ae,Se]}],saturate:[{saturate:[Ve,Ae,Se]}],sepia:[{sepia:["",Ve,Ae,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Ae,Se]}],"backdrop-blur":[{"backdrop-blur":Ye()}],"backdrop-brightness":[{"backdrop-brightness":[Ve,Ae,Se]}],"backdrop-contrast":[{"backdrop-contrast":[Ve,Ae,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ve,Ae,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ve,Ae,Se]}],"backdrop-invert":[{"backdrop-invert":["",Ve,Ae,Se]}],"backdrop-opacity":[{"backdrop-opacity":[Ve,Ae,Se]}],"backdrop-saturate":[{"backdrop-saturate":[Ve,Ae,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",Ve,Ae,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":G()}],"border-spacing-x":[{"border-spacing-x":G()}],"border-spacing-y":[{"border-spacing-y":G()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ae,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ve,"initial",Ae,Se]}],ease:[{ease:["linear","initial",O,Ae,Se]}],delay:[{delay:[Ve,Ae,Se]}],animate:[{animate:["none",B,Ae,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,Ae,Se]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:xt()}],"rotate-x":[{"rotate-x":xt()}],"rotate-y":[{"rotate-y":xt()}],"rotate-z":[{"rotate-z":xt()}],scale:[{scale:wt()}],"scale-x":[{"scale-x":wt()}],"scale-y":[{"scale-y":wt()}],"scale-z":[{"scale-z":wt()}],"scale-3d":["scale-3d"],skew:[{skew:rt()}],"skew-x":[{"skew-x":rt()}],"skew-y":[{"skew-y":rt()}],transform:[{transform:[Ae,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ht()}],"translate-x":[{"translate-x":ht()}],"translate-y":[{"translate-y":ht()}],"translate-z":[{"translate-z":ht()}],"translate-none":["translate-none"],zoom:[{zoom:[Tr,Ae,Se]}],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ae,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":C()}],"scrollbar-track-color":[{"scrollbar-track":C()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mbs":[{"scroll-mbs":G()}],"scroll-mbe":[{"scroll-mbe":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pbs":[{"scroll-pbs":G()}],"scroll-pbe":[{"scroll-pbe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ae,Se]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[Ve,Iu,fi,oy]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Jm=oC(OC);function Gt(...e){return Jm(Dc(e))}function LC(e,t){const[n,a]=S.useState("connecting"),u=S.useRef(t);return u.current=t,S.useEffect(()=>{if(!e)return;let s=!1,o=null,f,h=0;const d=()=>{if(s)return;a("connecting");const b=new WebSocket(ek(e));o=b,b.onopen=()=>{h=0,a("open")},b.onmessage=g=>{const E=VA.safeParse(DC(g.data));E.success&&u.current(E.data)},b.onerror=()=>b.close(),b.onclose=()=>{s||(a("closed"),h+=1,f=setTimeout(d,Math.min(1e3*2**(h-1),1e4)))}};return d(),()=>{s=!0,f&&clearTimeout(f),o==null||o.close()}},[e]),n}function DC(e){if(typeof e!="string")return null;try{return JSON.parse(e)}catch{return null}}function IC(e){const[t,n]=S.useState([]),[a,u]=S.useState(null),[s,o]=S.useState("away"),[f,h]=S.useState(null),d=S.useCallback(v=>{n(N=>MC(N,v))},[]),b=S.useCallback(v=>{$A(v).then(N=>d(N.events)).catch(N=>h(N.message))},[d]),g=S.useCallback(v=>{switch(v.t){case"hello":u(v.meta),o(v.presence),b(e);break;case"append":d([v.event]);break;case"presence":o(v.state);break;case"ended":u(v.meta);break}},[e,d,b]),E=LC(e,g);S.useEffect(()=>{GA(e).then(v=>{u(v.meta),o(v.presence)}).catch(()=>{}),b(e)},[e,b]);const T=S.useCallback(v=>QA(e,v),[e]);return{events:t,meta:a,presence:s,status:E,loadError:f,ended:(a==null?void 0:a.status)==="ended",send:T}}function MC(e,t){if(t.length===0)return e;const n=new Map(e.map(u=>[u.seq,u]));let a=!1;for(const u of t)n.has(u.seq)||(n.set(u.seq,u),a=!0);return a?[...n.values()].sort((u,s)=>u.seq-s.seq):e}function Ic(e){const[t,n]=S.useState(!1),a=S.useRef(null),u=S.useRef(e);u.current=e;const s=BC(),o=s!==null;S.useEffect(()=>()=>{var h;return(h=a.current)==null?void 0:h.stop()},[]);const f=S.useCallback(()=>{if(!s)return;if(a.current){a.current.stop();return}const h=new s;h.lang=navigator.language,h.interimResults=!1,h.continuous=!0,h.onresult=b=>{var E;let g="";for(let T=b.resultIndex;T<b.results.length;T++){const v=b.results[T];v!=null&&v.isFinal&&(g+=((E=v[0])==null?void 0:E.transcript)??"")}g&&u.current(g)};const d=()=>{a.current=null,n(!1)};h.onerror=d,h.onend=d,a.current=h,h.start(),n(!0)},[s]);return{supported:o,listening:t,toggle:f}}function BC(){const e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}function WT({target:e}){var n;const t=(n=e.component)==null?void 0:n.source;return _.jsxs("div",{className:"flex flex-wrap gap-1 text-[11px]",children:[e.component?_.jsxs(kh,{accent:!0,title:"React component",children:[e.component.name,t?` ${zC(t.file)}${t.line?`:${t.line}`:""}`:""]}):null,_.jsx(kh,{title:e.selector,children:HC(e.selector,44)}),_.jsxs(kh,{title:"viewport",children:[e.viewport.width,"×",e.viewport.height]})]})}function kh({children:e,title:t,accent:n}){return _.jsx("span",{title:t,className:n?"rounded-full border border-sky-500/40 bg-sky-500/10 px-2 py-0.5 font-medium text-sky-700 dark:text-sky-300":"rounded-full border bg-muted px-2 py-0.5 text-muted-foreground",children:e})}function zC(e){const t=e.split(/[\\/]/);return t[t.length-1]||e}function HC(e,t){return e.length>t?`…${e.slice(e.length-t+1)}`:e}function dy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function UC(...e){return t=>{let n=!1;const a=e.map(u=>{const s=dy(u,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let u=0;u<a.length;u++){const s=a[u];typeof s=="function"?s():dy(e[u],null)}}}}function PC(...e){return S.useCallback(UC(...e),e)}function jC(e){const t=S.forwardRef((n,a)=>{let{children:u,...s}=n,o=null,f=!1;const h=[];hy(u)&&typeof jo=="function"&&(u=jo(u._payload)),S.Children.forEach(u,E=>{var T;if(GC(E)){f=!0;const v=E;let N="child"in v.props?v.props.child:v.props.children;hy(N)&&typeof jo=="function"&&(N=jo(N._payload)),o=YC(v,N),h.push((T=o==null?void 0:o.props)==null?void 0:T.children)}else h.push(E)}),o?o=S.cloneElement(o,void 0,h):!f&&S.Children.count(u)===1&&S.isValidElement(u)&&(o=u);const d=o?$C(o):void 0,b=PC(a,d);if(!o){if(u||u===0)throw new Error(f?KC(e):ZC(e));return u}const g=VC(s,o.props??{});return o.type!==S.Fragment&&(g.ref=a?b:d),S.cloneElement(o,g)});return t.displayName=`${e}.Slot`,t}var FC=jC("Slot"),qC=Symbol.for("radix.slottable"),YC=(e,t)=>{if("child"in e.props){const n=e.props.child;return S.isValidElement(n)?S.cloneElement(n,void 0,e.props.children(n.props.children)):null}return S.isValidElement(t)?t:null};function VC(e,t){const n={...t};for(const a in t){const u=e[a],s=t[a];/^on[A-Z]/.test(a)?u&&s?n[a]=(...f)=>{const h=s(...f);return u(...f),h}:u&&(n[a]=u):a==="style"?n[a]={...u,...s}:a==="className"&&(n[a]=[u,s].filter(Boolean).join(" "))}return{...e,...n}}function $C(e){var a,u;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(u=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:u.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function GC(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qC}var QC=Symbol.for("react.lazy");function hy(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===QC&&"_payload"in e&&XC(e._payload)}function XC(e){return typeof e=="object"&&e!==null&&"then"in e}var ZC=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,KC=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,jo=ET[" use ".trim().toString()];const my=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,py=Dc,WC=(e,t)=>n=>{var a;if((t==null?void 0:t.variants)==null)return py(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:u,defaultVariants:s}=t,o=Object.keys(u).map(d=>{const b=n==null?void 0:n[d],g=s==null?void 0:s[d];if(b===null)return null;const E=my(b)||my(g);return u[d][E]}),f=n&&Object.entries(n).reduce((d,b)=>{let[g,E]=b;return E===void 0||(d[g]=E),d},{}),h=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((d,b)=>{let{class:g,className:E,...T}=b;return Object.entries(T).every(v=>{let[N,R]=v;return Array.isArray(R)?R.includes({...s,...f}[N]):{...s,...f}[N]===R})?[...d,g,E]:d},[]);return py(e,o,h,n==null?void 0:n.class,n==null?void 0:n.className)},JC=WC("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9","icon-sm":"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}}),At=S.forwardRef(({className:e,variant:t,size:n,asChild:a=!1,...u},s)=>{const o=a?FC:"button";return _.jsx(o,{className:Gt(JC({variant:t,size:n,className:e})),ref:s,...u})});At.displayName="Button";function e6({queue:e,disabled:t,sending:n,error:a,onNoteChange:u,onDiscard:s,onDiscardAll:o,onSend:f}){return e.length===0?null:_.jsxs("div",{className:"border-t bg-muted/40",children:[a?_.jsx("div",{className:"px-3 pt-2 text-destructive text-xs",children:a}):null,_.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5",children:[_.jsxs("span",{className:"font-medium text-muted-foreground text-xs",children:[e.length," annotation",e.length===1?"":"s"," queued"]}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("button",{type:"button",onClick:o,disabled:n,className:"text-muted-foreground text-xs hover:text-foreground disabled:opacity-50",children:"Discard all"}),_.jsxs(At,{type:"button",size:"sm",disabled:t||n,onClick:f,children:[_.jsx(Zm,{}),n?"Sending…":`Send ${e.length}`]})]})]}),_.jsx("div",{className:"max-h-56 space-y-2 overflow-y-auto px-3 pb-2",children:e.map(h=>_.jsx(t6,{item:h,disabled:n,onNoteChange:u,onDiscard:s},h.id))})]})}function t6({item:e,disabled:t,onNoteChange:n,onDiscard:a}){const u=Ic(s=>n(e.id,e.note?`${e.note} ${s}`:s));return _.jsxs("div",{className:"chamba-fly-in flex gap-2 rounded-lg border bg-card p-2 shadow-sm",children:[e.previewUrl?_.jsx("img",{src:e.previewUrl,alt:e.target.label??"annotated element",className:"size-16 shrink-0 rounded-md border object-cover"}):null,_.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[_.jsxs("div",{className:"flex items-start gap-1",children:[_.jsx("textarea",{value:e.note,onChange:s=>n(e.id,s.target.value),placeholder:"Comment on this element…",rows:2,disabled:t,className:"min-h-[2rem] flex-1 resize-none rounded-md border bg-background px-2 py-1 text-sm outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50"}),u.supported?_.jsx(At,{type:"button",size:"icon-sm",variant:u.listening?"default":"ghost","aria-label":u.listening?"Stop dictation":"Dictate comment","aria-pressed":u.listening,onClick:u.toggle,children:_.jsx(Lc,{})}):null,_.jsx(At,{type:"button",size:"icon-sm",variant:"ghost","aria-label":"Discard annotation",disabled:t,onClick:()=>a(e.id),children:_.jsx(mc,{})})]}),_.jsx(WT,{target:e.target})]})]})}/*!---------------------------------------------------------------------------------------------
185
- * Copyright (c) StackBlitz. All rights reserved.
186
- * Licensed under the MIT License. See License.txt in the project root for license information.
187
- *--------------------------------------------------------------------------------------------*/const n6={damping:.7,stiffness:.05,mass:1.25},r6=70,a6=1e3/60,i6=350;let Mc=!1;var gT;(gT=globalThis.document)==null||gT.addEventListener("mousedown",()=>{Mc=!0});var bT;(bT=globalThis.document)==null||bT.addEventListener("mouseup",()=>{Mc=!1});var yT;(yT=globalThis.document)==null||yT.addEventListener("click",()=>{Mc=!1});const l6=(e={})=>{const[t,n]=S.useState(!1),[a,u]=S.useState(e.initial!==!1),[s,o]=S.useState(!1),f=S.useRef(null);f.current=e;const h=S.useCallback(()=>{var D;if(!Mc)return!1;const B=window.getSelection();if(!B||!B.rangeCount)return!1;const U=B.getRangeAt(0);return U.commonAncestorContainer.contains(R.current)||((D=R.current)==null?void 0:D.contains(U.commonAncestorContainer))},[]),d=S.useCallback(B=>{g.isAtBottom=B,u(B)},[]),b=S.useCallback(B=>{g.escapedFromLock=B,n(B)},[]),g=S.useMemo(()=>{let B;return{escapedFromLock:t,isAtBottom:a,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){var U;return((U=R.current)==null?void 0:U.scrollTop)??0},set scrollTop(U){if(R.current){const{scrollBehavior:D}=getComputedStyle(R.current);D!=="auto"&&(R.current.style.scrollBehavior="auto"),R.current.scrollTop=U,g.ignoreScrollToTop=R.current.scrollTop,D!=="auto"&&(R.current.style.scrollBehavior=D)}},get targetScrollTop(){return!R.current||!O.current?0:R.current.scrollHeight-1-R.current.clientHeight},get calculatedTargetScrollTop(){if(!R.current||!O.current)return 0;const{targetScrollTop:U}=this;if(!e.targetScrollTop)return U;if((B==null?void 0:B.targetScrollTop)===U)return B.calculatedScrollTop;const D=Math.max(Math.min(e.targetScrollTop(U,{scrollElement:R.current,contentElement:O.current}),U),0);return B={targetScrollTop:U,calculatedScrollTop:D},requestAnimationFrame(()=>{B=void 0}),D},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=r6}}},[]),E=S.useCallback((B={})=>{var be;typeof B=="string"&&(B={animation:B}),B.preserveScrollPosition||d(!0);const U=Date.now()+(Number(B.wait)||0),D=Nh(f.current,B.animation),{ignoreEscapes:F=!1}=B;let z,V=g.calculatedTargetScrollTop;B.duration instanceof Promise?B.duration.finally(()=>{z=Date.now()}):z=U+(B.duration??0);const G=async()=>{const q=new Promise(requestAnimationFrame).then(()=>{var pe;if(!g.isAtBottom)return g.animation=void 0,!1;const{scrollTop:ce}=g,oe=performance.now(),we=(oe-(g.lastTick??oe))/a6;if(g.animation||(g.animation={behavior:D,promise:q,ignoreEscapes:F}),g.animation.behavior===D&&(g.lastTick=oe),h()||U>Date.now())return G();if(ce<Math.min(V,g.calculatedTargetScrollTop)){if(((pe=g.animation)==null?void 0:pe.behavior)===D){if(D==="instant")return g.scrollTop=g.calculatedTargetScrollTop,G();g.velocity=(D.damping*g.velocity+D.stiffness*g.scrollDifference)/D.mass,g.accumulated+=g.velocity*we,g.scrollTop+=g.accumulated,g.scrollTop!==ce&&(g.accumulated=0)}return G()}return z>Date.now()?(V=g.calculatedTargetScrollTop,G()):(g.animation=void 0,g.scrollTop<g.calculatedTargetScrollTop?E({animation:Nh(f.current,f.current.resize),ignoreEscapes:F,duration:Math.max(0,z-Date.now())||void 0}):g.isAtBottom)});return q.then(ce=>(requestAnimationFrame(()=>{g.animation||(g.lastTick=void 0,g.velocity=0)}),ce))};return B.wait!==!0&&(g.animation=void 0),((be=g.animation)==null?void 0:be.behavior)===D?g.animation.promise:G()},[d,h,g]),T=S.useCallback(()=>{b(!0),d(!1)},[b,d]),v=S.useCallback(({target:B})=>{if(B!==R.current)return;const{scrollTop:U,ignoreScrollToTop:D}=g;let{lastScrollTop:F=U}=g;g.lastScrollTop=U,g.ignoreScrollToTop=void 0,D&&D>U&&(F=D),o(g.isNearBottom),setTimeout(()=>{var G;if(g.resizeDifference||U===D)return;if(h()){b(!0),d(!1);return}const z=U>F,V=U<F;if((G=g.animation)!=null&&G.ignoreEscapes){g.scrollTop=F;return}V&&(b(!0),d(!1)),z&&b(!1),!g.escapedFromLock&&g.isNearBottom&&d(!0)},1)},[b,d,h,g]),N=S.useCallback(({target:B,deltaY:U})=>{var F;let D=B;for(;!["scroll","auto"].includes(getComputedStyle(D).overflow);){if(!D.parentElement)return;D=D.parentElement}D===R.current&&U<0&&R.current.scrollHeight>R.current.clientHeight&&!((F=g.animation)!=null&&F.ignoreEscapes)&&(b(!0),d(!1))},[b,d,g]),R=gy(B=>{var U,D;(U=R.current)==null||U.removeEventListener("scroll",v),(D=R.current)==null||D.removeEventListener("wheel",N),B==null||B.addEventListener("scroll",v,{passive:!0}),B==null||B.addEventListener("wheel",N,{passive:!0})},[]),O=gy(B=>{var D,F;if((D=g.resizeObserver)==null||D.disconnect(),g.resizeObserver=void 0,!B)return;let U;g.resizeObserver=new ResizeObserver(([z])=>{const{height:V}=z.contentRect,G=V-(U??V);if(g.resizeDifference=G,g.scrollTop>g.targetScrollTop&&(g.scrollTop=g.targetScrollTop),o(g.isNearBottom),G>=0){const be=Nh(f.current,U?f.current.resize:f.current.initial);E({animation:be,wait:!0,preserveScrollPosition:!0,duration:be==="instant"?void 0:i6})}else g.isNearBottom&&(b(!1),d(!0));U=V,requestAnimationFrame(()=>{setTimeout(()=>{g.resizeDifference===G&&(g.resizeDifference=0)},1)})}),(F=g.resizeObserver)==null||F.observe(B)},[]);return{contentRef:O,scrollRef:R,scrollToBottom:E,stopScroll:T,isAtBottom:a||s,isNearBottom:s,escapedFromLock:t,state:g}};function gy(e,t){const n=S.useCallback(a=>(n.current=a,e(a)),t);return n}const Ch=new Map;function Nh(...e){const t={...n6};let n=!1;for(const u of e){if(u==="instant"){n=!0;continue}typeof u=="object"&&(n=!1,t.damping=u.damping??t.damping,t.stiffness=u.stiffness??t.stiffness,t.mass=u.mass??t.mass)}const a=JSON.stringify(t);return Ch.has(a)||Ch.set(a,Object.freeze(t)),n?"instant":Ch.get(a)}/*!---------------------------------------------------------------------------------------------
188
- * Copyright (c) StackBlitz. All rights reserved.
189
- * Licensed under the MIT License. See License.txt in the project root for license information.
190
- *--------------------------------------------------------------------------------------------*/const JT=S.createContext(null),u6=typeof window<"u"?S.useLayoutEffect:S.useEffect;function gc({instance:e,children:t,resize:n,initial:a,mass:u,damping:s,stiffness:o,targetScrollTop:f,contextRef:h,...d}){const b=S.useRef(null),g=S.useCallback((F,z)=>{const V=(D==null?void 0:D.targetScrollTop)??f;return(V==null?void 0:V(F,z))??F},[f]),E=l6({mass:u,damping:s,stiffness:o,resize:n,initial:a,targetScrollTop:g}),{scrollRef:T,contentRef:v,scrollToBottom:N,stopScroll:R,isAtBottom:O,escapedFromLock:B,state:U}=e??E,D=S.useMemo(()=>({scrollToBottom:N,stopScroll:R,scrollRef:T,isAtBottom:O,escapedFromLock:B,contentRef:v,state:U,get targetScrollTop(){return b.current},set targetScrollTop(F){b.current=F}}),[N,O,v,T,R,B,U]);return S.useImperativeHandle(h,()=>D,[D]),u6(()=>{T.current&&getComputedStyle(T.current).overflow==="visible"&&(T.current.style.overflow="auto")},[]),S.createElement(JT.Provider,{value:D},S.createElement("div",{...d},typeof t=="function"?t(D):t))}(function(e){function t({children:n,scrollClassName:a,...u}){const s=e2();return S.createElement("div",{ref:s.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:a},S.createElement("div",{...u,ref:s.contentRef},typeof n=="function"?n(s):n))}e.Content=t})(gc||(gc={}));function e2(){const e=S.useContext(JT);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}const s6=({className:e,...t})=>_.jsx(gc,{className:Gt("relative flex-1 overflow-y-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),o6=({className:e,...t})=>_.jsx(gc.Content,{className:Gt("flex flex-col gap-6 p-4",e),...t}),c6=({className:e,title:t="No messages yet",description:n="Start a conversation to see messages here",icon:a,children:u,...s})=>_.jsx("div",{className:Gt("flex size-full flex-col items-center justify-center gap-3 p-8 text-center",e),...s,children:u??_.jsxs(_.Fragment,{children:[a&&_.jsx("div",{className:"text-muted-foreground",children:a}),_.jsxs("div",{className:"space-y-1",children:[_.jsx("h3",{className:"font-medium text-sm",children:t}),n&&_.jsx("p",{className:"text-muted-foreground text-sm",children:n})]})]})}),f6=({className:e,...t})=>{const{isAtBottom:n,scrollToBottom:a}=e2(),u=S.useCallback(()=>{a()},[a]);return!n&&_.jsx(At,{className:Gt("-translate-x-1/2 absolute bottom-4 left-[50%] rounded-full",e),onClick:u,size:"icon",type:"button",variant:"outline",...t,children:_.jsx(fk,{className:"size-4"})})},d6=S.forwardRef(function({sessionId:t,disabled:n,onSend:a},u){const[s,o]=S.useState(""),[f,h]=S.useState([]),[d,b]=S.useState(!1),[g,E]=S.useState(null),T=S.useRef(null),v=Ic(D=>{o(F=>F?`${F} ${D}`:D)}),N=S.useCallback(async D=>{const F=Array.from(D);if(!(F.length===0||n)){b(!0),E(null);try{for(const z of F){const V=await Qm(t,z);h(G=>[...G,V])}}catch(z){E(z.message)}finally{b(!1)}}},[t,n]);S.useImperativeHandle(u,()=>({addFiles:D=>void N(D)}),[N]);const R=async()=>{const D=s.trim();if(!(!D&&f.length===0||d||n)){b(!0),E(null);try{await a({...D?{text:D}:{},...f.length>0?{attachmentIds:f.map(F=>F.id)}:{}}),o(""),h([])}catch(F){E(F.message)}finally{b(!1)}}},O=D=>{D.key==="Enter"&&!D.shiftKey&&(D.preventDefault(),R())},B=D=>{const F=D.clipboardData.files;F.length>0&&(D.preventDefault(),N(F))},U=D=>{D.preventDefault(),D.dataTransfer.files.length>0&&N(D.dataTransfer.files)};return _.jsxs("div",{className:"border-t p-3",onDrop:U,onDragOver:D=>D.preventDefault(),children:[g?_.jsx("div",{className:"mb-2 text-destructive text-sm",children:g}):null,f.length>0?_.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:f.map(D=>_.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border bg-muted px-2 py-1 text-xs",children:[D.name,_.jsx("button",{type:"button","aria-label":`Remove ${D.name}`,onClick:()=>h(F=>F.filter(z=>z.id!==D.id)),className:"text-muted-foreground hover:text-foreground",children:_.jsx(mc,{className:"size-3"})})]},D.id))}):null,_.jsxs("div",{className:"flex items-end gap-2",children:[_.jsx("input",{ref:T,type:"file",multiple:!0,className:"hidden",onChange:D=>{D.target.files&&N(D.target.files),D.target.value=""}}),_.jsx(At,{type:"button",variant:"ghost",size:"icon",disabled:n||d,"aria-label":"Attach files",onClick:()=>{var D;return(D=T.current)==null?void 0:D.click()},children:_.jsx(BT,{})}),v.supported?_.jsx(At,{type:"button",variant:v.listening?"default":"ghost",size:"icon",disabled:n,"aria-label":v.listening?"Stop dictation":"Start dictation","aria-pressed":v.listening,onClick:v.toggle,children:_.jsx(Lc,{})}):null,_.jsx("textarea",{value:s,onChange:D=>o(D.target.value),onKeyDown:O,onPaste:B,placeholder:n?"This session has ended.":"Message the agent…",disabled:n,rows:2,className:"min-h-[2.5rem] flex-1 resize-none rounded-md border bg-background px-3 py-2 text-sm outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50"}),_.jsx(At,{type:"button",size:"icon",disabled:n||d,"aria-label":"Send message",onClick:()=>void R(),children:_.jsx(Zm,{})})]})]})}),h6=Nc.array();function m6(e){const t=e.payload;if(t&&typeof t=="object"){const n=t;if(typeof n.text=="string")return n.text}return""}function p6(e){if(!e.payload||typeof e.payload!="object")return[];const t=h6.safeParse(e.payload.attachments);return t.success?t.data:[]}function g6(e){const t=e.payload??{},n=typeof t.reason=="string"?t.reason:"",a=typeof t.to=="string"?t.to:"";switch(n){case"session-created":return"Session started";case"session-ended":return"Session ended";case"user-moved-away":return a?`You moved to another session (${a})`:"You moved to another session";default:return n.replace(/-/g," ")}}function b6(e){return e.contentType.startsWith("image/")}function y6({event:e,sessionId:t}){const n=wA.safeParse(e.payload);if(!n.success)return null;const{items:a}=n.data;return _.jsxs("div",{className:"ml-auto max-w-[85%] space-y-2",children:[_.jsxs("div",{className:"text-right text-muted-foreground text-xs",children:[a.length," annotation",a.length===1?"":"s"," sent"]}),a.map((u,s)=>_.jsxs("div",{className:"space-y-1.5 rounded-lg border bg-card p-2 shadow-sm",children:[u.screenshot?_.jsx("img",{src:DT(t,u.screenshot.id),alt:u.target.label??"annotated element",className:"max-h-40 w-full rounded-md border object-contain"}):null,u.note?_.jsx("p",{className:"text-sm",children:u.note}):null,_.jsx(WT,{target:u.target})]},`${e.id}:${s}`))]})}function E6({sessionId:e,attachments:t}){return t.length===0?null:_.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(n=>{const a=DT(e,n.id);return b6(n)?_.jsx("a",{href:a,target:"_blank",rel:"noreferrer",children:_.jsx("img",{src:a,alt:n.name,className:"max-h-64 max-w-full rounded-lg border object-contain"})},n.id):_.jsxs("a",{href:a,download:n.name,className:"inline-flex items-center gap-2 rounded-md border bg-muted px-3 py-2 text-sm hover:bg-accent",children:["📎 ",n.name]},n.id)})})}const T6="modulepreload",x6=function(e){return"/"+e},by={},e0=function(t,n,a){let u=Promise.resolve();if(n&&n.length>0){let o=function(d){return Promise.all(d.map(b=>Promise.resolve(b).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));u=o(n.map(d=>{if(d=x6(d),d in by)return;by[d]=!0;const b=d.endsWith(".css"),g=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${g}`))return;const E=document.createElement("link");if(E.rel=b?"stylesheet":T6,b||(E.as="script"),E.crossOrigin="",E.href=d,h&&E.setAttribute("nonce",h),document.head.appendChild(E),b)return new Promise((T,v)=>{E.addEventListener("load",T),E.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${d}`)))})}))}function s(o){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=o,window.dispatchEvent(f),!f.defaultPrevented)throw o}return u.then(o=>{for(const f of o||[])f.status==="rejected"&&s(f.reason);return t().catch(s)})},Bc=(function(e){if(e==null)return A6;if(typeof e=="function")return zc(e);if(typeof e=="object")return Array.isArray(e)?_6(e):v6(e);if(typeof e=="string")return S6(e);throw new Error("Expected function, string, or object as test")});function _6(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Bc(e[n]);return zc(a);function a(...u){let s=-1;for(;++s<t.length;)if(t[s].apply(this,u))return!0;return!1}}function v6(e){const t=e;return zc(n);function n(a){const u=a;let s;for(s in e)if(u[s]!==t[s])return!1;return!0}}function S6(e){return zc(t);function t(n){return n&&n.type===e}}function zc(e){return t;function t(n,a,u){return!!(k6(n)&&e.call(this,n,typeof a=="number"?a:void 0,u||void 0))}}function A6(){return!0}function k6(e){return e!==null&&typeof e=="object"&&"type"in e}const t2=[],Yu=!0,mm=!1,Sl="skip";function t0(e,t,n,a){let u;typeof t=="function"&&typeof n!="function"?(a=n,n=t):u=t;const s=Bc(u),o=a?-1:1;f(e,void 0,[])();function f(h,d,b){const g=h&&typeof h=="object"?h:{};if(typeof g.type=="string"){const T=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(h.type+(T?"<"+T+">":""))+")"})}return E;function E(){let T=t2,v,N,R;if((!t||s(h,d,b[b.length-1]||void 0))&&(T=C6(n(h,b)),T[0]===mm))return T;if("children"in h&&h.children){const O=h;if(O.children&&T[0]!==Sl)for(N=(a?O.children.length:-1)+o,R=b.concat(O);N>-1&&N<O.children.length;){const B=O.children[N];if(v=f(B,N,R)(),v[0]===mm)return v;N=typeof v[1]=="number"?v[1]:N+o}}return T}}}function C6(e){return Array.isArray(e)?e:typeof e=="number"?[Yu,e]:e==null?t2:[e]}function Ar(e,t,n,a){let u,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,u=n):(s=t,o=n,u=a),t0(e,s,f,u);function f(h,d){const b=d[d.length-1],g=b?b.children.indexOf(h):void 0;return o(h,g,b)}}const Ol={indicator:"indicator",textOnly:"text-only",remove:"remove"};function N6({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:a=!1,allowedProtocols:u=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:o="text-gray-500",linkBlockPolicy:f=Ol.indicator,imageBlockPolicy:h=Ol.indicator}){const d=t.length&&!t.every(g=>g==="*"),b=n.length&&!n.every(g=>g==="*");if(!e&&(d||b))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return g=>{const E=I6(e,t,n,a,u,s,o,f,h);n2(g),Ar(g,E)}}function yy(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function w6(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const R6=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),O6=new Set(["javascript:","data:","file:","vbscript:"]);function Ey(e,t,n,a=!1,u=!1,s=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!u)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return u&&a&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const b=e.substring(5);if(b&&b.length>0&&b!=="invalid")return e}}catch{return null}return null}const o=yy(e,n);if(!o||O6.has(o.protocol)||!(R6.has(o.protocol)||s.includes(o.protocol)||s.includes("*")))return null;if(o.protocol==="mailto:"||!o.protocol.match(/^https?:$/))return o.href;const h=w6(e);return o&&t.some(d=>{const b=yy(d,n);return!b||b.origin!==o.origin?!1:o.href.startsWith(b.href)})?h?o.pathname+o.search+o.hash:o.href:t.includes("*")?o.protocol!=="https:"&&o.protocol!=="http:"?null:h?o.pathname+o.search+o.hash:o.href:null}function n2(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)n2(t)}}const wh=Symbol("node-seen");function L6(e,t,n){return t===Ol.remove?{type:"remove"}:t===Ol.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function D6(e,t,n){if(t===Ol.remove)return{type:"remove"};if(t===Ol.textOnly){const a=String(e.properties.alt||"");return a?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:a}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const I6=(e,t,n,a,u,s,o,f,h)=>{const d=(b,g,E)=>{if(b.type!=="element"||b[wh])return Yu;if(b.tagName==="a"){const T=Ey(b.properties.href,t,e,!1,!1,u);if(T===null){if(b[wh]=!0,Ar(b,d),E&&typeof g=="number"){const v=L6(b,f,o);if(v.type==="remove")return E.children.splice(g,1),[Sl,g];E.children[g]=v.element}return Sl}else return b.properties.href=T,b.properties.target="_blank",b.properties.rel="noopener noreferrer",Yu}if(b.tagName==="img"){const T=Ey(b.properties.src,n,e,a,!0,u);if(T===null){if(b[wh]=!0,Ar(b,d),E&&typeof g=="number"){const v=D6(b,h,s);if(v.type==="remove")return E.children.splice(g,1),[Sl,g];E.children[g]=v.element}return Sl}else return b.properties.src=T,Yu}return Yu};return d},r2=-1,Hc=0,Zu=1,bc=2,n0=3,r0=4,a0=5,i0=6,a2=7,i2=8,M6=typeof self=="object"?self:globalThis,Ty=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new M6[e](t)},B6=(e,t)=>{const n=(u,s)=>(e.set(s,u),u),a=u=>{if(e.has(u))return e.get(u);const[s,o]=t[u];switch(s){case Hc:case r2:return n(o,u);case Zu:{const f=n([],u);for(const h of o)f.push(a(h));return f}case bc:{const f=n({},u);for(const[h,d]of o)f[a(h)]=a(d);return f}case n0:return n(new Date(o),u);case r0:{const{source:f,flags:h}=o;return n(new RegExp(f,h),u)}case a0:{const f=n(new Map,u);for(const[h,d]of o)f.set(a(h),a(d));return f}case i0:{const f=n(new Set,u);for(const h of o)f.add(a(h));return f}case a2:{const{name:f,message:h}=o;return n(Ty(f,h),u)}case i2:return n(BigInt(o),u);case"BigInt":return n(Object(BigInt(o)),u);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:f}=new Uint8Array(o);return n(new DataView(f),o)}}return n(Ty(s,o),u)};return a},xy=e=>B6(new Map,e)(0),pi="",{toString:z6}={},{keys:H6}=Object,Mu=e=>{const t=typeof e;if(t!=="object"||!e)return[Hc,t];const n=z6.call(e).slice(8,-1);switch(n){case"Array":return[Zu,pi];case"Object":return[bc,pi];case"Date":return[n0,pi];case"RegExp":return[r0,pi];case"Map":return[a0,pi];case"Set":return[i0,pi];case"DataView":return[Zu,n]}return n.includes("Array")?[Zu,n]:n.includes("Error")?[a2,n]:[bc,n]},Fo=([e,t])=>e===Hc&&(t==="function"||t==="symbol"),U6=(e,t,n,a)=>{const u=(o,f)=>{const h=a.push(o)-1;return n.set(f,h),h},s=o=>{if(n.has(o))return n.get(o);let[f,h]=Mu(o);switch(f){case Hc:{let b=o;switch(h){case"bigint":f=i2,b=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);b=null;break;case"undefined":return u([r2],o)}return u([f,b],o)}case Zu:{if(h){let E=o;return h==="DataView"?E=new Uint8Array(o.buffer):h==="ArrayBuffer"&&(E=new Uint8Array(o)),u([h,[...E]],o)}const b=[],g=u([f,b],o);for(const E of o)b.push(s(E));return g}case bc:{if(h)switch(h){case"BigInt":return u([h,o.toString()],o);case"Boolean":case"Number":case"String":return u([h,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const b=[],g=u([f,b],o);for(const E of H6(o))(e||!Fo(Mu(o[E])))&&b.push([s(E),s(o[E])]);return g}case n0:return u([f,isNaN(o.getTime())?pi:o.toISOString()],o);case r0:{const{source:b,flags:g}=o;return u([f,{source:b,flags:g}],o)}case a0:{const b=[],g=u([f,b],o);for(const[E,T]of o)(e||!(Fo(Mu(E))||Fo(Mu(T))))&&b.push([s(E),s(T)]);return g}case i0:{const b=[],g=u([f,b],o);for(const E of o)(e||!Fo(Mu(E)))&&b.push(s(E));return g}}const{message:d}=o;return u([f,{name:h,message:d}],o)};return s},_y=(e,{json:t,lossy:n}={})=>{const a=[];return U6(!(t||n),!!t,new Map,a)(e),a},ki=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?xy(_y(e,t)):structuredClone(e):(e,t)=>xy(_y(e,t));class hs{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}hs.prototype.normal={};hs.prototype.property={};hs.prototype.space=void 0;function l2(e,t){const n={},a={};for(const u of e)Object.assign(n,u.property),Object.assign(a,u.normal);return new hs(n,a,t)}function us(e){return e.toLowerCase()}class On{constructor(t,n){this.attribute=n,this.property=t}}On.prototype.attribute="";On.prototype.booleanish=!1;On.prototype.boolean=!1;On.prototype.commaOrSpaceSeparated=!1;On.prototype.commaSeparated=!1;On.prototype.defined=!1;On.prototype.mustUseProperty=!1;On.prototype.number=!1;On.prototype.overloadedBoolean=!1;On.prototype.property="";On.prototype.spaceSeparated=!1;On.prototype.space=void 0;let P6=0;const ze=Oi(),Vt=Oi(),pm=Oi(),ge=Oi(),St=Oi(),Ei=Oi(),Pn=Oi();function Oi(){return 2**++P6}const gm=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:Vt,commaOrSpaceSeparated:Pn,commaSeparated:Ei,number:ge,overloadedBoolean:pm,spaceSeparated:St},Symbol.toStringTag,{value:"Module"})),Rh=Object.keys(gm);class l0 extends On{constructor(t,n,a,u){let s=-1;if(super(t,n),vy(this,"space",u),typeof a=="number")for(;++s<Rh.length;){const o=Rh[s];vy(this,Rh[s],(a&gm[o])===gm[o])}}}l0.prototype.defined=!0;function vy(e,t,n){n&&(e[t]=n)}function Il(e){const t={},n={};for(const[a,u]of Object.entries(e.properties)){const s=new l0(a,e.transform(e.attributes||{},a),u,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(s.mustUseProperty=!0),t[a]=s,n[us(a)]=a,n[us(s.attribute)]=a}return new hs(t,n,e.space)}const u2=Il({properties:{ariaActiveDescendant:null,ariaAtomic:Vt,ariaAutoComplete:null,ariaBusy:Vt,ariaChecked:Vt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:St,ariaCurrent:null,ariaDescribedBy:St,ariaDetails:null,ariaDisabled:Vt,ariaDropEffect:St,ariaErrorMessage:null,ariaExpanded:Vt,ariaFlowTo:St,ariaGrabbed:Vt,ariaHasPopup:null,ariaHidden:Vt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:St,ariaLevel:ge,ariaLive:null,ariaModal:Vt,ariaMultiLine:Vt,ariaMultiSelectable:Vt,ariaOrientation:null,ariaOwns:St,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Vt,ariaReadOnly:Vt,ariaRelevant:null,ariaRequired:Vt,ariaRoleDescription:St,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:Vt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function s2(e,t){return t in e?e[t]:t}function o2(e,t){return s2(e,t.toLowerCase())}const j6=Il({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ei,acceptCharset:St,accessKey:St,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alpha:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:St,autoFocus:ze,autoPlay:ze,blocking:St,capture:null,charSet:null,checked:ze,cite:null,className:St,closedBy:null,colorSpace:null,cols:ge,colSpan:ge,command:null,commandFor:null,content:null,contentEditable:Vt,controls:ze,controlsList:St,coords:ge|Ei,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:pm,draggable:Vt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:St,height:ge,hidden:pm,high:ge,href:null,hrefLang:null,htmlFor:St,httpEquiv:St,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:St,itemRef:St,itemScope:ze,itemType:St,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,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:ze,optimum:ge,pattern:null,ping:St,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:St,required:ze,reversed:ze,rows:ge,rowSpan:ge,sandbox:St,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootCustomElementRegistry:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shadowRootSerializable:ze,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:Vt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:Vt,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:St,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:Vt,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ze,disablePictureInPicture:ze,disableRemotePlayback:ze,exportParts:Ei,part:St,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:o2}),F6=Il({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",maskType:"mask-type",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:Pn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:St,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:Ei,g2:Ei,glyphName:Ei,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:St,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:s2}),c2=Il({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()}}),f2=Il({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:o2}),d2=Il({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),q6={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"},Y6=/[A-Z]/g,Sy=/-[a-z]/g,V6=/^data[-\w.:]+$/i;function Uc(e,t){const n=us(t);let a=t,u=On;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&V6.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Sy,G6);a="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Sy.test(s)){let o=s.replace(Y6,$6);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}u=l0}return new u(a,t)}function $6(e){return"-"+e.toLowerCase()}function G6(e){return e.charAt(1).toUpperCase()}const ms=l2([u2,j6,c2,f2,d2],"html"),Va=l2([u2,F6,c2,f2,d2],"svg");function Ay(e){const t=[],n=String(e||"");let a=n.indexOf(","),u=0,s=!1;for(;!s;){a===-1&&(a=n.length,s=!0);const o=n.slice(u,a).trim();(o||!s)&&t.push(o),u=a+1,a=n.indexOf(",",u)}return t}function h2(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ky=/[#.]/g;function Q6(e,t){const n=e||"",a={};let u=0,s,o;for(;u<n.length;){ky.lastIndex=u;const f=ky.exec(n),h=n.slice(u,f?f.index:n.length);h&&(s?s==="#"?a.id=h:Array.isArray(a.className)?a.className.push(h):a.className=[h]:o=h,u+=h.length),f&&(s=f[0],u++)}return{type:"element",tagName:o||t||"div",properties:a,children:[]}}function Cy(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function m2(e){return e.join(" ").trim()}function p2(e,t,n){const a=n?W6(n):void 0;function u(s,o,...f){let h;if(s==null){h={type:"root",children:[]};const d=o;f.unshift(d)}else{h=Q6(s,t);const d=h.tagName.toLowerCase(),b=a?a.get(d):void 0;if(h.tagName=b||d,X6(o))f.unshift(o);else for(const[g,E]of Object.entries(o))Z6(e,h.properties,g,E)}for(const d of f)bm(h.children,d);return h.type==="element"&&h.tagName==="template"&&(h.content={type:"root",children:h.children},h.children=[]),h}return u}function X6(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const a of n){const u=t[a];if(u&&typeof u=="object"){if(!Array.isArray(u))return!0;const s=u;for(const o of s)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Z6(e,t,n,a){const u=Uc(e,n);let s;if(a!=null){if(typeof a=="number"){if(Number.isNaN(a))return;s=a}else typeof a=="boolean"?s=a:typeof a=="string"?u.spaceSeparated?s=Cy(a):u.commaSeparated?s=Ay(a):u.commaOrSpaceSeparated?s=Cy(Ay(a).join(" ")):s=Ny(u,u.property,a):Array.isArray(a)?s=[...a]:s=u.property==="style"?K6(a):String(a);if(Array.isArray(s)){const o=[];for(const f of s)o.push(Ny(u,u.property,f));s=o}u.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[u.property]=s}}function bm(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)bm(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?bm(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Ny(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||us(n)===us(t)))return!0}return n}function K6(e){const t=[];for(const[n,a]of Object.entries(e))t.push([n,a].join(": "));return t.join("; ")}function W6(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const J6=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],eN=p2(ms,"div"),tN=p2(Va,"g",J6);function nN(e){const t=String(e),n=[];return{toOffset:u,toPoint:a};function a(s){if(typeof s=="number"&&s>-1&&s<=t.length){let o=0;for(;;){let f=n[o];if(f===void 0){const h=wy(t,n[o-1]);f=h===-1?t.length+1:h+1,n[o]=f}if(f>s)return{line:o+1,column:s-(o>0?n[o-1]:0)+1,offset:s};o++}}}function u(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const f=n[n.length-1],h=wy(t,f),d=h===-1?t.length+1:h+1;if(f===d)break;n.push(d)}const o=(s.line>1?n[s.line-2]:0)+s.column-1;if(o<n[s.line-1])return o}}}function wy(e,t){const n=e.indexOf("\r",t),a=e.indexOf(`
191
- `,t);return a===-1?n:n===-1||n+1===a?a:n<a?n:a}const yi={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},g2={}.hasOwnProperty,rN=Object.prototype;function aN(e,t){const n=t||{};return u0({file:n.file||void 0,location:!1,schema:n.space==="svg"?Va:ms,verbose:n.verbose||!1},e)}function u0(e,t){let n;switch(t.nodeName){case"#comment":{const a=t;return n={type:"comment",value:a.data},Wo(e,a,n),n}case"#document":case"#document-fragment":{const a=t,u="mode"in a?a.mode==="quirks"||a.mode==="limited-quirks":!1;if(n={type:"root",children:b2(e,t.childNodes),data:{quirksMode:u}},e.file&&e.location){const s=String(e.file),o=nN(s),f=o.toPoint(0),h=o.toPoint(s.length);n.position={start:f,end:h}}return n}case"#documentType":{const a=t;return n={type:"doctype"},Wo(e,a,n),n}case"#text":{const a=t;return n={type:"text",value:a.value},Wo(e,a,n),n}default:return n=iN(e,t),n}}function b2(e,t){let n=-1;const a=[];for(;++n<t.length;){const u=u0(e,t[n]);a.push(u)}return a}function iN(e,t){const n=e.schema;e.schema=t.namespaceURI===yi.svg?Va:ms;let a=-1;const u={};for(;++a<t.attrs.length;){const f=t.attrs[a],h=(f.prefix?f.prefix+":":"")+f.name;g2.call(rN,h)||(u[h]=f.value)}const o=(e.schema.space==="svg"?tN:eN)(t.tagName,u,b2(e,t.childNodes));if(Wo(e,t,o),o.tagName==="template"){const f=t,h=f.sourceCodeLocation,d=h&&h.startTag&&Al(h.startTag),b=h&&h.endTag&&Al(h.endTag),g=u0(e,f.content);d&&b&&e.file&&(g.position={start:d.end,end:b.start}),o.content=g}return e.schema=n,o}function Wo(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const a=lN(e,n,t.sourceCodeLocation);a&&(e.location=!0,n.position=a)}}function lN(e,t,n){const a=Al(n);if(t.type==="element"){const u=t.children[t.children.length-1];if(a&&!n.endTag&&u&&u.position&&u.position.end&&(a.end=Object.assign({},u.position.end)),e.verbose){const s={};let o;if(n.attrs)for(o in n.attrs)g2.call(n.attrs,o)&&(s[Uc(e.schema,o).property]=Al(n.attrs[o]));n.startTag;const f=Al(n.startTag),h=n.endTag?Al(n.endTag):void 0,d={opening:f};h&&(d.closing=h),d.properties=s,t.data={position:d}}}return a}function Al(e){const t=Ry({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Ry({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Ry(e){return e.line&&e.column?e:void 0}const Oy={}.hasOwnProperty;function y2(e,t){const n=t||{};function a(u,...s){let o=a.invalid;const f=a.handlers;if(u&&Oy.call(u,e)){const h=String(u[e]);o=Oy.call(f,h)?f[h]:a.unknown}if(o)return o.call(this,u,...s)}return a.handlers=n.handlers||{},a.invalid=n.invalid,a.unknown=n.unknown,a}const uN={},sN={}.hasOwnProperty,E2=y2("type",{handlers:{root:cN,element:pN,text:hN,comment:mN,doctype:dN}});function oN(e,t){const a=(t||uN).space;return E2(e,a==="svg"?Va:ms)}function cN(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=s0(e.children,n,t),Ml(e,n),n}function fN(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=s0(e.children,n,t),Ml(e,n),n}function dN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ml(e,t),t}function hN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ml(e,t),t}function mN(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ml(e,t),t}function pN(e,t){const n=t;let a=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(a=Va);const u=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&sN.call(e.properties,s)){const h=gN(a,s,e.properties[s]);h&&u.push(h)}}const o=a.space,f={nodeName:e.tagName,tagName:e.tagName,attrs:u,namespaceURI:yi[o],childNodes:[],parentNode:null};return f.childNodes=s0(e.children,f,a),Ml(e,f),e.tagName==="template"&&e.content&&(f.content=fN(e.content,a)),f}function gN(e,t,n){const a=Uc(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&a.boolean)return;Array.isArray(n)&&(n=a.commaSeparated?h2(n):m2(n));const u={name:a.attribute,value:n===!0?"":String(n)};if(a.space&&a.space!=="html"&&a.space!=="svg"){const s=u.name.indexOf(":");s<0?u.prefix="":(u.name=u.name.slice(s+1),u.prefix=a.attribute.slice(0,s)),u.namespace=yi[a.space]}return u}function s0(e,t,n){let a=-1;const u=[];if(e)for(;++a<e.length;){const s=E2(e[a],n);s.parentNode=t,u.push(s)}return u}function Ml(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const bN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],yN=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Ot="�";var w;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(w||(w={}));const wn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function T2(e){return e>=55296&&e<=57343}function EN(e){return e>=56320&&e<=57343}function TN(e,t){return(e-55296)*1024+9216+t}function x2(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function _2(e){return e>=64976&&e<=65007||yN.has(e)}var J;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(J||(J={}));const xN=65536;class _N{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=xN,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:a,col:u,offset:s}=this,o=u+n,f=s+n;return{code:t,startLine:a,endLine:a,startCol:o,endCol:o,startOffset:f,endOffset:f}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(EN(n))return this.pos++,this._addGap(),TN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,w.EOF;return this._err(J.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let a=0;a<t.length;a++)if((this.html.charCodeAt(this.pos+a)|32)!==t.charCodeAt(a))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,w.EOF;const a=this.html.charCodeAt(n);return a===w.CARRIAGE_RETURN?w.LINE_FEED:a}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,w.EOF;let t=this.html.charCodeAt(this.pos);return t===w.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,w.LINE_FEED):t===w.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,T2(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===w.LINE_FEED||t===w.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){x2(t)?this._err(J.controlCharacterInInputStream):_2(t)&&this._err(J.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ge;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ge||(Ge={}));function v2(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const vN=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),SN=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function AN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=SN.get(e))!==null&&t!==void 0?t:e}var tn;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(tn||(tn={}));const kN=32;var za;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(za||(za={}));function ym(e){return e>=tn.ZERO&&e<=tn.NINE}function CN(e){return e>=tn.UPPER_A&&e<=tn.UPPER_F||e>=tn.LOWER_A&&e<=tn.LOWER_F}function NN(e){return e>=tn.UPPER_A&&e<=tn.UPPER_Z||e>=tn.LOWER_A&&e<=tn.LOWER_Z||ym(e)}function wN(e){return e===tn.EQUALS||NN(e)}var en;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(en||(en={}));var Zr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Zr||(Zr={}));class RN{constructor(t,n,a){this.decodeTree=t,this.emitCodePoint=n,this.errors=a,this.state=en.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Zr.Strict}startEntity(t){this.decodeMode=t,this.state=en.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case en.EntityStart:return t.charCodeAt(n)===tn.NUM?(this.state=en.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=en.NamedEntity,this.stateNamedEntity(t,n));case en.NumericStart:return this.stateNumericStart(t,n);case en.NumericDecimal:return this.stateNumericDecimal(t,n);case en.NumericHex:return this.stateNumericHex(t,n);case en.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|kN)===tn.LOWER_X?(this.state=en.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=en.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,a,u){if(n!==a){const s=a-n;this.result=this.result*Math.pow(u,s)+Number.parseInt(t.substr(n,s),u),this.consumed+=s}}stateNumericHex(t,n){const a=n;for(;n<t.length;){const u=t.charCodeAt(n);if(ym(u)||CN(u))n+=1;else return this.addToNumericResult(t,a,n,16),this.emitNumericEntity(u,3)}return this.addToNumericResult(t,a,n,16),-1}stateNumericDecimal(t,n){const a=n;for(;n<t.length;){const u=t.charCodeAt(n);if(ym(u))n+=1;else return this.addToNumericResult(t,a,n,10),this.emitNumericEntity(u,2)}return this.addToNumericResult(t,a,n,10),-1}emitNumericEntity(t,n){var a;if(this.consumed<=n)return(a=this.errors)===null||a===void 0||a.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===tn.SEMI)this.consumed+=1;else if(this.decodeMode===Zr.Strict)return 0;return this.emitCodePoint(AN(this.result),this.consumed),this.errors&&(t!==tn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:a}=this;let u=a[this.treeIndex],s=(u&za.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const o=t.charCodeAt(n);if(this.treeIndex=ON(a,u,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===Zr.Attribute&&(s===0||wN(o))?0:this.emitNotTerminatedNamedEntity();if(u=a[this.treeIndex],s=(u&za.VALUE_LENGTH)>>14,s!==0){if(o===tn.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Zr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:a}=this,u=(a[n]&za.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,u,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,a){const{decodeTree:u}=this;return this.emitCodePoint(n===1?u[t]&~za.VALUE_LENGTH:u[t+1],a),n===3&&this.emitCodePoint(u[t+2],a),a}end(){var t;switch(this.state){case en.NamedEntity:return this.result!==0&&(this.decodeMode!==Zr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case en.NumericDecimal:return this.emitNumericEntity(0,2);case en.NumericHex:return this.emitNumericEntity(0,3);case en.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case en.EntityStart:return 0}}}function ON(e,t,n,a){const u=(t&za.BRANCH_LENGTH)>>7,s=t&za.JUMP_TABLE;if(u===0)return s!==0&&a===s?n:-1;if(s){const h=a-s;return h<0||h>=u?-1:e[n+h]-1}let o=n,f=o+u-1;for(;o<=f;){const h=o+f>>>1,d=e[h];if(d<a)o=h+1;else if(d>a)f=h-1;else return e[h+u]}return-1}var de;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(de||(de={}));var Ti;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Ti||(Ti={}));var nr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(nr||(nr={}));var $;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})($||($={}));var y;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(y||(y={}));const LN=new Map([[$.A,y.A],[$.ADDRESS,y.ADDRESS],[$.ANNOTATION_XML,y.ANNOTATION_XML],[$.APPLET,y.APPLET],[$.AREA,y.AREA],[$.ARTICLE,y.ARTICLE],[$.ASIDE,y.ASIDE],[$.B,y.B],[$.BASE,y.BASE],[$.BASEFONT,y.BASEFONT],[$.BGSOUND,y.BGSOUND],[$.BIG,y.BIG],[$.BLOCKQUOTE,y.BLOCKQUOTE],[$.BODY,y.BODY],[$.BR,y.BR],[$.BUTTON,y.BUTTON],[$.CAPTION,y.CAPTION],[$.CENTER,y.CENTER],[$.CODE,y.CODE],[$.COL,y.COL],[$.COLGROUP,y.COLGROUP],[$.DD,y.DD],[$.DESC,y.DESC],[$.DETAILS,y.DETAILS],[$.DIALOG,y.DIALOG],[$.DIR,y.DIR],[$.DIV,y.DIV],[$.DL,y.DL],[$.DT,y.DT],[$.EM,y.EM],[$.EMBED,y.EMBED],[$.FIELDSET,y.FIELDSET],[$.FIGCAPTION,y.FIGCAPTION],[$.FIGURE,y.FIGURE],[$.FONT,y.FONT],[$.FOOTER,y.FOOTER],[$.FOREIGN_OBJECT,y.FOREIGN_OBJECT],[$.FORM,y.FORM],[$.FRAME,y.FRAME],[$.FRAMESET,y.FRAMESET],[$.H1,y.H1],[$.H2,y.H2],[$.H3,y.H3],[$.H4,y.H4],[$.H5,y.H5],[$.H6,y.H6],[$.HEAD,y.HEAD],[$.HEADER,y.HEADER],[$.HGROUP,y.HGROUP],[$.HR,y.HR],[$.HTML,y.HTML],[$.I,y.I],[$.IMG,y.IMG],[$.IMAGE,y.IMAGE],[$.INPUT,y.INPUT],[$.IFRAME,y.IFRAME],[$.KEYGEN,y.KEYGEN],[$.LABEL,y.LABEL],[$.LI,y.LI],[$.LINK,y.LINK],[$.LISTING,y.LISTING],[$.MAIN,y.MAIN],[$.MALIGNMARK,y.MALIGNMARK],[$.MARQUEE,y.MARQUEE],[$.MATH,y.MATH],[$.MENU,y.MENU],[$.META,y.META],[$.MGLYPH,y.MGLYPH],[$.MI,y.MI],[$.MO,y.MO],[$.MN,y.MN],[$.MS,y.MS],[$.MTEXT,y.MTEXT],[$.NAV,y.NAV],[$.NOBR,y.NOBR],[$.NOFRAMES,y.NOFRAMES],[$.NOEMBED,y.NOEMBED],[$.NOSCRIPT,y.NOSCRIPT],[$.OBJECT,y.OBJECT],[$.OL,y.OL],[$.OPTGROUP,y.OPTGROUP],[$.OPTION,y.OPTION],[$.P,y.P],[$.PARAM,y.PARAM],[$.PLAINTEXT,y.PLAINTEXT],[$.PRE,y.PRE],[$.RB,y.RB],[$.RP,y.RP],[$.RT,y.RT],[$.RTC,y.RTC],[$.RUBY,y.RUBY],[$.S,y.S],[$.SCRIPT,y.SCRIPT],[$.SEARCH,y.SEARCH],[$.SECTION,y.SECTION],[$.SELECT,y.SELECT],[$.SOURCE,y.SOURCE],[$.SMALL,y.SMALL],[$.SPAN,y.SPAN],[$.STRIKE,y.STRIKE],[$.STRONG,y.STRONG],[$.STYLE,y.STYLE],[$.SUB,y.SUB],[$.SUMMARY,y.SUMMARY],[$.SUP,y.SUP],[$.TABLE,y.TABLE],[$.TBODY,y.TBODY],[$.TEMPLATE,y.TEMPLATE],[$.TEXTAREA,y.TEXTAREA],[$.TFOOT,y.TFOOT],[$.TD,y.TD],[$.TH,y.TH],[$.THEAD,y.THEAD],[$.TITLE,y.TITLE],[$.TR,y.TR],[$.TRACK,y.TRACK],[$.TT,y.TT],[$.U,y.U],[$.UL,y.UL],[$.SVG,y.SVG],[$.VAR,y.VAR],[$.WBR,y.WBR],[$.XMP,y.XMP]]);function Bl(e){var t;return(t=LN.get(e))!==null&&t!==void 0?t:y.UNKNOWN}const me=y,DN={[de.HTML]:new Set([me.ADDRESS,me.APPLET,me.AREA,me.ARTICLE,me.ASIDE,me.BASE,me.BASEFONT,me.BGSOUND,me.BLOCKQUOTE,me.BODY,me.BR,me.BUTTON,me.CAPTION,me.CENTER,me.COL,me.COLGROUP,me.DD,me.DETAILS,me.DIR,me.DIV,me.DL,me.DT,me.EMBED,me.FIELDSET,me.FIGCAPTION,me.FIGURE,me.FOOTER,me.FORM,me.FRAME,me.FRAMESET,me.H1,me.H2,me.H3,me.H4,me.H5,me.H6,me.HEAD,me.HEADER,me.HGROUP,me.HR,me.HTML,me.IFRAME,me.IMG,me.INPUT,me.LI,me.LINK,me.LISTING,me.MAIN,me.MARQUEE,me.MENU,me.META,me.NAV,me.NOEMBED,me.NOFRAMES,me.NOSCRIPT,me.OBJECT,me.OL,me.P,me.PARAM,me.PLAINTEXT,me.PRE,me.SCRIPT,me.SECTION,me.SELECT,me.SOURCE,me.STYLE,me.SUMMARY,me.TABLE,me.TBODY,me.TD,me.TEMPLATE,me.TEXTAREA,me.TFOOT,me.TH,me.THEAD,me.TITLE,me.TR,me.TRACK,me.UL,me.WBR,me.XMP]),[de.MATHML]:new Set([me.MI,me.MO,me.MN,me.MS,me.MTEXT,me.ANNOTATION_XML]),[de.SVG]:new Set([me.TITLE,me.FOREIGN_OBJECT,me.DESC]),[de.XLINK]:new Set,[de.XML]:new Set,[de.XMLNS]:new Set},Em=new Set([me.H1,me.H2,me.H3,me.H4,me.H5,me.H6]);$.STYLE,$.SCRIPT,$.XMP,$.IFRAME,$.NOEMBED,$.NOFRAMES,$.PLAINTEXT;var L;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(L||(L={}));const Ht={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function IN(e){return e>=w.DIGIT_0&&e<=w.DIGIT_9}function Vu(e){return e>=w.LATIN_CAPITAL_A&&e<=w.LATIN_CAPITAL_Z}function MN(e){return e>=w.LATIN_SMALL_A&&e<=w.LATIN_SMALL_Z}function Ra(e){return MN(e)||Vu(e)}function Ly(e){return Ra(e)||IN(e)}function qo(e){return e+32}function S2(e){return e===w.SPACE||e===w.LINE_FEED||e===w.TABULATION||e===w.FORM_FEED}function Dy(e){return S2(e)||e===w.SOLIDUS||e===w.GREATER_THAN_SIGN}function BN(e){return e===w.NULL?J.nullCharacterReference:e>1114111?J.characterReferenceOutsideUnicodeRange:T2(e)?J.surrogateCharacterReference:_2(e)?J.noncharacterCharacterReference:x2(e)||e===w.CARRIAGE_RETURN?J.controlCharacterReference:null}class zN{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=L.DATA,this.returnState=L.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new _N(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new RN(vN,(a,u)=>{this.preprocessor.pos=this.entityStartPos+u-1,this._flushCodePointConsumedAsCharacterReference(a)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(J.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:a=>{this._err(J.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+a)},validateNumericCharacterReference:a=>{const u=BN(a);u&&this._err(u,1)}}:void 0)}_err(t,n=0){var a,u;(u=(a=this.handler).onParseError)===null||u===void 0||u.call(a,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,a){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||a==null||a()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Ge.START_TAG,tagName:"",tagID:y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ge.END_TAG,tagName:"",tagID:y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ge.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ge.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const a=this.currentToken;if(v2(a,this.currentAttr.name)===null){if(a.attrs.push(this.currentAttr),a.location&&this.currentLocation){const u=(t=(n=a.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);u[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(J.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Bl(t.tagName),t.type===Ge.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(J.endTagWithAttributes),t.selfClosing&&this._err(J.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ge.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ge.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ge.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ge.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=S2(t)?Ge.WHITESPACE_CHARACTER:t===w.NULL?Ge.NULL_CHARACTER:Ge.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ge.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Zr.Attribute:Zr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===L.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case L.DATA:{this._stateData(t);break}case L.RCDATA:{this._stateRcdata(t);break}case L.RAWTEXT:{this._stateRawtext(t);break}case L.SCRIPT_DATA:{this._stateScriptData(t);break}case L.PLAINTEXT:{this._statePlaintext(t);break}case L.TAG_OPEN:{this._stateTagOpen(t);break}case L.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case L.TAG_NAME:{this._stateTagName(t);break}case L.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case L.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case L.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case L.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case L.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case L.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case L.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case L.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case L.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case L.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case L.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case L.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case L.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case L.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case L.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case L.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case L.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case L.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case L.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case L.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case L.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case L.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case L.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case L.BOGUS_COMMENT:{this._stateBogusComment(t);break}case L.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case L.COMMENT_START:{this._stateCommentStart(t);break}case L.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case L.COMMENT:{this._stateComment(t);break}case L.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case L.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case L.COMMENT_END:{this._stateCommentEnd(t);break}case L.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case L.DOCTYPE:{this._stateDoctype(t);break}case L.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case L.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case L.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case L.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case L.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case L.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case L.CDATA_SECTION:{this._stateCdataSection(t);break}case L.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case L.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case L.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case L.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case w.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case w.AMPERSAND:{this._startCharacterReference();break}case w.NULL:{this._err(J.unexpectedNullCharacter),this._emitCodePoint(t);break}case w.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case w.AMPERSAND:{this._startCharacterReference();break}case w.LESS_THAN_SIGN:{this.state=L.RCDATA_LESS_THAN_SIGN;break}case w.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ot);break}case w.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case w.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case w.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ot);break}case w.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case w.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case w.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ot);break}case w.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case w.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ot);break}case w.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ra(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case w.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case w.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case w.QUESTION_MARK:{this._err(J.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case w.EOF:{this._err(J.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ra(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case w.GREATER_THAN_SIGN:{this._err(J.missingEndTagName),this.state=L.DATA;break}case w.EOF:{this._err(J.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:{this.state=L.BEFORE_ATTRIBUTE_NAME;break}case w.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case w.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case w.NULL:{this._err(J.unexpectedNullCharacter),n.tagName+=Ot;break}case w.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Vu(t)?qo(t):t)}}_stateRcdataLessThanSign(t){t===w.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ra(t)?(this.state=L.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case w.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case w.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=L.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===w.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ra(t)?(this.state=L.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case w.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case w.EXCLAMATION_MARK:{this.state=L.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=L.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ra(t)?(this.state=L.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===w.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===w.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case w.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case w.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case w.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ot);break}case w.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case w.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case w.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case w.NULL:{this._err(J.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(Ot);break}case w.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case w.HYPHEN_MINUS:{this._emitChars("-");break}case w.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case w.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case w.NULL:{this._err(J.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(Ot);break}case w.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===w.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ra(t)?(this._emitChars("<"),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ra(t)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&Dy(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case w.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case w.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case w.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ot);break}case w.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case w.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case w.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case w.NULL:{this._err(J.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ot);break}case w.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case w.HYPHEN_MINUS:{this._emitChars("-");break}case w.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case w.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case w.NULL:{this._err(J.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ot);break}case w.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===w.SOLIDUS?(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&Dy(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.SOLIDUS:case w.GREATER_THAN_SIGN:case w.EOF:{this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case w.EQUALS_SIGN:{this._err(J.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=L.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:case w.SOLIDUS:case w.GREATER_THAN_SIGN:case w.EOF:{this._leaveAttrName(),this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case w.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case w.QUOTATION_MARK:case w.APOSTROPHE:case w.LESS_THAN_SIGN:{this._err(J.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case w.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.name+=Ot;break}default:this.currentAttr.name+=String.fromCodePoint(Vu(t)?qo(t):t)}}_stateAfterAttributeName(t){switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case w.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case w.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case w.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.QUOTATION_MARK:{this.state=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case w.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case w.GREATER_THAN_SIGN:{this._err(J.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case w.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case w.AMPERSAND:{this._startCharacterReference();break}case w.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Ot;break}case w.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case w.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case w.AMPERSAND:{this._startCharacterReference();break}case w.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Ot;break}case w.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case w.AMPERSAND:{this._startCharacterReference();break}case w.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case w.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Ot;break}case w.QUOTATION_MARK:case w.APOSTROPHE:case w.LESS_THAN_SIGN:case w.EQUALS_SIGN:case w.GRAVE_ACCENT:{this._err(J.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case w.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case w.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case w.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case w.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case w.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case w.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case w.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case w.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case w.NULL:{this._err(J.unexpectedNullCharacter),n.data+=Ot;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(wn.DASH_DASH,!0)?(this._createCommentToken(wn.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(wn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(wn.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(wn.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(J.cdataInHtmlContent),this._createCommentToken(wn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(J.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case w.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case w.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=L.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case w.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case w.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case w.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case w.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case w.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case w.NULL:{this._err(J.unexpectedNullCharacter),n.data+=Ot;break}case w.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case w.EXCLAMATION_MARK:{n.data+="!",this.state=L.COMMENT_LESS_THAN_SIGN_BANG;break}case w.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===w.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===w.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==w.GREATER_THAN_SIGN&&t!==w.EOF&&this._err(J.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case w.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case w.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case w.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case w.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case w.HYPHEN_MINUS:{n.data+="-";break}case w.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case w.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case w.GREATER_THAN_SIGN:{this._err(J.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case w.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case w.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case w.EOF:{this._err(J.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Vu(t))this._createDoctypeToken(String.fromCharCode(qo(t))),this.state=L.DOCTYPE_NAME;else switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.NULL:{this._err(J.unexpectedNullCharacter),this._createDoctypeToken(Ot),this.state=L.DOCTYPE_NAME;break}case w.GREATER_THAN_SIGN:{this._err(J.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case w.EOF:{this._err(J.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=L.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case w.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case w.NULL:{this._err(J.unexpectedNullCharacter),n.name+=Ot;break}case w.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Vu(t)?qo(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case w.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(wn.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(wn.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(J.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case w.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case w.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case w.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case w.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.QUOTATION_MARK:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case w.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case w.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case w.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case w.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case w.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=Ot;break}case w.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case w.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case w.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case w.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=Ot;break}case w.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case w.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:{this.state=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case w.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case w.QUOTATION_MARK:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case w.APOSTROPHE:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case w.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case w.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case w.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case w.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case w.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case w.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case w.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case w.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case w.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case w.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case w.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case w.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case w.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=Ot;break}case w.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case w.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case w.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case w.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=Ot;break}case w.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case w.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case w.SPACE:case w.LINE_FEED:case w.TABULATION:case w.FORM_FEED:break;case w.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case w.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case w.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case w.NULL:{this._err(J.unexpectedNullCharacter);break}case w.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case w.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case w.EOF:{this._err(J.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===w.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case w.GREATER_THAN_SIGN:{this.state=L.DATA;break}case w.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(w.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ly(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ly(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===w.SEMICOLON&&this._err(J.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const A2=new Set([y.DD,y.DT,y.LI,y.OPTGROUP,y.OPTION,y.P,y.RB,y.RP,y.RT,y.RTC]),Iy=new Set([...A2,y.CAPTION,y.COLGROUP,y.TBODY,y.TD,y.TFOOT,y.TH,y.THEAD,y.TR]),yc=new Set([y.APPLET,y.CAPTION,y.HTML,y.MARQUEE,y.OBJECT,y.TABLE,y.TD,y.TEMPLATE,y.TH]),HN=new Set([...yc,y.OL,y.UL]),UN=new Set([...yc,y.BUTTON]),My=new Set([y.ANNOTATION_XML,y.MI,y.MN,y.MO,y.MS,y.MTEXT]),By=new Set([y.DESC,y.FOREIGN_OBJECT,y.TITLE]),PN=new Set([y.TR,y.TEMPLATE,y.HTML]),jN=new Set([y.TBODY,y.TFOOT,y.THEAD,y.TEMPLATE,y.HTML]),FN=new Set([y.TABLE,y.TEMPLATE,y.HTML]),qN=new Set([y.TD,y.TH]);class YN{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,a){this.treeAdapter=n,this.handler=a,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=y.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===y.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===de.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const a=this._indexOf(t);this.items[a]=n,a===this.stackTop&&(this.current=n)}insertAfter(t,n,a){const u=this._indexOf(t)+1;this.items.splice(u,0,n),this.tagIDs.splice(u,0,a),this.stackTop++,u===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,u===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==de.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const a=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(a,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Em,de.HTML)}popUntilTableCellPopped(){this.popUntilPopped(qN,de.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let a=this.stackTop;a>=0;a--)if(t.has(this.tagIDs[a])&&this.treeAdapter.getNamespaceURI(this.items[a])===n)return a;return-1}clearBackTo(t,n){const a=this._indexOfTagNames(t,n);this.shortenToLength(a+1)}clearBackToTableContext(){this.clearBackTo(FN,de.HTML)}clearBackToTableBodyContext(){this.clearBackTo(jN,de.HTML)}clearBackToTableRowContext(){this.clearBackTo(PN,de.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===y.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===y.HTML}hasInDynamicScope(t,n){for(let a=this.stackTop;a>=0;a--){const u=this.tagIDs[a];switch(this.treeAdapter.getNamespaceURI(this.items[a])){case de.HTML:{if(u===t)return!0;if(n.has(u))return!1;break}case de.SVG:{if(By.has(u))return!1;break}case de.MATHML:{if(My.has(u))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,yc)}hasInListItemScope(t){return this.hasInDynamicScope(t,HN)}hasInButtonScope(t){return this.hasInDynamicScope(t,UN)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case de.HTML:{if(Em.has(n))return!0;if(yc.has(n))return!1;break}case de.SVG:{if(By.has(n))return!1;break}case de.MATHML:{if(My.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===de.HTML)switch(this.tagIDs[n]){case t:return!0;case y.TABLE:case y.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===de.HTML)switch(this.tagIDs[t]){case y.TBODY:case y.THEAD:case y.TFOOT:return!0;case y.TABLE:case y.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===de.HTML)switch(this.tagIDs[n]){case t:return!0;case y.OPTION:case y.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&A2.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Iy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Iy.has(this.currentTagId);)this.pop()}}const Oh=3;var vr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(vr||(vr={}));const zy={type:vr.Marker};class VN{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const a=[],u=n.length,s=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let f=0;f<this.entries.length;f++){const h=this.entries[f];if(h.type===vr.Marker)break;const{element:d}=h;if(this.treeAdapter.getTagName(d)===s&&this.treeAdapter.getNamespaceURI(d)===o){const b=this.treeAdapter.getAttrList(d);b.length===u&&a.push({idx:f,attrs:b})}}return a}_ensureNoahArkCondition(t){if(this.entries.length<Oh)return;const n=this.treeAdapter.getAttrList(t),a=this._getNoahArkConditionCandidates(t,n);if(a.length<Oh)return;const u=new Map(n.map(o=>[o.name,o.value]));let s=0;for(let o=0;o<a.length;o++){const f=a[o];f.attrs.every(h=>u.get(h.name)===h.value)&&(s+=1,s>=Oh&&this.entries.splice(f.idx,1))}}insertMarker(){this.entries.unshift(zy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:vr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const a=this.entries.indexOf(this.bookmark);this.entries.splice(a,0,{type:vr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(zy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(a=>a.type===vr.Marker||this.treeAdapter.getTagName(a.element)===t);return n&&n.type===vr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===vr.Element&&n.element===t)}}const Oa={createDocument(){return{nodeName:"#document",mode:nr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const a=e.childNodes.indexOf(n);e.childNodes.splice(a,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,a){const u=e.childNodes.find(s=>s.nodeName==="#documentType");if(u)u.name=t,u.publicId=n,u.systemId=a;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:a,parentNode:null};Oa.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Oa.isTextNode(n)){n.value+=t;return}}Oa.appendChild(e,Oa.createTextNode(t))},insertTextBefore(e,t,n){const a=e.childNodes[e.childNodes.indexOf(n)-1];a&&Oa.isTextNode(a)?a.value+=t:Oa.insertBefore(e,Oa.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(a=>a.name));for(let a=0;a<t.length;a++)n.has(t[a].name)||e.attrs.push(t[a])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},k2="html",$N="about:legacy-compat",GN="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",C2=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],QN=[...C2,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],XN=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),N2=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],ZN=[...N2,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Hy(e,t){return t.some(n=>e.startsWith(n))}function KN(e){return e.name===k2&&e.publicId===null&&(e.systemId===null||e.systemId===$N)}function WN(e){if(e.name!==k2)return nr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===GN)return nr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),XN.has(n))return nr.QUIRKS;let a=t===null?QN:C2;if(Hy(n,a))return nr.QUIRKS;if(a=t===null?N2:ZN,Hy(n,a))return nr.LIMITED_QUIRKS}return nr.NO_QUIRKS}const Uy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},JN="definitionurl",e4="definitionURL",t4=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),n4=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:de.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:de.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:de.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:de.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:de.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:de.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:de.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:de.XML}],["xml:space",{prefix:"xml",name:"space",namespace:de.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:de.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:de.XMLNS}]]),r4=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),a4=new Set([y.B,y.BIG,y.BLOCKQUOTE,y.BODY,y.BR,y.CENTER,y.CODE,y.DD,y.DIV,y.DL,y.DT,y.EM,y.EMBED,y.H1,y.H2,y.H3,y.H4,y.H5,y.H6,y.HEAD,y.HR,y.I,y.IMG,y.LI,y.LISTING,y.MENU,y.META,y.NOBR,y.OL,y.P,y.PRE,y.RUBY,y.S,y.SMALL,y.SPAN,y.STRONG,y.STRIKE,y.SUB,y.SUP,y.TABLE,y.TT,y.U,y.UL,y.VAR]);function i4(e){const t=e.tagID;return t===y.FONT&&e.attrs.some(({name:a})=>a===Ti.COLOR||a===Ti.SIZE||a===Ti.FACE)||a4.has(t)}function w2(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===JN){e.attrs[t].name=e4;break}}function R2(e){for(let t=0;t<e.attrs.length;t++){const n=t4.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function o0(e){for(let t=0;t<e.attrs.length;t++){const n=n4.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function l4(e){const t=r4.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Bl(e.tagName))}function u4(e,t){return t===de.MATHML&&(e===y.MI||e===y.MO||e===y.MN||e===y.MS||e===y.MTEXT)}function s4(e,t,n){if(t===de.MATHML&&e===y.ANNOTATION_XML){for(let a=0;a<n.length;a++)if(n[a].name===Ti.ENCODING){const u=n[a].value.toLowerCase();return u===Uy.TEXT_HTML||u===Uy.APPLICATION_XML}}return t===de.SVG&&(e===y.FOREIGN_OBJECT||e===y.DESC||e===y.TITLE)}function o4(e,t,n,a){return(!a||a===de.HTML)&&s4(e,t,n)||(!a||a===de.MATHML)&&u4(e,t)}const c4="hidden",f4=8,d4=3;var I;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(I||(I={}));const h4={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},O2=new Set([y.TABLE,y.TBODY,y.TFOOT,y.THEAD,y.TR]),Py={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Oa,onParseError:null};class jy{constructor(t,n,a=null,u=null){this.fragmentContext=a,this.scriptHandler=u,this.currentToken=null,this.stopped=!1,this.insertionMode=I.INITIAL,this.originalInsertionMode=I.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Py,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new zN(this.options,this),this.activeFormattingElements=new VN(this.treeAdapter),this.fragmentContextID=a?Bl(this.treeAdapter.getTagName(a)):y.UNKNOWN,this._setContextModes(a??this.document,this.fragmentContextID),this.openElements=new YN(this.document,this.treeAdapter,this)}static parse(t,n){const a=new this(n);return a.tokenizer.write(t,!0),a.document}static getFragmentParser(t,n){const a={...Py,...n};t??(t=a.treeAdapter.createElement($.TEMPLATE,de.HTML,[]));const u=a.treeAdapter.createElement("documentmock",de.HTML,[]),s=new this(a,u,t);return s.fragmentContextID===y.TEMPLATE&&s.tmplInsertionModeStack.unshift(I.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,a){var u;if(!this.onParseError)return;const s=(u=t.location)!==null&&u!==void 0?u:h4,o={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:a?s.startLine:s.endLine,endCol:a?s.startCol:s.endCol,endOffset:a?s.startOffset:s.endOffset};this.onParseError(o)}onItemPush(t,n,a){var u,s;(s=(u=this.treeAdapter).onItemPush)===null||s===void 0||s.call(u,t),a&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var a,u;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(u=(a=this.treeAdapter).onItemPop)===null||u===void 0||u.call(a,t,this.openElements.current),n){let s,o;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,o=this.fragmentContextID):{current:s,currentTagId:o}=this.openElements,this._setContextModes(s,o)}}_setContextModes(t,n){const a=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===de.HTML;this.currentNotInHTML=!a,this.tokenizer.inForeignNode=!a&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,de.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=I.TEXT}switchToPlaintextParsing(){this.insertionMode=I.TEXT,this.originalInsertionMode=I.IN_BODY,this.tokenizer.state=Ht.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===$.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==de.HTML))switch(this.fragmentContextID){case y.TITLE:case y.TEXTAREA:{this.tokenizer.state=Ht.RCDATA;break}case y.STYLE:case y.XMP:case y.IFRAME:case y.NOEMBED:case y.NOFRAMES:case y.NOSCRIPT:{this.tokenizer.state=Ht.RAWTEXT;break}case y.SCRIPT:{this.tokenizer.state=Ht.SCRIPT_DATA;break}case y.PLAINTEXT:{this.tokenizer.state=Ht.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",a=t.publicId||"",u=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,a,u),t.location){const o=this.treeAdapter.getChildNodes(this.document).find(f=>this.treeAdapter.isDocumentTypeNode(f));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const a=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,a)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const a=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(a??this.document,t)}}_appendElement(t,n){const a=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(a,t.location)}_insertElement(t,n){const a=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID)}_insertFakeElement(t,n){const a=this.treeAdapter.createElement(t,de.HTML,[]);this._attachElementToTree(a,null),this.openElements.push(a,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,de.HTML,t.attrs),a=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,a),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement($.HTML,de.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,y.HTML)}_appendCommentNode(t,n){const a=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,a),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_insertCharacters(t){let n,a;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:a}=this._findFosterParentingLocation(),a?this.treeAdapter.insertTextBefore(n,t.chars,a):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const u=this.treeAdapter.getChildNodes(n),s=a?u.lastIndexOf(a):u.length,o=u[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:h,endCol:d,endOffset:b}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:h,endCol:d,endOffset:b})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,n){for(let a=this.treeAdapter.getFirstChild(t);a;a=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(a),this.treeAdapter.appendChild(n,a)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const a=n.location,u=this.treeAdapter.getTagName(t),s=n.type===Ge.END_TAG&&u===n.tagName?{endTag:{...a},endLine:a.endLine,endCol:a.endCol,endOffset:a.endOffset}:{endLine:a.startLine,endCol:a.startCol,endOffset:a.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,a;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,a=this.fragmentContextID):{current:n,currentTagId:a}=this.openElements,t.tagID===y.SVG&&this.treeAdapter.getTagName(n)===$.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===de.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===y.MGLYPH||t.tagID===y.MALIGNMARK)&&a!==void 0&&!this._isIntegrationPoint(a,n,de.HTML)}_processToken(t){switch(t.type){case Ge.CHARACTER:{this.onCharacter(t);break}case Ge.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ge.COMMENT:{this.onComment(t);break}case Ge.DOCTYPE:{this.onDoctype(t);break}case Ge.START_TAG:{this._processStartTag(t);break}case Ge.END_TAG:{this.onEndTag(t);break}case Ge.EOF:{this.onEof(t);break}case Ge.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,a){const u=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return o4(t,u,s,a)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(u=>u.type===vr.Marker||this.openElements.contains(u.element)),a=n===-1?t-1:n-1;for(let u=a;u>=0;u--){const s=this.activeFormattingElements.entries[u];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=I.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(y.P),this.openElements.popUntilTagNamePopped(y.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case y.TR:{this.insertionMode=I.IN_ROW;return}case y.TBODY:case y.THEAD:case y.TFOOT:{this.insertionMode=I.IN_TABLE_BODY;return}case y.CAPTION:{this.insertionMode=I.IN_CAPTION;return}case y.COLGROUP:{this.insertionMode=I.IN_COLUMN_GROUP;return}case y.TABLE:{this.insertionMode=I.IN_TABLE;return}case y.BODY:{this.insertionMode=I.IN_BODY;return}case y.FRAMESET:{this.insertionMode=I.IN_FRAMESET;return}case y.SELECT:{this._resetInsertionModeForSelect(t);return}case y.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case y.HTML:{this.insertionMode=this.headElement?I.AFTER_HEAD:I.BEFORE_HEAD;return}case y.TD:case y.TH:{if(t>0){this.insertionMode=I.IN_CELL;return}break}case y.HEAD:{if(t>0){this.insertionMode=I.IN_HEAD;return}break}}this.insertionMode=I.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const a=this.openElements.tagIDs[n];if(a===y.TEMPLATE)break;if(a===y.TABLE){this.insertionMode=I.IN_SELECT_IN_TABLE;return}}this.insertionMode=I.IN_SELECT}_isElementCausesFosterParenting(t){return O2.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case y.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===de.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case y.TABLE:{const a=this.treeAdapter.getParentNode(n);return a?{parent:a,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const a=this.treeAdapter.getNamespaceURI(t);return DN[a].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){qw(this,t);return}switch(this.insertionMode){case I.INITIAL:{Bu(this,t);break}case I.BEFORE_HTML:{Ku(this,t);break}case I.BEFORE_HEAD:{Wu(this,t);break}case I.IN_HEAD:{Ju(this,t);break}case I.IN_HEAD_NO_SCRIPT:{es(this,t);break}case I.AFTER_HEAD:{ts(this,t);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:{D2(this,t);break}case I.TEXT:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{Lh(this,t);break}case I.IN_TABLE_TEXT:{U2(this,t);break}case I.IN_COLUMN_GROUP:{Ec(this,t);break}case I.AFTER_BODY:{Tc(this,t);break}case I.AFTER_AFTER_BODY:{Jo(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Fw(this,t);return}switch(this.insertionMode){case I.INITIAL:{Bu(this,t);break}case I.BEFORE_HTML:{Ku(this,t);break}case I.BEFORE_HEAD:{Wu(this,t);break}case I.IN_HEAD:{Ju(this,t);break}case I.IN_HEAD_NO_SCRIPT:{es(this,t);break}case I.AFTER_HEAD:{ts(this,t);break}case I.TEXT:{this._insertCharacters(t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{Lh(this,t);break}case I.IN_COLUMN_GROUP:{Ec(this,t);break}case I.AFTER_BODY:{Tc(this,t);break}case I.AFTER_AFTER_BODY:{Jo(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Tm(this,t);return}switch(this.insertionMode){case I.INITIAL:case I.BEFORE_HTML:case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_TEMPLATE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{Tm(this,t);break}case I.IN_TABLE_TEXT:{zu(this,t);break}case I.AFTER_BODY:{T4(this,t);break}case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{x4(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case I.INITIAL:{_4(this,t);break}case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:{this._err(t,J.misplacedDoctype);break}case I.IN_TABLE_TEXT:{zu(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,J.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Yw(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case I.INITIAL:{Bu(this,t);break}case I.BEFORE_HTML:{v4(this,t);break}case I.BEFORE_HEAD:{A4(this,t);break}case I.IN_HEAD:{hr(this,t);break}case I.IN_HEAD_NO_SCRIPT:{N4(this,t);break}case I.AFTER_HEAD:{R4(this,t);break}case I.IN_BODY:{cn(this,t);break}case I.IN_TABLE:{Ll(this,t);break}case I.IN_TABLE_TEXT:{zu(this,t);break}case I.IN_CAPTION:{kw(this,t);break}case I.IN_COLUMN_GROUP:{d0(this,t);break}case I.IN_TABLE_BODY:{Fc(this,t);break}case I.IN_ROW:{qc(this,t);break}case I.IN_CELL:{ww(this,t);break}case I.IN_SELECT:{F2(this,t);break}case I.IN_SELECT_IN_TABLE:{Ow(this,t);break}case I.IN_TEMPLATE:{Dw(this,t);break}case I.AFTER_BODY:{Mw(this,t);break}case I.IN_FRAMESET:{Bw(this,t);break}case I.AFTER_FRAMESET:{Hw(this,t);break}case I.AFTER_AFTER_BODY:{Pw(this,t);break}case I.AFTER_AFTER_FRAMESET:{jw(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Vw(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case I.INITIAL:{Bu(this,t);break}case I.BEFORE_HTML:{S4(this,t);break}case I.BEFORE_HEAD:{k4(this,t);break}case I.IN_HEAD:{C4(this,t);break}case I.IN_HEAD_NO_SCRIPT:{w4(this,t);break}case I.AFTER_HEAD:{O4(this,t);break}case I.IN_BODY:{jc(this,t);break}case I.TEXT:{gw(this,t);break}case I.IN_TABLE:{ss(this,t);break}case I.IN_TABLE_TEXT:{zu(this,t);break}case I.IN_CAPTION:{Cw(this,t);break}case I.IN_COLUMN_GROUP:{Nw(this,t);break}case I.IN_TABLE_BODY:{xm(this,t);break}case I.IN_ROW:{j2(this,t);break}case I.IN_CELL:{Rw(this,t);break}case I.IN_SELECT:{q2(this,t);break}case I.IN_SELECT_IN_TABLE:{Lw(this,t);break}case I.IN_TEMPLATE:{Iw(this,t);break}case I.AFTER_BODY:{V2(this,t);break}case I.IN_FRAMESET:{zw(this,t);break}case I.AFTER_FRAMESET:{Uw(this,t);break}case I.AFTER_AFTER_BODY:{Jo(this,t);break}}}onEof(t){switch(this.insertionMode){case I.INITIAL:{Bu(this,t);break}case I.BEFORE_HTML:{Ku(this,t);break}case I.BEFORE_HEAD:{Wu(this,t);break}case I.IN_HEAD:{Ju(this,t);break}case I.IN_HEAD_NO_SCRIPT:{es(this,t);break}case I.AFTER_HEAD:{ts(this,t);break}case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{z2(this,t);break}case I.TEXT:{bw(this,t);break}case I.IN_TABLE_TEXT:{zu(this,t);break}case I.IN_TEMPLATE:{Y2(this,t);break}case I.AFTER_BODY:case I.IN_FRAMESET:case I.AFTER_FRAMESET:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{f0(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===w.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.TEXT:case I.IN_COLUMN_GROUP:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{this._insertCharacters(t);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:case I.AFTER_BODY:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{L2(this,t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{Lh(this,t);break}case I.IN_TABLE_TEXT:{H2(this,t);break}}}}function m4(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):B2(e,t),n}function p4(e,t){let n=null,a=e.openElements.stackTop;for(;a>=0;a--){const u=e.openElements.items[a];if(u===t.element)break;e._isSpecialElement(u,e.openElements.tagIDs[a])&&(n=u)}return n||(e.openElements.shortenToLength(Math.max(a,0)),e.activeFormattingElements.removeEntry(t)),n}function g4(e,t,n){let a=t,u=e.openElements.getCommonAncestor(t);for(let s=0,o=u;o!==n;s++,o=u){u=e.openElements.getCommonAncestor(o);const f=e.activeFormattingElements.getElementEntry(o),h=f&&s>=d4;!f||h?(h&&e.activeFormattingElements.removeEntry(f),e.openElements.remove(o)):(o=b4(e,f),a===t&&(e.activeFormattingElements.bookmark=f),e.treeAdapter.detachNode(a),e.treeAdapter.appendChild(o,a),a=o)}return a}function b4(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),a=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,a),t.element=a,a}function y4(e,t,n){const a=e.treeAdapter.getTagName(t),u=Bl(a);if(e._isElementCausesFosterParenting(u))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);u===y.TEMPLATE&&s===de.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function E4(e,t,n){const a=e.treeAdapter.getNamespaceURI(n.element),{token:u}=n,s=e.treeAdapter.createElement(u.tagName,a,u.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,u),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,u.tagID)}function c0(e,t){for(let n=0;n<f4;n++){const a=m4(e,t);if(!a)break;const u=p4(e,a);if(!u)break;e.activeFormattingElements.bookmark=a;const s=g4(e,u,a.element),o=e.openElements.getCommonAncestor(a.element);e.treeAdapter.detachNode(s),o&&y4(e,o,s),E4(e,u,a)}}function Tm(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function T4(e,t){e._appendCommentNode(t,e.openElements.items[0])}function x4(e,t){e._appendCommentNode(t,e.document)}function f0(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let a=e.openElements.stackTop;a>=n;a--)e._setEndLocation(e.openElements.items[a],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const a=e.openElements.items[0],u=e.treeAdapter.getNodeSourceCodeLocation(a);if(u&&!u.endTag&&(e._setEndLocation(a,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(s);o&&!o.endTag&&e._setEndLocation(s,t)}}}}function _4(e,t){e._setDocumentType(t);const n=t.forceQuirks?nr.QUIRKS:WN(t);KN(t)||e._err(t,J.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=I.BEFORE_HTML}function Bu(e,t){e._err(t,J.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nr.QUIRKS),e.insertionMode=I.BEFORE_HTML,e._processToken(t)}function v4(e,t){t.tagID===y.HTML?(e._insertElement(t,de.HTML),e.insertionMode=I.BEFORE_HEAD):Ku(e,t)}function S4(e,t){const n=t.tagID;(n===y.HTML||n===y.HEAD||n===y.BODY||n===y.BR)&&Ku(e,t)}function Ku(e,t){e._insertFakeRootElement(),e.insertionMode=I.BEFORE_HEAD,e._processToken(t)}function A4(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.HEAD:{e._insertElement(t,de.HTML),e.headElement=e.openElements.current,e.insertionMode=I.IN_HEAD;break}default:Wu(e,t)}}function k4(e,t){const n=t.tagID;n===y.HEAD||n===y.BODY||n===y.HTML||n===y.BR?Wu(e,t):e._err(t,J.endTagWithoutMatchingOpenElement)}function Wu(e,t){e._insertFakeElement($.HEAD,y.HEAD),e.headElement=e.openElements.current,e.insertionMode=I.IN_HEAD,e._processToken(t)}function hr(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case y.TITLE:{e._switchToTextParsing(t,Ht.RCDATA);break}case y.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ht.RAWTEXT):(e._insertElement(t,de.HTML),e.insertionMode=I.IN_HEAD_NO_SCRIPT);break}case y.NOFRAMES:case y.STYLE:{e._switchToTextParsing(t,Ht.RAWTEXT);break}case y.SCRIPT:{e._switchToTextParsing(t,Ht.SCRIPT_DATA);break}case y.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=I.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(I.IN_TEMPLATE);break}case y.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:Ju(e,t)}}function C4(e,t){switch(t.tagID){case y.HEAD:{e.openElements.pop(),e.insertionMode=I.AFTER_HEAD;break}case y.BODY:case y.BR:case y.HTML:{Ju(e,t);break}case y.TEMPLATE:{Li(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function Li(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==y.TEMPLATE&&e._err(t,J.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,J.endTagWithoutMatchingOpenElement)}function Ju(e,t){e.openElements.pop(),e.insertionMode=I.AFTER_HEAD,e._processToken(t)}function N4(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.BASEFONT:case y.BGSOUND:case y.HEAD:case y.LINK:case y.META:case y.NOFRAMES:case y.STYLE:{hr(e,t);break}case y.NOSCRIPT:{e._err(t,J.nestedNoscriptInHead);break}default:es(e,t)}}function w4(e,t){switch(t.tagID){case y.NOSCRIPT:{e.openElements.pop(),e.insertionMode=I.IN_HEAD;break}case y.BR:{es(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function es(e,t){const n=t.type===Ge.EOF?J.openElementsLeftAfterEof:J.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=I.IN_HEAD,e._processToken(t)}function R4(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.BODY:{e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=I.IN_BODY;break}case y.FRAMESET:{e._insertElement(t,de.HTML),e.insertionMode=I.IN_FRAMESET;break}case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:case y.NOFRAMES:case y.SCRIPT:case y.STYLE:case y.TEMPLATE:case y.TITLE:{e._err(t,J.abandonedHeadElementChild),e.openElements.push(e.headElement,y.HEAD),hr(e,t),e.openElements.remove(e.headElement);break}case y.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:ts(e,t)}}function O4(e,t){switch(t.tagID){case y.BODY:case y.HTML:case y.BR:{ts(e,t);break}case y.TEMPLATE:{Li(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function ts(e,t){e._insertFakeElement($.BODY,y.BODY),e.insertionMode=I.IN_BODY,Pc(e,t)}function Pc(e,t){switch(t.type){case Ge.CHARACTER:{D2(e,t);break}case Ge.WHITESPACE_CHARACTER:{L2(e,t);break}case Ge.COMMENT:{Tm(e,t);break}case Ge.START_TAG:{cn(e,t);break}case Ge.END_TAG:{jc(e,t);break}case Ge.EOF:{z2(e,t);break}}}function L2(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function D2(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function L4(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function D4(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function I4(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,de.HTML),e.insertionMode=I.IN_FRAMESET)}function M4(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML)}function B4(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Em.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,de.HTML)}function z4(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function H4(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML),n||(e.formElement=e.openElements.current))}function U4(e,t){e.framesetOk=!1;const n=t.tagID;for(let a=e.openElements.stackTop;a>=0;a--){const u=e.openElements.tagIDs[a];if(n===y.LI&&u===y.LI||(n===y.DD||n===y.DT)&&(u===y.DD||u===y.DT)){e.openElements.generateImpliedEndTagsWithExclusion(u),e.openElements.popUntilTagNamePopped(u);break}if(u!==y.ADDRESS&&u!==y.DIV&&u!==y.P&&e._isSpecialElement(e.openElements.items[a],u))break}e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML)}function P4(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.tokenizer.state=Ht.PLAINTEXT}function j4(e,t){e.openElements.hasInScope(y.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.framesetOk=!1}function F4(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName($.A);n&&(c0(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function q4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Y4(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(y.NOBR)&&(c0(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function V4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function $4(e,t){e.treeAdapter.getDocumentMode(e.document)!==nr.QUIRKS&&e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=I.IN_TABLE}function I2(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,de.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function M2(e){const t=v2(e,Ti.TYPE);return t!=null&&t.toLowerCase()===c4}function G4(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,de.HTML),M2(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Q4(e,t){e._appendElement(t,de.HTML),t.ackSelfClosing=!0}function X4(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._appendElement(t,de.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Z4(e,t){t.tagName=$.IMG,t.tagID=y.IMG,I2(e,t)}function K4(e,t){e._insertElement(t,de.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ht.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=I.TEXT}function W4(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ht.RAWTEXT)}function J4(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ht.RAWTEXT)}function Fy(e,t){e._switchToTextParsing(t,Ht.RAWTEXT)}function ew(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===I.IN_TABLE||e.insertionMode===I.IN_CAPTION||e.insertionMode===I.IN_TABLE_BODY||e.insertionMode===I.IN_ROW||e.insertionMode===I.IN_CELL?I.IN_SELECT_IN_TABLE:I.IN_SELECT}function tw(e,t){e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML)}function nw(e,t){e.openElements.hasInScope(y.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,de.HTML)}function rw(e,t){e.openElements.hasInScope(y.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(y.RTC),e._insertElement(t,de.HTML)}function aw(e,t){e._reconstructActiveFormattingElements(),w2(t),o0(t),t.selfClosing?e._appendElement(t,de.MATHML):e._insertElement(t,de.MATHML),t.ackSelfClosing=!0}function iw(e,t){e._reconstructActiveFormattingElements(),R2(t),o0(t),t.selfClosing?e._appendElement(t,de.SVG):e._insertElement(t,de.SVG),t.ackSelfClosing=!0}function qy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML)}function cn(e,t){switch(t.tagID){case y.I:case y.S:case y.B:case y.U:case y.EM:case y.TT:case y.BIG:case y.CODE:case y.FONT:case y.SMALL:case y.STRIKE:case y.STRONG:{q4(e,t);break}case y.A:{F4(e,t);break}case y.H1:case y.H2:case y.H3:case y.H4:case y.H5:case y.H6:{B4(e,t);break}case y.P:case y.DL:case y.OL:case y.UL:case y.DIV:case y.DIR:case y.NAV:case y.MAIN:case y.MENU:case y.ASIDE:case y.CENTER:case y.FIGURE:case y.FOOTER:case y.HEADER:case y.HGROUP:case y.DIALOG:case y.DETAILS:case y.ADDRESS:case y.ARTICLE:case y.SEARCH:case y.SECTION:case y.SUMMARY:case y.FIELDSET:case y.BLOCKQUOTE:case y.FIGCAPTION:{M4(e,t);break}case y.LI:case y.DD:case y.DT:{U4(e,t);break}case y.BR:case y.IMG:case y.WBR:case y.AREA:case y.EMBED:case y.KEYGEN:{I2(e,t);break}case y.HR:{X4(e,t);break}case y.RB:case y.RTC:{nw(e,t);break}case y.RT:case y.RP:{rw(e,t);break}case y.PRE:case y.LISTING:{z4(e,t);break}case y.XMP:{W4(e,t);break}case y.SVG:{iw(e,t);break}case y.HTML:{L4(e,t);break}case y.BASE:case y.LINK:case y.META:case y.STYLE:case y.TITLE:case y.SCRIPT:case y.BGSOUND:case y.BASEFONT:case y.TEMPLATE:{hr(e,t);break}case y.BODY:{D4(e,t);break}case y.FORM:{H4(e,t);break}case y.NOBR:{Y4(e,t);break}case y.MATH:{aw(e,t);break}case y.TABLE:{$4(e,t);break}case y.INPUT:{G4(e,t);break}case y.PARAM:case y.TRACK:case y.SOURCE:{Q4(e,t);break}case y.IMAGE:{Z4(e,t);break}case y.BUTTON:{j4(e,t);break}case y.APPLET:case y.OBJECT:case y.MARQUEE:{V4(e,t);break}case y.IFRAME:{J4(e,t);break}case y.SELECT:{ew(e,t);break}case y.OPTION:case y.OPTGROUP:{tw(e,t);break}case y.NOEMBED:case y.NOFRAMES:{Fy(e,t);break}case y.FRAMESET:{I4(e,t);break}case y.TEXTAREA:{K4(e,t);break}case y.NOSCRIPT:{e.options.scriptingEnabled?Fy(e,t):qy(e,t);break}case y.PLAINTEXT:{P4(e,t);break}case y.COL:case y.TH:case y.TD:case y.TR:case y.HEAD:case y.FRAME:case y.TBODY:case y.TFOOT:case y.THEAD:case y.CAPTION:case y.COLGROUP:break;default:qy(e,t)}}function lw(e,t){if(e.openElements.hasInScope(y.BODY)&&(e.insertionMode=I.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function uw(e,t){e.openElements.hasInScope(y.BODY)&&(e.insertionMode=I.AFTER_BODY,V2(e,t))}function sw(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function ow(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(y.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(y.FORM):n&&e.openElements.remove(n))}function cw(e){e.openElements.hasInButtonScope(y.P)||e._insertFakeElement($.P,y.P),e._closePElement()}function fw(e){e.openElements.hasInListItemScope(y.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(y.LI),e.openElements.popUntilTagNamePopped(y.LI))}function dw(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function hw(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function mw(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function pw(e){e._reconstructActiveFormattingElements(),e._insertFakeElement($.BR,y.BR),e.openElements.pop(),e.framesetOk=!1}function B2(e,t){const n=t.tagName,a=t.tagID;for(let u=e.openElements.stackTop;u>0;u--){const s=e.openElements.items[u],o=e.openElements.tagIDs[u];if(a===o&&(a!==y.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.stackTop>=u&&e.openElements.shortenToLength(u);break}if(e._isSpecialElement(s,o))break}}function jc(e,t){switch(t.tagID){case y.A:case y.B:case y.I:case y.S:case y.U:case y.EM:case y.TT:case y.BIG:case y.CODE:case y.FONT:case y.NOBR:case y.SMALL:case y.STRIKE:case y.STRONG:{c0(e,t);break}case y.P:{cw(e);break}case y.DL:case y.UL:case y.OL:case y.DIR:case y.DIV:case y.NAV:case y.PRE:case y.MAIN:case y.MENU:case y.ASIDE:case y.BUTTON:case y.CENTER:case y.FIGURE:case y.FOOTER:case y.HEADER:case y.HGROUP:case y.DIALOG:case y.ADDRESS:case y.ARTICLE:case y.DETAILS:case y.SEARCH:case y.SECTION:case y.SUMMARY:case y.LISTING:case y.FIELDSET:case y.BLOCKQUOTE:case y.FIGCAPTION:{sw(e,t);break}case y.LI:{fw(e);break}case y.DD:case y.DT:{dw(e,t);break}case y.H1:case y.H2:case y.H3:case y.H4:case y.H5:case y.H6:{hw(e);break}case y.BR:{pw(e);break}case y.BODY:{lw(e,t);break}case y.HTML:{uw(e,t);break}case y.FORM:{ow(e);break}case y.APPLET:case y.OBJECT:case y.MARQUEE:{mw(e,t);break}case y.TEMPLATE:{Li(e,t);break}default:B2(e,t)}}function z2(e,t){e.tmplInsertionModeStack.length>0?Y2(e,t):f0(e,t)}function gw(e,t){var n;t.tagID===y.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function bw(e,t){e._err(t,J.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Lh(e,t){if(e.openElements.currentTagId!==void 0&&O2.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=I.IN_TABLE_TEXT,t.type){case Ge.CHARACTER:{U2(e,t);break}case Ge.WHITESPACE_CHARACTER:{H2(e,t);break}}else ps(e,t)}function yw(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,de.HTML),e.insertionMode=I.IN_CAPTION}function Ew(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,de.HTML),e.insertionMode=I.IN_COLUMN_GROUP}function Tw(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement($.COLGROUP,y.COLGROUP),e.insertionMode=I.IN_COLUMN_GROUP,d0(e,t)}function xw(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,de.HTML),e.insertionMode=I.IN_TABLE_BODY}function _w(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement($.TBODY,y.TBODY),e.insertionMode=I.IN_TABLE_BODY,Fc(e,t)}function vw(e,t){e.openElements.hasInTableScope(y.TABLE)&&(e.openElements.popUntilTagNamePopped(y.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Sw(e,t){M2(t)?e._appendElement(t,de.HTML):ps(e,t),t.ackSelfClosing=!0}function Aw(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,de.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ll(e,t){switch(t.tagID){case y.TD:case y.TH:case y.TR:{_w(e,t);break}case y.STYLE:case y.SCRIPT:case y.TEMPLATE:{hr(e,t);break}case y.COL:{Tw(e,t);break}case y.FORM:{Aw(e,t);break}case y.TABLE:{vw(e,t);break}case y.TBODY:case y.TFOOT:case y.THEAD:{xw(e,t);break}case y.INPUT:{Sw(e,t);break}case y.CAPTION:{yw(e,t);break}case y.COLGROUP:{Ew(e,t);break}default:ps(e,t)}}function ss(e,t){switch(t.tagID){case y.TABLE:{e.openElements.hasInTableScope(y.TABLE)&&(e.openElements.popUntilTagNamePopped(y.TABLE),e._resetInsertionMode());break}case y.TEMPLATE:{Li(e,t);break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TBODY:case y.TD:case y.TFOOT:case y.TH:case y.THEAD:case y.TR:break;default:ps(e,t)}}function ps(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Pc(e,t),e.fosterParentingEnabled=n}function H2(e,t){e.pendingCharacterTokens.push(t)}function U2(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function zu(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ps(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const P2=new Set([y.CAPTION,y.COL,y.COLGROUP,y.TBODY,y.TD,y.TFOOT,y.TH,y.THEAD,y.TR]);function kw(e,t){const n=t.tagID;P2.has(n)?e.openElements.hasInTableScope(y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_TABLE,Ll(e,t)):cn(e,t)}function Cw(e,t){const n=t.tagID;switch(n){case y.CAPTION:case y.TABLE:{e.openElements.hasInTableScope(y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_TABLE,n===y.TABLE&&ss(e,t));break}case y.BODY:case y.COL:case y.COLGROUP:case y.HTML:case y.TBODY:case y.TD:case y.TFOOT:case y.TH:case y.THEAD:case y.TR:break;default:jc(e,t)}}function d0(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.COL:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case y.TEMPLATE:{hr(e,t);break}default:Ec(e,t)}}function Nw(e,t){switch(t.tagID){case y.COLGROUP:{e.openElements.currentTagId===y.COLGROUP&&(e.openElements.pop(),e.insertionMode=I.IN_TABLE);break}case y.TEMPLATE:{Li(e,t);break}case y.COL:break;default:Ec(e,t)}}function Ec(e,t){e.openElements.currentTagId===y.COLGROUP&&(e.openElements.pop(),e.insertionMode=I.IN_TABLE,e._processToken(t))}function Fc(e,t){switch(t.tagID){case y.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,de.HTML),e.insertionMode=I.IN_ROW;break}case y.TH:case y.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement($.TR,y.TR),e.insertionMode=I.IN_ROW,qc(e,t);break}case y.CAPTION:case y.COL:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE,Ll(e,t));break}default:Ll(e,t)}}function xm(e,t){const n=t.tagID;switch(t.tagID){case y.TBODY:case y.TFOOT:case y.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE);break}case y.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE,ss(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TD:case y.TH:case y.TR:break;default:ss(e,t)}}function qc(e,t){switch(t.tagID){case y.TH:case y.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,de.HTML),e.insertionMode=I.IN_CELL,e.activeFormattingElements.insertMarker();break}case y.CAPTION:case y.COL:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:case y.TR:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,Fc(e,t));break}default:Ll(e,t)}}function j2(e,t){switch(t.tagID){case y.TR:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY);break}case y.TABLE:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,xm(e,t));break}case y.TBODY:case y.TFOOT:case y.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(y.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=I.IN_TABLE_BODY,xm(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TD:case y.TH:break;default:ss(e,t)}}function ww(e,t){const n=t.tagID;P2.has(n)?(e.openElements.hasInTableScope(y.TD)||e.openElements.hasInTableScope(y.TH))&&(e._closeTableCell(),qc(e,t)):cn(e,t)}function Rw(e,t){const n=t.tagID;switch(n){case y.TD:case y.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=I.IN_ROW);break}case y.TABLE:case y.TBODY:case y.TFOOT:case y.THEAD:case y.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),j2(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:break;default:jc(e,t)}}function F2(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.OPTION:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e._insertElement(t,de.HTML);break}case y.OPTGROUP:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop(),e._insertElement(t,de.HTML);break}case y.HR:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop(),e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case y.INPUT:case y.KEYGEN:case y.TEXTAREA:case y.SELECT:{e.openElements.hasInSelectScope(y.SELECT)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),t.tagID!==y.SELECT&&e._processStartTag(t));break}case y.SCRIPT:case y.TEMPLATE:{hr(e,t);break}}}function q2(e,t){switch(t.tagID){case y.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===y.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===y.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop();break}case y.OPTION:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop();break}case y.SELECT:{e.openElements.hasInSelectScope(y.SELECT)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode());break}case y.TEMPLATE:{Li(e,t);break}}}function Ow(e,t){const n=t.tagID;n===y.CAPTION||n===y.TABLE||n===y.TBODY||n===y.TFOOT||n===y.THEAD||n===y.TR||n===y.TD||n===y.TH?(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),e._processStartTag(t)):F2(e,t)}function Lw(e,t){const n=t.tagID;n===y.CAPTION||n===y.TABLE||n===y.TBODY||n===y.TFOOT||n===y.THEAD||n===y.TR||n===y.TD||n===y.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),e.onEndTag(t)):q2(e,t)}function Dw(e,t){switch(t.tagID){case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:case y.NOFRAMES:case y.SCRIPT:case y.STYLE:case y.TEMPLATE:case y.TITLE:{hr(e,t);break}case y.CAPTION:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:{e.tmplInsertionModeStack[0]=I.IN_TABLE,e.insertionMode=I.IN_TABLE,Ll(e,t);break}case y.COL:{e.tmplInsertionModeStack[0]=I.IN_COLUMN_GROUP,e.insertionMode=I.IN_COLUMN_GROUP,d0(e,t);break}case y.TR:{e.tmplInsertionModeStack[0]=I.IN_TABLE_BODY,e.insertionMode=I.IN_TABLE_BODY,Fc(e,t);break}case y.TD:case y.TH:{e.tmplInsertionModeStack[0]=I.IN_ROW,e.insertionMode=I.IN_ROW,qc(e,t);break}default:e.tmplInsertionModeStack[0]=I.IN_BODY,e.insertionMode=I.IN_BODY,cn(e,t)}}function Iw(e,t){t.tagID===y.TEMPLATE&&Li(e,t)}function Y2(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):f0(e,t)}function Mw(e,t){t.tagID===y.HTML?cn(e,t):Tc(e,t)}function V2(e,t){var n;if(t.tagID===y.HTML){if(e.fragmentContext||(e.insertionMode=I.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===y.HTML){e._setEndLocation(e.openElements.items[0],t);const a=e.openElements.items[1];a&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(a))===null||n===void 0)&&n.endTag)&&e._setEndLocation(a,t)}}else Tc(e,t)}function Tc(e,t){e.insertionMode=I.IN_BODY,Pc(e,t)}function Bw(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.FRAMESET:{e._insertElement(t,de.HTML);break}case y.FRAME:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case y.NOFRAMES:{hr(e,t);break}}}function zw(e,t){t.tagID===y.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==y.FRAMESET&&(e.insertionMode=I.AFTER_FRAMESET))}function Hw(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.NOFRAMES:{hr(e,t);break}}}function Uw(e,t){t.tagID===y.HTML&&(e.insertionMode=I.AFTER_AFTER_FRAMESET)}function Pw(e,t){t.tagID===y.HTML?cn(e,t):Jo(e,t)}function Jo(e,t){e.insertionMode=I.IN_BODY,Pc(e,t)}function jw(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.NOFRAMES:{hr(e,t);break}}}function Fw(e,t){t.chars=Ot,e._insertCharacters(t)}function qw(e,t){e._insertCharacters(t),e.framesetOk=!1}function $2(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==de.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Yw(e,t){if(i4(t))$2(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),a=e.treeAdapter.getNamespaceURI(n);a===de.MATHML?w2(t):a===de.SVG&&(l4(t),R2(t)),o0(t),t.selfClosing?e._appendElement(t,a):e._insertElement(t,a),t.ackSelfClosing=!0}}function Vw(e,t){if(t.tagID===y.P||t.tagID===y.BR){$2(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const a=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(a)===de.HTML){e._endTagOutsideForeignContent(t);break}const u=e.treeAdapter.getTagName(a);if(u.toLowerCase()===t.tagName){t.tagName=u,e.openElements.shortenToLength(n);break}}}$.AREA,$.BASE,$.BASEFONT,$.BGSOUND,$.BR,$.COL,$.EMBED,$.FRAME,$.HR,$.IMG,$.INPUT,$.KEYGEN,$.LINK,$.META,$.PARAM,$.SOURCE,$.TRACK,$.WBR;const Yc=G2("end"),Cr=G2("start");function G2(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function Q2(e){const t=Cr(e),n=Yc(e);if(t&&n)return{start:t,end:n}}const $w=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Gw=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Yy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function X2(e,t){const n=r5(e),a=y2("type",{handlers:{root:Qw,element:Xw,text:Zw,comment:K2,doctype:Kw,raw:Jw},unknown:e5}),u={parser:n?new jy(Yy):jy.getFragmentParser(void 0,Yy),handle(f){a(f,u)},stitches:!1,options:t||{}};a(e,u),zl(u,Cr());const s=n?u.parser.document:u.parser.getFragment(),o=aN(s,{file:u.options.file});return u.stitches&&Ar(o,"comment",function(f,h,d){const b=f;if(b.value.stitch&&d&&h!==void 0){const g=d.children;return g[h]=b.value.stitch,h}}),o.type==="root"&&o.children.length===1&&o.children[0].type===e.type?o.children[0]:o}function Z2(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Qw(e,t){Z2(e.children,t)}function Xw(e,t){t5(e,t),Z2(e.children,t),n5(e,t)}function Zw(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ge.CHARACTER,chars:e.value,location:gs(e)};zl(t,Cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Kw(e,t){const n={type:Ge.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:gs(e)};zl(t,Cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ww(e,t){t.stitches=!0;const n=a5(e);if("children"in e&&"children"in n){const a=X2({type:"root",children:e.children},t.options);n.children=a.children}K2({type:"comment",value:{stitch:n}},t)}function K2(e,t){const n=e.value,a={type:Ge.COMMENT,data:n,location:gs(e)};zl(t,Cr(e)),t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken)}function Jw(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,W2(t,Cr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace($w,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function e5(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Ww(n,t);else{let a="";throw Gw.has(n.type)&&(a=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+a)}}function zl(e,t){W2(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ht.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function W2(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function t5(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ht.PLAINTEXT)return;zl(t,Cr(e));const a=t.parser.openElements.current;let u="namespaceURI"in a?a.namespaceURI:yi.html;u===yi.html&&n==="svg"&&(u=yi.svg);const s=oN({...e,children:[]},{space:u===yi.svg?"svg":"html"}),o={type:Ge.START_TAG,tagName:n,tagID:Bl(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:gs(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function n5(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&bN.includes(n)||t.parser.tokenizer.state===Ht.PLAINTEXT)return;zl(t,Yc(e));const a={type:Ge.END_TAG,tagName:n,tagID:Bl(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:gs(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ht.RCDATA||t.parser.tokenizer.state===Ht.RAWTEXT||t.parser.tokenizer.state===Ht.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ht.DATA)}function r5(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function gs(e){const t=Cr(e)||{line:void 0,column:void 0,offset:void 0},n=Yc(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function a5(e){return"children"in e?ki({...e,children:[]}):ki(e)}function _m(e){return function(t,n){return X2(t,{...e,file:n})}}const di=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],gi={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...di,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...di],h2:[["className","sr-only"]],img:[...di,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...di,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...di],table:[...di],ul:[...di,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Da={}.hasOwnProperty;function i5(e,t){let n={type:"root",children:[]};const a={schema:t?{...gi,...t}:gi,stack:[]},u=J2(a,e);return u&&(Array.isArray(u)?u.length===1?n=u[0]:n.children=u:n=u),n}function J2(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return l5(e,n);case"doctype":return u5(e,n);case"element":return s5(e,n);case"root":return o5(e,n);case"text":return c5(e,n)}}}function l5(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",a=n.indexOf("-->"),s={type:"comment",value:a<0?n:n.slice(0,a)};return bs(s,t),s}}function u5(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return bs(n,t),n}}function s5(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const a=ex(e,t.children),u=f5(e,t.properties);e.stack.pop();let s=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&Da.call(e.schema.ancestors,n))){const f=e.schema.ancestors[n];let h=-1;for(s=!1;++h<f.length;)e.stack.includes(f[h])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?a:void 0;const o={type:"element",tagName:n,properties:u,children:a};return bs(o,t),o}function o5(e,t){const a={type:"root",children:ex(e,t.children)};return bs(a,t),a}function c5(e,t){const a={type:"text",value:typeof t.value=="string"?t.value:""};return bs(a,t),a}function ex(e,t){const n=[];if(Array.isArray(t)){const a=t;let u=-1;for(;++u<a.length;){const s=J2(e,a[u]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function f5(e,t){const n=e.stack[e.stack.length-1],a=e.schema.attributes,u=e.schema.required,s=a&&Da.call(a,n)?a[n]:void 0,o=a&&Da.call(a,"*")?a["*"]:void 0,f=t&&typeof t=="object"?t:{},h={};let d;for(d in f)if(Da.call(f,d)){const b=f[d];let g=Vy(e,$y(s,d),d,b);g==null&&(g=Vy(e,$y(o,d),d,b)),g!=null&&(h[d]=g)}if(u&&Da.call(u,n)){const b=u[n];for(d in b)Da.call(b,d)&&!Da.call(h,d)&&(h[d]=b[d])}return h}function Vy(e,t,n,a){return t?Array.isArray(a)?d5(e,t,n,a):tx(e,t,n,a):void 0}function d5(e,t,n,a){let u=-1;const s=[];for(;++u<a.length;){const o=tx(e,t,n,a[u]);(typeof o=="number"||typeof o=="string")&&s.push(o)}return s}function tx(e,t,n,a){if(!(typeof a!="boolean"&&typeof a!="number"&&typeof a!="string")&&h5(e,n,a)){if(typeof t=="object"&&t.length>1){let u=!1,s=0;for(;++s<t.length;){const o=t[s];if(o&&typeof o=="object"&&"flags"in o){if(o.test(String(a))){u=!0;break}}else if(o===a){u=!0;break}}if(!u)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+a:a}}function h5(e,t,n){const a=e.schema.protocols&&Da.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!a||a.length===0)return!0;const u=String(n),s=u.indexOf(":"),o=u.indexOf("?"),f=u.indexOf("#"),h=u.indexOf("/");if(s<0||h>-1&&s>h||o>-1&&s>o||f>-1&&s>f)return!0;let d=-1;for(;++d<a.length;){const b=a[d];if(s===b.length&&u.slice(0,b.length)===b)return!0}return!1}function bs(e,t){const n=Q2(t);t.data&&(e.data=ki(t.data)),n&&(e.position=n)}function $y(e,t){let n,a=-1;if(e)for(;++a<e.length;){const u=e[a],s=typeof u=="string"?u:u[0];if(s===t)return u;s==="data*"&&(n=u)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function nx(e){return function(t){return i5(t,e)}}function Gy(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,u=n.indexOf(t);for(;u!==-1;)a++,u=n.indexOf(t,u+t.length);return a}const yn=$a(/[A-Za-z]/),on=$a(/[\dA-Za-z]/),m5=$a(/[#-'*+\--9=?A-Z^-~]/);function xc(e){return e!==null&&(e<32||e===127)}const vm=$a(/\d/),p5=$a(/[\dA-Fa-f]/),g5=$a(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function kt(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}const Vc=$a(new RegExp("\\p{P}|\\p{S}","u")),Ci=$a(/\s/);function $a(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function b5(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function y5(e,t,n){const u=Bc((n||{}).ignore||[]),s=E5(t);let o=-1;for(;++o<s.length;)t0(e,"text",f);function f(d,b){let g=-1,E;for(;++g<b.length;){const T=b[g],v=E?E.children:void 0;if(u(T,v?v.indexOf(T):void 0,E))return;E=T}if(E)return h(d,b)}function h(d,b){const g=b[b.length-1],E=s[o][0],T=s[o][1];let v=0;const R=g.children.indexOf(d);let O=!1,B=[];E.lastIndex=0;let U=E.exec(d.value);for(;U;){const D=U.index,F={index:U.index,input:U.input,stack:[...b,d]};let z=T(...U,F);if(typeof z=="string"&&(z=z.length>0?{type:"text",value:z}:void 0),z===!1?E.lastIndex=D+1:(v!==D&&B.push({type:"text",value:d.value.slice(v,D)}),Array.isArray(z)?B.push(...z):z&&B.push(z),v=D+U[0].length,O=!0),!E.global)break;U=E.exec(d.value)}return O?(v<d.value.length&&B.push({type:"text",value:d.value.slice(v)}),g.children.splice(R,1,...B)):B=[d],R+B.length}}function E5(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 a=-1;for(;++a<n.length;){const u=n[a];t.push([T5(u[0]),x5(u[1])])}return t}function T5(e){return typeof e=="string"?new RegExp(b5(e),"g"):e}function x5(e){return typeof e=="function"?e:function(){return e}}const Dh="phrasing",Ih=["autolink","link","image","label"];function _5(){return{transforms:[w5],enter:{literalAutolink:S5,literalAutolinkEmail:Mh,literalAutolinkHttp:Mh,literalAutolinkWww:Mh},exit:{literalAutolink:N5,literalAutolinkEmail:C5,literalAutolinkHttp:A5,literalAutolinkWww:k5}}}function v5(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Dh,notInConstruct:Ih},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Dh,notInConstruct:Ih},{character:":",before:"[ps]",after:"\\/",inConstruct:Dh,notInConstruct:Ih}]}}function S5(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Mh(e){this.config.enter.autolinkProtocol.call(this,e)}function A5(e){this.config.exit.autolinkProtocol.call(this,e)}function k5(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 C5(e){this.config.exit.autolinkEmail.call(this,e)}function N5(e){this.exit(e)}function w5(e){y5(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,R5],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),O5]],{ignore:["link","linkReference"]})}function R5(e,t,n,a,u){let s="";if(!rx(u)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!L5(n)))return!1;const o=D5(n+a);if(!o[0])return!1;const f={type:"link",title:null,url:s+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[f,{type:"text",value:o[1]}]:f}function O5(e,t,n,a){return!rx(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function L5(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 D5(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],a=n.indexOf(")");const u=Gy(e,"(");let s=Gy(e,")");for(;a!==-1&&u>s;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),s++;return[e,n]}function rx(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ci(n)||Vc(n))&&(!t||n!==47)}function fr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}ax.peek=F5;function I5(){this.buffer()}function M5(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function B5(){this.buffer()}function z5(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function H5(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function U5(e){this.exit(e)}function P5(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function j5(e){this.exit(e)}function F5(){return"["}function ax(e,t,n,a){const u=n.createTracker(a);let s=u.move("[^");const o=n.enter("footnoteReference"),f=n.enter("reference");return s+=u.move(n.safe(n.associationId(e),{after:"]",before:s})),f(),o(),s+=u.move("]"),s}function q5(){return{enter:{gfmFootnoteCallString:I5,gfmFootnoteCall:M5,gfmFootnoteDefinitionLabelString:B5,gfmFootnoteDefinition:z5},exit:{gfmFootnoteCallString:H5,gfmFootnoteCall:U5,gfmFootnoteDefinitionLabelString:P5,gfmFootnoteDefinition:j5}}}function Y5(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ax},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,u,s,o){const f=s.createTracker(o);let h=f.move("[^");const d=s.enter("footnoteDefinition"),b=s.enter("label");return h+=f.move(s.safe(s.associationId(a),{before:h,after:"]"})),b(),h+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),h+=f.move((t?`
192
- `:" ")+s.indentLines(s.containerFlow(a,f.current()),t?ix:V5))),d(),h}}function V5(e,t,n){return t===0?e:ix(e,t,n)}function ix(e,t,n){return(n?"":" ")+e}const $5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];lx.peek=K5;function G5(){return{canContainEols:["delete"],enter:{strikethrough:X5},exit:{strikethrough:Z5}}}function Q5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$5}],handlers:{delete:lx}}}function X5(e){this.enter({type:"delete",children:[]},e)}function Z5(e){this.exit(e)}function lx(e,t,n,a){const u=n.createTracker(a),s=n.enter("strikethrough");let o=u.move("~~");return o+=n.containerPhrasing(e,{...u.current(),before:o,after:"~"}),o+=u.move("~~"),s(),o}function K5(){return"~"}function W5(e){return e.length}function J5(e,t){const n=t||{},a=(n.align||[]).concat(),u=n.stringLength||W5,s=[],o=[],f=[],h=[];let d=0,b=-1;for(;++b<e.length;){const N=[],R=[];let O=-1;for(e[b].length>d&&(d=e[b].length);++O<e[b].length;){const B=eR(e[b][O]);if(n.alignDelimiters!==!1){const U=u(B);R[O]=U,(h[O]===void 0||U>h[O])&&(h[O]=U)}N.push(B)}o[b]=N,f[b]=R}let g=-1;if(typeof a=="object"&&"length"in a)for(;++g<d;)s[g]=Qy(a[g]);else{const N=Qy(a);for(;++g<d;)s[g]=N}g=-1;const E=[],T=[];for(;++g<d;){const N=s[g];let R="",O="";N===99?(R=":",O=":"):N===108?R=":":N===114&&(O=":");let B=n.alignDelimiters===!1?1:Math.max(1,h[g]-R.length-O.length);const U=R+"-".repeat(B)+O;n.alignDelimiters!==!1&&(B=R.length+B+O.length,B>h[g]&&(h[g]=B),T[g]=B),E[g]=U}o.splice(1,0,E),f.splice(1,0,T),b=-1;const v=[];for(;++b<o.length;){const N=o[b],R=f[b];g=-1;const O=[];for(;++g<d;){const B=N[g]||"";let U="",D="";if(n.alignDelimiters!==!1){const F=h[g]-(R[g]||0),z=s[g];z===114?U=" ".repeat(F):z===99?F%2?(U=" ".repeat(F/2+.5),D=" ".repeat(F/2-.5)):(U=" ".repeat(F/2),D=U):D=" ".repeat(F)}n.delimiterStart!==!1&&!g&&O.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&B==="")&&(n.delimiterStart!==!1||g)&&O.push(" "),n.alignDelimiters!==!1&&O.push(U),O.push(B),n.alignDelimiters!==!1&&O.push(D),n.padding!==!1&&O.push(" "),(n.delimiterEnd!==!1||g!==d-1)&&O.push("|")}v.push(n.delimiterEnd===!1?O.join("").replace(/ +$/,""):O.join(""))}return v.join(`
193
- `)}function eR(e){return e==null?"":String(e)}function Qy(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 tR(e,t,n,a){const u=n.enter("blockquote"),s=n.createTracker(a);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),nR);return u(),o}function nR(e,t,n){return">"+(n?"":" ")+e}function rR(e,t){return Xy(e,t.inConstruct,!0)&&!Xy(e,t.notInConstruct,!1)}function Xy(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function Zy(e,t,n,a){let u=-1;for(;++u<n.unsafe.length;)if(n.unsafe[u].character===`
194
- `&&rR(n.stack,n.unsafe[u]))return/[ \t]/.test(a.before)?"":" ";return`\\
195
- `}function aR(e,t){const n=String(e);let a=n.indexOf(t),u=a,s=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===u?++s>o&&(o=s):s=1,u=a+t.length,a=n.indexOf(t,u);return o}function iR(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 lR(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 uR(e,t,n,a){const u=lR(n),s=e.value||"",o=u==="`"?"GraveAccent":"Tilde";if(iR(e,n)){const g=n.enter("codeIndented"),E=n.indentLines(s,sR);return g(),E}const f=n.createTracker(a),h=u.repeat(Math.max(aR(s,u)+1,3)),d=n.enter("codeFenced");let b=f.move(h);if(e.lang){const g=n.enter(`codeFencedLang${o}`);b+=f.move(n.safe(e.lang,{before:b,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${o}`);b+=f.move(" "),b+=f.move(n.safe(e.meta,{before:b,after:`
196
- `,encode:["`"],...f.current()})),g()}return b+=f.move(`
197
- `),s&&(b+=f.move(s+`
198
- `)),b+=f.move(h),d(),b}function sR(e,t,n){return(n?"":" ")+e}function h0(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 oR(e,t,n,a){const u=h0(n),s=u==='"'?"Quote":"Apostrophe",o=n.enter("definition");let f=n.enter("label");const h=n.createTracker(a);let d=h.move("[");return d+=h.move(n.safe(n.associationId(e),{before:d,after:"]",...h.current()})),d+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),d+=h.move("<"),d+=h.move(n.safe(e.url,{before:d,after:">",...h.current()})),d+=h.move(">")):(f=n.enter("destinationRaw"),d+=h.move(n.safe(e.url,{before:d,after:e.title?" ":`
199
- `,...h.current()}))),f(),e.title&&(f=n.enter(`title${s}`),d+=h.move(" "+u),d+=h.move(n.safe(e.title,{before:d,after:u,...h.current()})),d+=h.move(u),f()),o(),d}function cR(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 os(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Dl(e){if(e===null||kt(e)||Ci(e))return 1;if(Vc(e))return 2}function _c(e,t,n){const a=Dl(e),u=Dl(t);return a===void 0?u===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ux.peek=fR;function ux(e,t,n,a){const u=cR(n),s=n.enter("emphasis"),o=n.createTracker(a),f=o.move(u);let h=o.move(n.containerPhrasing(e,{after:u,before:f,...o.current()}));const d=h.charCodeAt(0),b=_c(a.before.charCodeAt(a.before.length-1),d,u);b.inside&&(h=os(d)+h.slice(1));const g=h.charCodeAt(h.length-1),E=_c(a.after.charCodeAt(0),g,u);E.inside&&(h=h.slice(0,-1)+os(g));const T=o.move(u);return s(),n.attentionEncodeSurroundingInfo={after:E.outside,before:b.outside},f+h+T}function fR(e,t,n){return n.options.emphasis||"*"}const dR={};function m0(e,t){const n=dR,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,u=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return sx(e,a,u)}function sx(e,t,n){if(hR(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 Ky(e.children,t,n)}return Array.isArray(e)?Ky(e,t,n):""}function Ky(e,t,n){const a=[];let u=-1;for(;++u<e.length;)a[u]=sx(e[u],t,n);return a.join("")}function hR(e){return!!(e&&typeof e=="object")}function mR(e,t){let n=!1;return Ar(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,mm}),!!((!e.depth||e.depth<3)&&m0(e)&&(t.options.setext||n))}function pR(e,t,n,a){const u=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(a);if(mR(e,n)){const b=n.enter("headingSetext"),g=n.enter("phrasing"),E=n.containerPhrasing(e,{...s.current(),before:`
200
- `,after:`
201
- `});return g(),b(),E+`
202
- `+(u===1?"=":"-").repeat(E.length-(Math.max(E.lastIndexOf("\r"),E.lastIndexOf(`
203
- `))+1))}const o="#".repeat(u),f=n.enter("headingAtx"),h=n.enter("phrasing");s.move(o+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
204
- `,...s.current()});return/^[\t ]/.test(d)&&(d=os(d.charCodeAt(0))+d.slice(1)),d=d?o+" "+d:o,n.options.closeAtx&&(d+=" "+o),h(),f(),d}ox.peek=gR;function ox(e){return e.value||""}function gR(){return"<"}cx.peek=bR;function cx(e,t,n,a){const u=h0(n),s=u==='"'?"Quote":"Apostrophe",o=n.enter("image");let f=n.enter("label");const h=n.createTracker(a);let d=h.move("![");return d+=h.move(n.safe(e.alt,{before:d,after:"]",...h.current()})),d+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),d+=h.move("<"),d+=h.move(n.safe(e.url,{before:d,after:">",...h.current()})),d+=h.move(">")):(f=n.enter("destinationRaw"),d+=h.move(n.safe(e.url,{before:d,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=n.enter(`title${s}`),d+=h.move(" "+u),d+=h.move(n.safe(e.title,{before:d,after:u,...h.current()})),d+=h.move(u),f()),d+=h.move(")"),o(),d}function bR(){return"!"}fx.peek=yR;function fx(e,t,n,a){const u=e.referenceType,s=n.enter("imageReference");let o=n.enter("label");const f=n.createTracker(a);let h=f.move("![");const d=n.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(d+"]["),o();const b=n.stack;n.stack=[],o=n.enter("reference");const g=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return o(),n.stack=b,s(),u==="full"||!d||d!==g?h+=f.move(g+"]"):u==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function yR(){return"!"}dx.peek=ER;function dx(e,t,n){let a=e.value||"",u="`",s=-1;for(;new RegExp("(^|[^`])"+u+"([^`]|$)").test(a);)u+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++s<n.unsafe.length;){const o=n.unsafe[s],f=n.compilePattern(o);let h;if(o.atBreak)for(;h=f.exec(a);){let d=h.index;a.charCodeAt(d)===10&&a.charCodeAt(d-1)===13&&d--,a=a.slice(0,d)+" "+a.slice(h.index+1)}}return u+a+u}function ER(){return"`"}function hx(e,t){const n=m0(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))}mx.peek=TR;function mx(e,t,n,a){const u=h0(n),s=u==='"'?"Quote":"Apostrophe",o=n.createTracker(a);let f,h;if(hx(e,n)){const b=n.stack;n.stack=[],f=n.enter("autolink");let g=o.move("<");return g+=o.move(n.containerPhrasing(e,{before:g,after:">",...o.current()})),g+=o.move(">"),f(),n.stack=b,g}f=n.enter("link"),h=n.enter("label");let d=o.move("[");return d+=o.move(n.containerPhrasing(e,{before:d,after:"](",...o.current()})),d+=o.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=n.enter("destinationLiteral"),d+=o.move("<"),d+=o.move(n.safe(e.url,{before:d,after:">",...o.current()})),d+=o.move(">")):(h=n.enter("destinationRaw"),d+=o.move(n.safe(e.url,{before:d,after:e.title?" ":")",...o.current()}))),h(),e.title&&(h=n.enter(`title${s}`),d+=o.move(" "+u),d+=o.move(n.safe(e.title,{before:d,after:u,...o.current()})),d+=o.move(u),h()),d+=o.move(")"),f(),d}function TR(e,t,n){return hx(e,n)?"<":"["}px.peek=xR;function px(e,t,n,a){const u=e.referenceType,s=n.enter("linkReference");let o=n.enter("label");const f=n.createTracker(a);let h=f.move("[");const d=n.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(d+"]["),o();const b=n.stack;n.stack=[],o=n.enter("reference");const g=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return o(),n.stack=b,s(),u==="full"||!d||d!==g?h+=f.move(g+"]"):u==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function xR(){return"["}function p0(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 _R(e){const t=p0(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 vR(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 gx(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 SR(e,t,n,a){const u=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?vR(n):p0(n);const f=e.ordered?o==="."?")":".":_R(n);let h=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&b&&(!b.children||!b.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&&(h=!0),gx(n)===o&&b){let g=-1;for(;++g<e.children.length;){const E=e.children[g];if(E&&E.type==="listItem"&&E.children&&E.children[0]&&E.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(o=f),n.bulletCurrent=o;const d=n.containerFlow(e,a);return n.bulletLastUsed=o,n.bulletCurrent=s,u(),d}function AR(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 kR(e,t,n,a){const u=AR(n);let s=n.bulletCurrent||p0(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 o=s.length+1;(u==="tab"||u==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const f=n.createTracker(a);f.move(s+" ".repeat(o-s.length)),f.shift(o);const h=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,f.current()),b);return h(),d;function b(g,E,T){return E?(T?"":" ".repeat(o))+g:(T?s:s+" ".repeat(o-s.length))+g}}function CR(e,t,n,a){const u=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,a);return s(),u(),o}const NR=Bc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function wR(e,t,n,a){return(e.children.some(function(o){return NR(o)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function RR(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}bx.peek=OR;function bx(e,t,n,a){const u=RR(n),s=n.enter("strong"),o=n.createTracker(a),f=o.move(u+u);let h=o.move(n.containerPhrasing(e,{after:u,before:f,...o.current()}));const d=h.charCodeAt(0),b=_c(a.before.charCodeAt(a.before.length-1),d,u);b.inside&&(h=os(d)+h.slice(1));const g=h.charCodeAt(h.length-1),E=_c(a.after.charCodeAt(0),g,u);E.inside&&(h=h.slice(0,-1)+os(g));const T=o.move(u+u);return s(),n.attentionEncodeSurroundingInfo={after:E.outside,before:b.outside},f+h+T}function OR(e,t,n){return n.options.strong||"*"}function LR(e,t,n,a){return n.safe(e.value,a)}function DR(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 IR(e,t,n){const a=(gx(n)+(n.options.ruleSpaces?" ":"")).repeat(DR(n));return n.options.ruleSpaces?a.slice(0,-1):a}const yx={blockquote:tR,break:Zy,code:uR,definition:oR,emphasis:ux,hardBreak:Zy,heading:pR,html:ox,image:cx,imageReference:fx,inlineCode:dx,link:mx,linkReference:px,list:SR,listItem:kR,paragraph:CR,root:wR,strong:bx,text:LR,thematicBreak:IR},Wy=document.createElement("i");function g0(e){const t="&"+e+";";Wy.innerHTML=t;const n=Wy.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ex(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)}const MR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function BR(e){return e.replace(MR,zR)}function zR(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const u=n.charCodeAt(1),s=u===120||u===88;return Ex(n.slice(s?2:1),s?16:10)}return g0(n)||e}function HR(){return{enter:{table:UR,tableData:Jy,tableHeader:Jy,tableRow:jR},exit:{codeText:FR,table:PR,tableData:Bh,tableHeader:Bh,tableRow:Bh}}}function UR(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 PR(e){this.exit(e),this.data.inTable=void 0}function jR(e){this.enter({type:"tableRow",children:[]},e)}function Bh(e){this.exit(e)}function Jy(e){this.enter({type:"tableCell",children:[]},e)}function FR(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,qR));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function qR(e,t){return t==="|"?t:e}function YR(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,u=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
205
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:E,table:o,tableCell:h,tableRow:f}};function o(T,v,N,R){return d(b(T,N,R),T.align)}function f(T,v,N,R){const O=g(T,N,R),B=d([O]);return B.slice(0,B.indexOf(`
206
- `))}function h(T,v,N,R){const O=N.enter("tableCell"),B=N.enter("phrasing"),U=N.containerPhrasing(T,{...R,before:s,after:s});return B(),O(),U}function d(T,v){return J5(T,{align:v,alignDelimiters:a,padding:n,stringLength:u})}function b(T,v,N){const R=T.children;let O=-1;const B=[],U=v.enter("table");for(;++O<R.length;)B[O]=g(R[O],v,N);return U(),B}function g(T,v,N){const R=T.children;let O=-1;const B=[],U=v.enter("tableRow");for(;++O<R.length;)B[O]=h(R[O],T,v,N);return U(),B}function E(T,v,N){let R=yx.inlineCode(T,v,N);return N.stack.includes("tableCell")&&(R=R.replace(/\|/g,"\\$&")),R}}function VR(){return{exit:{taskListCheckValueChecked:eE,taskListCheckValueUnchecked:eE,paragraph:GR}}}function $R(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:QR}}}function eE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function GR(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 a=n.children[0];if(a&&a.type==="text"){const u=t.children;let s=-1,o;for(;++s<u.length;){const f=u[s];if(f.type==="paragraph"){o=f;break}}o===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function QR(e,t,n,a){const u=e.children[0],s=typeof e.checked=="boolean"&&u&&u.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",f=n.createTracker(a);s&&f.move(o);let h=yx.listItem(e,t,n,{...a,...f.current()});return s&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),h;function d(b){return b+o}}function XR(){return[_5(),q5(),G5(),HR(),VR()]}function ZR(e){return{extensions:[v5(),Y5(e),Q5(),YR(e),$R()]}}function Fn(e,t,n,a){const u=e.length;let s=0,o;if(t<0?t=-t>u?0:u+t:t=t>u?u:t,n=n>0?n:0,a.length<1e4)o=Array.from(a),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<a.length;)o=a.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function rr(e,t){return e.length>0?(Fn(e,e.length,0,t),e):t}const tE={}.hasOwnProperty;function Tx(e){const t={};let n=-1;for(;++n<e.length;)KR(t,e[n]);return t}function KR(e,t){let n;for(n in t){const u=(tE.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){tE.call(u,o)||(u[o]=[]);const f=s[o];WR(u[o],Array.isArray(f)?f:f?[f]:[])}}}function WR(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);Fn(e,0,0,a)}const JR={tokenize:iO,partial:!0},xx={tokenize:lO,partial:!0},_x={tokenize:uO,partial:!0},vx={tokenize:sO,partial:!0},eO={tokenize:oO,partial:!0},Sx={name:"wwwAutolink",tokenize:rO,previous:kx},Ax={name:"protocolAutolink",tokenize:aO,previous:Cx},ta={name:"emailAutolink",tokenize:nO,previous:Nx},Nr={};function tO(){return{text:Nr}}let hi=48;for(;hi<123;)Nr[hi]=ta,hi++,hi===58?hi=65:hi===91&&(hi=97);Nr[43]=ta;Nr[45]=ta;Nr[46]=ta;Nr[95]=ta;Nr[72]=[ta,Ax];Nr[104]=[ta,Ax];Nr[87]=[ta,Sx];Nr[119]=[ta,Sx];function nO(e,t,n){const a=this;let u,s;return o;function o(g){return!Sm(g)||!Nx.call(a,a.previous)||b0(a.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return Sm(g)?(e.consume(g),f):g===64?(e.consume(g),h):n(g)}function h(g){return g===46?e.check(eO,b,d)(g):g===45||g===95||on(g)?(s=!0,e.consume(g),h):b(g)}function d(g){return e.consume(g),u=!0,h}function b(g){return s&&u&&yn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function rO(e,t,n){const a=this;return u;function u(o){return o!==87&&o!==119||!kx.call(a,a.previous)||b0(a.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(JR,e.attempt(xx,e.attempt(_x,s),n),n)(o))}function s(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function aO(e,t,n){const a=this;let u="",s=!1;return o;function o(g){return(g===72||g===104)&&Cx.call(a,a.previous)&&!b0(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),u+=String.fromCodePoint(g),e.consume(g),f):n(g)}function f(g){if(yn(g)&&u.length<5)return u+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const E=u.toLowerCase();if(E==="http"||E==="https")return e.consume(g),h}return n(g)}function h(g){return g===47?(e.consume(g),s?d:(s=!0,h)):n(g)}function d(g){return g===null||xc(g)||kt(g)||Ci(g)||Vc(g)?n(g):e.attempt(xx,e.attempt(_x,b),n)(g)}function b(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function iO(e,t,n){let a=0;return u;function u(o){return(o===87||o===119)&&a<3?(a++,e.consume(o),u):o===46&&a===3?(e.consume(o),s):n(o)}function s(o){return o===null?n(o):t(o)}}function lO(e,t,n){let a,u,s;return o;function o(d){return d===46||d===95?e.check(vx,h,f)(d):d===null||kt(d)||Ci(d)||d!==45&&Vc(d)?h(d):(s=!0,e.consume(d),o)}function f(d){return d===95?a=!0:(u=a,a=void 0),e.consume(d),o}function h(d){return u||a||!s?n(d):t(d)}}function uO(e,t){let n=0,a=0;return u;function u(o){return o===40?(n++,e.consume(o),u):o===41&&a<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(vx,t,s)(o):o===null||kt(o)||Ci(o)?t(o):(e.consume(o),u)}function s(o){return o===41&&a++,e.consume(o),u}}function sO(e,t,n){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),s):f===93?(e.consume(f),u):f===60||f===null||kt(f)||Ci(f)?t(f):n(f)}function u(f){return f===null||f===40||f===91||kt(f)||Ci(f)?t(f):a(f)}function s(f){return yn(f)?o(f):n(f)}function o(f){return f===59?(e.consume(f),a):yn(f)?(e.consume(f),o):n(f)}}function oO(e,t,n){return a;function a(s){return e.consume(s),u}function u(s){return on(s)?n(s):t(s)}}function kx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||kt(e)}function Cx(e){return!yn(e)}function Nx(e){return!(e===47||Sm(e))}function Sm(e){return e===43||e===45||e===46||e===95||on(e)}function b0(e){let t=e.length,n=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){n=!0;break}if(a._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Hl(e){const t=[];let n=-1,a=0,u=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&on(e.charCodeAt(n+1))&&on(e.charCodeAt(n+2)))u=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(n+1);s<56320&&f>56319&&f<57344?(o=String.fromCharCode(s,f),u=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(a,n),encodeURIComponent(o)),a=n+u+1,o=""),u&&(n+=u,u=0)}return t.join("")+e.slice(a)}function $c(e,t,n){const a=[];let u=-1;for(;++u<e.length;){const s=e[u].resolveAll;s&&!a.includes(s)&&(t=s(t,n),a.push(s))}return t}const Am={name:"attention",resolveAll:cO,tokenize:fO};function cO(e,t){let n=-1,a,u,s,o,f,h,d,b;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;h=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g={...e[a][1].end},E={...e[n][1].start};nE(g,-h),nE(E,h),o={type:h>1?"strongSequence":"emphasisSequence",start:g,end:{...e[a][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:E},s={type:h>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},u={type:h>1?"strong":"emphasis",start:{...o.start},end:{...f.end}},e[a][1].end={...o.start},e[n][1].start={...f.end},d=[],e[a][1].end.offset-e[a][1].start.offset&&(d=rr(d,[["enter",e[a][1],t],["exit",e[a][1],t]])),d=rr(d,[["enter",u,t],["enter",o,t],["exit",o,t],["enter",s,t]]),d=rr(d,$c(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),d=rr(d,[["exit",s,t],["enter",f,t],["exit",f,t],["exit",u,t]]),e[n][1].end.offset-e[n][1].start.offset?(b=2,d=rr(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):b=0,Fn(e,a-1,n-a+3,d),n=a+d.length-b-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function fO(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,u=Dl(a);let s;return o;function o(h){return s=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===s)return e.consume(h),f;const d=e.exit("attentionSequence"),b=Dl(h),g=!b||b===2&&u||n.includes(h),E=!u||u===2&&b||n.includes(a);return d._open=!!(s===42?g:g&&(u||!E)),d._close=!!(s===42?E:E&&(b||!g)),t(h)}}function nE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const dO={name:"autolink",tokenize:hO};function hO(e,t,n){let a=0;return u;function u(T){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(T){return yn(T)?(e.consume(T),o):T===64?n(T):d(T)}function o(T){return T===43||T===45||T===46||on(T)?(a=1,f(T)):d(T)}function f(T){return T===58?(e.consume(T),a=0,h):(T===43||T===45||T===46||on(T))&&a++<32?(e.consume(T),f):(a=0,d(T))}function h(T){return T===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):T===null||T===32||T===60||xc(T)?n(T):(e.consume(T),h)}function d(T){return T===64?(e.consume(T),b):m5(T)?(e.consume(T),d):n(T)}function b(T){return on(T)?g(T):n(T)}function g(T){return T===46?(e.consume(T),a=0,b):T===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):E(T)}function E(T){if((T===45||on(T))&&a++<63){const v=T===45?E:g;return e.consume(T),v}return n(T)}}function at(e,t,n,a){const u=a?a-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(h){return We(h)?(e.enter(n),f(h)):t(h)}function f(h){return We(h)&&s++<u?(e.consume(h),f):(e.exit(n),t(h))}}const ys={partial:!0,tokenize:mO};function mO(e,t,n){return a;function a(s){return We(s)?at(e,u,"linePrefix")(s):u(s)}function u(s){return s===null||De(s)?t(s):n(s)}}const wx={continuation:{tokenize:gO},exit:bO,name:"blockQuote",tokenize:pO};function pO(e,t,n){const a=this;return u;function u(o){if(o===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return We(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function gO(e,t,n){const a=this;return u;function u(o){return We(o)?at(e,s,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(wx,t,n)(o)}}function bO(e){e.exit("blockQuote")}const Rx={name:"characterEscape",tokenize:yO};function yO(e,t,n){return a;function a(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),u}function u(s){return g5(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Ox={name:"characterReference",tokenize:EO};function EO(e,t,n){const a=this;let u=0,s,o;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),h}function h(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),s=31,o=on,b(g))}function d(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=p5,b):(e.enter("characterReferenceValue"),s=7,o=vm,b(g))}function b(g){if(g===59&&u){const E=e.exit("characterReferenceValue");return o===on&&!g0(a.sliceSerialize(E))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(g)&&u++<s?(e.consume(g),b):n(g)}}const rE={partial:!0,tokenize:xO},aE={concrete:!0,name:"codeFenced",tokenize:TO};function TO(e,t,n){const a=this,u={partial:!0,tokenize:F};let s=0,o=0,f;return h;function h(z){return d(z)}function d(z){const V=a.events[a.events.length-1];return s=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,f=z,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(z)}function b(z){return z===f?(o++,e.consume(z),b):o<3?n(z):(e.exit("codeFencedFenceSequence"),We(z)?at(e,g,"whitespace")(z):g(z))}function g(z){return z===null||De(z)?(e.exit("codeFencedFence"),a.interrupt?t(z):e.check(rE,N,D)(z)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),E(z))}function E(z){return z===null||De(z)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(z)):We(z)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,T,"whitespace")(z)):z===96&&z===f?n(z):(e.consume(z),E)}function T(z){return z===null||De(z)?g(z):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(z))}function v(z){return z===null||De(z)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(z)):z===96&&z===f?n(z):(e.consume(z),v)}function N(z){return e.attempt(u,D,R)(z)}function R(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),O}function O(z){return s>0&&We(z)?at(e,B,"linePrefix",s+1)(z):B(z)}function B(z){return z===null||De(z)?e.check(rE,N,D)(z):(e.enter("codeFlowValue"),U(z))}function U(z){return z===null||De(z)?(e.exit("codeFlowValue"),B(z)):(e.consume(z),U)}function D(z){return e.exit("codeFenced"),t(z)}function F(z,V,G){let be=0;return q;function q(ae){return z.enter("lineEnding"),z.consume(ae),z.exit("lineEnding"),ce}function ce(ae){return z.enter("codeFencedFence"),We(ae)?at(z,oe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):oe(ae)}function oe(ae){return ae===f?(z.enter("codeFencedFenceSequence"),we(ae)):G(ae)}function we(ae){return ae===f?(be++,z.consume(ae),we):be>=o?(z.exit("codeFencedFenceSequence"),We(ae)?at(z,pe,"whitespace")(ae):pe(ae)):G(ae)}function pe(ae){return ae===null||De(ae)?(z.exit("codeFencedFence"),V(ae)):G(ae)}}}function xO(e,t,n){const a=this;return u;function u(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return a.parser.lazy[a.now().line]?n(o):t(o)}}const zh={name:"codeIndented",tokenize:vO},_O={partial:!0,tokenize:SO};function vO(e,t,n){const a=this;return u;function u(d){return e.enter("codeIndented"),at(e,s,"linePrefix",5)(d)}function s(d){const b=a.events[a.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?o(d):n(d)}function o(d){return d===null?h(d):De(d)?e.attempt(_O,o,h)(d):(e.enter("codeFlowValue"),f(d))}function f(d){return d===null||De(d)?(e.exit("codeFlowValue"),o(d)):(e.consume(d),f)}function h(d){return e.exit("codeIndented"),t(d)}}function SO(e,t,n){const a=this;return u;function u(o){return a.parser.lazy[a.now().line]?n(o):De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),u):at(e,s,"linePrefix",5)(o)}function s(o){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(o):De(o)?u(o):n(o)}}const AO={name:"codeText",previous:CO,resolve:kO,tokenize:NO};function kO(e){let t=e.length-4,n=3,a,u;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)u===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(u=a):(a===t||e[a][1].type==="lineEnding")&&(e[u][1].type="codeTextData",a!==u+2&&(e[u][1].end=e[a-1][1].end,e.splice(u+2,a-u-2),t-=a-u-2,a=u+2),u=void 0);return e}function CO(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function NO(e,t,n){let a=0,u,s;return o;function o(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),a++,f):(e.exit("codeTextSequence"),h(g))}function h(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),h):g===96?(s=e.enter("codeTextSequence"),u=0,b(g)):De(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("codeTextData"),d(g))}function d(g){return g===null||g===32||g===96||De(g)?(e.exit("codeTextData"),h(g)):(e.consume(g),d)}function b(g){return g===96?(e.consume(g),u++,b):u===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(s.type="codeTextData",d(g))}}class wO{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 a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const u=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return a&&Hu(this.left,a),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),Hu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Hu(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);Hu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Hu(this.left,n.reverse())}}}function Hu(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 Lx(e){const t={};let n=-1,a,u,s,o,f,h,d;const b=new wO(e);for(;++n<b.length;){for(;n in t;)n=t[n];if(a=b.get(n),n&&a[1].type==="chunkFlow"&&b.get(n-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,s=0,s<h.length&&h[s][1].type==="lineEndingBlank"&&(s+=2),s<h.length&&h[s][1].type==="content"))for(;++s<h.length&&h[s][1].type!=="content";)h[s][1].type==="chunkText"&&(h[s][1]._isInFirstContentOfListItem=!0,s++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,RO(b,n)),n=t[n],d=!0);else if(a[1]._container){for(s=n,u=void 0;s--;)if(o=b.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(u&&(b.get(u)[1].type="lineEndingBlank"),o[1].type="lineEnding",u=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;u&&(a[1].end={...b.get(u)[1].start},f=b.slice(u,n),f.unshift(a),b.splice(u,n-u+1,f))}}return Fn(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!d}function RO(e,t){const n=e.get(t)[1],a=e.get(t)[2];let u=t-1;const s=[];let o=n._tokenizer;o||(o=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const f=o.events,h=[],d={};let b,g,E=-1,T=n,v=0,N=0;const R=[N];for(;T;){for(;e.get(++u)[1]!==T;);s.push(u),T._tokenizer||(b=a.sliceStream(T),T.next||b.push(null),g&&o.defineSkip(T.start),T._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(b),T._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),g=T,T=T.next}for(T=n;++E<f.length;)f[E][0]==="exit"&&f[E-1][0]==="enter"&&f[E][1].type===f[E-1][1].type&&f[E][1].start.line!==f[E][1].end.line&&(N=E+1,R.push(N),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(o.events=[],T?(T._tokenizer=void 0,T.previous=void 0):R.pop(),E=R.length;E--;){const O=f.slice(R[E],R[E+1]),B=s.pop();h.push([B,B+O.length-1]),e.splice(B,2,O)}for(h.reverse(),E=-1;++E<h.length;)d[v+h[E][0]]=v+h[E][1],v+=h[E][1]-h[E][0]-1;return d}const OO={resolve:DO,tokenize:IO},LO={partial:!0,tokenize:MO};function DO(e){return Lx(e),e}function IO(e,t){let n;return a;function a(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),u(f)}function u(f){return f===null?s(f):De(f)?e.check(LO,o,s)(f):(e.consume(f),u)}function s(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function o(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,u}}function MO(e,t,n){const a=this;return u;function u(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),at(e,s,"linePrefix")}function s(o){if(o===null||De(o))return n(o);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(o):e.interrupt(a.parser.constructs.flow,n,t)(o)}}function Dx(e,t,n,a,u,s,o,f,h){const d=h||Number.POSITIVE_INFINITY;let b=0;return g;function g(O){return O===60?(e.enter(a),e.enter(u),e.enter(s),e.consume(O),e.exit(s),E):O===null||O===32||O===41||xc(O)?n(O):(e.enter(a),e.enter(o),e.enter(f),e.enter("chunkString",{contentType:"string"}),N(O))}function E(O){return O===62?(e.enter(s),e.consume(O),e.exit(s),e.exit(u),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),T(O))}function T(O){return O===62?(e.exit("chunkString"),e.exit(f),E(O)):O===null||O===60||De(O)?n(O):(e.consume(O),O===92?v:T)}function v(O){return O===60||O===62||O===92?(e.consume(O),T):T(O)}function N(O){return!b&&(O===null||O===41||kt(O))?(e.exit("chunkString"),e.exit(f),e.exit(o),e.exit(a),t(O)):b<d&&O===40?(e.consume(O),b++,N):O===41?(e.consume(O),b--,N):O===null||O===32||O===40||xc(O)?n(O):(e.consume(O),O===92?R:N)}function R(O){return O===40||O===41||O===92?(e.consume(O),N):N(O)}}function Ix(e,t,n,a,u,s){const o=this;let f=0,h;return d;function d(T){return e.enter(a),e.enter(u),e.consume(T),e.exit(u),e.enter(s),b}function b(T){return f>999||T===null||T===91||T===93&&!h||T===94&&!f&&"_hiddenFootnoteSupport"in o.parser.constructs?n(T):T===93?(e.exit(s),e.enter(u),e.consume(T),e.exit(u),e.exit(a),t):De(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),g(T))}function g(T){return T===null||T===91||T===93||De(T)||f++>999?(e.exit("chunkString"),b(T)):(e.consume(T),h||(h=!We(T)),T===92?E:g)}function E(T){return T===91||T===92||T===93?(e.consume(T),f++,g):g(T)}}function Mx(e,t,n,a,u,s){let o;return f;function f(E){return E===34||E===39||E===40?(e.enter(a),e.enter(u),e.consume(E),e.exit(u),o=E===40?41:E,h):n(E)}function h(E){return E===o?(e.enter(u),e.consume(E),e.exit(u),e.exit(a),t):(e.enter(s),d(E))}function d(E){return E===o?(e.exit(s),h(o)):E===null?n(E):De(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),at(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===o||E===null||De(E)?(e.exit("chunkString"),d(E)):(e.consume(E),E===92?g:b)}function g(E){return E===o||E===92?(e.consume(E),b):b(E)}}function ns(e,t){let n;return a;function a(u){return De(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),n=!0,a):We(u)?at(e,a,n?"linePrefix":"lineSuffix")(u):t(u)}}const BO={name:"definition",tokenize:HO},zO={partial:!0,tokenize:UO};function HO(e,t,n){const a=this;let u;return s;function s(T){return e.enter("definition"),o(T)}function o(T){return Ix.call(a,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function f(T){return u=fr(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),h):n(T)}function h(T){return kt(T)?ns(e,d)(T):d(T)}function d(T){return Dx(e,b,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function b(T){return e.attempt(zO,g,g)(T)}function g(T){return We(T)?at(e,E,"whitespace")(T):E(T)}function E(T){return T===null||De(T)?(e.exit("definition"),a.parser.defined.push(u),t(T)):n(T)}}function UO(e,t,n){return a;function a(f){return kt(f)?ns(e,u)(f):n(f)}function u(f){return Mx(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return We(f)?at(e,o,"whitespace")(f):o(f)}function o(f){return f===null||De(f)?t(f):n(f)}}const PO={name:"hardBreakEscape",tokenize:jO};function jO(e,t,n){return a;function a(s){return e.enter("hardBreakEscape"),e.consume(s),u}function u(s){return De(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const FO={name:"headingAtx",resolve:qO,tokenize:YO};function qO(e,t){let n=e.length-2,a=3,u,s;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(u={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},s={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},Fn(e,a,n-a+1,[["enter",u,t],["enter",s,t],["exit",s,t],["exit",u,t]])),e}function YO(e,t,n){let a=0;return u;function u(b){return e.enter("atxHeading"),s(b)}function s(b){return e.enter("atxHeadingSequence"),o(b)}function o(b){return b===35&&a++<6?(e.consume(b),o):b===null||kt(b)?(e.exit("atxHeadingSequence"),f(b)):n(b)}function f(b){return b===35?(e.enter("atxHeadingSequence"),h(b)):b===null||De(b)?(e.exit("atxHeading"),t(b)):We(b)?at(e,f,"whitespace")(b):(e.enter("atxHeadingText"),d(b))}function h(b){return b===35?(e.consume(b),h):(e.exit("atxHeadingSequence"),f(b))}function d(b){return b===null||b===35||kt(b)?(e.exit("atxHeadingText"),f(b)):(e.consume(b),d)}}const VO=["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"],iE=["pre","script","style","textarea"],$O={concrete:!0,name:"htmlFlow",resolveTo:XO,tokenize:ZO},GO={partial:!0,tokenize:WO},QO={partial:!0,tokenize:KO};function XO(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 ZO(e,t,n){const a=this;let u,s,o,f,h;return d;function d(k){return b(k)}function b(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),g}function g(k){return k===33?(e.consume(k),E):k===47?(e.consume(k),s=!0,N):k===63?(e.consume(k),u=3,a.interrupt?t:C):yn(k)?(e.consume(k),o=String.fromCharCode(k),R):n(k)}function E(k){return k===45?(e.consume(k),u=2,T):k===91?(e.consume(k),u=5,f=0,v):yn(k)?(e.consume(k),u=4,a.interrupt?t:C):n(k)}function T(k){return k===45?(e.consume(k),a.interrupt?t:C):n(k)}function v(k){const ne="CDATA[";return k===ne.charCodeAt(f++)?(e.consume(k),f===ne.length?a.interrupt?t:oe:v):n(k)}function N(k){return yn(k)?(e.consume(k),o=String.fromCharCode(k),R):n(k)}function R(k){if(k===null||k===47||k===62||kt(k)){const ne=k===47,ue=o.toLowerCase();return!ne&&!s&&iE.includes(ue)?(u=1,a.interrupt?t(k):oe(k)):VO.includes(o.toLowerCase())?(u=6,ne?(e.consume(k),O):a.interrupt?t(k):oe(k)):(u=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(k):s?B(k):U(k))}return k===45||on(k)?(e.consume(k),o+=String.fromCharCode(k),R):n(k)}function O(k){return k===62?(e.consume(k),a.interrupt?t:oe):n(k)}function B(k){return We(k)?(e.consume(k),B):q(k)}function U(k){return k===47?(e.consume(k),q):k===58||k===95||yn(k)?(e.consume(k),D):We(k)?(e.consume(k),U):q(k)}function D(k){return k===45||k===46||k===58||k===95||on(k)?(e.consume(k),D):F(k)}function F(k){return k===61?(e.consume(k),z):We(k)?(e.consume(k),F):U(k)}function z(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),h=k,V):We(k)?(e.consume(k),z):G(k)}function V(k){return k===h?(e.consume(k),h=null,be):k===null||De(k)?n(k):(e.consume(k),V)}function G(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||kt(k)?F(k):(e.consume(k),G)}function be(k){return k===47||k===62||We(k)?U(k):n(k)}function q(k){return k===62?(e.consume(k),ce):n(k)}function ce(k){return k===null||De(k)?oe(k):We(k)?(e.consume(k),ce):n(k)}function oe(k){return k===45&&u===2?(e.consume(k),P):k===60&&u===1?(e.consume(k),te):k===62&&u===4?(e.consume(k),M):k===63&&u===3?(e.consume(k),C):k===93&&u===5?(e.consume(k),xe):De(k)&&(u===6||u===7)?(e.exit("htmlFlowData"),e.check(GO,W,we)(k)):k===null||De(k)?(e.exit("htmlFlowData"),we(k)):(e.consume(k),oe)}function we(k){return e.check(QO,pe,W)(k)}function pe(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),ae}function ae(k){return k===null||De(k)?we(k):(e.enter("htmlFlowData"),oe(k))}function P(k){return k===45?(e.consume(k),C):oe(k)}function te(k){return k===47?(e.consume(k),o="",fe):oe(k)}function fe(k){if(k===62){const ne=o.toLowerCase();return iE.includes(ne)?(e.consume(k),M):oe(k)}return yn(k)&&o.length<8?(e.consume(k),o+=String.fromCharCode(k),fe):oe(k)}function xe(k){return k===93?(e.consume(k),C):oe(k)}function C(k){return k===62?(e.consume(k),M):k===45&&u===2?(e.consume(k),C):oe(k)}function M(k){return k===null||De(k)?(e.exit("htmlFlowData"),W(k)):(e.consume(k),M)}function W(k){return e.exit("htmlFlow"),t(k)}}function KO(e,t,n){const a=this;return u;function u(o){return De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return a.parser.lazy[a.now().line]?n(o):t(o)}}function WO(e,t,n){return a;function a(u){return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),e.attempt(ys,t,n)}}const JO={name:"htmlText",tokenize:eL};function eL(e,t,n){const a=this;let u,s,o;return f;function f(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),h}function h(C){return C===33?(e.consume(C),d):C===47?(e.consume(C),F):C===63?(e.consume(C),U):yn(C)?(e.consume(C),G):n(C)}function d(C){return C===45?(e.consume(C),b):C===91?(e.consume(C),s=0,v):yn(C)?(e.consume(C),B):n(C)}function b(C){return C===45?(e.consume(C),T):n(C)}function g(C){return C===null?n(C):C===45?(e.consume(C),E):De(C)?(o=g,te(C)):(e.consume(C),g)}function E(C){return C===45?(e.consume(C),T):g(C)}function T(C){return C===62?P(C):C===45?E(C):g(C)}function v(C){const M="CDATA[";return C===M.charCodeAt(s++)?(e.consume(C),s===M.length?N:v):n(C)}function N(C){return C===null?n(C):C===93?(e.consume(C),R):De(C)?(o=N,te(C)):(e.consume(C),N)}function R(C){return C===93?(e.consume(C),O):N(C)}function O(C){return C===62?P(C):C===93?(e.consume(C),O):N(C)}function B(C){return C===null||C===62?P(C):De(C)?(o=B,te(C)):(e.consume(C),B)}function U(C){return C===null?n(C):C===63?(e.consume(C),D):De(C)?(o=U,te(C)):(e.consume(C),U)}function D(C){return C===62?P(C):U(C)}function F(C){return yn(C)?(e.consume(C),z):n(C)}function z(C){return C===45||on(C)?(e.consume(C),z):V(C)}function V(C){return De(C)?(o=V,te(C)):We(C)?(e.consume(C),V):P(C)}function G(C){return C===45||on(C)?(e.consume(C),G):C===47||C===62||kt(C)?be(C):n(C)}function be(C){return C===47?(e.consume(C),P):C===58||C===95||yn(C)?(e.consume(C),q):De(C)?(o=be,te(C)):We(C)?(e.consume(C),be):P(C)}function q(C){return C===45||C===46||C===58||C===95||on(C)?(e.consume(C),q):ce(C)}function ce(C){return C===61?(e.consume(C),oe):De(C)?(o=ce,te(C)):We(C)?(e.consume(C),ce):be(C)}function oe(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),u=C,we):De(C)?(o=oe,te(C)):We(C)?(e.consume(C),oe):(e.consume(C),pe)}function we(C){return C===u?(e.consume(C),u=void 0,ae):C===null?n(C):De(C)?(o=we,te(C)):(e.consume(C),we)}function pe(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||kt(C)?be(C):(e.consume(C),pe)}function ae(C){return C===47||C===62||kt(C)?be(C):n(C)}function P(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function te(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),fe}function fe(C){return We(C)?at(e,xe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):xe(C)}function xe(C){return e.enter("htmlTextData"),o(C)}}const y0={name:"labelEnd",resolveAll:aL,resolveTo:iL,tokenize:lL},tL={tokenize:uL},nL={tokenize:sL},rL={tokenize:oL};function aL(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const u=a.type==="labelImage"?4:2;a.type="data",t+=u}}return e.length!==n.length&&Fn(e,0,e.length,n),e}function iL(e,t){let n=e.length,a=0,u,s,o,f;for(;n--;)if(u=e[n][1],s){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;e[n][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(s=n,u.type!=="labelLink")){a=2;break}}else u.type==="labelEnd"&&(o=n);const h={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},b={type:"labelText",start:{...e[s+a+2][1].end},end:{...e[o-2][1].start}};return f=[["enter",h,t],["enter",d,t]],f=rr(f,e.slice(s+1,s+a+3)),f=rr(f,[["enter",b,t]]),f=rr(f,$c(t.parser.constructs.insideSpan.null,e.slice(s+a+4,o-3),t)),f=rr(f,[["exit",b,t],e[o-2],e[o-1],["exit",d,t]]),f=rr(f,e.slice(o+1)),f=rr(f,[["exit",h,t]]),Fn(e,s,e.length,f),e}function lL(e,t,n){const a=this;let u=a.events.length,s,o;for(;u--;)if((a.events[u][1].type==="labelImage"||a.events[u][1].type==="labelLink")&&!a.events[u][1]._balanced){s=a.events[u][1];break}return f;function f(E){return s?s._inactive?g(E):(o=a.parser.defined.includes(fr(a.sliceSerialize({start:s.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(E),e.exit("labelMarker"),e.exit("labelEnd"),h):n(E)}function h(E){return E===40?e.attempt(tL,b,o?b:g)(E):E===91?e.attempt(nL,b,o?d:g)(E):o?b(E):g(E)}function d(E){return e.attempt(rL,b,g)(E)}function b(E){return t(E)}function g(E){return s._balanced=!0,n(E)}}function uL(e,t,n){return a;function a(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),u}function u(g){return kt(g)?ns(e,s)(g):s(g)}function s(g){return g===41?b(g):Dx(e,o,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function o(g){return kt(g)?ns(e,h)(g):b(g)}function f(g){return n(g)}function h(g){return g===34||g===39||g===40?Mx(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):b(g)}function d(g){return kt(g)?ns(e,b)(g):b(g)}function b(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function sL(e,t,n){const a=this;return u;function u(f){return Ix.call(a,e,s,o,"reference","referenceMarker","referenceString")(f)}function s(f){return a.parser.defined.includes(fr(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function o(f){return n(f)}}function oL(e,t,n){return a;function a(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),u}function u(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const cL={name:"labelStartImage",resolveAll:y0.resolveAll,tokenize:fL};function fL(e,t,n){const a=this;return u;function u(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),o):n(f)}function o(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):t(f)}}const dL={name:"labelStartLink",resolveAll:y0.resolveAll,tokenize:hL};function hL(e,t,n){const a=this;return u;function u(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(o):t(o)}}const Hh={name:"lineEnding",tokenize:mL};function mL(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),at(e,t,"linePrefix")}}const ec={name:"thematicBreak",tokenize:pL};function pL(e,t,n){let a=0,u;return s;function s(d){return e.enter("thematicBreak"),o(d)}function o(d){return u=d,f(d)}function f(d){return d===u?(e.enter("thematicBreakSequence"),h(d)):a>=3&&(d===null||De(d))?(e.exit("thematicBreak"),t(d)):n(d)}function h(d){return d===u?(e.consume(d),a++,h):(e.exit("thematicBreakSequence"),We(d)?at(e,f,"whitespace")(d):f(d))}}const Rn={continuation:{tokenize:EL},exit:xL,name:"list",tokenize:yL},gL={partial:!0,tokenize:_L},bL={partial:!0,tokenize:TL};function yL(e,t,n){const a=this,u=a.events[a.events.length-1];let s=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,o=0;return f;function f(T){const v=a.containerState.type||(T===42||T===43||T===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!a.containerState.marker||T===a.containerState.marker:vm(T)){if(a.containerState.type||(a.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(ec,n,d)(T):d(T);if(!a.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(T)}return n(T)}function h(T){return vm(T)&&++o<10?(e.consume(T),h):(!a.interrupt||o<2)&&(a.containerState.marker?T===a.containerState.marker:T===41||T===46)?(e.exit("listItemValue"),d(T)):n(T)}function d(T){return e.enter("listItemMarker"),e.consume(T),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||T,e.check(ys,a.interrupt?n:b,e.attempt(gL,E,g))}function b(T){return a.containerState.initialBlankLine=!0,s++,E(T)}function g(T){return We(T)?(e.enter("listItemPrefixWhitespace"),e.consume(T),e.exit("listItemPrefixWhitespace"),E):n(T)}function E(T){return a.containerState.size=s+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function EL(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(ys,u,s);function u(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,at(e,t,"listItemIndent",a.containerState.size+1)(f)}function s(f){return a.containerState.furtherBlankLines||!We(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,o(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(bL,t,o)(f))}function o(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,at(e,e.attempt(Rn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function TL(e,t,n){const a=this;return at(e,u,"listItemIndent",a.containerState.size+1);function u(s){const o=a.events[a.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===a.containerState.size?t(s):n(s)}}function xL(e){e.exit(this.containerState.type)}function _L(e,t,n){const a=this;return at(e,u,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(s){const o=a.events[a.events.length-1];return!We(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const lE={name:"setextUnderline",resolveTo:vL,tokenize:SL};function vL(e,t){let n=e.length,a,u,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(u=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[u][1].type="setextHeadingText",s?(e.splice(u,0,["enter",o,t]),e.splice(s+1,0,["exit",e[a][1],t]),e[a][1].end={...e[s][1].end}):e[a][1]=o,e.push(["exit",o,t]),e}function SL(e,t,n){const a=this;let u;return s;function s(d){let b=a.events.length,g;for(;b--;)if(a.events[b][1].type!=="lineEnding"&&a.events[b][1].type!=="linePrefix"&&a.events[b][1].type!=="content"){g=a.events[b][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||g)?(e.enter("setextHeadingLine"),u=d,o(d)):n(d)}function o(d){return e.enter("setextHeadingLineSequence"),f(d)}function f(d){return d===u?(e.consume(d),f):(e.exit("setextHeadingLineSequence"),We(d)?at(e,h,"lineSuffix")(d):h(d))}function h(d){return d===null||De(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const AL={tokenize:DL,partial:!0};function kL(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:RL,continuation:{tokenize:OL},exit:LL}},text:{91:{name:"gfmFootnoteCall",tokenize:wL},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:CL,resolveTo:NL}}}}function CL(e,t,n){const a=this;let u=a.events.length;const s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o;for(;u--;){const h=a.events[u][1];if(h.type==="labelImage"){o=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!o||!o._balanced)return n(h);const d=fr(a.sliceSerialize({start:o.end,end:a.now()}));return d.codePointAt(0)!==94||!s.includes(d.slice(1))?n(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function NL(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 a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};u.end.column++,u.end.offset++,u.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},u.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},f=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",u,t],["exit",u,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...f),e}function wL(e,t,n){const a=this,u=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let s=0,o;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),h}function h(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(g){if(s>999||g===93&&!o||g===null||g===91||kt(g))return n(g);if(g===93){e.exit("chunkString");const E=e.exit("gfmFootnoteCallString");return u.includes(fr(a.sliceSerialize(E)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return kt(g)||(o=!0),s++,e.consume(g),g===92?b:d}function b(g){return g===91||g===92||g===93?(e.consume(g),s++,d):d(g)}}function RL(e,t,n){const a=this,u=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let s,o=0,f;return h;function h(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):n(v)}function b(v){if(o>999||v===93&&!f||v===null||v===91||kt(v))return n(v);if(v===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return s=fr(a.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),E}return kt(v)||(f=!0),o++,e.consume(v),v===92?g:b}function g(v){return v===91||v===92||v===93?(e.consume(v),o++,b):b(v)}function E(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),u.includes(s)||u.push(s),at(e,T,"gfmFootnoteDefinitionWhitespace")):n(v)}function T(v){return t(v)}}function OL(e,t,n){return e.check(ys,t,e.attempt(AL,t,n))}function LL(e){e.exit("gfmFootnoteDefinition")}function DL(e,t,n){const a=this;return at(e,u,"gfmFootnoteDefinitionIndent",5);function u(s){const o=a.events[a.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(s):n(s)}}function IL(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:s,resolveAll:u};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function u(o,f){let h=-1;for(;++h<o.length;)if(o[h][0]==="enter"&&o[h][1].type==="strikethroughSequenceTemporary"&&o[h][1]._close){let d=h;for(;d--;)if(o[d][0]==="exit"&&o[d][1].type==="strikethroughSequenceTemporary"&&o[d][1]._open&&o[h][1].end.offset-o[h][1].start.offset===o[d][1].end.offset-o[d][1].start.offset){o[h][1].type="strikethroughSequence",o[d][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},o[d][1].start),end:Object.assign({},o[h][1].end)},g={type:"strikethroughText",start:Object.assign({},o[d][1].end),end:Object.assign({},o[h][1].start)},E=[["enter",b,f],["enter",o[d][1],f],["exit",o[d][1],f],["enter",g,f]],T=f.parser.constructs.insideSpan.null;T&&Fn(E,E.length,0,$c(T,o.slice(d+1,h),f)),Fn(E,E.length,0,[["exit",g,f],["enter",o[h][1],f],["exit",o[h][1],f],["exit",b,f]]),Fn(o,d-1,h-d+3,E),h=d+E.length-2;break}}for(h=-1;++h<o.length;)o[h][1].type==="strikethroughSequenceTemporary"&&(o[h][1].type="data");return o}function s(o,f,h){const d=this.previous,b=this.events;let g=0;return E;function E(v){return d===126&&b[b.length-1][1].type!=="characterEscape"?h(v):(o.enter("strikethroughSequenceTemporary"),T(v))}function T(v){const N=Dl(d);if(v===126)return g>1?h(v):(o.consume(v),g++,T);if(g<2&&!n)return h(v);const R=o.exit("strikethroughSequenceTemporary"),O=Dl(v);return R._open=!O||O===2&&!!N,R._close=!N||N===2&&!!O,f(v)}}}class ML{constructor(){this.map=[]}add(t,n,a){BL(this,t,n,a)}consume(t){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const a=[];for(;n>0;)n-=1,a.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];a.push(t.slice()),t.length=0;let u=a.pop();for(;u;){for(const s of u)t.push(s);u=a.pop()}this.map.length=0}}function BL(e,t,n,a){let u=0;if(!(n===0&&a.length===0)){for(;u<e.map.length;){if(e.map[u][0]===t){e.map[u][1]+=n,e.map[u][2].push(...a);return}u+=1}e.map.push([t,n,a])}}function zL(e,t){let n=!1;const a=[];for(;t<e.length;){const u=e[t];if(n){if(u[0]==="enter")u[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(u[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=a.length-1;a[s]=a[s]==="left"?"center":"right"}}else if(u[1].type==="tableDelimiterRow")break}else u[0]==="enter"&&u[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function HL(){return{flow:{null:{name:"table",tokenize:UL,resolveAll:PL}}}}function UL(e,t,n){const a=this;let u=0,s=0,o;return f;function f(q){let ce=a.events.length-1;for(;ce>-1;){const pe=a.events[ce][1].type;if(pe==="lineEnding"||pe==="linePrefix")ce--;else break}const oe=ce>-1?a.events[ce][1].type:null,we=oe==="tableHead"||oe==="tableRow"?z:h;return we===z&&a.parser.lazy[a.now().line]?n(q):we(q)}function h(q){return e.enter("tableHead"),e.enter("tableRow"),d(q)}function d(q){return q===124||(o=!0,s+=1),b(q)}function b(q){return q===null?n(q):De(q)?s>1?(s=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(q),e.exit("lineEnding"),T):n(q):We(q)?at(e,b,"whitespace")(q):(s+=1,o&&(o=!1,u+=1),q===124?(e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),o=!0,b):(e.enter("data"),g(q)))}function g(q){return q===null||q===124||kt(q)?(e.exit("data"),b(q)):(e.consume(q),q===92?E:g)}function E(q){return q===92||q===124?(e.consume(q),g):g(q)}function T(q){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(q):(e.enter("tableDelimiterRow"),o=!1,We(q)?at(e,v,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):v(q))}function v(q){return q===45||q===58?R(q):q===124?(o=!0,e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),N):F(q)}function N(q){return We(q)?at(e,R,"whitespace")(q):R(q)}function R(q){return q===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(q),e.exit("tableDelimiterMarker"),O):q===45?(s+=1,O(q)):q===null||De(q)?D(q):F(q)}function O(q){return q===45?(e.enter("tableDelimiterFiller"),B(q)):F(q)}function B(q){return q===45?(e.consume(q),B):q===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(q),e.exit("tableDelimiterMarker"),U):(e.exit("tableDelimiterFiller"),U(q))}function U(q){return We(q)?at(e,D,"whitespace")(q):D(q)}function D(q){return q===124?v(q):q===null||De(q)?!o||u!==s?F(q):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(q)):F(q)}function F(q){return n(q)}function z(q){return e.enter("tableRow"),V(q)}function V(q){return q===124?(e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),V):q===null||De(q)?(e.exit("tableRow"),t(q)):We(q)?at(e,V,"whitespace")(q):(e.enter("data"),G(q))}function G(q){return q===null||q===124||kt(q)?(e.exit("data"),V(q)):(e.consume(q),q===92?be:G)}function be(q){return q===92||q===124?(e.consume(q),G):G(q)}}function PL(e,t){let n=-1,a=!0,u=0,s=[0,0,0,0],o=[0,0,0,0],f=!1,h=0,d,b,g;const E=new ML;for(;++n<e.length;){const T=e[n],v=T[1];T[0]==="enter"?v.type==="tableHead"?(f=!1,h!==0&&(uE(E,t,h,d,b),b=void 0,h=0),d={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},E.add(n,0,[["enter",d,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(a=!0,g=void 0,s=[0,0,0,0],o=[0,n+1,0,0],f&&(f=!1,b={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},E.add(n,0,[["enter",b,t]])),u=v.type==="tableDelimiterRow"?2:b?3:1):u&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(a=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],g=Yo(E,t,s,u,void 0,g),s=[0,0,0,0]),o[2]=n)):v.type==="tableCellDivider"&&(a?a=!1:(s[1]!==0&&(o[0]=o[1],g=Yo(E,t,s,u,void 0,g)),s=o,o=[s[1],n,0,0])):v.type==="tableHead"?(f=!0,h=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(h=n,s[1]!==0?(o[0]=o[1],g=Yo(E,t,s,u,n,g)):o[1]!==0&&(g=Yo(E,t,o,u,n,g)),u=0):u&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(o[3]=n)}for(h!==0&&uE(E,t,h,d,b),E.consume(t.events),n=-1;++n<t.events.length;){const T=t.events[n];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=zL(t.events,n))}return e}function Yo(e,t,n,a,u,s){const o=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(s.end=Object.assign({},_l(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const h=_l(t.events,n[1]);if(s={type:o,start:Object.assign({},h),end:Object.assign({},h)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const d=_l(t.events,n[2]),b=_l(t.events,n[3]),g={type:f,start:Object.assign({},d),end:Object.assign({},b)};if(e.add(n[2],0,[["enter",g,t]]),a!==2){const E=t.events[n[2]],T=t.events[n[3]];if(E[1].end=Object.assign({},T[1].end),E[1].type="chunkText",E[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,N=n[3]-n[2]-1;e.add(v,N,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return u!==void 0&&(s.end=Object.assign({},_l(t.events,u)),e.add(u,0,[["exit",s,t]]),s=void 0),s}function uE(e,t,n,a,u){const s=[],o=_l(t.events,n);u&&(u.end=Object.assign({},o),s.push(["exit",u,t])),a.end=Object.assign({},o),s.push(["exit",a,t]),e.add(n+1,0,s)}function _l(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const jL={name:"tasklistCheck",tokenize:qL};function FL(){return{text:{91:jL}}}function qL(e,t,n){const a=this;return u;function u(h){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),s)}function s(h){return kt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),o):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),o):n(h)}function o(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(h)}function f(h){return De(h)?t(h):We(h)?e.check({tokenize:YL},t,n)(h):n(h)}}function YL(e,t,n){return at(e,a,"whitespace");function a(u){return u===null?n(u):t(u)}}function VL(e){return Tx([tO(),kL(),IL(e),HL(),FL()])}const $L={};function GL(e){const t=this,n=e||$L,a=t.data(),u=a.micromarkExtensions||(a.micromarkExtensions=[]),s=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),o=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);u.push(VL(n)),s.push(XR()),o.push(ZR(n))}var QL=Object.defineProperty,XL=Object.defineProperties,ZL=Object.getOwnPropertyDescriptors,sE=Object.getOwnPropertySymbols,KL=Object.prototype.hasOwnProperty,WL=Object.prototype.propertyIsEnumerable,oE=(e,t,n)=>t in e?QL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bx=(e,t)=>{for(var n in t||(t={}))KL.call(t,n)&&oE(e,n,t[n]);if(sE)for(var n of sE(t))WL.call(t,n)&&oE(e,n,t[n]);return e},zx=(e,t)=>XL(e,ZL(t)),Tn=(e,t)=>{let n=!1,a=!1;for(let u=0;u<t;u+=1){if(e[u]==="\\"&&u+1<e.length&&e[u+1]==="`"){u+=1;continue}if(e.substring(u,u+3)==="```"){a=!a,u+=2;continue}!a&&e[u]==="`"&&(n=!n)}return n||a},JL=(e,t)=>{let n=e.substring(t,t+3)==="```",a=t>0&&e.substring(t-1,t+2)==="```",u=t>1&&e.substring(t-2,t+1)==="```";return n||a||u},eD=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!JL(e,n)&&(t+=1)}return t},ja=(e,t)=>{let n=!1,a=!1,u=-1;for(let s=0;s<e.length;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){a=!a,s+=2;continue}if(!a&&e[s]==="`")if(n){if(u<t&&t<s)return!0;n=!1,u=-1}else n=!0,u=s}return!1},tD=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,nD=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(tD,(t,n,a,u)=>Tn(e,u)?t:`${n}\\>${a}`),rD=/(\*\*)([^*]*\*?)$/,aD=/(__)([^_]*?)$/,iD=/(\*\*\*)([^*]*?)$/,lD=/(\*)([^*]*?)$/,uD=/(_)([^_]*?)$/,sD=/(`)([^`]*?)$/,oD=/(~~)([^~]*?)$/,Di=/^[\s_~*`]*$/,Hx=/^[\s]*[-*+][\s]+$/,cD=/[\p{L}\p{N}_]/u,fD=/^```[^`\n]*```?$/,dD=/^\*{4,}$/,hD=/(__)([^_]+)_$/,mD=/(~~)([^~]+)~$/,cE=/~~/g,Fa=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:cD.test(e)},pD=(e,t)=>{let n=1;for(let a=t-1;a>=0;a-=1)if(e[a]==="]")n+=1;else if(e[a]==="["&&(n-=1,n===0))return a;return-1},Ux=(e,t)=>{let n=1;for(let a=t+1;a<e.length;a+=1)if(e[a]==="[")n+=1;else if(e[a]==="]"&&(n-=1,n===0))return a;return-1},Gc=(e,t)=>{let n=!1,a=!1;for(let u=0;u<e.length&&u<t;u+=1){if(e[u]==="\\"&&e[u+1]==="$"){u+=1;continue}e[u]==="$"&&(e[u+1]==="$"?(a=!a,u+=1,n=!1):a||(n=!n))}return n||a},gD=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
207
- `)return!1}return!1},Px=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?gD(e,t):!1;if(e[n]===`
208
- `)return!1}return!1},bD=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let a=n+1<e.length?e[n+1]:"";return a>="a"&&a<="z"||a>="A"&&a<="Z"||a==="/"}if(e[n]===`
209
- `)return!1}return!1},E0=(e,t,n)=>{let a=0;for(let h=t-1;h>=0;h-=1)if(e[h]===`
210
- `){a=h+1;break}let u=e.length;for(let h=t;h<e.length;h+=1)if(e[h]===`
211
- `){u=h;break}let s=e.substring(a,u),o=0,f=!1;for(let h of s)if(h===n)o+=1;else if(h!==" "&&h!==" "){f=!0;break}return o>=3&&!f},yD=(e,t,n,a)=>n==="\\"||e.includes("$")&&Gc(e,t)?!0:n!=="*"&&a==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&a&&Fa(n)&&Fa(a)||(!n||n===" "||n===" "||n===`
212
- `)&&(!a||a===" "||a===" "||a===`
213
- `)),jx=e=>{let t=0,n=!1,a=e.length;for(let u=0;u<a;u+=1){if(e[u]==="`"&&u+2<a&&e[u+1]==="`"&&e[u+2]==="`"){n=!n,u+=2;continue}if(n||e[u]!=="*")continue;let s=u>0?e[u-1]:"",o=u<a-1?e[u+1]:"";yD(e,u,s,o)||(t+=1)}return t},ED=(e,t,n,a)=>!!(n==="\\"||e.includes("$")&&Gc(e,t)||Px(e,t)||bD(e,t)||n==="_"||a==="_"||n&&a&&Fa(n)&&Fa(a)),TD=e=>{let t=0,n=!1,a=e.length;for(let u=0;u<a;u+=1){if(e[u]==="`"&&u+2<a&&e[u+1]==="`"&&e[u+2]==="`"){n=!n,u+=2;continue}if(n||e[u]!=="_")continue;let s=u>0?e[u-1]:"",o=u<a-1?e[u+1]:"";ED(e,u,s,o)||(t+=1)}return t},xD=e=>{let t=0,n=0,a=!1;for(let u=0;u<e.length;u+=1){if(e[u]==="`"&&u+2<e.length&&e[u+1]==="`"&&e[u+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,a=!a,u+=2;continue}a||(e[u]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},T0=e=>{let t=0,n=!1;for(let a=0;a<e.length;a+=1){if(e[a]==="`"&&a+2<e.length&&e[a+1]==="`"&&e[a+2]==="`"){n=!n,a+=2;continue}n||e[a]==="*"&&a+1<e.length&&e[a+1]==="*"&&(t+=1,a+=1)}return t},fE=e=>{let t=0,n=!1;for(let a=0;a<e.length;a+=1){if(e[a]==="`"&&a+2<e.length&&e[a+1]==="`"&&e[a+2]==="`"){n=!n,a+=2;continue}n||e[a]==="_"&&a+1<e.length&&e[a+1]==="_"&&(t+=1,a+=1)}return t},_D=(e,t,n)=>{if(!t||Di.test(t))return!0;let a=e.substring(0,n).lastIndexOf(`
214
- `),u=a===-1?0:a+1,s=e.substring(u,n);return Hx.test(s)&&t.includes(`
215
- `)?!0:E0(e,n,"*")},vD=e=>{let t=e.match(rD);if(!t)return e;let n=t[2],a=e.lastIndexOf(t[1]);return Tn(e,a)||ja(e,a)||_D(e,n,a)?e:T0(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},SD=(e,t,n)=>{if(!t||Di.test(t))return!0;let a=e.substring(0,n).lastIndexOf(`
216
- `),u=a===-1?0:a+1,s=e.substring(u,n);return Hx.test(s)&&t.includes(`
217
- `)?!0:E0(e,n,"_")},AD=e=>{let t=e.match(aD);if(!t){let u=e.match(hD);if(u){let s=e.lastIndexOf(u[1]);if(!(Tn(e,s)||ja(e,s))&&fE(e)%2===1)return`${e}_`}return e}let n=t[2],a=e.lastIndexOf(t[1]);return Tn(e,a)||ja(e,a)||SD(e,n,a)?e:fE(e)%2===1?`${e}__`:e},kD=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Gc(e,n)){let a=n>0?e[n-1]:"",u=n<e.length-1?e[n+1]:"";if((!a||a===" "||a===" "||a===`
218
- `)&&(!u||u===" "||u===" "||u===`
219
- `)||a&&u&&Fa(a)&&Fa(u))continue;return n}}return-1},CD=e=>{if(!e.match(lD))return e;let t=kD(e);if(t===-1||Tn(e,t)||ja(e,t))return e;let n=e.substring(t+1);return!n||Di.test(n)?e:jx(e)%2===1?`${e}*`:e},Fx=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Gc(e,n)&&!Px(e,n)){let a=n>0?e[n-1]:"",u=n<e.length-1?e[n+1]:"";if(a&&u&&Fa(a)&&Fa(u))continue;return n}}return-1},ND=e=>{let t=e.length;for(;t>0&&e[t-1]===`
220
- `;)t-=1;if(t<e.length){let n=e.slice(0,t),a=e.slice(t);return`${n}_${a}`}return`${e}_`},wD=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(T0(t)%2!==1)return null;let n=t.indexOf("**"),a=Fx(t);return n!==-1&&a!==-1&&n<a?`${t}_**`:null},RD=e=>{if(!e.match(uD))return e;let t=Fx(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Di.test(n)||Tn(e,t)||ja(e,t))return e;if(TD(e)%2===1){let a=wD(e);return a!==null?a:ND(e)}return e},OD=e=>{let t=T0(e),n=jx(e);return t%2===0&&n%2===0},LD=(e,t,n)=>!t||Di.test(t)||Tn(e,n)||ja(e,n)?!0:E0(e,n,"*"),DD=e=>{if(dD.test(e))return e;let t=e.match(iD);if(!t)return e;let n=t[2],a=e.lastIndexOf(t[1]);return LD(e,n,a)?e:xD(e)%2===1?OD(e)?e:`${e}***`:e},ID=/<[a-zA-Z/][^>]*$/,MD=e=>{let t=e.match(ID);return!t||t.index===void 0||Tn(e,t.index)?e:e.substring(0,t.index).trimEnd()},BD=e=>!e.match(fD)||e.includes(`
221
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,zD=e=>(e.match(/```/g)||[]).length%2===1,HD=e=>{let t=BD(e);if(t!==null)return t;let n=e.match(sD);if(n&&!zD(e)){let a=n[2];if(!a||Di.test(a))return e;if(eD(e)%2===1)return`${e}\``}return e},qx=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",UD=e=>{let t=0,n=!1;for(let a=0;a<e.length-1;a+=1)e[a]==="`"&&!qx(e,a)&&(n=!n),!n&&e[a]==="$"&&e[a+1]==="$"&&(t+=1,a+=1);return t},PD=e=>{let t=0,n=!1;for(let a=0;a<e.length;a+=1){if(e[a]==="\\"){a+=1;continue}if(e[a]==="`"&&!qx(e,a)){n=!n;continue}!n&&e[a]==="$"&&(a+1<e.length&&e[a+1]==="$"?a+=1:t+=1)}return t},jD=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
222
- `,t)!==-1&&!e.endsWith(`
223
- `)?`${e}
224
- $$`:`${e}$$`},FD=e=>UD(e)%2===0?e:jD(e),qD=e=>PD(e)%2===1?`${e}$`:e,YD=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let a=pD(e,t);if(a===-1||Tn(e,a))return null;let u=a>0&&e[a-1]==="!",s=u?a-1:a,o=e.substring(0,s);if(u)return o;let f=e.substring(a+1,t);return n==="text-only"?`${o}${f}`:`${o}[${f}](streamdown:incomplete-link)`},dE=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!Tn(e,n)){if(n>0&&e[n-1]==="!")continue;let a=Ux(e,n);if(a===-1)return n;if(a+1<e.length&&e[a+1]==="("){let u=e.indexOf(")",a+2);u!==-1&&(n=u)}}return t},VD=(e,t,n)=>{let a=t>0&&e[t-1]==="!",u=a?t-1:t;if(!e.substring(t+1).includes("]")){let s=e.substring(0,u);if(a)return s;if(n==="text-only"){let o=dE(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}if(Ux(e,t)===-1){let s=e.substring(0,u);if(a)return s;if(n==="text-only"){let o=dE(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}return null},Yx=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Tn(e,n)){let a=YD(e,n,t);if(a!==null)return a}for(let a=e.length-1;a>=0;a-=1)if(e[a]==="["&&!Tn(e,a)){let u=VD(e,a,t);if(u!==null)return u}return e},$D=/^-{1,2}$/,GD=/^[\s]*-{1,2}[\s]+$/,QD=/^={1,2}$/,XD=/^[\s]*={1,2}[\s]+$/,ZD=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
225
- `);if(t===-1)return e;let n=e.substring(t+1),a=e.substring(0,t),u=n.trim();if($D.test(u)&&!n.match(GD)){let s=a.split(`
226
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}if(QD.test(u)&&!n.match(XD)){let s=a.split(`
227
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}return e},KD=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),WD=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(KD,(t,n)=>Tn(e,n)?t:"\\~"),JD=e=>{var t,n;let a=e.match(oD);if(a){let u=a[2];if(!u||Di.test(u))return e;let s=e.lastIndexOf(a[1]);if(Tn(e,s)||ja(e,s))return e;if(((t=e.match(cE))==null?void 0:t.length)%2===1)return`${e}~~`}else{let u=e.match(mD);if(u){let s=e.lastIndexOf(u[0].slice(0,2));if(Tn(e,s)||ja(e,s))return e;if(((n=e.match(cE))==null?void 0:n.length)%2===1)return`${e}~`}}return e},Uh=e=>e!==!1,e8=e=>e===!0,bn={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},t8=[{handler:{name:"singleTilde",handle:WD,priority:bn.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:nD,priority:bn.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:MD,priority:bn.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:ZD,priority:bn.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Yx,priority:bn.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:DD,priority:bn.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:vD,priority:bn.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:AD,priority:bn.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:CD,priority:bn.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:RD,priority:bn.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:HD,priority:bn.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:JD,priority:bn.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:FD,priority:bn.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:qD,priority:bn.INLINE_KATEX},optionKey:"inlineKatex"}],n8=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return t8.filter(({handler:a,optionKey:u})=>a.name==="links"?Uh(e==null?void 0:e.links)||Uh(e==null?void 0:e.images):a.name==="inlineKatex"?e8(e==null?void 0:e.inlineKatex):Uh(e==null?void 0:e[u])).map(({handler:a,earlyReturn:u})=>a.name==="links"?{handler:zx(Bx({},a),{handle:s=>Yx(s,n)}),earlyReturn:n==="protocol"?u:void 0}:{handler:a,earlyReturn:u})},r8=(e,t)=>{var n;if(!e||typeof e!="string")return e;let a=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,u=n8(t),s=((n=t==null?void 0:t.handlers)!=null?n:[]).map(f=>{var h;return{handler:zx(Bx({},f),{priority:(h=f.priority)!=null?h:bn.DEFAULT}),earlyReturn:void 0}}),o=[...u,...s].sort((f,h)=>{var d,b;return((d=f.handler.priority)!=null?d:0)-((b=h.handler.priority)!=null?b:0)});for(let{handler:f,earlyReturn:h}of o)if(a=f.handle(a),h!=null&&h(a))return a;return a},a8=r8,Vx=TT();const i8=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,l8=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u8={};function hE(e,t){return(u8.jsx?l8:i8).test(e)}const s8=/[ \t\n\f\r]/g;function o8(e){return typeof e=="object"?e.type==="text"?mE(e.value):!1:mE(e)}function mE(e){return e.replace(s8,"")===""}var El={},Ph,pE;function c8(){if(pE)return Ph;pE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
228
- `,d="/",b="*",g="",E="comment",T="declaration";function v(R,O){if(typeof R!="string")throw new TypeError("First argument must be a string");if(!R)return[];O=O||{};var B=1,U=1;function D(pe){var ae=pe.match(t);ae&&(B+=ae.length);var P=pe.lastIndexOf(h);U=~P?pe.length-P:U+pe.length}function F(){var pe={line:B,column:U};return function(ae){return ae.position=new z(pe),be(),ae}}function z(pe){this.start=pe,this.end={line:B,column:U},this.source=O.source}z.prototype.content=R;function V(pe){var ae=new Error(O.source+":"+B+":"+U+": "+pe);if(ae.reason=pe,ae.filename=O.source,ae.line=B,ae.column=U,ae.source=R,!O.silent)throw ae}function G(pe){var ae=pe.exec(R);if(ae){var P=ae[0];return D(P),R=R.slice(P.length),ae}}function be(){G(n)}function q(pe){var ae;for(pe=pe||[];ae=ce();)ae!==!1&&pe.push(ae);return pe}function ce(){var pe=F();if(!(d!=R.charAt(0)||b!=R.charAt(1))){for(var ae=2;g!=R.charAt(ae)&&(b!=R.charAt(ae)||d!=R.charAt(ae+1));)++ae;if(ae+=2,g===R.charAt(ae-1))return V("End of comment missing");var P=R.slice(2,ae-2);return U+=2,D(P),R=R.slice(ae),U+=2,pe({type:E,comment:P})}}function oe(){var pe=F(),ae=G(a);if(ae){if(ce(),!G(u))return V("property missing ':'");var P=G(s),te=pe({type:T,property:N(ae[0].replace(e,g)),value:P?N(P[0].replace(e,g)):g});return G(o),te}}function we(){var pe=[];q(pe);for(var ae;ae=oe();)ae!==!1&&(pe.push(ae),q(pe));return pe}return be(),we()}function N(R){return R?R.replace(f,g):g}return Ph=v,Ph}var gE;function f8(){if(gE)return El;gE=1;var e=El&&El.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(El,"__esModule",{value:!0}),El.default=n;const t=e(c8());function n(a,u){let s=null;if(!a||typeof a!="string")return s;const o=(0,t.default)(a),f=typeof u=="function";return o.forEach(h=>{if(h.type!=="declaration")return;const{property:d,value:b}=h;f?u(d,b,h):b&&(s=s||{},s[d]=b)}),s}return El}var Uu={},bE;function d8(){if(bE)return Uu;bE=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,u=/^-(ms)-/,s=function(d){return!d||n.test(d)||e.test(d)},o=function(d,b){return b.toUpperCase()},f=function(d,b){return"".concat(b,"-")},h=function(d,b){return b===void 0&&(b={}),s(d)?d:(d=d.toLowerCase(),b.reactCompat?d=d.replace(u,f):d=d.replace(a,f),d.replace(t,o))};return Uu.camelCase=h,Uu}var Pu,yE;function h8(){if(yE)return Pu;yE=1;var e=Pu&&Pu.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},t=e(f8()),n=d8();function a(u,s){var o={};return!u||typeof u!="string"||(0,t.default)(u,function(f,h){f&&h&&(o[(0,n.camelCase)(f,s)]=h)}),o}return a.default=a,Pu=a,Pu}var m8=h8();const p8=jm(m8);function rs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?EE(e.position):"start"in e||"end"in e?EE(e):"line"in e||"column"in e?km(e):""}function km(e){return TE(e&&e.line)+":"+TE(e&&e.column)}function EE(e){return km(e&&e.start)+"-"+km(e&&e.end)}function TE(e){return e&&typeof e=="number"?e:1}class fn extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let u="",s={},o=!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"?u=t:!s.cause&&t&&(o=!0,u=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?s.ruleId=a:(s.source=a.slice(0,h),s.ruleId=a.slice(h+1))}if(!s.place&&s.ancestors&&s.ancestors){const h=s.ancestors[s.ancestors.length-1];h&&(s.place=h.position)}const f=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=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=u,this.line=f?f.line:void 0,this.name=rs(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=o&&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}}fn.prototype.file="";fn.prototype.name="";fn.prototype.reason="";fn.prototype.message="";fn.prototype.stack="";fn.prototype.column=void 0;fn.prototype.line=void 0;fn.prototype.ancestors=void 0;fn.prototype.cause=void 0;fn.prototype.fatal=void 0;fn.prototype.place=void 0;fn.prototype.ruleId=void 0;fn.prototype.source=void 0;const x0={}.hasOwnProperty,g8=new Map,b8=/[A-Z]/g,y8=new Set(["table","tbody","thead","tfoot","tr"]),E8=new Set(["td","th"]),$x="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function T8(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=N8(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");a=C8(n,t.jsx,t.jsxs)}const u={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,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"?Va:ms,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Gx(u,e,void 0);return s&&typeof s!="string"?s:u.create(e,u.Fragment,{children:s||void 0},void 0)}function Gx(e,t,n){if(t.type==="element")return x8(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return _8(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return S8(e,t,n);if(t.type==="mdxjsEsm")return v8(e,t);if(t.type==="root")return A8(e,t,n);if(t.type==="text")return k8(e,t)}function x8(e,t,n){const a=e.schema;let u=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(u=Va,e.schema=u),e.ancestors.push(t);const s=Xx(e,t.tagName,!1),o=w8(e,t);let f=v0(e,t);return y8.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!o8(h):!0})),Qx(e,o,s,t),_0(o,f),e.ancestors.pop(),e.schema=a,e.create(t,s,o,n)}function _8(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}cs(e,t.position)}function v8(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);cs(e,t.position)}function S8(e,t,n){const a=e.schema;let u=a;t.name==="svg"&&a.space==="html"&&(u=Va,e.schema=u),e.ancestors.push(t);const s=t.name===null?e.Fragment:Xx(e,t.name,!0),o=R8(e,t),f=v0(e,t);return Qx(e,o,s,t),_0(o,f),e.ancestors.pop(),e.schema=a,e.create(t,s,o,n)}function A8(e,t,n){const a={};return _0(a,v0(e,t)),e.create(t,e.Fragment,a,n)}function k8(e,t){return t.value}function Qx(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function _0(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function C8(e,t,n){return a;function a(u,s,o,f){const d=Array.isArray(o.children)?n:t;return f?d(s,o,f):d(s,o)}}function N8(e,t){return n;function n(a,u,s,o){const f=Array.isArray(s.children),h=Cr(a);return t(u,s,o,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function w8(e,t){const n={};let a,u;for(u in t.properties)if(u!=="children"&&x0.call(t.properties,u)){const s=O8(e,u,t.properties[u]);if(s){const[o,f]=s;e.tableCellAlignToStyle&&o==="align"&&typeof f=="string"&&E8.has(t.tagName)?a=f:n[o]=f}}if(a){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function R8(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const s=a.data.estree.body[0];s.type;const o=s.expression;o.type;const f=o.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else cs(e,t.position);else{const u=a.name;let s;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else cs(e,t.position);else s=a.value===null?!0:a.value;n[u]=s}return n}function v0(e,t){const n=[];let a=-1;const u=e.passKeys?new Map:g8;for(;++a<t.children.length;){const s=t.children[a];let o;if(e.passKeys){const h=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(h){const d=u.get(h)||0;o=h+"-"+d,u.set(h,d+1)}}const f=Gx(e,s,o);f!==void 0&&n.push(f)}return n}function O8(e,t,n){const a=Uc(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?h2(n):m2(n)),a.property==="style"){let u=typeof n=="object"?n:L8(e,String(n));return e.stylePropertyNameCase==="css"&&(u=D8(u)),["style",u]}return[e.elementAttributeNameCase==="react"&&a.space?q6[a.property]||a.property:a.attribute,n]}}function L8(e,t){try{return p8(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,u=new fn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw u.file=e.filePath||void 0,u.url=$x+"#cannot-parse-style-attribute",u}}function Xx(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const u=t.split(".");let s=-1,o;for(;++s<u.length;){const f=hE(u[s])?{type:"Identifier",name:u[s]}:{type:"Literal",value:u[s]};o=o?{type:"MemberExpression",object:o,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}a=o}else a=hE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const u=a.value;return x0.call(e.components,u)?e.components[u]:u}if(e.evaluater)return e.evaluater.evaluateExpression(a);cs(e)}function cs(e,t){const n=new fn("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=$x+"#cannot-handle-mdx-estrees-without-createevaluater",n}function D8(e){const t={};let n;for(n in e)x0.call(e,n)&&(t[I8(n)]=e[n]);return t}function I8(e){let t=e.replace(b8,M8);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function M8(e){return"-"+e.toLowerCase()}const jh={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"]},B8={tokenize:z8};function z8(e){const t=e.attempt(this.parser.constructs.contentInitial,a,u);let n;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),at(e,t,"linePrefix")}function u(f){return e.enter("paragraph"),s(f)}function s(f){const h=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=h),n=h,o(f)}function o(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return De(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),o)}}const H8={tokenize:U8},xE={tokenize:P8};function U8(e){const t=this,n=[];let a=0,u,s,o;return f;function f(U){if(a<n.length){const D=n[a];return t.containerState=D[1],e.attempt(D[0].continuation,h,d)(U)}return d(U)}function h(U){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,u&&B();const D=t.events.length;let F=D,z;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){z=t.events[F][1].end;break}O(a);let V=D;for(;V<t.events.length;)t.events[V][1].end={...z},V++;return Fn(t.events,F+1,0,t.events.slice(D)),t.events.length=V,d(U)}return f(U)}function d(U){if(a===n.length){if(!u)return E(U);if(u.currentConstruct&&u.currentConstruct.concrete)return v(U);t.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(xE,b,g)(U)}function b(U){return u&&B(),O(a),E(U)}function g(U){return t.parser.lazy[t.now().line]=a!==n.length,o=t.now().offset,v(U)}function E(U){return t.containerState={},e.attempt(xE,T,v)(U)}function T(U){return a++,n.push([t.currentConstruct,t.containerState]),E(U)}function v(U){if(U===null){u&&B(),O(0),e.consume(U);return}return u=u||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:s}),N(U)}function N(U){if(U===null){R(e.exit("chunkFlow"),!0),O(0),e.consume(U);return}return De(U)?(e.consume(U),R(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(U),N)}function R(U,D){const F=t.sliceStream(U);if(D&&F.push(null),U.previous=s,s&&(s.next=U),s=U,u.defineSkip(U.start),u.write(F),t.parser.lazy[U.start.line]){let z=u.events.length;for(;z--;)if(u.events[z][1].start.offset<o&&(!u.events[z][1].end||u.events[z][1].end.offset>o))return;const V=t.events.length;let G=V,be,q;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(be){q=t.events[G][1].end;break}be=!0}for(O(a),z=V;z<t.events.length;)t.events[z][1].end={...q},z++;Fn(t.events,G+1,0,t.events.slice(V)),t.events.length=z}}function O(U){let D=n.length;for(;D-- >U;){const F=n[D];t.containerState=F[1],F[0].exit.call(t,e)}n.length=U}function B(){u.write([null]),s=void 0,u=void 0,t.containerState._closeFlow=void 0}}function P8(e,t,n){return at(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const j8={tokenize:F8};function F8(e){const t=this,n=e.attempt(ys,a,e.attempt(this.parser.constructs.flowInitial,u,at(e,e.attempt(this.parser.constructs.flow,u,e.attempt(OO,u)),"linePrefix")));return n;function a(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function u(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const q8={resolveAll:Kx()},Y8=Zx("string"),V8=Zx("text");function Zx(e){return{resolveAll:Kx(e==="text"?$8:void 0),tokenize:t};function t(n){const a=this,u=this.parser.constructs[e],s=n.attempt(u,o,f);return o;function o(b){return d(b)?s(b):f(b)}function f(b){if(b===null){n.consume(b);return}return n.enter("data"),n.consume(b),h}function h(b){return d(b)?(n.exit("data"),s(b)):(n.consume(b),h)}function d(b){if(b===null)return!0;const g=u[b];let E=-1;if(g)for(;++E<g.length;){const T=g[E];if(!T.previous||T.previous.call(a,a.previous))return!0}return!1}}}function Kx(e){return t;function t(n,a){let u=-1,s;for(;++u<=n.length;)s===void 0?n[u]&&n[u][1].type==="data"&&(s=u,u++):(!n[u]||n[u][1].type!=="data")&&(u!==s+2&&(n[s][1].end=n[u-1][1].end,n.splice(s+2,u-s-2),u=s+2),s=void 0);return e?e(n,a):n}}function $8(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 a=e[n-1][1],u=t.sliceStream(a);let s=u.length,o=-1,f=0,h;for(;s--;){const d=u[s];if(typeof d=="string"){for(o=d.length;d.charCodeAt(o-1)===32;)f++,o--;if(o)break;o=-1}else if(d===-2)h=!0,f++;else if(d!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const d={type:n===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:a.start._bufferIndex+o,_index:a.start._index+s,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...d.start},a.start.offset===a.end.offset?Object.assign(a,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const G8={42:Rn,43:Rn,45:Rn,48:Rn,49:Rn,50:Rn,51:Rn,52:Rn,53:Rn,54:Rn,55:Rn,56:Rn,57:Rn,62:wx},Q8={91:BO},X8={[-2]:zh,[-1]:zh,32:zh},Z8={35:FO,42:ec,45:[lE,ec],60:$O,61:lE,95:ec,96:aE,126:aE},K8={38:Ox,92:Rx},W8={[-5]:Hh,[-4]:Hh,[-3]:Hh,33:cL,38:Ox,42:Am,60:[dO,JO],91:dL,92:[PO,Rx],93:y0,95:Am,96:AO},J8={null:[Am,q8]},eI={null:[42,95]},tI={null:[]},nI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:eI,contentInitial:Q8,disable:tI,document:G8,flow:Z8,flowInitial:X8,insideSpan:J8,string:K8,text:W8},Symbol.toStringTag,{value:"Module"}));function rI(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const u={},s=[];let o=[],f=[];const h={attempt:V(F),check:V(z),consume:B,enter:U,exit:D,interrupt:V(z,{interrupt:!0})},d={code:null,containerState:{},defineSkip:N,events:[],now:v,parser:e,previous:null,sliceSerialize:E,sliceStream:T,write:g};let b=t.tokenize.call(d,h);return t.resolveAll&&s.push(t),d;function g(ce){return o=rr(o,ce),R(),o[o.length-1]!==null?[]:(G(t,0),d.events=$c(s,d.events,d),d.events)}function E(ce,oe){return iI(T(ce),oe)}function T(ce){return aI(o,ce)}function v(){const{_bufferIndex:ce,_index:oe,line:we,column:pe,offset:ae}=a;return{_bufferIndex:ce,_index:oe,line:we,column:pe,offset:ae}}function N(ce){u[ce.line]=ce.column,q()}function R(){let ce;for(;a._index<o.length;){const oe=o[a._index];if(typeof oe=="string")for(ce=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===ce&&a._bufferIndex<oe.length;)O(oe.charCodeAt(a._bufferIndex));else O(oe)}}function O(ce){b=b(ce)}function B(ce){De(ce)?(a.line++,a.column=1,a.offset+=ce===-3?2:1,q()):ce!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===o[a._index].length&&(a._bufferIndex=-1,a._index++)),d.previous=ce}function U(ce,oe){const we=oe||{};return we.type=ce,we.start=v(),d.events.push(["enter",we,d]),f.push(we),we}function D(ce){const oe=f.pop();return oe.end=v(),d.events.push(["exit",oe,d]),oe}function F(ce,oe){G(ce,oe.from)}function z(ce,oe){oe.restore()}function V(ce,oe){return we;function we(pe,ae,P){let te,fe,xe,C;return Array.isArray(pe)?W(pe):"tokenize"in pe?W([pe]):M(pe);function M(ie){return he;function he(_e){const Te=_e!==null&&ie[_e],Ye=_e!==null&&ie.null,xt=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(Ye)?Ye:Ye?[Ye]:[]];return W(xt)(_e)}}function W(ie){return te=ie,fe=0,ie.length===0?P:k(ie[fe])}function k(ie){return he;function he(_e){return C=be(),xe=ie,ie.partial||(d.currentConstruct=ie),ie.name&&d.parser.constructs.disable.null.includes(ie.name)?ue():ie.tokenize.call(oe?Object.assign(Object.create(d),oe):d,h,ne,ue)(_e)}}function ne(ie){return ce(xe,C),ae}function ue(ie){return C.restore(),++fe<te.length?k(te[fe]):P}}}function G(ce,oe){ce.resolveAll&&!s.includes(ce)&&s.push(ce),ce.resolve&&Fn(d.events,oe,d.events.length-oe,ce.resolve(d.events.slice(oe),d)),ce.resolveTo&&(d.events=ce.resolveTo(d.events,d))}function be(){const ce=v(),oe=d.previous,we=d.currentConstruct,pe=d.events.length,ae=Array.from(f);return{from:pe,restore:P};function P(){a=ce,d.previous=oe,d.currentConstruct=we,d.events.length=pe,f=ae,q()}}function q(){a.line in u&&a.column<2&&(a.column=u[a.line],a.offset+=u[a.line]-1)}}function aI(e,t){const n=t.start._index,a=t.start._bufferIndex,u=t.end._index,s=t.end._bufferIndex;let o;if(n===u)o=[e[n].slice(a,s)];else{if(o=e.slice(n,u),a>-1){const f=o[0];typeof f=="string"?o[0]=f.slice(a):o.shift()}s>0&&o.push(e[u].slice(0,s))}return o}function iI(e,t){let n=-1;const a=[];let u;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
229
- `;break}case-3:{o=`\r
230
- `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&u)continue;o=" ";break}default:o=String.fromCharCode(s)}u=s===-2,a.push(o)}return a.join("")}function lI(e){const a={constructs:Tx([nI,...(e||{}).extensions||[]]),content:u(B8),defined:[],document:u(H8),flow:u(j8),lazy:{},string:u(Y8),text:u(V8)};return a;function u(s){return o;function o(f){return rI(a,s,f)}}}function uI(e){for(;!Lx(e););return e}const _E=/[\0\t\n\r]/g;function sI(){let e=1,t="",n=!0,a;return u;function u(s,o,f){const h=[];let d,b,g,E,T;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),g=0,t="",n&&(s.charCodeAt(0)===65279&&g++,n=void 0);g<s.length;){if(_E.lastIndex=g,d=_E.exec(s),E=d&&d.index!==void 0?d.index:s.length,T=s.charCodeAt(E),!d){t=s.slice(g);break}if(T===10&&g===E&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),g<E&&(h.push(s.slice(g,E)),e+=E-g),T){case 0:{h.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,h.push(-2);e++<b;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}g=E+1}return f&&(a&&h.push(-5),t&&h.push(t),h.push(null)),h}}const Wx={}.hasOwnProperty;function oI(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),cI(n)(uI(lI(n).document().write(sI()(e,t,!0))))}function cI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ut),autolinkProtocol:be,autolinkEmail:be,atxHeading:s(dn),blockQuote:s(Ye),characterEscape:be,characterReference:be,codeFenced:s(xt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(xt,o),codeText:s(wt,o),codeTextData:be,data:be,codeFlowValue:be,definition:s(rt),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(ht),hardBreakEscape:s(hn),hardBreakTrailing:s(hn),htmlFlow:s(pr,o),htmlFlowData:be,htmlText:s(pr,o),htmlTextData:be,image:s(Le),label:o,link:s(ut),listItem:s(Pt),listItemValue:E,listOrdered:s(Ut,g),listUnordered:s(Ut),paragraph:s(Vn),reference:k,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(dn),strong:s(Pl),thematicBreak:s(nf)},exit:{atxHeading:h(),atxHeadingSequence:F,autolink:h(),autolinkEmail:Te,autolinkProtocol:_e,blockQuote:h(),characterEscapeValue:q,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:ie,characterReference:he,codeFenced:h(R),codeFencedFence:N,codeFencedFenceInfo:T,codeFencedFenceMeta:v,codeFlowValue:q,codeIndented:h(O),codeText:h(ae),codeTextData:q,data:q,definition:h(),definitionDestinationString:D,definitionLabelString:B,definitionTitleString:U,emphasis:h(),hardBreakEscape:h(oe),hardBreakTrailing:h(oe),htmlFlow:h(we),htmlFlowData:q,htmlText:h(pe),htmlTextData:q,image:h(te),label:xe,labelText:fe,lineEnding:ce,link:h(P),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ne,resourceDestinationString:C,resourceTitleString:M,resource:W,setextHeading:h(G),setextHeadingLineSequence:V,setextHeadingText:z,strong:h(),thematicBreak:h()}};Jx(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(re){let Ee={type:"root",children:[]};const Me={stack:[Ee],tokenStack:[],config:t,enter:f,exit:d,buffer:o,resume:b,data:n},Xe=[];let dt=-1;for(;++dt<re.length;)if(re[dt][1].type==="listOrdered"||re[dt][1].type==="listUnordered")if(re[dt][0]==="enter")Xe.push(dt);else{const Ln=Xe.pop();dt=u(re,Ln,dt)}for(dt=-1;++dt<re.length;){const Ln=t[re[dt][0]];Wx.call(Ln,re[dt][1].type)&&Ln[re[dt][1].type].call(Object.assign({sliceSerialize:re[dt][2].sliceSerialize},Me),re[dt][1])}if(Me.tokenStack.length>0){const Ln=Me.tokenStack[Me.tokenStack.length-1];(Ln[1]||vE).call(Me,void 0,Ln[0])}for(Ee.position={start:wa(re.length>0?re[0][1].start:{line:1,column:1,offset:0}),end:wa(re.length>0?re[re.length-2][1].end:{line:1,column:1,offset:0})},dt=-1;++dt<t.transforms.length;)Ee=t.transforms[dt](Ee)||Ee;return Ee}function u(re,Ee,Me){let Xe=Ee-1,dt=-1,Ln=!1,wr,pn,Xt,xn;for(;++Xe<=Me;){const _t=re[Xe];switch(_t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{_t[0]==="enter"?dt++:dt--,xn=void 0;break}case"lineEndingBlank":{_t[0]==="enter"&&(wr&&!xn&&!dt&&!Xt&&(Xt=Xe),xn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:xn=void 0}if(!dt&&_t[0]==="enter"&&_t[1].type==="listItemPrefix"||dt===-1&&_t[0]==="exit"&&(_t[1].type==="listUnordered"||_t[1].type==="listOrdered")){if(wr){let ra=Xe;for(pn=void 0;ra--;){const lr=re[ra];if(lr[1].type==="lineEnding"||lr[1].type==="lineEndingBlank"){if(lr[0]==="exit")continue;pn&&(re[pn][1].type="lineEndingBlank",Ln=!0),lr[1].type="lineEnding",pn=ra}else if(!(lr[1].type==="linePrefix"||lr[1].type==="blockQuotePrefix"||lr[1].type==="blockQuotePrefixWhitespace"||lr[1].type==="blockQuoteMarker"||lr[1].type==="listItemIndent"))break}Xt&&(!pn||Xt<pn)&&(wr._spread=!0),wr.end=Object.assign({},pn?re[pn][1].start:_t[1].end),re.splice(pn||Xe,0,["exit",wr,_t[2]]),Xe++,Me++}if(_t[1].type==="listItemPrefix"){const ra={type:"listItem",_spread:!1,start:Object.assign({},_t[1].start),end:void 0};wr=ra,re.splice(Xe,0,["enter",ra,_t[2]]),Xe++,Me++,Xt=void 0,xn=!0}}}return re[Ee][1]._spread=Ln,Me}function s(re,Ee){return Me;function Me(Xe){f.call(this,re(Xe),Xe),Ee&&Ee.call(this,Xe)}}function o(){this.stack.push({type:"fragment",children:[]})}function f(re,Ee,Me){this.stack[this.stack.length-1].children.push(re),this.stack.push(re),this.tokenStack.push([Ee,Me||void 0]),re.position={start:wa(Ee.start),end:void 0}}function h(re){return Ee;function Ee(Me){re&&re.call(this,Me),d.call(this,Me)}}function d(re,Ee){const Me=this.stack.pop(),Xe=this.tokenStack.pop();if(Xe)Xe[0].type!==re.type&&(Ee?Ee.call(this,re,Xe[0]):(Xe[1]||vE).call(this,re,Xe[0]));else throw new Error("Cannot close `"+re.type+"` ("+rs({start:re.start,end:re.end})+"): it’s not open");Me.position.end=wa(re.end)}function b(){return m0(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function E(re){if(this.data.expectingFirstListItemValue){const Ee=this.stack[this.stack.length-2];Ee.start=Number.parseInt(this.sliceSerialize(re),10),this.data.expectingFirstListItemValue=void 0}}function T(){const re=this.resume(),Ee=this.stack[this.stack.length-1];Ee.lang=re}function v(){const re=this.resume(),Ee=this.stack[this.stack.length-1];Ee.meta=re}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const re=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=re.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function O(){const re=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=re.replace(/(\r?\n|\r)$/g,"")}function B(re){const Ee=this.resume(),Me=this.stack[this.stack.length-1];Me.label=Ee,Me.identifier=fr(this.sliceSerialize(re)).toLowerCase()}function U(){const re=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=re}function D(){const re=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=re}function F(re){const Ee=this.stack[this.stack.length-1];if(!Ee.depth){const Me=this.sliceSerialize(re).length;Ee.depth=Me}}function z(){this.data.setextHeadingSlurpLineEnding=!0}function V(re){const Ee=this.stack[this.stack.length-1];Ee.depth=this.sliceSerialize(re).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function be(re){const Me=this.stack[this.stack.length-1].children;let Xe=Me[Me.length-1];(!Xe||Xe.type!=="text")&&(Xe=mn(),Xe.position={start:wa(re.start),end:void 0},Me.push(Xe)),this.stack.push(Xe)}function q(re){const Ee=this.stack.pop();Ee.value+=this.sliceSerialize(re),Ee.position.end=wa(re.end)}function ce(re){const Ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Me=Ee.children[Ee.children.length-1];Me.position.end=wa(re.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ee.type)&&(be.call(this,re),q.call(this,re))}function oe(){this.data.atHardBreak=!0}function we(){const re=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=re}function pe(){const re=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=re}function ae(){const re=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=re}function P(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=Ee,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function te(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=Ee,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function fe(re){const Ee=this.sliceSerialize(re),Me=this.stack[this.stack.length-2];Me.label=BR(Ee),Me.identifier=fr(Ee).toLowerCase()}function xe(){const re=this.stack[this.stack.length-1],Ee=this.resume(),Me=this.stack[this.stack.length-1];if(this.data.inReference=!0,Me.type==="link"){const Xe=re.children;Me.children=Xe}else Me.alt=Ee}function C(){const re=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=re}function M(){const re=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=re}function W(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function ne(re){const Ee=this.resume(),Me=this.stack[this.stack.length-1];Me.label=Ee,Me.identifier=fr(this.sliceSerialize(re)).toLowerCase(),this.data.referenceType="full"}function ue(re){this.data.characterReferenceType=re.type}function ie(re){const Ee=this.sliceSerialize(re),Me=this.data.characterReferenceType;let Xe;Me?(Xe=Ex(Ee,Me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Xe=g0(Ee);const dt=this.stack[this.stack.length-1];dt.value+=Xe}function he(re){const Ee=this.stack.pop();Ee.position.end=wa(re.end)}function _e(re){q.call(this,re);const Ee=this.stack[this.stack.length-1];Ee.url=this.sliceSerialize(re)}function Te(re){q.call(this,re);const Ee=this.stack[this.stack.length-1];Ee.url="mailto:"+this.sliceSerialize(re)}function Ye(){return{type:"blockquote",children:[]}}function xt(){return{type:"code",lang:null,meta:null,value:""}}function wt(){return{type:"inlineCode",value:""}}function rt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ht(){return{type:"emphasis",children:[]}}function dn(){return{type:"heading",depth:0,children:[]}}function hn(){return{type:"break"}}function pr(){return{type:"html",value:""}}function Le(){return{type:"image",title:null,url:"",alt:null}}function ut(){return{type:"link",title:null,url:"",children:[]}}function Ut(re){return{type:"list",ordered:re.type==="listOrdered",start:null,spread:re._spread,children:[]}}function Pt(re){return{type:"listItem",spread:re._spread,checked:null,children:[]}}function Vn(){return{type:"paragraph",children:[]}}function Pl(){return{type:"strong",children:[]}}function mn(){return{type:"text",value:""}}function nf(){return{type:"thematicBreak"}}}function wa(e){return{line:e.line,column:e.column,offset:e.offset}}function Jx(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?Jx(e,a):fI(e,a)}}function fI(e,t){let n;for(n in t)if(Wx.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function vE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+rs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+rs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+rs({start:t.start,end:t.end})+") is still open")}function dI(e){const t=this;t.parser=n;function n(a){return oI(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function hI(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 mI(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
231
- `}]}function pI(e,t){const n=t.value?t.value+`
232
- `:"",a={},u=t.lang?t.lang.split(/\s+/):[];u.length>0&&(a.className=["language-"+u[0]]);let s={type:"element",tagName:"code",properties:a,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 gI(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bI(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yI(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),u=Hl(a.toLowerCase()),s=e.footnoteOrder.indexOf(a);let o,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),o=e.footnoteOrder.length):o=s+1,f+=1,e.footnoteCounts.set(a,f);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+u,id:n+"fnref-"+u+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,h);const d={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,d),e.applyData(t,d)}function EI(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 TI(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function e_(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const u=e.all(t),s=u[0];s&&s.type==="text"?s.value="["+s.value:u.unshift({type:"text",value:"["});const o=u[u.length-1];return o&&o.type==="text"?o.value+=a:u.push({type:"text",value:a}),u}function xI(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return e_(e,t);const u={src:Hl(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(u.title=a.title);const s={type:"element",tagName:"img",properties:u,children:[]};return e.patch(t,s),e.applyData(t,s)}function _I(e,t){const n={src:Hl(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 a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function vI(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function SI(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return e_(e,t);const u={href:Hl(a.url||"")};a.title!==null&&a.title!==void 0&&(u.title=a.title);const s={type:"element",tagName:"a",properties:u,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function AI(e,t){const n={href:Hl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function kI(e,t,n){const a=e.all(t),u=n?CI(n):t_(t),s={},o=[];if(typeof t.checked=="boolean"){const b=a[0];let g;b&&b.type==="element"&&b.tagName==="p"?g=b:(g={type:"element",tagName:"p",properties:{},children:[]},a.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const b=a[f];(u||f!==0||b.type!=="element"||b.tagName!=="p")&&o.push({type:"text",value:`
233
- `}),b.type==="element"&&b.tagName==="p"&&!u?o.push(...b.children):o.push(b)}const h=a[a.length-1];h&&(u||h.type!=="element"||h.tagName!=="p")&&o.push({type:"text",value:`
234
- `});const d={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,d),e.applyData(t,d)}function CI(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=t_(n[a])}return t}function t_(e){const t=e.spread;return t??e.children.length>1}function NI(e,t){const n={},a=e.all(t);let u=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++u<a.length;){const o=a[u];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.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(a,!0)};return e.patch(t,s),e.applyData(t,s)}function wI(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RI(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function OI(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LI(e,t){const n=e.all(t),a=n.shift(),u=[];if(a){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],o),u.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=Cr(t.children[1]),h=Yc(t.children[t.children.length-1]);f&&h&&(o.position={start:f,end:h}),u.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(u,!0)};return e.patch(t,s),e.applyData(t,s)}function DI(e,t,n){const a=n?n.children:void 0,s=(a?a.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,f=o?o.length:t.children.length;let h=-1;const d=[];for(;++h<f;){const g=t.children[h],E={},T=o?o[h]:void 0;T&&(E.align=T);let v={type:"element",tagName:s,properties:E,children:[]};g&&(v.children=e.all(g),e.patch(g,v),v=e.applyData(g,v)),d.push(v)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,b),e.applyData(t,b)}function II(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const SE=9,AE=32;function MI(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),u=0;const s=[];for(;a;)s.push(kE(t.slice(u,a.index),u>0,!0),a[0]),u=a.index+a[0].length,a=n.exec(t);return s.push(kE(t.slice(u),u>0,!1)),s.join("")}function kE(e,t,n){let a=0,u=e.length;if(t){let s=e.codePointAt(a);for(;s===SE||s===AE;)a++,s=e.codePointAt(a)}if(n){let s=e.codePointAt(u-1);for(;s===SE||s===AE;)u--,s=e.codePointAt(u-1)}return u>a?e.slice(a,u):""}function BI(e,t){const n={type:"text",value:MI(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function zI(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const HI={blockquote:hI,break:mI,code:pI,delete:gI,emphasis:bI,footnoteReference:yI,heading:EI,html:TI,imageReference:xI,image:_I,inlineCode:vI,linkReference:SI,link:AI,listItem:kI,list:NI,paragraph:wI,root:RI,strong:OI,table:LI,tableCell:II,tableRow:DI,text:BI,thematicBreak:zI,toml:Vo,yaml:Vo,definition:Vo,footnoteDefinition:Vo};function Vo(){}function UI(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 PI(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function jI(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||UI,a=e.options.footnoteBackLabel||PI,u=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[h]);if(!d)continue;const b=e.all(d),g=String(d.identifier).toUpperCase(),E=Hl(g.toLowerCase());let T=0;const v=[],N=e.footnoteCounts.get(g);for(;N!==void 0&&++T<=N;){v.length>0&&v.push({type:"text",value:" "});let B=typeof n=="string"?n:n(h,T);typeof B=="string"&&(B={type:"text",value:B}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+E+(T>1?"-"+T:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,T),className:["data-footnote-backref"]},children:Array.isArray(B)?B:[B]})}const R=b[b.length-1];if(R&&R.type==="element"&&R.tagName==="p"){const B=R.children[R.children.length-1];B&&B.type==="text"?B.value+=" ":R.children.push({type:"text",value:" "}),R.children.push(...v)}else b.push(...v);const O={type:"element",tagName:"li",properties:{id:t+"fn-"+E},children:e.wrap(b,!0)};e.patch(d,O),f.push(O)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...ki(o),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
235
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
236
- `}]}}const Cm={}.hasOwnProperty,FI={};function qI(e,t){const n=t||FI,a=new Map,u=new Map,s=new Map,o={...HI,...n.handlers},f={all:d,applyData:VI,definitionById:a,footnoteById:u,footnoteCounts:s,footnoteOrder:[],handlers:o,one:h,options:n,patch:YI,wrap:GI};return Ar(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const g=b.type==="definition"?a:u,E=String(b.identifier).toUpperCase();g.has(E)||g.set(E,b)}}),f;function h(b,g){const E=b.type,T=f.handlers[E];if(Cm.call(f.handlers,E)&&T)return T(f,b,g);if(f.options.passThrough&&f.options.passThrough.includes(E)){if("children"in b){const{children:N,...R}=b,O=ki(R);return O.children=f.all(b),O}return ki(b)}return(f.options.unknownHandler||$I)(f,b,g)}function d(b){const g=[];if("children"in b){const E=b.children;let T=-1;for(;++T<E.length;){const v=f.one(E[T],b);if(v){if(T&&E[T-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=CE(v.value)),!Array.isArray(v)&&v.type==="element")){const N=v.children[0];N&&N.type==="text"&&(N.value=CE(N.value))}Array.isArray(v)?g.push(...v):g.push(v)}}}return g}}function YI(e,t){e.position&&(t.position=Q2(e))}function VI(e,t){let n=t;if(e&&e.data){const a=e.data.hName,u=e.data.hChildren,s=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const o="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,ki(s)),"children"in n&&n.children&&u!==null&&u!==void 0&&(n.children=u)}return n}function $I(e,t){const n=t.data||{},a="value"in t&&!(Cm.call(n,"hProperties")||Cm.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function GI(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
237
- `});++a<e.length;)a&&n.push({type:"text",value:`
238
- `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
239
- `}),n}function CE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function NE(e,t){const n=qI(e,t),a=n.one(e,void 0),u=jI(n),s=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return u&&s.children.push({type:"text",value:`
240
- `},u),s}function QI(e,t){return e&&"run"in e?async function(n,a){const u=NE(n,{file:a,...t});await e.run(u,a)}:function(n,a){return NE(n,{file:a,...e||t})}}function wE(e){if(e)throw e}var Fh,RE;function XI(){if(RE)return Fh;RE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},s=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var b=e.call(d,"constructor"),g=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!b&&!g)return!1;var E;for(E in d);return typeof E>"u"||e.call(d,E)},o=function(d,b){n&&b.name==="__proto__"?n(d,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):d[b.name]=b.newValue},f=function(d,b){if(b==="__proto__")if(e.call(d,b)){if(a)return a(d,b).value}else return;return d[b]};return Fh=function h(){var d,b,g,E,T,v,N=arguments[0],R=1,O=arguments.length,B=!1;for(typeof N=="boolean"&&(B=N,N=arguments[1]||{},R=2),(N==null||typeof N!="object"&&typeof N!="function")&&(N={});R<O;++R)if(d=arguments[R],d!=null)for(b in d)g=f(N,b),E=f(d,b),N!==E&&(B&&E&&(s(E)||(T=u(E)))?(T?(T=!1,v=g&&u(g)?g:[]):v=g&&s(g)?g:{},o(N,{name:b,newValue:h(B,v,E)})):typeof E<"u"&&o(N,{name:b,newValue:E}));return N},Fh}var ZI=XI();const qh=jm(ZI);function Nm(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 KI(){const e=[],t={run:n,use:a};return t;function n(...u){let s=-1;const o=u.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);f(null,...u);function f(h,...d){const b=e[++s];let g=-1;if(h){o(h);return}for(;++g<u.length;)(d[g]===null||d[g]===void 0)&&(d[g]=u[g]);u=d,b?WI(b,f)(...d):o(null,...d)}}function a(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return e.push(u),t}}function WI(e,t){let n;return a;function a(...o){const f=e.length>o.length;let h;f&&o.push(u);try{h=e.apply(this,o)}catch(d){const b=d;if(f&&n)throw b;return u(b)}f||(h&&h.then&&typeof h.then=="function"?h.then(s,u):h instanceof Error?u(h):s(h))}function u(o,...f){n||(n=!0,t(o,...f))}function s(o){u(null,o)}}const _r={basename:JI,dirname:e9,extname:t9,join:n9,sep:"/"};function JI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Es(e);let n=0,a=-1,u=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;u--;)if(e.codePointAt(u)===47){if(s){n=u+1;break}}else a<0&&(s=!0,a=u+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let o=-1,f=t.length-1;for(;u--;)if(e.codePointAt(u)===47){if(s){n=u+1;break}}else o<0&&(s=!0,o=u+1),f>-1&&(e.codePointAt(u)===t.codePointAt(f--)?f<0&&(a=u):(f=-1,a=o));return n===a?a=o:a<0&&(a=e.length),e.slice(n,a)}function e9(e){if(Es(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function t9(e){Es(e);let t=e.length,n=-1,a=0,u=-1,s=0,o;for(;t--;){const f=e.codePointAt(t);if(f===47){if(o){a=t+1;break}continue}n<0&&(o=!0,n=t+1),f===46?u<0?u=t:s!==1&&(s=1):u>-1&&(s=-1)}return u<0||n<0||s===0||s===1&&u===n-1&&u===a+1?"":e.slice(u,n)}function n9(...e){let t=-1,n;for(;++t<e.length;)Es(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":r9(n)}function r9(e){Es(e);const t=e.codePointAt(0)===47;let n=a9(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function a9(e,t){let n="",a=0,u=-1,s=0,o=-1,f,h;for(;++o<=e.length;){if(o<e.length)f=e.codePointAt(o);else{if(f===47)break;f=47}if(f===47){if(!(u===o-1||s===1))if(u!==o-1&&s===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",a=0):(n=n.slice(0,h),a=n.length-1-n.lastIndexOf("/")),u=o,s=0;continue}}else if(n.length>0){n="",a=0,u=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(u+1,o):n=e.slice(u+1,o),a=o-u-1;u=o,s=0}else f===46&&s>-1?s++:s=-1}return n}function Es(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const i9={cwd:l9};function l9(){return"/"}function wm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function u9(e){if(typeof e=="string")e=new URL(e);else if(!wm(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 s9(e)}function s9(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+2);if(a===70||a===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(t)}const Yh=["history","path","basename","stem","extname","dirname"];class o9{constructor(t){let n;t?wm(t)?n={path:t}:typeof t=="string"||c9(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":i9.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Yh.length;){const s=Yh[a];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let u;for(u in n)Yh.includes(u)||(this[u]=n[u])}get basename(){return typeof this.path=="string"?_r.basename(this.path):void 0}set basename(t){$h(t,"basename"),Vh(t,"basename"),this.path=_r.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?_r.dirname(this.path):void 0}set dirname(t){OE(this.basename,"dirname"),this.path=_r.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?_r.extname(this.path):void 0}set extname(t){if(Vh(t,"extname"),OE(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=_r.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){wm(t)&&(t=u9(t)),$h(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?_r.basename(this.path,this.extname):void 0}set stem(t){$h(t,"stem"),Vh(t,"stem"),this.path=_r.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const u=this.message(t,n,a);throw u.fatal=!0,u}info(t,n,a){const u=this.message(t,n,a);return u.fatal=void 0,u}message(t,n,a){const u=new fn(t,n,a);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Vh(e,t){if(e&&e.includes(_r.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+_r.sep+"`")}function $h(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function OE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function c9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const f9=(function(e){const a=this.constructor.prototype,u=a[e],s=function(){return u.apply(s,arguments)};return Object.setPrototypeOf(s,a),s}),d9={}.hasOwnProperty;class S0 extends f9{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=KI()}copy(){const t=new S0;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(qh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Xh("data",this.frozen),this.namespace[t]=n,this):d9.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Xh("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,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const u=n.call(t,...a);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=$o(t),a=this.parser||this.Parser;return Gh("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),Gh("process",this.parser||this.Parser),Qh("process",this.compiler||this.Compiler),n?u(void 0,n):new Promise(u);function u(s,o){const f=$o(t),h=a.parse(f);a.run(h,f,function(b,g,E){if(b||!g||!E)return d(b);const T=g,v=a.stringify(T,E);p9(v)?E.value=v:E.result=v,d(b,E)});function d(b,g){b||!g?o(b):s?s(g):n(void 0,g)}}}processSync(t){let n=!1,a;return this.freeze(),Gh("processSync",this.parser||this.Parser),Qh("processSync",this.compiler||this.Compiler),this.process(t,u),DE("processSync","process",n),a;function u(s,o){n=!0,wE(s),a=o}}run(t,n,a){LE(t),this.freeze();const u=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?s(void 0,a):new Promise(s);function s(o,f){const h=$o(n);u.run(t,h,d);function d(b,g,E){const T=g||t;b?f(b):o?o(T):a(void 0,T,E)}}}runSync(t,n){let a=!1,u;return this.run(t,n,s),DE("runSync","run",a),u;function s(o,f){wE(o),u=f,a=!0}}stringify(t,n){this.freeze();const a=$o(n),u=this.compiler||this.Compiler;return Qh("stringify",u),LE(t),u(t,a)}use(t,...n){const a=this.attachers,u=this.namespace;if(Xh("use",this.frozen),t!=null)if(typeof t=="function")h(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(d){if(typeof d=="function")h(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[b,...g]=d;h(b,g)}else o(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function o(d){if(!("plugins"in d)&&!("settings"in d))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");f(d.plugins),d.settings&&(u.settings=qh(!0,u.settings,d.settings))}function f(d){let b=-1;if(d!=null)if(Array.isArray(d))for(;++b<d.length;){const g=d[b];s(g)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function h(d,b){let g=-1,E=-1;for(;++g<a.length;)if(a[g][0]===d){E=g;break}if(E===-1)a.push([d,...b]);else if(b.length>0){let[T,...v]=b;const N=a[E][1];Nm(N)&&Nm(T)&&(T=qh(!0,N,T)),a[E]=[d,T,...v]}}}}const h9=new S0().freeze();function Gh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Qh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Xh(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 LE(e){if(!Nm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function DE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function $o(e){return m9(e)?e:new o9(e)}function m9(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function p9(e){return typeof e=="string"||g9(e)}function g9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function A0(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ii=A0();function n_(e){Ii=e}var bi={exec:()=>null};function it(e,t=""){let n=typeof e=="string"?e:e.source,a={replace:(u,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(En.caret,"$1"),n=n.replace(u,o),a},getRegex:()=>new RegExp(n,t)};return a}var b9=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),En={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},y9=/^(?:[ \t]*(?:\n|$))+/,E9=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,T9=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ts=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,x9=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,k0=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,r_=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,a_=it(r_).replace(/bull/g,k0).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),_9=it(r_).replace(/bull/g,k0).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),C0=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,v9=/^[^\n]+/,N0=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,S9=it(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",N0).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),A9=it(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,k0).getRegex(),Qc="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",w0=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,k9=it("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",w0).replace("tag",Qc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),i_=it(C0).replace("hr",Ts).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qc).getRegex(),C9=it(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",i_).getRegex(),R0={blockquote:C9,code:E9,def:S9,fences:T9,heading:x9,hr:Ts,html:k9,lheading:a_,list:A9,newline:y9,paragraph:i_,table:bi,text:v9},IE=it("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ts).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qc).getRegex(),N9={...R0,lheading:_9,table:IE,paragraph:it(C0).replace("hr",Ts).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",IE).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qc).getRegex()},w9={...R0,html:it(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",w0).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:it(C0).replace("hr",Ts).replace("heading",` *#{1,6} *[^
241
- ]`).replace("lheading",a_).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},R9=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,O9=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,l_=/^( {2,}|\\)\n(?!\s*$)/,L9=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ul=/[\p{P}\p{S}]/u,Xc=/[\s\p{P}\p{S}]/u,O0=/[^\s\p{P}\p{S}]/u,D9=it(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Xc).getRegex(),u_=/(?!~)[\p{P}\p{S}]/u,I9=/(?!~)[\s\p{P}\p{S}]/u,M9=/(?:[^\s\p{P}\p{S}]|~)/u,B9=it(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",b9?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),s_=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,z9=it(s_,"u").replace(/punct/g,Ul).getRegex(),H9=it(s_,"u").replace(/punct/g,u_).getRegex(),o_="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",U9=it(o_,"gu").replace(/notPunctSpace/g,O0).replace(/punctSpace/g,Xc).replace(/punct/g,Ul).getRegex(),P9=it(o_,"gu").replace(/notPunctSpace/g,M9).replace(/punctSpace/g,I9).replace(/punct/g,u_).getRegex(),j9=it("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,O0).replace(/punctSpace/g,Xc).replace(/punct/g,Ul).getRegex(),F9=it(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ul).getRegex(),q9="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Y9=it(q9,"gu").replace(/notPunctSpace/g,O0).replace(/punctSpace/g,Xc).replace(/punct/g,Ul).getRegex(),V9=it(/\\(punct)/,"gu").replace(/punct/g,Ul).getRegex(),$9=it(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),G9=it(w0).replace("(?:-->|$)","-->").getRegex(),Q9=it("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",G9).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),vc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,X9=it(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",vc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),c_=it(/^!?\[(label)\]\[(ref)\]/).replace("label",vc).replace("ref",N0).getRegex(),f_=it(/^!?\[(ref)\](?:\[\])?/).replace("ref",N0).getRegex(),Z9=it("reflink|nolink(?!\\()","g").replace("reflink",c_).replace("nolink",f_).getRegex(),ME=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,L0={_backpedal:bi,anyPunctuation:V9,autolink:$9,blockSkip:B9,br:l_,code:O9,del:bi,delLDelim:bi,delRDelim:bi,emStrongLDelim:z9,emStrongRDelimAst:U9,emStrongRDelimUnd:j9,escape:R9,link:X9,nolink:f_,punctuation:D9,reflink:c_,reflinkSearch:Z9,tag:Q9,text:L9,url:bi},K9={...L0,link:it(/^!?\[(label)\]\((.*?)\)/).replace("label",vc).getRegex(),reflink:it(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",vc).getRegex()},Rm={...L0,emStrongRDelimAst:P9,emStrongLDelim:H9,delLDelim:F9,delRDelim:Y9,url:it(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ME).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:it(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ME).getRegex()},W9={...Rm,br:it(l_).replace("{2,}","*").getRegex(),text:it(Rm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Go={normal:R0,gfm:N9,pedantic:w9},ju={normal:L0,gfm:Rm,breaks:W9,pedantic:K9},J9={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},BE=e=>J9[e];function xr(e,t){if(t){if(En.escapeTest.test(e))return e.replace(En.escapeReplace,BE)}else if(En.escapeTestNoEncode.test(e))return e.replace(En.escapeReplaceNoEncode,BE);return e}function zE(e){try{e=encodeURI(e).replace(En.percentDecode,"%")}catch{return null}return e}function HE(e,t){var s;let n=e.replace(En.findPipe,(o,f,h)=>{let d=!1,b=f;for(;--b>=0&&h[b]==="\\";)d=!d;return d?"|":" |"}),a=n.split(En.splitPipe),u=0;if(a[0].trim()||a.shift(),a.length>0&&!((s=a.at(-1))!=null&&s.trim())&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push("");for(;u<a.length;u++)a[u]=a[u].trim().replace(En.slashPipe,"|");return a}function Fu(e,t,n){let a=e.length;if(a===0)return"";let u=0;for(;u<a&&e.charAt(a-u-1)===t;)u++;return e.slice(0,a-u)}function eM(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])n++;else if(e[a]===t[1]&&(n--,n<0))return a;return n>0?-2:-1}function tM(e,t=0){let n=t,a="";for(let u of e)if(u===" "){let s=4-n%4;a+=" ".repeat(s),n+=s}else a+=u,n++;return a}function UE(e,t,n,a,u){let s=t.href,o=t.title||null,f=e[1].replace(u.other.outputLinkReplace,"$1");a.state.inLink=!0;let h={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:o,text:f,tokens:a.inlineTokens(f)};return a.state.inLink=!1,h}function nM(e,t,n){let a=e.match(n.other.indentCodeCompensation);if(a===null)return t;let u=a[1];return t.split(`
242
- `).map(s=>{let o=s.match(n.other.beginningSpace);if(o===null)return s;let[f]=o;return f.length>=u.length?s.slice(u.length):s}).join(`
243
- `)}var Sc=class{constructor(e){Et(this,"options");Et(this,"rules");Et(this,"lexer");this.options=e||Ii}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Fu(n,`
244
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],a=nM(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:a}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let a=Fu(n,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(n=a.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Fu(t[0],`
245
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Fu(t[0],`
246
- `).split(`
247
- `),a="",u="",s=[];for(;n.length>0;){let o=!1,f=[],h;for(h=0;h<n.length;h++)if(this.rules.other.blockquoteStart.test(n[h]))f.push(n[h]),o=!0;else if(!o)f.push(n[h]);else break;n=n.slice(h);let d=f.join(`
248
- `),b=d.replace(this.rules.other.blockquoteSetextReplace,`
249
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
250
- ${d}`:d,u=u?`${u}
251
- ${b}`:b;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,s,!0),this.lexer.state.top=g,n.length===0)break;let E=s.at(-1);if((E==null?void 0:E.type)==="code")break;if((E==null?void 0:E.type)==="blockquote"){let T=E,v=T.raw+`
252
- `+n.join(`
253
- `),N=this.blockquote(v);s[s.length-1]=N,a=a.substring(0,a.length-T.raw.length)+N.raw,u=u.substring(0,u.length-T.text.length)+N.text;break}else if((E==null?void 0:E.type)==="list"){let T=E,v=T.raw+`
254
- `+n.join(`
255
- `),N=this.list(v);s[s.length-1]=N,a=a.substring(0,a.length-E.raw.length)+N.raw,u=u.substring(0,u.length-T.raw.length)+N.raw,n=v.substring(s.at(-1).raw.length).split(`
256
- `);continue}}return{type:"blockquote",raw:a,tokens:s,text:u}}}list(e){var n,a;let t=this.rules.block.list.exec(e);if(t){let u=t[1].trim(),s=u.length>1,o={type:"list",raw:"",ordered:s,start:s?+u.slice(0,-1):"",loose:!1,items:[]};u=s?`\\d{1,9}\\${u.slice(-1)}`:`\\${u}`,this.options.pedantic&&(u=s?u:"[*+-]");let f=this.rules.other.listItemRegex(u),h=!1;for(;e;){let b=!1,g="",E="";if(!(t=f.exec(e))||this.rules.block.hr.test(e))break;g=t[0],e=e.substring(g.length);let T=tM(t[2].split(`
257
- `,1)[0],t[1].length),v=e.split(`
258
- `,1)[0],N=!T.trim(),R=0;if(this.options.pedantic?(R=2,E=T.trimStart()):N?R=t[1].length+1:(R=T.search(this.rules.other.nonSpaceChar),R=R>4?1:R,E=T.slice(R),R+=t[1].length),N&&this.rules.other.blankLine.test(v)&&(g+=v+`
259
- `,e=e.substring(v.length+1),b=!0),!b){let O=this.rules.other.nextBulletRegex(R),B=this.rules.other.hrRegex(R),U=this.rules.other.fencesBeginRegex(R),D=this.rules.other.headingBeginRegex(R),F=this.rules.other.htmlBeginRegex(R),z=this.rules.other.blockquoteBeginRegex(R);for(;e;){let V=e.split(`
260
- `,1)[0],G;if(v=V,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),G=v):G=v.replace(this.rules.other.tabCharGlobal," "),U.test(v)||D.test(v)||F.test(v)||z.test(v)||O.test(v)||B.test(v))break;if(G.search(this.rules.other.nonSpaceChar)>=R||!v.trim())E+=`
261
- `+G.slice(R);else{if(N||T.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||U.test(T)||D.test(T)||B.test(T))break;E+=`
262
- `+v}N=!v.trim(),g+=V+`
263
- `,e=e.substring(V.length+1),T=G.slice(R)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(h=!0)),o.items.push({type:"list_item",raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(E),loose:!1,text:E,tokens:[]}),o.raw+=g}let d=o.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let b of o.items){if(this.lexer.state.top=!1,b.tokens=this.lexer.blockTokens(b.text,[]),b.task){if(b.text=b.text.replace(this.rules.other.listReplaceTask,""),((n=b.tokens[0])==null?void 0:n.type)==="text"||((a=b.tokens[0])==null?void 0:a.type)==="paragraph"){b.tokens[0].raw=b.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),b.tokens[0].text=b.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let E=this.lexer.inlineQueue.length-1;E>=0;E--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[E].src)){this.lexer.inlineQueue[E].src=this.lexer.inlineQueue[E].src.replace(this.rules.other.listReplaceTask,"");break}}let g=this.rules.other.listTaskCheckbox.exec(b.raw);if(g){let E={type:"checkbox",raw:g[0]+" ",checked:g[0]!=="[ ]"};b.checked=E.checked,o.loose?b.tokens[0]&&["paragraph","text"].includes(b.tokens[0].type)&&"tokens"in b.tokens[0]&&b.tokens[0].tokens?(b.tokens[0].raw=E.raw+b.tokens[0].raw,b.tokens[0].text=E.raw+b.tokens[0].text,b.tokens[0].tokens.unshift(E)):b.tokens.unshift({type:"paragraph",raw:E.raw,text:E.raw,tokens:[E]}):b.tokens.unshift(E)}}if(!o.loose){let g=b.tokens.filter(T=>T.type==="space"),E=g.length>0&&g.some(T=>this.rules.other.anyLine.test(T.raw));o.loose=E}}if(o.loose)for(let b of o.items){b.loose=!0;for(let g of b.tokens)g.type==="text"&&(g.type="paragraph")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",u=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:a,title:u}}}table(e){var o;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=HE(t[1]),a=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),u=(o=t[3])!=null&&o.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
264
- `):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===a.length){for(let f of a)this.rules.other.tableAlignRight.test(f)?s.align.push("right"):this.rules.other.tableAlignCenter.test(f)?s.align.push("center"):this.rules.other.tableAlignLeft.test(f)?s.align.push("left"):s.align.push(null);for(let f=0;f<n.length;f++)s.header.push({text:n[f],tokens:this.lexer.inline(n[f]),header:!0,align:s.align[f]});for(let f of u)s.rows.push(HE(f,s.header.length).map((h,d)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:s.align[d]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
265
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=Fu(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=eM(t[2],"()");if(s===-2)return;if(s>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let a=t[2],u="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(a);s&&(a=s[1],u=s[3])}else u=t[3]?t[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?a=a.slice(1):a=a.slice(1,-1)),UE(t,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:u&&u.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),u=t[a.toLowerCase()];if(!u){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return UE(n,u,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||!a[1]&&!a[2]&&!a[3]&&!a[4]||a[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[3])||!n||this.rules.inline.punctuation.exec(n))){let u=[...a[0]].length-1,s,o,f=u,h=0,d=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+u);(a=d.exec(t))!==null;){if(s=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!s)continue;if(o=[...s].length,a[3]||a[4]){f+=o;continue}else if((a[5]||a[6])&&u%3&&!((u+o)%3)){h+=o;continue}if(f-=o,f>0)continue;o=Math.min(o,o+f+h);let b=[...a[0]][0].length,g=e.slice(0,u+a.index+b+o);if(Math.min(u,o)%2){let T=g.slice(1,-1);return{type:"em",raw:g,text:T,tokens:this.lexer.inlineTokens(T)}}let E=g.slice(2,-2);return{type:"strong",raw:g,text:E,tokens:this.lexer.inlineTokens(E)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(n),u=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return a&&u&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let a=this.rules.inline.delLDelim.exec(e);if(a&&(!a[1]||!n||this.rules.inline.punctuation.exec(n))){let u=[...a[0]].length-1,s,o,f=u,h=this.rules.inline.delRDelim;for(h.lastIndex=0,t=t.slice(-1*e.length+u);(a=h.exec(t))!==null;){if(s=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!s||(o=[...s].length,o!==u))continue;if(a[3]||a[4]){f+=o;continue}if(f-=o,f>0)continue;o=Math.min(o,o+f);let d=[...a[0]][0].length,b=e.slice(0,u+a.index+d+o),g=b.slice(u,-u);return{type:"del",raw:b,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,a;return t[2]==="@"?(n=t[1],a="mailto:"+n):(n=t[1],a=n),{type:"link",raw:t[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let a,u;if(t[2]==="@")a=t[0],u="mailto:"+a;else{let s;do s=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(s!==t[0]);a=t[0],t[1]==="www."?u="http://"+t[0]:u=t[0]}return{type:"link",raw:t[0],text:a,href:u,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},ar=class Om{constructor(t){Et(this,"tokens");Et(this,"options");Et(this,"state");Et(this,"inlineQueue");Et(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ii,this.options.tokenizer=this.options.tokenizer||new Sc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:En,block:Go.normal,inline:ju.normal};this.options.pedantic?(n.block=Go.pedantic,n.inline=ju.pedantic):this.options.gfm&&(n.block=Go.gfm,this.options.breaks?n.inline=ju.breaks:n.inline=ju.gfm),this.tokenizer.rules=n}static get rules(){return{block:Go,inline:ju}}static lex(t,n){return new Om(n).lex(t)}static lexInline(t,n){return new Om(n).inlineTokens(t)}lex(t){t=t.replace(En.carriageReturn,`
266
- `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let a=this.inlineQueue[n];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],a=!1){var u,s,o;for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(En.tabCharGlobal," ").replace(En.spaceLine,""));t;){let f;if((s=(u=this.options.extensions)==null?void 0:u.block)!=null&&s.some(d=>(f=d.call({lexer:this},t,n))?(t=t.substring(f.raw.length),n.push(f),!0):!1))continue;if(f=this.tokenizer.space(t)){t=t.substring(f.raw.length);let d=n.at(-1);f.raw.length===1&&d!==void 0?d.raw+=`
267
- `:n.push(f);continue}if(f=this.tokenizer.code(t)){t=t.substring(f.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
268
- `)?"":`
269
- `)+f.raw,d.text+=`
270
- `+f.text,this.inlineQueue.at(-1).src=d.text):n.push(f);continue}if(f=this.tokenizer.fences(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.heading(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.hr(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.blockquote(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.list(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.html(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.def(t)){t=t.substring(f.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
271
- `)?"":`
272
- `)+f.raw,d.text+=`
273
- `+f.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[f.tag]||(this.tokens.links[f.tag]={href:f.href,title:f.title},n.push(f));continue}if(f=this.tokenizer.table(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.lheading(t)){t=t.substring(f.raw.length),n.push(f);continue}let h=t;if((o=this.options.extensions)!=null&&o.startBlock){let d=1/0,b=t.slice(1),g;this.options.extensions.startBlock.forEach(E=>{g=E.call({lexer:this},b),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(h=t.substring(0,d+1))}if(this.state.top&&(f=this.tokenizer.paragraph(h))){let d=n.at(-1);a&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=(d.raw.endsWith(`
274
- `)?"":`
275
- `)+f.raw,d.text+=`
276
- `+f.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):n.push(f),a=h.length!==t.length,t=t.substring(f.raw.length);continue}if(f=this.tokenizer.text(t)){t=t.substring(f.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
277
- `)?"":`
278
- `)+f.raw,d.text+=`
279
- `+f.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):n.push(f);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var h,d,b,g,E;this.tokenizer.lexer=this;let a=t,u=null;if(this.tokens.links){let T=Object.keys(this.tokens.links);if(T.length>0)for(;(u=this.tokenizer.rules.inline.reflinkSearch.exec(a))!==null;)T.includes(u[0].slice(u[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(u=this.tokenizer.rules.inline.anyPunctuation.exec(a))!==null;)a=a.slice(0,u.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(u=this.tokenizer.rules.inline.blockSkip.exec(a))!==null;)s=u[2]?u[2].length:0,a=a.slice(0,u.index+s)+"["+"a".repeat(u[0].length-s-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=((d=(h=this.options.hooks)==null?void 0:h.emStrongMask)==null?void 0:d.call({lexer:this},a))??a;let o=!1,f="";for(;t;){o||(f=""),o=!1;let T;if((g=(b=this.options.extensions)==null?void 0:b.inline)!=null&&g.some(N=>(T=N.call({lexer:this},t,n))?(t=t.substring(T.raw.length),n.push(T),!0):!1))continue;if(T=this.tokenizer.escape(t)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.tag(t)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.link(t)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(T.raw.length);let N=n.at(-1);T.type==="text"&&(N==null?void 0:N.type)==="text"?(N.raw+=T.raw,N.text+=T.text):n.push(T);continue}if(T=this.tokenizer.emStrong(t,a,f)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.codespan(t)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.br(t)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.del(t,a,f)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.autolink(t)){t=t.substring(T.raw.length),n.push(T);continue}if(!this.state.inLink&&(T=this.tokenizer.url(t))){t=t.substring(T.raw.length),n.push(T);continue}let v=t;if((E=this.options.extensions)!=null&&E.startInline){let N=1/0,R=t.slice(1),O;this.options.extensions.startInline.forEach(B=>{O=B.call({lexer:this},R),typeof O=="number"&&O>=0&&(N=Math.min(N,O))}),N<1/0&&N>=0&&(v=t.substring(0,N+1))}if(T=this.tokenizer.inlineText(v)){t=t.substring(T.raw.length),T.raw.slice(-1)!=="_"&&(f=T.raw.slice(-1)),o=!0;let N=n.at(-1);(N==null?void 0:N.type)==="text"?(N.raw+=T.raw,N.text+=T.text):n.push(T);continue}if(t){let N="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(N);break}else throw new Error(N)}}return n}},Ac=class{constructor(t){Et(this,"options");Et(this,"parser");this.options=t||Ii}space(t){return""}code({text:t,lang:n,escaped:a}){var o;let u=(o=(n||"").match(En.notSpaceStart))==null?void 0:o[0],s=t.replace(En.endingNewline,"")+`
280
- `;return u?'<pre><code class="language-'+xr(u)+'">'+(a?s:xr(s,!0))+`</code></pre>
281
- `:"<pre><code>"+(a?s:xr(s,!0))+`</code></pre>
282
- `}blockquote({tokens:t}){return`<blockquote>
283
- ${this.parser.parse(t)}</blockquote>
284
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
285
- `}hr(t){return`<hr>
286
- `}list(t){let n=t.ordered,a=t.start,u="";for(let f=0;f<t.items.length;f++){let h=t.items[f];u+=this.listitem(h)}let s=n?"ol":"ul",o=n&&a!==1?' start="'+a+'"':"";return"<"+s+o+`>
287
- `+u+"</"+s+`>
288
- `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
289
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
290
- `}table(t){let n="",a="";for(let s=0;s<t.header.length;s++)a+=this.tablecell(t.header[s]);n+=this.tablerow({text:a});let u="";for(let s=0;s<t.rows.length;s++){let o=t.rows[s];a="";for(let f=0;f<o.length;f++)a+=this.tablecell(o[f]);u+=this.tablerow({text:a})}return u&&(u=`<tbody>${u}</tbody>`),`<table>
291
- <thead>
292
- `+n+`</thead>
293
- `+u+`</table>
294
- `}tablerow({text:t}){return`<tr>
295
- ${t}</tr>
296
- `}tablecell(t){let n=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+n+`</${a}>
297
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${xr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:a}){let u=this.parser.parseInline(a),s=zE(t);if(s===null)return u;t=s;let o='<a href="'+t+'"';return n&&(o+=' title="'+xr(n)+'"'),o+=">"+u+"</a>",o}image({href:t,title:n,text:a,tokens:u}){u&&(a=this.parser.parseInline(u,this.parser.textRenderer));let s=zE(t);if(s===null)return xr(a);t=s;let o=`<img src="${t}" alt="${xr(a)}"`;return n&&(o+=` title="${xr(n)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:xr(t.text)}},D0=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},cr=class Lm{constructor(t){Et(this,"options");Et(this,"renderer");Et(this,"textRenderer");this.options=t||Ii,this.options.renderer=this.options.renderer||new Ac,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new D0}static parse(t,n){return new Lm(n).parse(t)}static parseInline(t,n){return new Lm(n).parseInline(t)}parse(t){var a,u;this.renderer.parser=this;let n="";for(let s=0;s<t.length;s++){let o=t[s];if((u=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&u[o.type]){let h=o,d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){n+=d||"";continue}}let f=o;switch(f.type){case"space":{n+=this.renderer.space(f);break}case"hr":{n+=this.renderer.hr(f);break}case"heading":{n+=this.renderer.heading(f);break}case"code":{n+=this.renderer.code(f);break}case"table":{n+=this.renderer.table(f);break}case"blockquote":{n+=this.renderer.blockquote(f);break}case"list":{n+=this.renderer.list(f);break}case"checkbox":{n+=this.renderer.checkbox(f);break}case"html":{n+=this.renderer.html(f);break}case"def":{n+=this.renderer.def(f);break}case"paragraph":{n+=this.renderer.paragraph(f);break}case"text":{n+=this.renderer.text(f);break}default:{let h='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return n}parseInline(t,n=this.renderer){var u,s;this.renderer.parser=this;let a="";for(let o=0;o<t.length;o++){let f=t[o];if((s=(u=this.options.extensions)==null?void 0:u.renderers)!=null&&s[f.type]){let d=this.options.extensions.renderers[f.type].call({parser:this},f);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(f.type)){a+=d||"";continue}}let h=f;switch(h.type){case"escape":{a+=n.text(h);break}case"html":{a+=n.html(h);break}case"link":{a+=n.link(h);break}case"image":{a+=n.image(h);break}case"checkbox":{a+=n.checkbox(h);break}case"strong":{a+=n.strong(h);break}case"em":{a+=n.em(h);break}case"codespan":{a+=n.codespan(h);break}case"br":{a+=n.br(h);break}case"del":{a+=n.del(h);break}case"text":{a+=n.text(h);break}default:{let d='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return a}},Ko,$u=(Ko=class{constructor(e){Et(this,"options");Et(this,"block");this.options=e||Ii}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?ar.lex:ar.lexInline}provideParser(e=this.block){return e?cr.parse:cr.parseInline}},Et(Ko,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Et(Ko,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ko),rM=class{constructor(...t){Et(this,"defaults",A0());Et(this,"options",this.setOptions);Et(this,"parse",this.parseMarkdown(!0));Et(this,"parseInline",this.parseMarkdown(!1));Et(this,"Parser",cr);Et(this,"Renderer",Ac);Et(this,"TextRenderer",D0);Et(this,"Lexer",ar);Et(this,"Tokenizer",Sc);Et(this,"Hooks",$u);this.use(...t)}walkTokens(t,n){var u,s;let a=[];for(let o of t)switch(a=a.concat(n.call(this,o)),o.type){case"table":{let f=o;for(let h of f.header)a=a.concat(this.walkTokens(h.tokens,n));for(let h of f.rows)for(let d of h)a=a.concat(this.walkTokens(d.tokens,n));break}case"list":{let f=o;a=a.concat(this.walkTokens(f.items,n));break}default:{let f=o;(s=(u=this.defaults.extensions)==null?void 0:u.childTokens)!=null&&s[f.type]?this.defaults.extensions.childTokens[f.type].forEach(h=>{let d=f[h].flat(1/0);a=a.concat(this.walkTokens(d,n))}):f.tokens&&(a=a.concat(this.walkTokens(f.tokens,n)))}}return a}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(a=>{let u={...a};if(u.async=this.defaults.async||u.async||!1,a.extensions&&(a.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=n.renderers[s.name];o?n.renderers[s.name]=function(...f){let h=s.renderer.apply(this,f);return h===!1&&(h=o.apply(this,f)),h}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=n[s.level];o?o.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),u.extensions=n),a.renderer){let s=this.defaults.renderer||new Ac(this.defaults);for(let o in a.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let f=o,h=a.renderer[f],d=s[f];s[f]=(...b)=>{let g=h.apply(s,b);return g===!1&&(g=d.apply(s,b)),g||""}}u.renderer=s}if(a.tokenizer){let s=this.defaults.tokenizer||new Sc(this.defaults);for(let o in a.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let f=o,h=a.tokenizer[f],d=s[f];s[f]=(...b)=>{let g=h.apply(s,b);return g===!1&&(g=d.apply(s,b)),g}}u.tokenizer=s}if(a.hooks){let s=this.defaults.hooks||new $u;for(let o in a.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let f=o,h=a.hooks[f],d=s[f];$u.passThroughHooks.has(o)?s[f]=b=>{if(this.defaults.async&&$u.passThroughHooksRespectAsync.has(o))return(async()=>{let E=await h.call(s,b);return d.call(s,E)})();let g=h.call(s,b);return d.call(s,g)}:s[f]=(...b)=>{if(this.defaults.async)return(async()=>{let E=await h.apply(s,b);return E===!1&&(E=await d.apply(s,b)),E})();let g=h.apply(s,b);return g===!1&&(g=d.apply(s,b)),g}}u.hooks=s}if(a.walkTokens){let s=this.defaults.walkTokens,o=a.walkTokens;u.walkTokens=function(f){let h=[];return h.push(o.call(this,f)),s&&(h=h.concat(s.call(this,f))),h}}this.defaults={...this.defaults,...u}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return ar.lex(t,n??this.defaults)}parser(t,n){return cr.parse(t,n??this.defaults)}parseMarkdown(t){return(n,a)=>{let u={...a},s={...this.defaults,...u},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&u.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let f=s.hooks?await s.hooks.preprocess(n):n,h=await(s.hooks?await s.hooks.provideLexer(t):t?ar.lex:ar.lexInline)(f,s),d=s.hooks?await s.hooks.processAllTokens(h):h;s.walkTokens&&await Promise.all(this.walkTokens(d,s.walkTokens));let b=await(s.hooks?await s.hooks.provideParser(t):t?cr.parse:cr.parseInline)(d,s);return s.hooks?await s.hooks.postprocess(b):b})().catch(o);try{s.hooks&&(n=s.hooks.preprocess(n));let f=(s.hooks?s.hooks.provideLexer(t):t?ar.lex:ar.lexInline)(n,s);s.hooks&&(f=s.hooks.processAllTokens(f)),s.walkTokens&&this.walkTokens(f,s.walkTokens);let h=(s.hooks?s.hooks.provideParser(t):t?cr.parse:cr.parseInline)(f,s);return s.hooks&&(h=s.hooks.postprocess(h)),h}catch(f){return o(f)}}}onError(t,n){return a=>{if(a.message+=`
298
- Please report this to https://github.com/markedjs/marked.`,t){let u="<p>An error occurred:</p><pre>"+xr(a.message+"",!0)+"</pre>";return n?Promise.resolve(u):u}if(n)return Promise.reject(a);throw a}}},Ni=new rM;function Tt(e,t){return Ni.parse(e,t)}Tt.options=Tt.setOptions=function(e){return Ni.setOptions(e),Tt.defaults=Ni.defaults,n_(Tt.defaults),Tt};Tt.getDefaults=A0;Tt.defaults=Ii;Tt.use=function(...e){return Ni.use(...e),Tt.defaults=Ni.defaults,n_(Tt.defaults),Tt};Tt.walkTokens=function(e,t){return Ni.walkTokens(e,t)};Tt.parseInline=Ni.parseInline;Tt.Parser=cr;Tt.parser=cr.parse;Tt.Renderer=Ac;Tt.TextRenderer=D0;Tt.Lexer=ar;Tt.lexer=ar.lex;Tt.Tokenizer=Sc;Tt.Hooks=$u;Tt.parse=Tt;Tt.options;Tt.setOptions;Tt.use;Tt.walkTokens;Tt.parseInline;cr.parse;ar.lex;var aM=300,iM="300px",lM=500;function uM(e={}){let{immediate:t=!1,debounceDelay:n=aM,rootMargin:a=iM,idleTimeout:u=lM}=e,[s,o]=S.useState(!1),f=S.useRef(null),h=S.useRef(null),d=S.useRef(null),b=S.useMemo(()=>T=>{let v=Date.now();return window.setTimeout(()=>{T({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-v))})},1)},[]),g=S.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(T,v)=>window.requestIdleCallback(T,v):b,[b]),E=S.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?T=>window.cancelIdleCallback(T):T=>{clearTimeout(T)},[]);return S.useEffect(()=>{if(t){o(!0);return}let T=f.current;if(!T)return;h.current&&(clearTimeout(h.current),h.current=null),d.current&&(E(d.current),d.current=null);let v=()=>{h.current&&(clearTimeout(h.current),h.current=null),d.current&&(E(d.current),d.current=null)},N=U=>{d.current=g(D=>{D.timeRemaining()>0||D.didTimeout?(o(!0),U.disconnect()):d.current=g(()=>{o(!0),U.disconnect()},{timeout:u/2})},{timeout:u})},R=U=>{v(),h.current=window.setTimeout(()=>{var D,F;let z=U.takeRecords();(z.length===0||(F=(D=z.at(-1))==null?void 0:D.isIntersecting)!=null&&F)&&N(U)},n)},O=(U,D)=>{U.isIntersecting?R(D):v()},B=new IntersectionObserver(U=>{for(let D of U)O(D,B)},{rootMargin:a,threshold:0});return B.observe(T),()=>{h.current&&clearTimeout(h.current),d.current&&E(d.current),B.disconnect()}},[t,n,a,u,E,g]),{shouldRender:s,containerRef:f}}var d_=/\s/,sM=/^\s+$/,oM=new Set(["code","pre","svg","math","annotation"]),cM=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",fM=e=>e.some(t=>cM(t)&&oM.has(t.tagName)),dM=e=>{let t=[],n="",a=!1;for(let u of e){let s=d_.test(u);s!==a&&n&&(t.push(n),n=""),n+=u,a=s}return n&&t.push(n),t},hM=e=>{let t=[],n="";for(let a of e)d_.test(a)?n+=a:(n&&(t.push(n),n=""),t.push(a));return n&&t.push(n),t},mM=(e,t,n,a,u,s)=>{let o=`--sd-animation:sd-${t};--sd-duration:${u?0:n}ms;--sd-easing:${a}`;return s&&(o+=`;--sd-delay:${s}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:o},children:[{type:"text",value:e}]}},pM=(e,t,n,a,u)=>{let s=t.at(-1);if(!(s&&"children"in s))return;if(fM(t))return Sl;let o=s,f=o.children.indexOf(e);if(f===-1)return;let h=e.value;if(!h.trim()){u.count+=h.length;return}let d=n.sep==="char"?hM(h):dM(h),b=a.prevContentLength,g=d.map(E=>{let T=u.count;if(u.count+=E.length,sM.test(E))return{type:"text",value:E};let v=b>0&&T<b,N=v?0:u.newIndex++*n.stagger;return mM(E,n.animation,n.duration,n.easing,v,N)});return o.children.splice(f,1,...g),f+g.length},gM=0;function Dm(e){var t,n,a,u,s;let o={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(a=e==null?void 0:e.easing)!=null?a:"ease",sep:(u=e==null?void 0:e.sep)!=null?u:"word",stagger:(s=e==null?void 0:e.stagger)!=null?s:40},f={prevContentLength:0,lastRenderCharCount:0},h=gM++,d=()=>b=>{let g={count:0,newIndex:0};t0(b,"text",(E,T)=>pM(E,T,o,f,g)),f.lastRenderCharCount=g.count,f.prevContentLength=0};return Object.defineProperty(d,"name",{value:`rehypeAnimate$${h}`}),{name:"animate",type:"animate",rehypePlugin:d,setPrevContentLength(b){f.prevContentLength=b},getLastRenderCharCount(){let b=f.lastRenderCharCount;return f.lastRenderCharCount=0,b}}}Dm();var h_=S.createContext(!1),bM=()=>S.useContext(h_),I0=(...e)=>Jm(Dc(e)),yM=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(a=>a.startsWith(n)?a:`${e}:${a}`).join(" ")},EM=e=>e?(...t)=>yM(e,Jm(Dc(t))):I0,Cl=(e,t,n)=>{let a=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",u=typeof t=="string"?new Blob([a+t],{type:n}):t,s=URL.createObjectURL(u),o=document.createElement("a");o.href=s,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(s)},Im=S.createContext(I0),Qe=()=>S.useContext(Im),TM=I0("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),xM=e=>{let t={};for(let n of e.split(";")){let a=n.indexOf(":");if(a>0){let u=n.slice(0,a).trim(),s=n.slice(a+1).trim();u&&s&&(t[u]=s)}}return t},_M=S.memo(({children:e,result:t,language:n,className:a,startLine:u,lineNumbers:s=!0,...o})=>{let f=Qe(),h=S.useMemo(()=>f(TM),[f]),d=S.useMemo(()=>{let b={};return t.bg&&(b["--sdm-bg"]=t.bg),t.fg&&(b["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(b,xM(t.rootStyle)),b},[t.bg,t.fg,t.rootStyle]);return _.jsx("div",{className:f(a,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...o,children:_.jsx("pre",{className:f(a,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:d,children:_.jsx("code",{className:s?f("[counter-increment:line_0] [counter-reset:line]"):void 0,style:s&&u&&u>1?{counterReset:`line ${u-1}`}:void 0,children:t.tokens.map((b,g)=>_.jsx("span",{className:s?h:void 0,children:b.length===0||b.length===1&&b[0].content===""?`
299
- `:b.map((E,T)=>{let v={},N=!!E.bgColor;if(E.color&&(v["--sdm-c"]=E.color),E.bgColor&&(v["--sdm-tbg"]=E.bgColor),E.htmlStyle)for(let[R,O]of Object.entries(E.htmlStyle))R==="color"?v["--sdm-c"]=O:R==="background-color"?(v["--sdm-tbg"]=O,N=!0):v[R]=O;return _.jsx("span",{className:f("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",N&&"bg-[var(--sdm-tbg)]",N&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:v,...E.htmlAttrs,children:E.content},T)})},g))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),vM=({className:e,language:t,style:n,isIncomplete:a,...u})=>{let s=Qe();return _.jsx("div",{className:s("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":a||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...u})},m_=S.createContext({code:""}),p_=()=>S.useContext(m_),SM=({language:e})=>{let t=Qe();return _.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:_.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},AM=e=>{let t=e.length;for(;t>0&&e[t-1]===`
300
- `;)t--;return e.slice(0,t)},kM=S.lazy(()=>e0(()=>import("./highlighted-body-OFNGDK62-q_mVDG84.js"),[]).then(e=>({default:e.HighlightedCodeBlockBody}))),CM=({code:e,language:t,className:n,children:a,isIncomplete:u=!1,startLine:s,lineNumbers:o,...f})=>{let h=Qe(),d=S.useMemo(()=>AM(e),[e]),b=S.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:d.split(`
301
- `).map(g=>[{content:g,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[d]);return _.jsx(m_.Provider,{value:{code:e},children:_.jsxs(vM,{isIncomplete:u,language:t,children:[_.jsx(SM,{language:t}),a?_.jsx("div",{className:h("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:_.jsx("div",{className:h("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:a})}):null,_.jsx(S.Suspense,{fallback:_.jsx(_M,{className:n,language:t,lineNumbers:o,result:b,startLine:s,...f}),children:_.jsx(kM,{className:n,code:d,language:t,lineNumbers:o,raw:b,startLine:s,...f})})]})})},NM=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),wM=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),RM=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),OM=e=>_.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[_.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),LM=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),DM=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),IM=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),MM=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),BM=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),zM=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Gu={CheckIcon:NM,CopyIcon:wM,DownloadIcon:RM,ExternalLinkIcon:MM,Loader2Icon:OM,Maximize2Icon:LM,RotateCcwIcon:DM,XIcon:IM,ZoomInIcon:BM,ZoomOutIcon:zM},g_=S.createContext(Gu),HM=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),a=Object.keys(t);return n.length!==a.length?!1:n.every(u=>e[u]===t[u])},PE=({icons:e,children:t})=>{let n=S.useRef(e),a=S.useRef(e?{...Gu,...e}:Gu);HM(n.current,e)||(n.current=e,a.current=e?{...Gu,...e}:Gu);let u=a.current;return _.jsx(g_.Provider,{value:u,children:t})},mr=()=>S.useContext(g_),b_={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Mm=S.createContext(b_),na=()=>S.useContext(Mm),jE=({onCopy:e,onError:t,timeout:n=2e3,children:a,className:u,code:s,...o})=>{let f=Qe(),[h,d]=S.useState(!1),b=S.useRef(0),{code:g}=p_(),{isAnimating:E}=S.useContext(Yn),T=na(),v=s??g,N=async()=>{var B;if(typeof window>"u"||!((B=navigator==null?void 0:navigator.clipboard)!=null&&B.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{h||(await navigator.clipboard.writeText(v),d(!0),e==null||e(),b.current=window.setTimeout(()=>d(!1),n))}catch(U){t==null||t(U)}};S.useEffect(()=>()=>{window.clearTimeout(b.current)},[]);let R=mr(),O=h?R.CheckIcon:R.CopyIcon;return _.jsx("button",{className:f("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",u),"data-streamdown":"code-block-copy-button",disabled:E,onClick:N,title:T.copyCode,type:"button",...o,children:a??_.jsx(O,{size:14})})},FE={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},UM=({onDownload:e,onError:t,language:n,children:a,className:u,code:s,...o})=>{let f=Qe(),{code:h}=p_(),{isAnimating:d}=S.useContext(Yn),b=na(),g=mr(),E=s??h,T=`file.${n&&n in FE?FE[n]:"txt"}`,v="text/plain",N=()=>{try{Cl(T,E,v),e==null||e()}catch(R){t==null||t(R)}};return _.jsx("button",{className:f("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",u),"data-streamdown":"code-block-download-button",disabled:d,onClick:N,title:b.downloadFile,type:"button",...o,children:a??_.jsx(g.DownloadIcon,{size:14})})},qE=()=>{let{Loader2Icon:e}=mr(),t=Qe();return _.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[_.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),_.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:_.jsx(e,{className:t("size-4 animate-spin")})})]})},PM=/\.[^/.]+$/,jM=({node:e,className:t,src:n,alt:a,onLoad:u,onError:s,...o})=>{let{DownloadIcon:f}=mr(),h=Qe(),d=S.useRef(null),[b,g]=S.useState(!1),[E,T]=S.useState(!1),v=na(),N=o.width!=null||o.height!=null,R=(b||N)&&!E,O=E&&!N;S.useEffect(()=>{let F=d.current;if(F!=null&&F.complete){let z=F.naturalWidth>0;g(z),T(!z)}},[]);let B=S.useCallback(F=>{g(!0),T(!1),u==null||u(F)},[u]),U=S.useCallback(F=>{g(!1),T(!0),s==null||s(F)},[s]),D=async()=>{if(n)try{let F=await(await fetch(n)).blob(),z=new URL(n,window.location.origin).pathname.split("/").pop()||"",V=z.split(".").pop(),G=z.includes(".")&&V!==void 0&&V.length<=4,be="";if(G)be=z;else{let q=F.type,ce="png";q.includes("jpeg")||q.includes("jpg")?ce="jpg":q.includes("png")?ce="png":q.includes("svg")?ce="svg":q.includes("gif")?ce="gif":q.includes("webp")&&(ce="webp"),be=`${(a||z||"image").replace(PM,"")}.${ce}`}Cl(be,F,F.type)}catch{window.open(n,"_blank")}};return n?_.jsxs("div",{className:h("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[_.jsx("img",{alt:a,className:h("max-w-full rounded-lg",O&&"hidden",t),"data-streamdown":"image",onError:U,onLoad:B,ref:d,src:n,...o}),O&&_.jsx("span",{className:h("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:v.imageNotAvailable}),_.jsx("div",{className:h("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),R&&_.jsx("button",{className:h("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:D,title:v.downloadImage,type:"button",children:_.jsx(f,{size:14})})]}):null},as=0,M0=()=>{as+=1,as===1&&(document.body.style.overflow="hidden")},B0=()=>{as=Math.max(0,as-1),as===0&&(document.body.style.overflow="")},FM=({url:e,isOpen:t,onClose:n,onConfirm:a})=>{let{CheckIcon:u,CopyIcon:s,ExternalLinkIcon:o,XIcon:f}=mr(),h=Qe(),[d,b]=S.useState(!1),g=na(),E=S.useCallback(async()=>{try{await navigator.clipboard.writeText(e),b(!0),setTimeout(()=>b(!1),2e3)}catch{}},[e]),T=S.useCallback(()=>{a(),n()},[a,n]);return S.useEffect(()=>{if(t){M0();let v=N=>{N.key==="Escape"&&n()};return document.addEventListener("keydown",v),()=>{document.removeEventListener("keydown",v),B0()}}},[t,n]),t?_.jsx("div",{className:h("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:v=>{v.key==="Escape"&&n()},role:"button",tabIndex:0,children:_.jsxs("div",{className:h("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:v=>v.stopPropagation(),onKeyDown:v=>v.stopPropagation(),role:"presentation",children:[_.jsx("button",{className:h("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:g.close,type:"button",children:_.jsx(f,{size:16})}),_.jsxs("div",{className:h("flex flex-col gap-2"),children:[_.jsxs("div",{className:h("flex items-center gap-2 font-semibold text-lg"),children:[_.jsx(o,{size:20}),_.jsx("span",{children:g.openExternalLink})]}),_.jsx("p",{className:h("text-muted-foreground text-sm"),children:g.externalLinkWarning})]}),_.jsx("div",{className:h("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),_.jsxs("div",{className:h("flex gap-2"),children:[_.jsx("button",{className:h("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:E,type:"button",children:d?_.jsxs(_.Fragment,{children:[_.jsx(u,{size:14}),_.jsx("span",{children:g.copied})]}):_.jsxs(_.Fragment,{children:[_.jsx(s,{size:14}),_.jsx("span",{children:g.copyLink})]})}),_.jsxs("button",{className:h("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:T,type:"button",children:[_.jsx(o,{size:14}),_.jsx("span",{children:g.openLink})]})]})]})}):null},Bm=S.createContext(null),z0=()=>S.useContext(Bm),WB=()=>{var e;let t=z0();return(e=t==null?void 0:t.code)!=null?e:null},H0=()=>{var e;let t=z0();return(e=t==null?void 0:t.mermaid)!=null?e:null},qM=e=>{var t;let n=z0();return n!=null&&n.renderers&&e&&(t=n.renderers.find(a=>Array.isArray(a.language)?a.language.includes(e):a.language===e))!=null?t:null},YM=(e,t)=>{var n;let a=(n=void 0)!=null?n:5;return new Promise((u,s)=>{let o="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),f=new Image;f.crossOrigin="anonymous",f.onload=()=>{let h=document.createElement("canvas"),d=f.width*a,b=f.height*a;h.width=d,h.height=b;let g=h.getContext("2d");if(!g){s(new Error("Failed to create 2D canvas context for PNG export"));return}g.drawImage(f,0,0,d,b),h.toBlob(E=>{if(!E){s(new Error("Failed to create PNG blob"));return}u(E)},"image/png")},f.onerror=()=>s(new Error("Failed to load SVG image")),f.src=o})},VM=({chart:e,children:t,className:n,onDownload:a,config:u,onError:s})=>{let o=Qe(),[f,h]=S.useState(!1),d=S.useRef(null),{isAnimating:b}=S.useContext(Yn),g=mr(),E=H0(),T=na(),v=async N=>{try{if(N==="mmd"){Cl("diagram.mmd",e,"text/plain"),h(!1),a==null||a(N);return}if(!E){s==null||s(new Error("Mermaid plugin not available"));return}let R=E.getMermaid(u),O=e.split("").reduce((D,F)=>(D<<5)-D+F.charCodeAt(0)|0,0),B=`mermaid-${Math.abs(O)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:U}=await R.render(B,e);if(!U){s==null||s(new Error("SVG not found. Please wait for the diagram to render."));return}if(N==="svg"){Cl("diagram.svg",U,"image/svg+xml"),h(!1),a==null||a(N);return}if(N==="png"){let D=await YM(U);Cl("diagram.png",D,"image/png"),a==null||a(N),h(!1);return}}catch(R){s==null||s(R)}};return S.useEffect(()=>{let N=R=>{let O=R.composedPath();d.current&&!O.includes(d.current)&&h(!1)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),_.jsxs("div",{className:o("relative"),ref:d,children:[_.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:b,onClick:()=>h(!f),title:T.downloadDiagram,type:"button",children:t??_.jsx(g.DownloadIcon,{size:14})}),f?_.jsxs("div",{className:o("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[_.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>v("svg"),title:T.downloadDiagramAsSvg,type:"button",children:T.mermaidFormatSvg}),_.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>v("png"),title:T.downloadDiagramAsPng,type:"button",children:T.mermaidFormatPng}),_.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>v("mmd"),title:T.downloadDiagramAsMmd,type:"button",children:T.mermaidFormatMmd})]}):null]})},$M=({chart:e,config:t,onFullscreen:n,onExit:a,className:u,...s})=>{let{Maximize2Icon:o,XIcon:f}=mr(),h=Qe(),[d,b]=S.useState(!1),{isAnimating:g,controls:E}=S.useContext(Yn),T=na(),v=(()=>{if(typeof E=="boolean")return E;let R=E.mermaid;return R===!1?!1:R===!0||R===void 0?!0:R.panZoom!==!1})(),N=()=>{b(!d)};return S.useEffect(()=>{if(d){M0();let R=O=>{O.key==="Escape"&&b(!1)};return document.addEventListener("keydown",R),()=>{document.removeEventListener("keydown",R),B0()}}},[d]),S.useEffect(()=>{d?n==null||n():a&&a()},[d,n,a]),_.jsxs(_.Fragment,{children:[_.jsx("button",{className:h("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",u),disabled:g,onClick:N,title:T.viewFullscreen,type:"button",...s,children:_.jsx(o,{size:14})}),d?Vx.createPortal(_.jsxs("div",{className:h("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:N,onKeyDown:R=>{R.key==="Escape"&&N()},role:"button",tabIndex:0,children:[_.jsx("button",{className:h("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:N,title:T.exitFullscreen,type:"button",children:_.jsx(f,{size:20})}),_.jsx("div",{className:h("flex size-full items-center justify-center p-4"),onClick:R=>R.stopPropagation(),onKeyDown:R=>R.stopPropagation(),role:"presentation",children:_.jsx(W_,{chart:e,className:h("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:v})})]}),document.body):null]})},y_=e=>{var t,n;let a=[],u=[],s=e.querySelectorAll("thead th");for(let f of s)a.push(((t=f.textContent)==null?void 0:t.trim())||"");let o=e.querySelectorAll("tbody tr");for(let f of o){let h=[],d=f.querySelectorAll("td");for(let b of d)h.push(((n=b.textContent)==null?void 0:n.trim())||"");u.push(h)}return{headers:a,rows:u}},E_=e=>{let{headers:t,rows:n}=e,a=f=>{let h=!1,d=!1;for(let b of f){if(b==='"'){h=!0,d=!0;break}(b===","||b===`
302
- `)&&(h=!0)}return h?d?`"${f.replace(/"/g,'""')}"`:`"${f}"`:f},u=t.length>0?n.length+1:n.length,s=new Array(u),o=0;t.length>0&&(s[o]=t.map(a).join(","),o+=1);for(let f of n)s[o]=f.map(a).join(","),o+=1;return s.join(`
303
- `)},GM=e=>{let{headers:t,rows:n}=e,a=f=>{let h=!1;for(let b of f)if(b===" "||b===`
304
- `||b==="\r"){h=!0;break}if(!h)return f;let d=[];for(let b of f)b===" "?d.push("\\t"):b===`
305
- `?d.push("\\n"):b==="\r"?d.push("\\r"):d.push(b);return d.join("")},u=t.length>0?n.length+1:n.length,s=new Array(u),o=0;t.length>0&&(s[o]=t.map(a).join(" "),o+=1);for(let f of n)s[o]=f.map(a).join(" "),o+=1;return s.join(`
306
- `)},Zh=e=>{let t=!1;for(let a of e)if(a==="\\"||a==="|"){t=!0;break}if(!t)return e;let n=[];for(let a of e)a==="\\"?n.push("\\\\"):a==="|"?n.push("\\|"):n.push(a);return n.join("")},zm=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let a=new Array(n.length+2),u=0,s=t.map(f=>Zh(f));a[u]=`| ${s.join(" | ")} |`,u+=1;let o=new Array(t.length);for(let f=0;f<t.length;f+=1)o[f]="---";a[u]=`| ${o.join(" | ")} |`,u+=1;for(let f of n)if(f.length<t.length){let h=new Array(t.length);for(let d=0;d<t.length;d+=1)h[d]=d<f.length?Zh(f[d]):"";a[u]=`| ${h.join(" | ")} |`,u+=1}else{let h=f.map(d=>Zh(d));a[u]=`| ${h.join(" | ")} |`,u+=1}return a.join(`
307
- `)},T_=({children:e,className:t,onCopy:n,onError:a,timeout:u=2e3})=>{let s=Qe(),[o,f]=S.useState(!1),[h,d]=S.useState(!1),b=S.useRef(null),g=S.useRef(0),{isAnimating:E}=S.useContext(Yn),T=na(),v=async O=>{var B,U;if(typeof window>"u"||!((B=navigator==null?void 0:navigator.clipboard)!=null&&B.write)){a==null||a(new Error("Clipboard API not available"));return}try{let D=(U=b.current)==null?void 0:U.closest('[data-streamdown="table-wrapper"]'),F=D==null?void 0:D.querySelector("table");if(!F){a==null||a(new Error("Table not found"));return}let z=y_(F),V=({csv:E_,tsv:GM,md:zm}[O]||zm)(z),G=new ClipboardItem({"text/plain":new Blob([V],{type:"text/plain"}),"text/html":new Blob([F.outerHTML],{type:"text/html"})});await navigator.clipboard.write([G]),d(!0),f(!1),n==null||n(O),g.current=window.setTimeout(()=>d(!1),u)}catch(D){a==null||a(D)}};S.useEffect(()=>{let O=B=>{let U=B.composedPath();b.current&&!U.includes(b.current)&&f(!1)};return document.addEventListener("mousedown",O),()=>{document.removeEventListener("mousedown",O),window.clearTimeout(g.current)}},[]);let N=mr(),R=h?N.CheckIcon:N.CopyIcon;return _.jsxs("div",{className:s("relative"),ref:b,children:[_.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:E,onClick:()=>f(!o),title:T.copyTable,type:"button",children:e??_.jsx(R,{height:14,width:14})}),o?_.jsxs("div",{className:s("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[_.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>v("md"),title:T.copyTableAsMarkdown,type:"button",children:T.tableFormatMarkdown}),_.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>v("csv"),title:T.copyTableAsCsv,type:"button",children:T.tableFormatCsv}),_.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>v("tsv"),title:T.copyTableAsTsv,type:"button",children:T.tableFormatTsv})]}):null]})},x_=({children:e,className:t,onDownload:n,onError:a})=>{let u=Qe(),[s,o]=S.useState(!1),f=S.useRef(null),{isAnimating:h}=S.useContext(Yn),d=na(),b=mr(),g=E=>{var T;try{let v=(T=f.current)==null?void 0:T.closest('[data-streamdown="table-wrapper"]'),N=v==null?void 0:v.querySelector("table");if(!N){a==null||a(new Error("Table not found"));return}let R=y_(N),O=E==="csv"?E_(R):zm(R);Cl(`table.${E==="csv"?"csv":"md"}`,O,E==="csv"?"text/csv":"text/markdown"),o(!1),n==null||n(E)}catch(v){a==null||a(v)}};return S.useEffect(()=>{let E=T=>{let v=T.composedPath();f.current&&!v.includes(f.current)&&o(!1)};return document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)}},[]),_.jsxs("div",{className:u("relative"),ref:f,children:[_.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:()=>o(!s),title:d.downloadTable,type:"button",children:e??_.jsx(b.DownloadIcon,{size:14})}),s?_.jsxs("div",{className:u("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[_.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("csv"),title:d.downloadTableAsCsv,type:"button",children:d.tableFormatCsv}),_.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("markdown"),title:d.downloadTableAsMarkdown,type:"button",children:d.tableFormatMarkdown})]}):null]})},QM=({children:e,className:t,showCopy:n=!0,showDownload:a=!0})=>{let{Maximize2Icon:u,XIcon:s}=mr(),o=Qe(),[f,h]=S.useState(!1),{isAnimating:d}=S.useContext(Yn),b=na(),g=()=>{h(!0)},E=()=>{h(!1)};return S.useEffect(()=>{if(f){M0();let T=v=>{v.key==="Escape"&&h(!1)};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T),B0()}}},[f]),_.jsxs(_.Fragment,{children:[_.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:g,title:b.viewFullscreen,type:"button",children:_.jsx(u,{size:14})}),f?Vx.createPortal(_.jsx("div",{"aria-label":b.viewFullscreen,"aria-modal":"true",className:o("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:E,onKeyDown:T=>{T.key==="Escape"&&E()},role:"dialog",children:_.jsxs("div",{className:o("flex h-full flex-col"),onClick:T=>T.stopPropagation(),onKeyDown:T=>T.stopPropagation(),role:"presentation",children:[_.jsxs("div",{className:o("flex items-center justify-end gap-1 p-4"),children:[n?_.jsx(T_,{}):null,a?_.jsx(x_,{}):null,_.jsx("button",{className:o("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:E,title:b.exitFullscreen,type:"button",children:_.jsx(s,{size:20})})]}),_.jsx("div",{className:o("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:_.jsx("table",{className:o("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},XM=({children:e,className:t,showControls:n,showCopy:a=!0,showDownload:u=!0,showFullscreen:s=!0,...o})=>{let f=Qe(),h=n&&a,d=n&&u,b=n&&s,g=h||d||b;return _.jsxs("div",{className:f("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[g?_.jsxs("div",{className:f("flex items-center justify-end gap-1"),children:[h?_.jsx(T_,{}):null,d?_.jsx(x_,{}):null,b?_.jsx(QM,{showCopy:h,showDownload:d,children:e}):null]}):null,_.jsx("div",{className:f("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:_.jsx("table",{className:f("w-full divide-y divide-border",t),"data-streamdown":"table",...o,children:e})})]})},ZM=/startLine=(\d+)/,KM=/\bnoLineNumbers\b/,WM=S.lazy(()=>e0(()=>Promise.resolve().then(()=>QB),void 0).then(e=>({default:e.Mermaid}))),JM=/language-([^\s]+)/;function Zc(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,a=t.position.start,u=e.position.end,s=t.position.end;return(n==null?void 0:n.line)===(a==null?void 0:a.line)&&(n==null?void 0:n.column)===(a==null?void 0:a.column)&&(u==null?void 0:u.line)===(s==null?void 0:s.line)&&(u==null?void 0:u.column)===(s==null?void 0:s.column)}function Mt(e,t){return e.className===t.className&&Zc(e.node,t.node)}var Hm=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Kh=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},YE=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Qo=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},U0=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("ol",{className:u("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...a,children:e})},(e,t)=>Mt(e,t));U0.displayName="MarkdownOl";var __=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("li",{className:u("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...a,children:e})},(e,t)=>e.className===t.className&&Zc(e.node,t.node));__.displayName="MarkdownLi";var v_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("ul",{className:u("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...a,children:e})},(e,t)=>Mt(e,t));v_.displayName="MarkdownUl";var S_=S.memo(({className:e,node:t,...n})=>{let a=Qe();return _.jsx("hr",{className:a("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>Mt(e,t));S_.displayName="MarkdownHr";var A_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("span",{className:u("font-semibold",t),"data-streamdown":"strong",...a,children:e})},(e,t)=>Mt(e,t));A_.displayName="MarkdownStrong";var e7=({children:e,className:t,href:n,node:a,...u})=>{let s=Qe(),{linkSafety:o}=S.useContext(Yn),[f,h]=S.useState(!1),d=n==="streamdown:incomplete-link",b=S.useCallback(async v=>{if(!(!(o!=null&&o.enabled&&n)||d)){if(v.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}h(!0)}},[o,n,d]),g=S.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),E=S.useCallback(()=>{h(!1)},[]),T={url:n??"",isOpen:f,onClose:E,onConfirm:g};return o!=null&&o.enabled&&n?_.jsxs(_.Fragment,{children:[_.jsx("button",{className:s("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":d,"data-streamdown":"link",onClick:b,type:"button",children:e}),o.renderModal?o.renderModal(T):_.jsx(FM,{...T})]}):_.jsx("a",{className:s("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":d,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...u,children:e})},k_=S.memo(e7,(e,t)=>Mt(e,t)&&e.href===t.href);k_.displayName="MarkdownA";var C_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("h1",{className:u("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...a,children:e})},(e,t)=>Mt(e,t));C_.displayName="MarkdownH1";var N_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("h2",{className:u("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...a,children:e})},(e,t)=>Mt(e,t));N_.displayName="MarkdownH2";var w_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("h3",{className:u("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...a,children:e})},(e,t)=>Mt(e,t));w_.displayName="MarkdownH3";var R_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("h4",{className:u("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...a,children:e})},(e,t)=>Mt(e,t));R_.displayName="MarkdownH4";var O_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("h5",{className:u("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...a,children:e})},(e,t)=>Mt(e,t));O_.displayName="MarkdownH5";var L_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("h6",{className:u("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...a,children:e})},(e,t)=>Mt(e,t));L_.displayName="MarkdownH6";var D_=S.memo(({children:e,className:t,node:n,...a})=>{let{controls:u}=S.useContext(Yn),s=Hm(u,"table"),o=Kh(u,"copy"),f=Kh(u,"download"),h=Kh(u,"fullscreen");return _.jsx(XM,{className:t,showControls:s,showCopy:o,showDownload:f,showFullscreen:h,...a,children:e})},(e,t)=>Mt(e,t));D_.displayName="MarkdownTable";var I_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("thead",{className:u("bg-muted/80",t),"data-streamdown":"table-header",...a,children:e})},(e,t)=>Mt(e,t));I_.displayName="MarkdownThead";var M_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("tbody",{className:u("divide-y divide-border",t),"data-streamdown":"table-body",...a,children:e})},(e,t)=>Mt(e,t));M_.displayName="MarkdownTbody";var B_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("tr",{className:u("border-border",t),"data-streamdown":"table-row",...a,children:e})},(e,t)=>Mt(e,t));B_.displayName="MarkdownTr";var z_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("th",{className:u("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...a,children:e})},(e,t)=>Mt(e,t));z_.displayName="MarkdownTh";var H_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("td",{className:u("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...a,children:e})},(e,t)=>Mt(e,t));H_.displayName="MarkdownTd";var U_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("blockquote",{className:u("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...a,children:e})},(e,t)=>Mt(e,t));U_.displayName="MarkdownBlockquote";var P_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("sup",{className:u("text-sm",t),"data-streamdown":"superscript",...a,children:e})},(e,t)=>Mt(e,t));P_.displayName="MarkdownSup";var j_=S.memo(({children:e,className:t,node:n,...a})=>{let u=Qe();return _.jsx("sub",{className:u("text-sm",t),"data-streamdown":"subscript",...a,children:e})},(e,t)=>Mt(e,t));j_.displayName="MarkdownSub";var F_=S.memo(({children:e,className:t,node:n,...a})=>{if("data-footnotes"in a){let u=o=>{var f,h;if(!S.isValidElement(o))return!1;let d=Array.isArray(o.props.children)?o.props.children:[o.props.children],b=!1,g=!1;for(let E of d)if(E){if(typeof E=="string")E.trim()!==""&&(b=!0);else if(S.isValidElement(E))if(((f=E.props)==null?void 0:f["data-footnote-backref"])!==void 0)g=!0;else{let T=Array.isArray(E.props.children)?E.props.children:[E.props.children];for(let v of T){if(typeof v=="string"&&v.trim()!==""){b=!0;break}if(S.isValidElement(v)&&((h=v.props)==null?void 0:h["data-footnote-backref"])===void 0){b=!0;break}}}}return g&&!b},s=Array.isArray(e)?e.map(o=>{if(!S.isValidElement(o))return o;if(o.type===U0){let f=(Array.isArray(o.props.children)?o.props.children:[o.props.children]).filter(h=>!u(h));return f.length===0?null:{...o,props:{...o.props,children:f}}}return o}):e;return(Array.isArray(s)?s.some(o=>o!==null):s!==null)?_.jsx("section",{className:t,...a,children:s}):null}return _.jsx("section",{className:t,...a,children:e})},(e,t)=>Mt(e,t));F_.displayName="MarkdownSection";var t7=({node:e,className:t,children:n,...a})=>{var u,s;let o=Qe(),f=!("data-block"in a),{mermaid:h,controls:d,lineNumbers:b}=S.useContext(Yn),g=H0(),E=bM(),T=t==null?void 0:t.match(JM),v=(u=T==null?void 0:T.at(1))!=null?u:"",N=qM(v);if(f)return _.jsx("code",{className:o("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...a,children:n});let R=(s=e==null?void 0:e.properties)==null?void 0:s.metastring,O=R==null?void 0:R.match(ZM),B=O?Number.parseInt(O[1],10):void 0,U=B!==void 0&&B>=1?B:void 0,D=!(R&&KM.test(R))&&b!==!1,F="";if(S.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?F=n.props.children:typeof n=="string"&&(F=n),N){let be=N.component;return _.jsx(S.Suspense,{fallback:_.jsx(qE,{}),children:_.jsx(be,{code:F,isIncomplete:E,language:v,meta:R})})}if(v==="mermaid"&&g){let be=Hm(d,"mermaid"),q=Qo(d,"download"),ce=Qo(d,"copy"),oe=Qo(d,"fullscreen"),we=Qo(d,"panZoom"),pe=be&&(q||ce||oe);return _.jsx(S.Suspense,{fallback:_.jsx(qE,{}),children:_.jsxs("div",{className:o("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[_.jsx("div",{className:o("flex h-8 items-center text-muted-foreground text-xs"),children:_.jsx("span",{className:o("ml-1 font-mono lowercase"),children:"mermaid"})}),pe?_.jsx("div",{className:o("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:_.jsxs("div",{className:o("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[q?_.jsx(VM,{chart:F,config:h==null?void 0:h.config}):null,ce?_.jsx(jE,{code:F}):null,oe?_.jsx($M,{chart:F,config:h==null?void 0:h.config}):null]})}):null,_.jsx("div",{className:o("rounded-md border border-border bg-background"),children:_.jsx(WM,{chart:F,config:h==null?void 0:h.config,showControls:we})})]})})}let z=Hm(d,"code"),V=YE(d,"download"),G=YE(d,"copy");return _.jsx(CM,{className:t,code:F,isIncomplete:E,language:v,lineNumbers:D,startLine:U,children:z?_.jsxs(_.Fragment,{children:[V?_.jsx(UM,{code:F,language:v}):null,G?_.jsx(jE,{}):null]}):null})},q_=S.memo(t7,(e,t)=>e.className===t.className&&Zc(e.node,t.node));q_.displayName="MarkdownCode";var Y_=S.memo(jM,(e,t)=>e.className===t.className&&Zc(e.node,t.node));Y_.displayName="MarkdownImg";var V_=S.memo(({children:e,node:t,...n})=>{let a=(Array.isArray(e)?e:[e]).filter(u=>u!=null&&u!=="");if(a.length===1&&S.isValidElement(a[0])){let u=a[0].props.node,s=u==null?void 0:u.tagName;if(s==="img")return _.jsx(_.Fragment,{children:e});if(s==="code"&&"data-block"in a[0].props)return _.jsx(_.Fragment,{children:e})}return _.jsx("p",{...n,children:e})},(e,t)=>Mt(e,t));V_.displayName="MarkdownParagraph";var n7={ol:U0,li:__,ul:v_,hr:S_,strong:A_,a:k_,h1:C_,h2:N_,h3:w_,h4:R_,h5:O_,h6:L_,table:D_,thead:I_,tbody:M_,tr:B_,th:z_,td:H_,blockquote:U_,code:q_,img:Y_,pre:({children:e})=>S.isValidElement(e)?S.cloneElement(e,{"data-block":"true"}):e,sup:P_,sub:j_,p:V_,section:F_},r7=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,a7=new RegExp("\\p{L}","u");function VE(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(r7.test(n))return"rtl";if(a7.test(n))return"ltr"}return"ltr"}var i7=/^[ \t]{0,3}(`{3,}|~{3,})/,l7=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,$E=e=>{let t=e.split(`
308
- `),n=null,a=0;for(let u of t){let s=i7.exec(u);if(n===null){if(s){let o=s[1];n=o[0],a=o.length}}else if(s){let o=s[1],f=o[0],h=o.length;f===n&&h>=a&&(n=null,a=0)}}return n!==null},u7=e=>{let t=e.split(`
309
- `);for(let n of t){let a=n.trim();if(a.length>0&&a.includes("|")&&l7.test(a))return!0}return!1},s7=()=>e=>{Ar(e,"html",(t,n,a)=>{!a||typeof n!="number"||(a.children[n]={type:"text",value:t.value})})},GE=[],QE={allowDangerousHtml:!0},Xo=new WeakMap,o7=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,a=e.remarkPlugins,u=e.remarkRehypeOptions;if(!(n||a||u)){let b="default";return this.keyCache.set(e,b),b}let s=b=>{if(!b||b.length===0)return"";let g="";for(let E=0;E<b.length;E+=1){let T=b[E];if(E>0&&(g+=","),Array.isArray(T)){let[v,N]=T;if(typeof v=="function"){let R=Xo.get(v);R||(R=v.name,Xo.set(v,R)),g+=R}else g+=String(v);g+=":",g+=JSON.stringify(N)}else if(typeof T=="function"){let v=Xo.get(T);v||(v=T.name,Xo.set(T,v)),g+=v}else g+=String(T)}return g},o=s(n),f=s(a),h=u?JSON.stringify(u):"",d=`${f}::${o}::${h}`;return this.keyCache.set(e,d),d}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let a=this.cache.keys().next().value;a&&this.cache.delete(a)}this.cache.set(n,t)}clear(){this.cache.clear()}},XE=new o7,$_=e=>{let t=c7(e),n=e.children||"",a=t.runSync(t.parse(n),n);return b7(a,e)},c7=e=>{let t=XE.get(e);if(t)return t;let n=d7(e);return XE.set(e,n),n},f7=e=>e.some(t=>Array.isArray(t)?t[0]===_m:t===_m),d7=e=>{let t=e.rehypePlugins||GE,n=e.remarkPlugins||GE,a=f7(t)?n:[...n,s7],u=e.remarkRehypeOptions?{...QE,...e.remarkRehypeOptions}:QE;return h9().use(dI).use(a).use(QI,u).use(t)},h7=e=>e,m7=(e,t,n,a)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:a}},p7=(e,t)=>{var n;for(let a in jh)if(Object.hasOwn(jh,a)&&Object.hasOwn(e.properties,a)){let u=e.properties[a],s=jh[a];(s===null||s.includes(e.tagName))&&(e.properties[a]=(n=t(String(u||""),a,e))!=null?n:void 0)}},g7=(e,t,n,a,u,s)=>{let o=!1;return a?o=!a.includes(e.tagName):u&&(o=u.includes(e.tagName)),!o&&s&&typeof t=="number"&&(o=!s(e,t,n)),o},b7=(e,t)=>{let{allowElement:n,allowedElements:a,disallowedElements:u,skipHtml:s,unwrapDisallowed:o,urlTransform:f}=t;if(n||a||u||s||f){let h=f||h7;Ar(e,(d,b,g)=>{if(d.type==="raw"&&g&&typeof b=="number")return m7(g,b,s,d.value),b;if(d.type==="element"&&(p7(d,h),g7(d,b,g,a,u,n)&&g&&typeof b=="number"))return o&&d.children?g.children.splice(b,1,...d.children):g.children.splice(b,1),b})}return T8(e,{Fragment:_.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0})},y7=/\[\^[\w-]{1,200}\](?!:)/,E7=/\[\^[\w-]{1,200}\]:/,T7=/<(\w+)[\s>]/,x7=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ZE=new Map,KE=new Map,_7=e=>{let t=e.toLowerCase(),n=ZE.get(t);if(n)return n;let a=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return ZE.set(t,a),a},v7=e=>{let t=e.toLowerCase(),n=KE.get(t);if(n)return n;let a=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return KE.set(t,a),a},WE=(e,t)=>{if(x7.has(t.toLowerCase()))return 0;let n=e.match(_7(t));if(!n)return 0;let a=0;for(let u of n)u.trimEnd().endsWith("/>")||(a+=1);return a},JE=(e,t)=>{let n=e.match(v7(t));return n?n.length:0},S7=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},A7=e=>{let t=y7.test(e),n=E7.test(e);if(t||n)return[e];let a=ar.lex(e,{gfm:!0}),u=[],s=[],o=!1;for(let f of a){let h=f.raw,d=u.length;if(s.length>0){u[d-1]+=h;let b=s.at(-1),g=WE(h,b),E=JE(h,b);for(let T=0;T<g;T+=1)s.push(b);for(let T=0;T<E;T+=1)s.length>0&&s.at(-1)===b&&s.pop();continue}if(f.type==="html"&&f.block){let b=h.match(T7);if(b){let g=b[1],E=WE(h,g),T=JE(h,g);E>T&&s.push(g)}}if(d>0&&!o){let b=u[d-1];if(S7(b)%2===1){u[d-1]=b+h;continue}}u.push(h),f.type!=="space"&&(o=f.type==="code")}return u},k7=(e,t)=>{if(!t.length)return e;let n=e;for(let a of t){let u=new RegExp(`(<${a}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${a}\\s*>)`,"gi");n=n.replace(u,(s,o,f,h)=>{if(!f.includes(`
310
-
311
- `))return o+f+h;let d=f.replace(/\n\n/g,`
312
- <!---->
313
- `),b=(d.startsWith(`
314
- `)?"":`
315
- `)+d+(d.endsWith(`
316
- `)?"":`
317
- `);return`${o}${b}${h}
318
-
319
- `})}return n},C7=/([\\`*_~[\]|])/g,N7=e=>e.replace(C7,"\\$1"),w7=(e,t)=>{if(!t.length)return e;let n=e;for(let a of t){let u=new RegExp(`(<${a}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${a}\\s*>)`,"gi");n=n.replace(u,(s,o,f,h)=>{let d=N7(f).replace(/\n\n/g,"&#10;&#10;");return o+d+h})}return n},G_=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(G_).join(""):"",R7=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(a=>a.toLowerCase()));Ar(t,"element",a=>{if(n.has(a.tagName.toLowerCase())){let u=G_(a);a.children=u?[{type:"text",value:u}]:[]}})},O7=()=>e=>{Ar(e,"code",t=>{var n,a;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(a=t.data.hProperties)!=null?a:{},metastring:t.meta})})},L7=/^[ \t]*<[\w!/?-]/,D7=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,I7=e=>typeof e!="string"||e.length===0||!L7.test(e)?e:e.replace(D7,"$1"),eT,tT,nT,rT,tc={...gi,protocols:{...gi.protocols,href:[...(tT=(eT=gi.protocols)==null?void 0:eT.href)!=null?tT:[],"tel"]},attributes:{...gi.attributes,code:[...(rT=(nT=gi.attributes)==null?void 0:nT.code)!=null?rT:[],"metastring"]}},Um={raw:_m,sanitize:[nx,tc],harden:[N6,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},M7={gfm:[GL,{}],codeMeta:O7},aT=Object.values(Um),B7=Object.values(M7),z7={block:" ▋",circle:" ●"},Q_=["github-light","github-dark"],X_={enabled:!0},H7={shikiTheme:Q_,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:X_},Yn=S.createContext(H7),Z_=S.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:a,isIncomplete:u,dir:s,animatePlugin:o,...f})=>{if(o){let b=o.getLastRenderCharCount();o.setPrevContentLength(b)}let h=typeof e=="string"&&n?I7(e):e,d=_.jsx($_,{...f,children:h});return _.jsx(h_.Provider,{value:u,children:s?_.jsx("div",{dir:s,style:{display:"contents"},children:d}):d})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),a=Object.keys(t.components||{});if(n.length!==a.length||n.some(u=>{var s,o;return((s=e.components)==null?void 0:s[u])!==((o=t.components)==null?void 0:o[u])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Z_.displayName="Block";var K_=S.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:a=!0,normalizeHtmlIndentation:u=!1,components:s,rehypePlugins:o=aT,remarkPlugins:f=B7,className:h,shikiTheme:d=Q_,mermaid:b,controls:g=!0,isAnimating:E=!1,animated:T,BlockComponent:v=Z_,parseMarkdownIntoBlocksFn:N=A7,caret:R,plugins:O,remend:B,linkSafety:U=X_,lineNumbers:D=!0,allowedTags:F,literalTagContent:z,translations:V,icons:G,prefix:be,onAnimationStart:q,onAnimationEnd:ce,...oe})=>{let we=S.useId(),[pe,ae]=S.useTransition(),P=S.useMemo(()=>EM(be),[be]),te=S.useRef(null),fe=S.useRef(q),xe=S.useRef(ce);fe.current=q,xe.current=ce,S.useEffect(()=>{var Le,ut,Ut;if(t==="static")return;let Pt=te.current;if(te.current=E,Pt===null){E&&((Le=fe.current)==null||Le.call(fe));return}E&&!Pt?(ut=fe.current)==null||ut.call(fe):!E&&Pt&&((Ut=xe.current)==null||Ut.call(xe))},[E,t]);let C=S.useMemo(()=>F?Object.keys(F):[],[F]),M=S.useMemo(()=>{if(typeof e!="string")return"";let Le=t==="streaming"&&a?a8(e,B):e;return z&&z.length>0&&(Le=w7(Le,z)),C.length>0&&(Le=k7(Le,C)),Le},[e,t,a,B,C,z]),W=S.useMemo(()=>N(M),[M,N]),[k,ne]=S.useState(W);S.useEffect(()=>{t==="streaming"&&!Te?ae(()=>{ne(W)}):ne(W)},[W,t]);let ue=t==="streaming"?k:W,ie=S.useMemo(()=>n==="auto"?ue.map(VE):void 0,[ue,n]),he=S.useMemo(()=>ue.map((Le,ut)=>`${we}-${ut}`),[ue.length,we]),_e=S.useMemo(()=>T===!0?"true":T?JSON.stringify(T):"",[T]),Te=S.useMemo(()=>_e?_e==="true"?Dm():Dm(T):null,[_e]),Ye=S.useMemo(()=>{var Le,ut;return{shikiTheme:(ut=(Le=O==null?void 0:O.code)==null?void 0:Le.getThemes())!=null?ut:d,controls:g,isAnimating:E,lineNumbers:D,mode:t,mermaid:b,linkSafety:U}},[d,g,E,D,t,b,U,O==null?void 0:O.code]),xt=S.useMemo(()=>V?JSON.stringify(V):"",[V]),wt=S.useMemo(()=>({...b_,...V}),[xt]),rt=S.useMemo(()=>{let{inlineCode:Le,...ut}=s??{},Ut={...n7,...ut};if(Le){let Pt=Ut.code;Ut.code=Vn=>"data-block"in Vn?Pt?S.createElement(Pt,Vn):null:S.createElement(Le,Vn)}return Ut},[s]),ht=S.useMemo(()=>{let Le=[];return O!=null&&O.cjk&&(Le=[...Le,...O.cjk.remarkPluginsBefore]),Le=[...Le,...f],O!=null&&O.cjk&&(Le=[...Le,...O.cjk.remarkPluginsAfter]),O!=null&&O.math&&(Le=[...Le,O.math.remarkPlugin]),Le},[f,O==null?void 0:O.math,O==null?void 0:O.cjk]),dn=S.useMemo(()=>{var Le;let ut=o;if(F&&Object.keys(F).length>0&&o===aT){let Ut={...tc,tagNames:[...(Le=tc.tagNames)!=null?Le:[],...Object.keys(F)],attributes:{...tc.attributes,...F}};ut=[Um.raw,[nx,Ut],Um.harden]}return z&&z.length>0&&(ut=[...ut,[R7,z]]),O!=null&&O.math&&(ut=[...ut,O.math.rehypePlugin]),Te&&E&&(ut=[...ut,Te.rehypePlugin]),ut},[o,O==null?void 0:O.math,Te,E,F,z]),hn=S.useMemo(()=>{if(!E||ue.length===0)return!1;let Le=ue.at(-1);return $E(Le)||u7(Le)},[E,ue]),pr=S.useMemo(()=>R&&E&&!hn?{"--streamdown-caret":`"${z7[R]}"`}:void 0,[R,E,hn]);return t==="static"?_.jsx(Mm.Provider,{value:wt,children:_.jsx(Bm.Provider,{value:O??null,children:_.jsx(Yn.Provider,{value:Ye,children:_.jsx(PE,{icons:G,children:_.jsx(Im.Provider,{value:P,children:_.jsx("div",{className:P("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",h),dir:n==="auto"?VE(M):n,children:_.jsx($_,{components:rt,rehypePlugins:dn,remarkPlugins:ht,...oe,children:M})})})})})})}):_.jsx(Mm.Provider,{value:wt,children:_.jsx(Bm.Provider,{value:O??null,children:_.jsx(Yn.Provider,{value:Ye,children:_.jsx(PE,{icons:G,children:_.jsx(Im.Provider,{value:P,children:_.jsxs("div",{className:P("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",R&&!hn?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,h),style:pr,children:[ue.length===0&&R&&E&&_.jsx("span",{}),ue.map((Le,ut)=>{var Ut;let Pt=ut===ue.length-1,Vn=E&&Pt&&$E(Le);return _.jsx(v,{animatePlugin:Te,components:rt,content:Le,dir:(Ut=ie==null?void 0:ie[ut])!=null?Ut:n!=="auto"?n:void 0,index:ut,isIncomplete:Vn,rehypePlugins:dn,remarkPlugins:ht,shouldNormalizeHtmlIndentation:u,shouldParseIncompleteMarkdown:a,...oe},he[ut])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);K_.displayName="Streamdown";var U7=({children:e,className:t,minZoom:n=.5,maxZoom:a=3,zoomStep:u=.1,showControls:s=!0,initialZoom:o=1,fullscreen:f=!1})=>{let{RotateCcwIcon:h,ZoomInIcon:d,ZoomOutIcon:b}=mr(),g=Qe(),E=S.useRef(null),T=S.useRef(null),[v,N]=S.useState(o),[R,O]=S.useState({x:0,y:0}),[B,U]=S.useState(!1),[D,F]=S.useState({x:0,y:0}),[z,V]=S.useState({x:0,y:0}),G=S.useCallback(P=>{N(te=>Math.max(n,Math.min(a,te+P)))},[n,a]),be=S.useCallback(()=>{G(u)},[G,u]),q=S.useCallback(()=>{G(-u)},[G,u]),ce=S.useCallback(()=>{N(o),O({x:0,y:0})},[o]),oe=S.useCallback(P=>{P.preventDefault();let te=P.deltaY>0?-u:u;G(te)},[G,u]),we=S.useCallback(P=>{if(P.button!==0||P.isPrimary===!1)return;U(!0),F({x:P.clientX,y:P.clientY}),V(R);let te=P.currentTarget;te instanceof HTMLElement&&te.setPointerCapture(P.pointerId)},[R]),pe=S.useCallback(P=>{if(!B)return;P.preventDefault();let te=P.clientX-D.x,fe=P.clientY-D.y;O({x:z.x+te,y:z.y+fe})},[B,D,z]),ae=S.useCallback(P=>{U(!1);let te=P.currentTarget;te instanceof HTMLElement&&te.releasePointerCapture(P.pointerId)},[]);return S.useEffect(()=>{let P=E.current;if(P)return P.addEventListener("wheel",oe,{passive:!1}),()=>{P.removeEventListener("wheel",oe)}},[oe]),S.useEffect(()=>{let P=T.current;if(P&&B)return document.body.style.userSelect="none",P.addEventListener("pointermove",pe,{passive:!1}),P.addEventListener("pointerup",ae),P.addEventListener("pointercancel",ae),()=>{document.body.style.userSelect="",P.removeEventListener("pointermove",pe),P.removeEventListener("pointerup",ae),P.removeEventListener("pointercancel",ae)}},[B,pe,ae]),_.jsxs("div",{className:g("relative flex flex-col",f?"h-full w-full":"min-h-28 w-full",t),ref:E,style:{cursor:B?"grabbing":"grab"},children:[s?_.jsxs("div",{className:g("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",f?"bottom-4 left-4":"bottom-2 left-2"),children:[_.jsx("button",{className:g("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:v>=a,onClick:be,title:"Zoom in",type:"button",children:_.jsx(d,{size:16})}),_.jsx("button",{className:g("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:v<=n,onClick:q,title:"Zoom out",type:"button",children:_.jsx(b,{size:16})}),_.jsx("button",{className:g("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:ce,title:"Reset zoom and pan",type:"button",children:_.jsx(h,{size:16})})]}):null,_.jsx("div",{className:g("flex-1 origin-center transition-transform duration-150 ease-out",f?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:we,ref:T,role:"application",style:{transform:`translate(${R.x}px, ${R.y}px) scale(${v})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},W_=({chart:e,className:t,config:n,fullscreen:a=!1,showControls:u=!0})=>{let s=Qe(),[o,f]=S.useState(null),[h,d]=S.useState(!1),[b,g]=S.useState(""),[E,T]=S.useState(""),[v,N]=S.useState(0),{mermaid:R}=S.useContext(Yn),O=H0(),B=R==null?void 0:R.errorComponent,{shouldRender:U,containerRef:D}=uM({immediate:a});if(S.useEffect(()=>{if(U){if(!O){f("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{f(null),d(!0);let z=O.getMermaid(n),V=e.split("").reduce((q,ce)=>(q<<5)-q+ce.charCodeAt(0)|0,0),G=`mermaid-${Math.abs(V)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:be}=await z.render(G,e);g(be),T(be)}catch(z){if(!(E||b)){let V=z instanceof Error?z.message:"Failed to render Mermaid chart";f(V)}}finally{d(!1)}})()}},[e,n,v,U,O]),!(U||b||E))return _.jsx("div",{className:s("my-4 min-h-[200px]",t),ref:D});if(h&&!b&&!E)return _.jsx("div",{className:s("my-4 flex justify-center p-4",t),ref:D,children:_.jsxs("div",{className:s("flex items-center space-x-2 text-muted-foreground"),children:[_.jsx("div",{className:s("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),_.jsx("span",{className:s("text-sm"),children:"Loading diagram..."})]})});if(o&&!b&&!E){let z=()=>N(V=>V+1);return B?_.jsx("div",{ref:D,children:_.jsx(B,{chart:e,error:o,retry:z})}):_.jsxs("div",{className:s("rounded-md bg-red-50 p-4",t),ref:D,children:[_.jsxs("p",{className:s("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",o]}),_.jsxs("details",{className:s("mt-2"),children:[_.jsx("summary",{className:s("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),_.jsx("pre",{className:s("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let F=b||E;return _.jsx("div",{className:s("size-full",t),"data-streamdown":"mermaid",ref:D,children:_.jsx(U7,{className:s(a?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:a,maxZoom:3,minZoom:.5,showControls:u,zoomStep:.1,children:_.jsx("div",{"aria-label":"Mermaid chart",className:s("flex justify-center",a?"size-full items-center":null),dangerouslySetInnerHTML:{__html:F},role:"img"})})})};const P7=({className:e,from:t,...n})=>_.jsx("div",{className:Gt("group flex w-full max-w-[95%] flex-col gap-2",t==="user"?"is-user ml-auto justify-end":"is-assistant",e),...n}),j7=({children:e,className:t,...n})=>_.jsx("div",{className:Gt("flex w-fit max-w-full min-w-0 flex-col gap-2 overflow-hidden text-sm","group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground",t),...n,children:e}),J_=S.memo(({className:e,...t})=>_.jsx(K_,{className:Gt("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);J_.displayName="MessageResponse";function F7({payload:e}){const t=e.status==="confirmed",n=t?yk:Tk;return _.jsxs("div",{className:Gt("mx-auto flex w-full max-w-2xl items-start gap-2 rounded-lg border px-3 py-2 text-sm",t?"border-emerald-500/30 bg-emerald-500/5":"border-amber-500/40 bg-amber-500/10"),children:[_.jsx(n,{className:Gt("mt-0.5 size-4 shrink-0",t?"text-emerald-600 dark:text-emerald-400":"text-amber-600 dark:text-amber-400")}),_.jsxs("div",{className:"min-w-0 flex-1",children:[_.jsx("div",{className:"flex items-center gap-2",children:_.jsx("span",{className:"font-medium text-[10px] uppercase tracking-wide text-muted-foreground",children:t?"Decided":"Assumed"})}),_.jsx("p",{className:"font-medium",children:e.summary}),e.detail?_.jsx("p",{className:"text-muted-foreground text-xs",children:e.detail}):null]})]})}function q7({payload:e,active:t,onAnswer:n}){const[a,u]=S.useState(null),[s,o]=S.useState(""),f=Ic(g=>o(E=>E?`${E} ${g}`:g)),h=s.trim(),d=t&&(a!==null||h.length>0),b=()=>{if(!d)return;const g=a?h?`${a} - ${h}`:a:h;n(g),u(null),o("")};return _.jsxs("div",{className:"mx-auto w-full max-w-2xl space-y-2 rounded-xl border bg-card p-3 shadow-sm",children:[_.jsx("p",{className:"font-medium text-sm",children:e.question}),_.jsx("div",{className:"space-y-1.5",children:e.options.map(g=>{const E=a===g.label;return _.jsxs("button",{type:"button",disabled:!t,onClick:()=>u(E?null:g.label),className:Gt("flex w-full items-start gap-2 rounded-lg border p-2 text-left transition-colors",E?"border-primary bg-primary/10":"hover:bg-accent hover:text-accent-foreground",!t&&"opacity-70"),children:[_.jsx("span",{className:Gt("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border",E?"border-primary bg-primary text-primary-foreground":"border-muted-foreground/40"),children:E?_.jsx(Oc,{className:"size-3"}):null}),_.jsxs("span",{className:"min-w-0 flex-1",children:[_.jsxs("span",{className:"flex items-center gap-2",children:[_.jsx("span",{className:"font-medium text-sm",children:g.label}),g.recommended?_.jsx("span",{className:"rounded-full bg-emerald-500/15 px-1.5 py-0.5 text-[10px] text-emerald-600 dark:text-emerald-400",children:"Recommended"}):null]}),_.jsx("span",{className:"block text-muted-foreground text-xs",children:g.description})]})]},g.label)})}),t?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"flex items-start gap-1",children:[_.jsx("textarea",{value:s,onChange:g=>o(g.target.value),placeholder:a?"Add a note to your choice…":"Type your own answer, or add a note…",rows:2,onKeyDown:g=>{g.key==="Enter"&&(g.metaKey||g.ctrlKey)&&(g.preventDefault(),b())},className:"min-h-[2rem] flex-1 resize-none rounded-md border bg-background px-2 py-1 text-sm outline-none focus-visible:ring-1 focus-visible:ring-ring"}),f.supported?_.jsx(At,{type:"button",size:"icon-sm",variant:f.listening?"default":"ghost","aria-label":f.listening?"Stop dictation":"Dictate answer","aria-pressed":f.listening,onClick:f.toggle,children:_.jsx(Lc,{})}):null]}),_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"text-muted-foreground text-xs",children:e.stopHint??"You can pick, type your own, or stop anytime."}),_.jsxs(At,{type:"button",size:"sm",disabled:!d,onClick:b,children:[_.jsx(Zm,{}),"Answer"]})]})]}):_.jsx("p",{className:"text-muted-foreground text-xs",children:"Answered above."})]})}const Y7={draft:"Draft updated",mock:"Mock updated",diagram:"Diagram updated"};function V7({event:e,sessionId:t,cardAnswered:n,ended:a,onSend:u}){if(e.type==="system")return _.jsx("div",{className:"mx-auto text-center text-muted-foreground text-xs",children:g6(e)});if(e.type===AA)return _.jsx(y6,{event:e,sessionId:t});if(e.type===kT){const s=IA.safeParse(e.payload);return s.success?_.jsx(q7,{payload:s.data,active:!n&&!a,onAnswer:o=>void u({text:o})}):null}if(e.type===LA){const s=BA.safeParse(e.payload);return s.success?_.jsx(F7,{payload:s.data}):null}if(e.type===CT){const s=zA.safeParse(e.payload);if(!s.success)return null;const{kind:o,name:f}=s.data.artifact;return _.jsxs("div",{className:"mx-auto text-center text-muted-foreground text-xs",children:[Y7[o]??"Artifact updated"," · ",f]})}if(e.type==="message"){const s=m6(e),o=p6(e);return _.jsx(P7,{from:e.source==="user"?"user":"assistant",children:_.jsxs(j7,{children:[s?_.jsx(J_,{children:s}):null,_.jsx(E6,{sessionId:t,attachments:o})]})})}return null}function $7({sessionId:e,presence:t,status:n,ended:a}){const u=a||n==="open"&&t!=="listening",[s,o]=S.useState(void 0),[f,h]=S.useState(!1),[d,b]=S.useState(null);if(S.useEffect(()=>{if(!u||a){o(null);return}let T=!1;return Gm().then(v=>{if(T)return;const N=v.find(R=>R.presence==="listening"&&R.meta.id!==e);o((N==null?void 0:N.meta.id)??null)}).catch(()=>{T||o(null)}),()=>{T=!0}},[u,a,e]),!u)return null;const g=async()=>{if(s){h(!0),b(null);try{await LT(s,e)}catch(T){b(T.message),h(!1)}}},E=!a&&s!==null&&s!==void 0;return _.jsx("div",{className:"flex flex-col gap-2 border-amber-500/30 border-b bg-amber-500/10 px-4 py-2.5 text-sm",children:a?_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"text-muted-foreground",children:"This session has ended. Reattach from your terminal to keep working with its context:"}),_.jsx(iT,{sessionId:e})]}):E?_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"text-muted-foreground",children:"The agent is attending another session."}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx(At,{type:"button",size:"sm",disabled:f,onClick:()=>void g(),children:f?"Activating…":"Activate this session"}),d?_.jsx("span",{className:"text-destructive text-xs",children:d}):null]})]}):_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"text-muted-foreground",children:"No agent is attending this session. Bring one here from your terminal:"}),_.jsx(iT,{sessionId:e})]})})}function iT({sessionId:e}){const[t,n]=S.useState(!1),a=`chamba attach ${e}`,u=async()=>{try{await navigator.clipboard.writeText(a),n(!0)}catch{n(!1)}};return _.jsxs("div",{className:"flex items-center gap-2 rounded-md border bg-background p-1.5",children:[_.jsx("code",{className:"min-w-0 flex-1 break-all text-xs",children:a}),_.jsx(At,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Copy command",onClick:()=>void u(),children:t?_.jsx(Oc,{}):_.jsx(Xm,{})})]})}function G7({sessionId:e,events:t,ended:n,presence:a,status:u,loadError:s,onSend:o,queue:f,sendingQueue:h,queueError:d,onNoteChange:b,onDiscard:g,onDiscardAll:E,onSendBatch:T,composerRef:v}){const N=S.useMemo(()=>{let R=-1;for(const B of t)B.type==="message"&&B.source==="user"&&B.seq>R&&(R=B.seq);const O=new Set;for(const B of t)B.type===kT&&B.seq<R&&O.add(B.id);return O},[t]);return _.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[_.jsx($7,{sessionId:e,presence:a,status:u,ended:n}),s?_.jsx("div",{className:"border-destructive/40 border-b bg-destructive/10 px-4 py-2 text-destructive text-sm",children:s}):null,_.jsxs(s6,{className:"min-h-0 flex-1",children:[_.jsx(o6,{children:t.length===0?_.jsx(c6,{icon:_.jsx(Ok,{className:"size-6"}),title:"No messages yet",description:"Say hello below - your terminal agent is listening."}):t.map(R=>_.jsx(V7,{event:R,sessionId:e,cardAnswered:N.has(R.id),ended:n,onSend:o},R.id))}),_.jsx(f6,{})]}),_.jsx(e6,{queue:f,disabled:n,sending:h,error:d,onNoteChange:b,onDiscard:g,onDiscardAll:E,onSend:T}),_.jsx(d6,{ref:v,sessionId:e,disabled:n,onSend:o})]})}const Q7=[{value:"bug",label:"Bug",Icon:hk},{value:"feature",label:"Feature",Icon:Ck}];function X7({sessionId:e,onClose:t}){const[n,a]=S.useState("bug"),[u,s]=S.useState(""),[o,f]=S.useState([]),[h,d]=S.useState(!1),[b,g]=S.useState(null),[E,T]=S.useState(null),v=S.useRef(null),N=Ic(D=>{s(F=>F?`${F} ${D}`:D)});S.useEffect(()=>{const D=F=>{F.key==="Escape"&&t()};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[t]);const R=async D=>{const F=Array.from(D);if(F.length!==0){d(!0),g(null);try{for(const z of F){const V=await Qm(e,z);f(G=>[...G,V])}}catch(z){g(z.message)}finally{d(!1)}}},O=async()=>{const D=u.trim();if(!(!D||h)){d(!0),g(null);try{const F=await ZA(e,{type:n,text:D,...o.length>0?{screenshotAttachmentIds:o.map(z=>z.id)}:{}});T(F)}catch(F){g(F.message)}finally{d(!1)}}},B=D=>{D.clipboardData.files.length>0&&(D.preventDefault(),R(D.clipboardData.files))},U=D=>{D.preventDefault(),D.dataTransfer.files.length>0&&R(D.dataTransfer.files)};return _.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",onClick:D=>{D.target===D.currentTarget&&t()},children:_.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Report an issue",className:"flex w-full max-w-md flex-col gap-4 rounded-lg border bg-background p-5 shadow-lg",children:[_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("h2",{className:"font-semibold text-sm",children:"Report an issue"}),_.jsx(At,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Close",onClick:t,children:_.jsx(mc,{})})]}),E?_.jsx(Z7,{result:E,onClose:t}):_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"flex items-center rounded-md border p-0.5",role:"toolbar","aria-label":"Issue type",children:Q7.map(({value:D,label:F,Icon:z})=>_.jsxs("button",{type:"button","aria-pressed":n===D,onClick:()=>a(D),className:`flex flex-1 items-center justify-center gap-1.5 rounded-sm px-3 py-1.5 text-sm transition-colors ${n===D?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground"}`,children:[_.jsx(z,{className:"size-4"}),F]},D))}),_.jsx("div",{onDrop:U,onDragOver:D=>D.preventDefault(),children:_.jsx("textarea",{value:u,onChange:D=>s(D.target.value),onPaste:B,placeholder:n==="bug"?"What went wrong? Steps, what you expected, what happened…":"What would you like chamba to do?",rows:5,autoFocus:!0,className:"w-full resize-none rounded-md border bg-background px-3 py-2 text-sm outline-none focus-visible:ring-1 focus-visible:ring-ring"})}),o.length>0?_.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(D=>_.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border bg-muted px-2 py-1 text-xs",children:[D.name,_.jsx("button",{type:"button","aria-label":`Remove ${D.name}`,onClick:()=>f(F=>F.filter(z=>z.id!==D.id)),className:"text-muted-foreground hover:text-foreground",children:_.jsx(mc,{className:"size-3"})})]},D.id))}):null,b?_.jsx("div",{className:"text-destructive text-sm",children:b}):null,_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("input",{ref:v,type:"file",multiple:!0,accept:"image/*",className:"hidden",onChange:D=>{D.target.files&&R(D.target.files),D.target.value=""}}),_.jsx(At,{type:"button",variant:"ghost",size:"icon",disabled:h,"aria-label":"Attach screenshots",onClick:()=>{var D;return(D=v.current)==null?void 0:D.click()},children:_.jsx(BT,{})}),N.supported?_.jsx(At,{type:"button",variant:N.listening?"default":"ghost",size:"icon","aria-label":N.listening?"Stop dictation":"Start dictation","aria-pressed":N.listening,onClick:N.toggle,children:_.jsx(Lc,{})}):null,_.jsx("div",{className:"flex-1"}),_.jsx(At,{type:"button",variant:"ghost",size:"sm",onClick:t,children:"Cancel"}),_.jsx(At,{type:"button",size:"sm",disabled:h||u.trim().length===0,onClick:()=>void O(),children:"Save report"})]})]})]})})}function Z7({result:e,onClose:t}){const[n,a]=S.useState(!1),u=async()=>{try{await navigator.clipboard.writeText(e.path),a(!0)}catch{a(!1)}};return _.jsxs("div",{className:"flex flex-col gap-3",children:[_.jsx("p",{className:"text-muted-foreground text-sm",children:"Saved. Hand this folder to an agent in the chamba repo to act on it:"}),_.jsxs("div",{className:"flex items-center gap-2 rounded-md border bg-muted p-2",children:[_.jsx("code",{className:"min-w-0 flex-1 break-all text-xs",children:e.path}),_.jsx(At,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Copy path",onClick:()=>void u(),children:n?_.jsx(Oc,{}):_.jsx(Xm,{})})]}),_.jsx("div",{className:"flex justify-end",children:_.jsx(At,{type:"button",size:"sm",onClick:t,children:"Done"})})]})}function K7({presence:e,status:t,ended:n}){const{tone:a,label:u}=W7(e,t,n);return _.jsxs("span",{className:"inline-flex items-center gap-1.5 text-muted-foreground text-sm",children:[_.jsx("span",{className:Gt("size-2 rounded-full",a)}),u]})}function W7(e,t,n){return n?{tone:"bg-muted-foreground",label:"session ended"}:t!=="open"?{tone:"bg-amber-500",label:"reconnecting…"}:e==="listening"?{tone:"bg-emerald-500",label:"agent is here"}:{tone:"bg-muted-foreground",label:"agent is away"}}function J7({currentId:e,onSwitch:t}){const[n,a]=S.useState(!1),[u,s]=S.useState([]),[o,f]=S.useState(null),h=S.useRef(null);return S.useEffect(()=>{n&&Gm().then(s).catch(d=>f(d.message))},[n]),S.useEffect(()=>{if(!n)return;const d=b=>{var g;(g=h.current)!=null&&g.contains(b.target)||a(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[n]),_.jsxs("div",{ref:h,className:"relative",children:[_.jsxs(At,{type:"button",variant:"outline",size:"sm",onClick:()=>a(d=>!d),"aria-haspopup":"listbox","aria-expanded":n,children:["Sessions",_.jsx(gk,{className:"size-3.5"})]}),n?_.jsxs("div",{className:"absolute right-0 z-20 mt-1 max-h-96 w-80 overflow-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md",children:[o?_.jsx("div",{className:"px-2 py-1.5 text-destructive text-sm",children:o}):null,u.length===0&&!o?_.jsx("div",{className:"px-2 py-1.5 text-muted-foreground text-sm",children:"No sessions."}):null,u.map(({meta:d,presence:b})=>{const g=d.id===e;return _.jsxs("button",{type:"button",onClick:()=>{a(!1),g||t(d.id)},className:Gt("flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",g&&"bg-accent/50"),children:[_.jsx(Oc,{className:Gt("size-4 shrink-0",g?"opacity-100":"opacity-0")}),_.jsxs("span",{className:"min-w-0 flex-1",children:[_.jsx("span",{className:"block truncate",children:d.title??d.id}),_.jsxs("span",{className:"block truncate text-muted-foreground text-xs",children:[d.kind,d.status==="ended"?" · read-only":` · agent ${b}`]})]})]},d.id)})]}):null]})}function e3(e,t,n,a){let u="*";if(!a)try{u=new URL(t,window.location.href).origin}catch{}const s=d=>{var b;return(b=e.contentWindow)==null?void 0:b.postMessage(d,u)},o=d=>{if(d.source!==e.contentWindow||u!=="*"&&d.origin!==u)return;const b=d.data;if(!(!b||b.tag!==vh))if(b.t==="ready")n.onReady({react:b.react===!0,url:b.url??t});else if(b.t==="selected"){const g=$m.safeParse(b.target);if(!g.success)return;n.onSelected(g.data,b.screenshot instanceof Blob?b.screenshot:void 0)}else b.t==="region"&&b.screenshot instanceof Blob&&n.onRegion(b.screenshot)};window.addEventListener("message",o);const f=()=>s({tag:vh,t:"hello"}),h=()=>{f(),setTimeout(f,400)};return e.addEventListener("load",h),f(),{setMode:d=>s({tag:vh,t:"mode",mode:d}),disconnect:()=>{window.removeEventListener("message",o),e.removeEventListener("load",h)}}}const eB={id:"script-tag",label:"Script tag",setupHint:e=>`<script src="${e}"><\/script>`,connect:(e,t,n)=>e3(e,t,n,!1)},tB={id:"sandboxed",label:"Sandboxed",setupHint:e=>`<script src="${e}"><\/script>`,connect:(e,t,n)=>e3(e,t,n,!0)};function t3({provider:e,url:t,srcdoc:n,sandbox:a,reloadKey:u=0,title:s="surface",onAnnotation:o,onRegionShot:f,onConnectionChange:h}){const d=S.useRef(null),b=S.useRef(null),[g,E]=S.useState("off"),[T,v]=S.useState(!1),[N,R]=S.useState(!1),O=t!==void 0||n!==void 0;S.useEffect(()=>{v(!1),R(!1),E("off");const U=d.current;if(!U||!O)return;const D=e.connect(U,t??"about:srcdoc",{onReady:F=>{v(!0),R(F.react)},onSelected:o,onRegion:f});return b.current=D,()=>{D.disconnect(),b.current=null}},[e,t,n,u,O,o,f]),S.useEffect(()=>{h==null||h({connected:T,react:N})},[T,N,h]);const B=U=>{var F;const D=g===U?"off":U;E(D),(F=b.current)==null||F.setMode(D)};return _.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[_.jsxs("div",{className:"flex shrink-0 items-center gap-1 border-b px-2 py-1.5",children:[_.jsx(At,{type:"button",size:"icon-sm",variant:g==="annotate"?"default":"ghost",disabled:!T,"aria-pressed":g==="annotate","aria-label":"Annotate elements",title:"Annotate - click elements to comment",onClick:()=>B("annotate"),children:_.jsx(Ik,{})}),_.jsx(At,{type:"button",size:"icon-sm",variant:g==="region"?"default":"ghost",disabled:!T,"aria-pressed":g==="region","aria-label":"Screenshot a region",title:"Screenshot a region into the composer",onClick:()=>B("region"),children:_.jsx(Uk,{})}),_.jsx(nB,{connected:T,react:N,active:O})]}),_.jsx("div",{className:"relative min-h-0 flex-1 bg-muted/30",children:O?_.jsx("iframe",{ref:d,title:s,...t!==void 0?{src:t}:{srcDoc:n},...a?{sandbox:a}:{},className:"h-full w-full border-0 bg-white"},`${t??"srcdoc"}::${u}`):null})]})}function nB({connected:e,react:t,active:n}){return n?_.jsxs("span",{className:"ml-auto flex items-center gap-1.5 pr-1 text-muted-foreground text-xs",children:[_.jsx("span",{className:Gt("size-2 rounded-full",e?"bg-emerald-500":"bg-muted-foreground/40")}),e?t?"React":"connected":"connecting"]}):null}const Wh=eB,rB=1500;function aB({storageKey:e,onAnnotation:t,onRegionShot:n}){const a=(()=>{try{return localStorage.getItem(e)??""}catch{return""}})(),[u,s]=S.useState(a),[o,f]=S.useState(a),[h,d]=S.useState(0),[b,g]=S.useState(!1),[E,T]=S.useState(!1),[v,N]=S.useState(!1),R=S.useCallback(D=>{g(D.connected)},[]);S.useEffect(()=>{if(!o||b){T(!1);return}const D=setTimeout(()=>T(!0),rB);return()=>clearTimeout(D)},[o,h,b]);const O=D=>{D.preventDefault();const F=u.trim();if(F){try{localStorage.setItem(e,F)}catch{}f(F),d(z=>z+1)}},B=()=>d(D=>D+1),U=async()=>{try{await navigator.clipboard.writeText(Wh.setupHint(dm())),N(!0),setTimeout(()=>N(!1),1500)}catch{}};return _.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[_.jsxs("form",{onSubmit:O,className:"flex shrink-0 items-center gap-2 border-b px-2 py-1.5",children:[_.jsx("input",{value:u,onChange:D=>s(D.target.value),placeholder:"http://localhost:3000",className:"min-w-0 flex-1 rounded-md border bg-background px-2.5 py-1.5 text-sm outline-none focus-visible:ring-1 focus-visible:ring-ring"}),_.jsx(At,{type:"submit",size:"sm",variant:"secondary",children:"Load"}),o?_.jsx(At,{type:"button",size:"icon-sm",variant:"ghost","aria-label":"Reload app",onClick:B,children:_.jsx(zk,{})}):null]}),E?_.jsxs("div",{className:"shrink-0 border-amber-500/40 border-b bg-amber-500/10 px-3 py-2 text-xs",children:[_.jsx("p",{className:"mb-1 text-muted-foreground",children:"Annotation layer not detected. Add this tag to your dev app to enable it:"}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("code",{className:"min-w-0 flex-1 truncate rounded bg-muted px-2 py-1 font-mono",children:Wh.setupHint(dm())}),_.jsx(At,{type:"button",size:"icon-sm",variant:"ghost","aria-label":"Copy script tag",onClick:U,children:_.jsx(Xm,{})}),v?_.jsx("span",{className:"text-muted-foreground",children:"copied"}):null]})]}):null,o?_.jsx(t3,{provider:Wh,url:o,reloadKey:h,title:"Your app",onAnnotation:t,onRegionShot:n,onConnectionChange:R}):_.jsx("div",{className:"flex flex-1 items-center justify-center p-8 text-center",children:_.jsxs("div",{className:"space-y-1",children:[_.jsx("h3",{className:"font-medium text-sm",children:"Your app"}),_.jsx("p",{className:"text-muted-foreground text-sm",children:"Enter your dev server URL above to point at the running app and annotate it."})]})})]})}const iB={draft:"The draft spec will build here as the agent writes it.",mock:"Agent-authored HTML mocks will appear here, annotatable like the app.",diagram:"Mermaid diagrams the agent draws will render here."};let lB=0;function uB({sessionId:e,kind:t,artifacts:n,onAnnotation:a,onRegionShot:u}){const[s,o]=S.useState(null),f=S.useMemo(()=>n.find(T=>T.ref.name===s)??n[0],[n,s]),h=f?sB(f.ref.relPath):"",d=f?`${f.ref.name}:${f.rev}`:"none",[b,g]=S.useState(void 0);if(S.useEffect(()=>{if(t!=="diagram"||!f){g(void 0);return}let T=!1;return g(void 0),(async()=>{try{const v=await JA(e,h),N=await oB(v);T||g(lT(N))}catch(v){T||g(lT(`<pre>${cB(String(v))}</pre>`))}})(),()=>{T=!0}},[t,e,h,d,f]),!f)return _.jsx("div",{className:"flex h-full flex-1 items-center justify-center p-8 text-center",children:_.jsxs("div",{className:"space-y-1",children:[_.jsx("h3",{className:"font-medium text-sm capitalize",children:t}),_.jsx("p",{className:"text-muted-foreground text-sm",children:iB[t]})]})});const E=t==="diagram"&&b===void 0;return _.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[n.length>1?_.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-2 py-1.5",children:[_.jsx("span",{className:"text-muted-foreground text-xs",children:t}),_.jsx("select",{value:f.ref.name,onChange:T=>o(T.target.value),className:"min-w-0 flex-1 rounded-md border bg-background px-2 py-1 text-sm outline-none focus-visible:ring-1 focus-visible:ring-ring",children:n.map(T=>_.jsx("option",{value:T.ref.name,children:T.ref.name},T.ref.name))})]}):null,E?_.jsx("div",{className:"flex flex-1 items-center justify-center p-8 text-center",children:_.jsx("p",{className:"text-muted-foreground text-sm",children:"Rendering diagram…"})}):_.jsx(t3,{provider:tB,sandbox:"allow-scripts",reloadKey:d,title:`${t}: ${f.ref.name}`,...t==="diagram"?{srcdoc:b}:{url:IT(e,h)},onAnnotation:a,onRegionShot:u})]})}function sB(e){return e.split("/").pop()??e}async function oB(e){var u;const t=(await e0(async()=>{const{default:s}=await import("./mermaid.core-CyLpSBwh.js").then(o=>o.bp);return{default:s}},[])).default,n=typeof window<"u"&&((u=window.matchMedia)==null?void 0:u.call(window,"(prefers-color-scheme: dark)").matches)===!0;t.initialize({startOnLoad:!1,theme:n?"dark":"default",securityLevel:"strict"});const{svg:a}=await t.render(`chamba-mmd-${++lB}`,e);return a}function lT(e){return`<!doctype html>
320
- <html lang="en">
321
- <head>
322
- <meta charset="utf-8" />
323
- <style>
324
- :root { color-scheme: light dark; }
325
- body { margin: 0; padding: 1.5rem; display: flex; justify-content: center;
326
- font-family: system-ui, -apple-system, sans-serif; }
327
- svg { max-width: 100%; height: auto; }
328
- pre { white-space: pre-wrap; color: #b91c1c; }
329
- </style>
330
- </head>
331
- <body>
332
- ${e}
333
- <script src="${dm()}"><\/script>
334
- </body>
335
- </html>`}function cB(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const fB={everyday:["Your app"],spec:["Draft","Mock","Diagram","Your app"]},dB={Draft:"draft",Mock:"mock",Diagram:"diagram"};function hB({kind:e,sessionId:t,events:n,onAnnotation:a,onRegionShot:u}){const s=fB[e],[o,f]=S.useState(e==="spec"?"Draft":s[0]??"Your app"),h=S.useMemo(()=>mB(n),[n]),d=dB[o];return _.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[_.jsx("div",{className:"flex shrink-0 items-center gap-1 border-b px-2 py-1.5",children:s.map(b=>_.jsx("button",{type:"button",onClick:()=>f(b),className:Gt("rounded-md px-3 py-1.5 text-sm transition-colors",b===o?"bg-secondary text-secondary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:b},b))}),o==="Your app"||!d?_.jsx(aB,{storageKey:`chamba:appurl:${t}`,onAnnotation:a,onRegionShot:u}):_.jsx(uB,{sessionId:t,kind:d,artifacts:h[d],onAnnotation:a,onRegionShot:u})]})}function mB(e){var a;const t=new Map;for(const u of e){if(u.type!==CT)continue;const s=wT.safeParse((a=u.payload)==null?void 0:a.artifact);s.success&&t.set(`${s.data.kind}:${s.data.name}`,{ref:s.data,rev:u.seq})}const n={draft:[],mock:[],diagram:[]};for(const u of t.values())n[u.ref.kind].push(u);for(const u of Object.values(n))u.sort((s,o)=>o.rev-s.rev);return n}const Kc=S.createContext(null);Kc.displayName="PanelGroupContext";const It={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},P0=10,xi=S.useLayoutEffect,uT=ET.useId,pB=typeof uT=="function"?uT:()=>null;let gB=0;function j0(e=null){const t=pB(),n=S.useRef(e||t||null);return n.current===null&&(n.current=""+gB++),e??n.current}function n3({children:e,className:t="",collapsedSize:n,collapsible:a,defaultSize:u,forwardedRef:s,id:o,maxSize:f,minSize:h,onCollapse:d,onExpand:b,onResize:g,order:E,style:T,tagName:v="div",...N}){const R=S.useContext(Kc);if(R===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:O,expandPanel:B,getPanelSize:U,getPanelStyle:D,groupId:F,isPanelCollapsed:z,reevaluatePanelConstraints:V,registerPanel:G,resizePanel:be,unregisterPanel:q}=R,ce=j0(o),oe=S.useRef({callbacks:{onCollapse:d,onExpand:b,onResize:g},constraints:{collapsedSize:n,collapsible:a,defaultSize:u,maxSize:f,minSize:h},id:ce,idIsFromProps:o!==void 0,order:E});S.useRef({didLogMissingDefaultSizeWarning:!1}),xi(()=>{const{callbacks:pe,constraints:ae}=oe.current,P={...ae};oe.current.id=ce,oe.current.idIsFromProps=o!==void 0,oe.current.order=E,pe.onCollapse=d,pe.onExpand=b,pe.onResize=g,ae.collapsedSize=n,ae.collapsible=a,ae.defaultSize=u,ae.maxSize=f,ae.minSize=h,(P.collapsedSize!==ae.collapsedSize||P.collapsible!==ae.collapsible||P.maxSize!==ae.maxSize||P.minSize!==ae.minSize)&&V(oe.current,P)}),xi(()=>{const pe=oe.current;return G(pe),()=>{q(pe)}},[E,ce,G,q]),S.useImperativeHandle(s,()=>({collapse:()=>{O(oe.current)},expand:pe=>{B(oe.current,pe)},getId(){return ce},getSize(){return U(oe.current)},isCollapsed(){return z(oe.current)},isExpanded(){return!z(oe.current)},resize:pe=>{be(oe.current,pe)}}),[O,B,U,z,ce,be]);const we=D(oe.current,u);return S.createElement(v,{...N,children:e,className:t,id:ce,style:{...we,...T},[It.groupId]:F,[It.panel]:"",[It.panelCollapsible]:a||void 0,[It.panelId]:ce,[It.panelSize]:parseFloat(""+we.flexGrow).toFixed(1)})}const r3=S.forwardRef((e,t)=>S.createElement(n3,{...e,forwardedRef:t}));n3.displayName="Panel";r3.displayName="forwardRef(Panel)";let Pm=null,nc=-1,Ia=null;function bB(e,t,n){const a=(t&s3)!==0,u=(t&o3)!==0,s=(t&c3)!==0,o=(t&f3)!==0;if(t){if(a)return s?"se-resize":o?"ne-resize":"e-resize";if(u)return s?"sw-resize":o?"nw-resize":"w-resize";if(s)return"s-resize";if(o)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function yB(){Ia!==null&&(document.head.removeChild(Ia),Pm=null,Ia=null,nc=-1)}function Jh(e,t,n){var a,u;const s=bB(e,t);if(Pm!==s){if(Pm=s,Ia===null&&(Ia=document.createElement("style"),document.head.appendChild(Ia)),nc>=0){var o;(o=Ia.sheet)===null||o===void 0||o.removeRule(nc)}nc=(a=(u=Ia.sheet)===null||u===void 0?void 0:u.insertRule(`*{cursor: ${s} !important;}`))!==null&&a!==void 0?a:-1}}function a3(e){return e.type==="keydown"}function i3(e){return e.type.startsWith("pointer")}function l3(e){return e.type.startsWith("mouse")}function Wc(e){if(i3(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(l3(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function EB(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function TB(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function xB(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:cT(e),b:cT(t)};let a;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),a=e;qe(a,"Stacking order can only be calculated for elements with a common ancestor");const u={a:oT(sT(n.a)),b:oT(sT(n.b))};if(u.a===u.b){const s=a.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let f=s.length;for(;f--;){const h=s[f];if(h===o.a)return 1;if(h===o.b)return-1}}return Math.sign(u.a-u.b)}const _B=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function vB(e){var t;const n=getComputedStyle((t=u3(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function SB(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||vB(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||_B.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function sT(e){let t=e.length;for(;t--;){const n=e[t];if(qe(n,"Missing node"),SB(n))return n}return null}function oT(e){return e&&Number(getComputedStyle(e).zIndex)||0}function cT(e){const t=[];for(;e;)t.push(e),e=u3(e);return t}function u3(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const s3=1,o3=2,c3=4,f3=8,AB=EB()==="coarse";let dr=[],Nl=!1,Ma=new Map,Jc=new Map;const fs=new Set;function kB(e,t,n,a,u){var s;const{ownerDocument:o}=t,f={direction:n,element:t,hitAreaMargins:a,setResizeHandlerState:u},h=(s=Ma.get(o))!==null&&s!==void 0?s:0;return Ma.set(o,h+1),fs.add(f),kc(),function(){var b;Jc.delete(e),fs.delete(f);const g=(b=Ma.get(o))!==null&&b!==void 0?b:1;if(Ma.set(o,g-1),kc(),g===1&&Ma.delete(o),dr.includes(f)){const E=dr.indexOf(f);E>=0&&dr.splice(E,1),ef(),u("up",!0,null)}}}function CB(e){const{target:t}=e,{x:n,y:a}=Wc(e);Nl=!0,F0({target:t,x:n,y:a}),kc(),dr.length>0&&(Cc("down",e),ef(),e.preventDefault(),d3(t)||e.stopImmediatePropagation())}function em(e){const{x:t,y:n}=Wc(e);if(Nl&&e.type!=="pointerleave"&&e.buttons===0&&(Nl=!1,Cc("up",e)),!Nl){const{target:a}=e;F0({target:a,x:t,y:n})}Cc("move",e),ef(),dr.length>0&&e.preventDefault()}function tm(e){const{target:t}=e,{x:n,y:a}=Wc(e);Jc.clear(),Nl=!1,dr.length>0&&(e.preventDefault(),d3(t)||e.stopImmediatePropagation()),Cc("up",e),F0({target:t,x:n,y:a}),ef(),kc()}function d3(e){let t=e;for(;t;){if(t.hasAttribute(It.resizeHandle))return!0;t=t.parentElement}return!1}function F0({target:e,x:t,y:n}){dr.splice(0);let a=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(a=e),fs.forEach(u=>{const{element:s,hitAreaMargins:o}=u,f=s.getBoundingClientRect(),{bottom:h,left:d,right:b,top:g}=f,E=AB?o.coarse:o.fine;if(t>=d-E&&t<=b+E&&n>=g-E&&n<=h+E){if(a!==null&&document.contains(a)&&s!==a&&!s.contains(a)&&!a.contains(s)&&xB(a,s)>0){let v=a,N=!1;for(;v&&!v.contains(s);){if(TB(v.getBoundingClientRect(),f)){N=!0;break}v=v.parentElement}if(N)return}dr.push(u)}})}function nm(e,t){Jc.set(e,t)}function ef(){let e=!1,t=!1;dr.forEach(a=>{const{direction:u}=a;u==="horizontal"?e=!0:t=!0});let n=0;Jc.forEach(a=>{n|=a}),e&&t?Jh("intersection",n):e?Jh("horizontal",n):t?Jh("vertical",n):yB()}let rm;function kc(){var e;(e=rm)===null||e===void 0||e.abort(),rm=new AbortController;const t={capture:!0,signal:rm.signal};fs.size&&(Nl?(dr.length>0&&Ma.forEach((n,a)=>{const{body:u}=a;n>0&&(u.addEventListener("contextmenu",tm,t),u.addEventListener("pointerleave",em,t),u.addEventListener("pointermove",em,t))}),Ma.forEach((n,a)=>{const{body:u}=a;u.addEventListener("pointerup",tm,t),u.addEventListener("pointercancel",tm,t)})):Ma.forEach((n,a)=>{const{body:u}=a;n>0&&(u.addEventListener("pointerdown",CB,t),u.addEventListener("pointermove",em,t))}))}function Cc(e,t){fs.forEach(n=>{const{setResizeHandlerState:a}=n,u=dr.includes(n);a(e,u,t)})}function NB(){const[e,t]=S.useState(0);return S.useCallback(()=>t(n=>n+1),[])}function qe(e,t){if(!e)throw console.error(t),Error(t)}function wi(e,t,n=P0){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Kr(e,t,n=P0){return wi(e,t,n)===0}function jn(e,t,n){return wi(e,t,n)===0}function wB(e,t,n){if(e.length!==t.length)return!1;for(let a=0;a<e.length;a++){const u=e[a],s=t[a];if(!jn(u,s,n))return!1}return!0}function kl({panelConstraints:e,panelIndex:t,size:n}){const a=e[t];qe(a!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:u=0,collapsible:s,maxSize:o=100,minSize:f=0}=a;if(wi(n,f)<0)if(s){const h=(u+f)/2;wi(n,h)<0?n=u:n=f}else n=f;return n=Math.min(o,n),n=parseFloat(n.toFixed(P0)),n}function Qu({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:a,prevLayout:u,trigger:s}){if(jn(e,0))return t;const o=[...t],[f,h]=a;qe(f!=null,"Invalid first pivot index"),qe(h!=null,"Invalid second pivot index");let d=0;if(s==="keyboard"){{const g=e<0?h:f,E=n[g];qe(E,`Panel constraints not found for index ${g}`);const{collapsedSize:T=0,collapsible:v,minSize:N=0}=E;if(v){const R=t[g];if(qe(R!=null,`Previous layout not found for panel index ${g}`),jn(R,T)){const O=N-R;wi(O,Math.abs(e))>0&&(e=e<0?0-O:O)}}}{const g=e<0?f:h,E=n[g];qe(E,`No panel constraints found for index ${g}`);const{collapsedSize:T=0,collapsible:v,minSize:N=0}=E;if(v){const R=t[g];if(qe(R!=null,`Previous layout not found for panel index ${g}`),jn(R,N)){const O=R-T;wi(O,Math.abs(e))>0&&(e=e<0?0-O:O)}}}}{const g=e<0?1:-1;let E=e<0?h:f,T=0;for(;;){const N=t[E];qe(N!=null,`Previous layout not found for panel index ${E}`);const O=kl({panelConstraints:n,panelIndex:E,size:100})-N;if(T+=O,E+=g,E<0||E>=n.length)break}const v=Math.min(Math.abs(e),Math.abs(T));e=e<0?0-v:v}{let E=e<0?f:h;for(;E>=0&&E<n.length;){const T=Math.abs(e)-Math.abs(d),v=t[E];qe(v!=null,`Previous layout not found for panel index ${E}`);const N=v-T,R=kl({panelConstraints:n,panelIndex:E,size:N});if(!jn(v,R)&&(d+=v-R,o[E]=R,d.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?E--:E++}}if(wB(u,o))return u;{const g=e<0?h:f,E=t[g];qe(E!=null,`Previous layout not found for panel index ${g}`);const T=E+d,v=kl({panelConstraints:n,panelIndex:g,size:T});if(o[g]=v,!jn(v,T)){let N=T-v,O=e<0?h:f;for(;O>=0&&O<n.length;){const B=o[O];qe(B!=null,`Previous layout not found for panel index ${O}`);const U=B+N,D=kl({panelConstraints:n,panelIndex:O,size:U});if(jn(B,D)||(N-=D-B,o[O]=D),jn(N,0))break;e>0?O--:O++}}}const b=o.reduce((g,E)=>E+g,0);return jn(b,100)?o:u}function RB({layout:e,panelsArray:t,pivotIndices:n}){let a=0,u=100,s=0,o=0;const f=n[0];qe(f!=null,"No pivot index found"),t.forEach((g,E)=>{const{constraints:T}=g,{maxSize:v=100,minSize:N=0}=T;E===f?(a=N,u=v):(s+=N,o+=v)});const h=Math.min(u,100-s),d=Math.max(a,100-o),b=e[f];return{valueMax:h,valueMin:d,valueNow:b}}function ds(e,t=document){return Array.from(t.querySelectorAll(`[${It.resizeHandleId}][data-panel-group-id="${e}"]`))}function h3(e,t,n=document){const u=ds(e,n).findIndex(s=>s.getAttribute(It.resizeHandleId)===t);return u??null}function m3(e,t,n){const a=h3(e,t,n);return a!=null?[a,a+1]:[-1,-1]}function OB(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function p3(e,t=document){if(OB(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function tf(e,t=document){const n=t.querySelector(`[${It.resizeHandleId}="${e}"]`);return n||null}function LB(e,t,n,a=document){var u,s,o,f;const h=tf(t,a),d=ds(e,a),b=h?d.indexOf(h):-1,g=(u=(s=n[b])===null||s===void 0?void 0:s.id)!==null&&u!==void 0?u:null,E=(o=(f=n[b+1])===null||f===void 0?void 0:f.id)!==null&&o!==void 0?o:null;return[g,E]}function DB({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:a,panelDataArray:u,panelGroupElement:s,setLayout:o}){S.useRef({didWarnAboutMissingResizeHandle:!1}),xi(()=>{if(!s)return;const f=ds(n,s);for(let h=0;h<u.length-1;h++){const{valueMax:d,valueMin:b,valueNow:g}=RB({layout:a,panelsArray:u,pivotIndices:[h,h+1]}),E=f[h];if(E!=null){const T=u[h];qe(T,`No panel data found for index "${h}"`),E.setAttribute("aria-controls",T.id),E.setAttribute("aria-valuemax",""+Math.round(d)),E.setAttribute("aria-valuemin",""+Math.round(b)),E.setAttribute("aria-valuenow",g!=null?""+Math.round(g):"")}}return()=>{f.forEach((h,d)=>{h.removeAttribute("aria-controls"),h.removeAttribute("aria-valuemax"),h.removeAttribute("aria-valuemin"),h.removeAttribute("aria-valuenow")})}},[n,a,u,s]),S.useEffect(()=>{if(!s)return;const f=t.current;qe(f,"Eager values not found");const{panelDataArray:h}=f,d=p3(n,s);qe(d!=null,`No group found for id "${n}"`);const b=ds(n,s);qe(b,`No resize handles found for group id "${n}"`);const g=b.map(E=>{const T=E.getAttribute(It.resizeHandleId);qe(T,"Resize handle element has no handle id attribute");const[v,N]=LB(n,T,h,s);if(v==null||N==null)return()=>{};const R=O=>{if(!O.defaultPrevented)switch(O.key){case"Enter":{O.preventDefault();const B=h.findIndex(U=>U.id===v);if(B>=0){const U=h[B];qe(U,`No panel data found for index ${B}`);const D=a[B],{collapsedSize:F=0,collapsible:z,minSize:V=0}=U.constraints;if(D!=null&&z){const G=Qu({delta:jn(D,F)?V-F:F-D,initialLayout:a,panelConstraints:h.map(be=>be.constraints),pivotIndices:m3(n,T,s),prevLayout:a,trigger:"keyboard"});a!==G&&o(G)}}break}}};return E.addEventListener("keydown",R),()=>{E.removeEventListener("keydown",R)}});return()=>{g.forEach(E=>E())}},[s,e,t,n,a,u,o])}function fT(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function g3(e,t){const n=e==="horizontal",{x:a,y:u}=Wc(t);return n?a:u}function IB(e,t,n,a,u){const s=n==="horizontal",o=tf(t,u);qe(o,`No resize handle element found for id "${t}"`);const f=o.getAttribute(It.groupId);qe(f,"Resize handle element has no group id attribute");let{initialCursorPosition:h}=a;const d=g3(n,e),b=p3(f,u);qe(b,`No group element found for id "${f}"`);const g=b.getBoundingClientRect(),E=s?g.width:g.height;return(d-h)/E*100}function MB(e,t,n,a,u,s){if(a3(e)){const o=n==="horizontal";let f=0;e.shiftKey?f=100:u!=null?f=u:f=10;let h=0;switch(e.key){case"ArrowDown":h=o?0:f;break;case"ArrowLeft":h=o?-f:0;break;case"ArrowRight":h=o?f:0;break;case"ArrowUp":h=o?0:-f;break;case"End":h=100;break;case"Home":h=-100;break}return h}else return a==null?0:IB(e,t,n,a,s)}function BB({panelDataArray:e}){const t=Array(e.length),n=e.map(s=>s.constraints);let a=0,u=100;for(let s=0;s<e.length;s++){const o=n[s];qe(o,`Panel constraints not found for index ${s}`);const{defaultSize:f}=o;f!=null&&(a++,t[s]=f,u-=f)}for(let s=0;s<e.length;s++){const o=n[s];qe(o,`Panel constraints not found for index ${s}`);const{defaultSize:f}=o;if(f!=null)continue;const h=e.length-a,d=u/h;a++,t[s]=d,u-=d}return t}function Tl(e,t,n){t.forEach((a,u)=>{const s=e[u];qe(s,`Panel data not found for index ${u}`);const{callbacks:o,constraints:f,id:h}=s,{collapsedSize:d=0,collapsible:b}=f,g=n[h];if(g==null||a!==g){n[h]=a;const{onCollapse:E,onExpand:T,onResize:v}=o;v&&v(a,g),b&&(E||T)&&(T&&(g==null||Kr(g,d))&&!Kr(a,d)&&T(),E&&(g==null||!Kr(g,d))&&Kr(a,d)&&E())}})}function Zo(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function zB({defaultSize:e,dragState:t,layout:n,panelData:a,panelIndex:u,precision:s=3}){const o=n[u];let f;return o==null?f=e!=null?e.toFixed(s):"1":a.length===1?f="1":f=o.toFixed(s),{flexBasis:0,flexGrow:f,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function HB(e,t=10){let n=null;return(...u)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...u)},t)}}function dT(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function b3(e){return`react-resizable-panels:${e}`}function y3(e){return e.map(t=>{const{constraints:n,id:a,idIsFromProps:u,order:s}=t;return u?a:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function E3(e,t){try{const n=b3(e),a=t.getItem(n);if(a){const u=JSON.parse(a);if(typeof u=="object"&&u!=null)return u}}catch{}return null}function UB(e,t,n){var a,u;const s=(a=E3(e,n))!==null&&a!==void 0?a:{},o=y3(t);return(u=s[o])!==null&&u!==void 0?u:null}function PB(e,t,n,a,u){var s;const o=b3(e),f=y3(t),h=(s=E3(e,u))!==null&&s!==void 0?s:{};h[f]={expandToSizes:Object.fromEntries(n.entries()),layout:a};try{u.setItem(o,JSON.stringify(h))}catch(d){console.error(d)}}function hT({layout:e,panelConstraints:t}){const n=[...e],a=n.reduce((s,o)=>s+o,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!jn(a,100)&&n.length>0)for(let s=0;s<t.length;s++){const o=n[s];qe(o!=null,`No layout data found for index ${s}`);const f=100/a*o;n[s]=f}let u=0;for(let s=0;s<t.length;s++){const o=n[s];qe(o!=null,`No layout data found for index ${s}`);const f=kl({panelConstraints:t,panelIndex:s,size:o});o!=f&&(u+=o-f,n[s]=f)}if(!jn(u,0))for(let s=0;s<t.length;s++){const o=n[s];qe(o!=null,`No layout data found for index ${s}`);const f=o+u,h=kl({panelConstraints:t,panelIndex:s,size:f});if(o!==h&&(u-=h-o,n[s]=h,jn(u,0)))break}return n}const jB=100,Xu={getItem:e=>(dT(Xu),Xu.getItem(e)),setItem:(e,t)=>{dT(Xu),Xu.setItem(e,t)}},mT={};function T3({autoSaveId:e=null,children:t,className:n="",direction:a,forwardedRef:u,id:s=null,onLayout:o=null,keyboardResizeBy:f=null,storage:h=Xu,style:d,tagName:b="div",...g}){const E=j0(s),T=S.useRef(null),[v,N]=S.useState(null),[R,O]=S.useState([]),B=NB(),U=S.useRef({}),D=S.useRef(new Map),F=S.useRef(0),z=S.useRef({autoSaveId:e,direction:a,dragState:v,id:E,keyboardResizeBy:f,onLayout:o,storage:h}),V=S.useRef({layout:R,panelDataArray:[],panelDataArrayChanged:!1});S.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),S.useImperativeHandle(u,()=>({getId:()=>z.current.id,getLayout:()=>{const{layout:k}=V.current;return k},setLayout:k=>{const{onLayout:ne}=z.current,{layout:ue,panelDataArray:ie}=V.current,he=hT({layout:k,panelConstraints:ie.map(_e=>_e.constraints)});fT(ue,he)||(O(he),V.current.layout=he,ne&&ne(he),Tl(ie,he,U.current))}}),[]),xi(()=>{z.current.autoSaveId=e,z.current.direction=a,z.current.dragState=v,z.current.id=E,z.current.onLayout=o,z.current.storage=h}),DB({committedValuesRef:z,eagerValuesRef:V,groupId:E,layout:R,panelDataArray:V.current.panelDataArray,setLayout:O,panelGroupElement:T.current}),S.useEffect(()=>{const{panelDataArray:k}=V.current;if(e){if(R.length===0||R.length!==k.length)return;let ne=mT[e];ne==null&&(ne=HB(PB,jB),mT[e]=ne);const ue=[...k],ie=new Map(D.current);ne(e,ue,ie,R,h)}},[e,R,h]),S.useEffect(()=>{});const G=S.useCallback(k=>{const{onLayout:ne}=z.current,{layout:ue,panelDataArray:ie}=V.current;if(k.constraints.collapsible){const he=ie.map(xt=>xt.constraints),{collapsedSize:_e=0,panelSize:Te,pivotIndices:Ye}=mi(ie,k,ue);if(qe(Te!=null,`Panel size not found for panel "${k.id}"`),!Kr(Te,_e)){D.current.set(k.id,Te);const wt=vl(ie,k)===ie.length-1?Te-_e:_e-Te,rt=Qu({delta:wt,initialLayout:ue,panelConstraints:he,pivotIndices:Ye,prevLayout:ue,trigger:"imperative-api"});Zo(ue,rt)||(O(rt),V.current.layout=rt,ne&&ne(rt),Tl(ie,rt,U.current))}}},[]),be=S.useCallback((k,ne)=>{const{onLayout:ue}=z.current,{layout:ie,panelDataArray:he}=V.current;if(k.constraints.collapsible){const _e=he.map(ht=>ht.constraints),{collapsedSize:Te=0,panelSize:Ye=0,minSize:xt=0,pivotIndices:wt}=mi(he,k,ie),rt=ne??xt;if(Kr(Ye,Te)){const ht=D.current.get(k.id),dn=ht!=null&&ht>=rt?ht:rt,pr=vl(he,k)===he.length-1?Ye-dn:dn-Ye,Le=Qu({delta:pr,initialLayout:ie,panelConstraints:_e,pivotIndices:wt,prevLayout:ie,trigger:"imperative-api"});Zo(ie,Le)||(O(Le),V.current.layout=Le,ue&&ue(Le),Tl(he,Le,U.current))}}},[]),q=S.useCallback(k=>{const{layout:ne,panelDataArray:ue}=V.current,{panelSize:ie}=mi(ue,k,ne);return qe(ie!=null,`Panel size not found for panel "${k.id}"`),ie},[]),ce=S.useCallback((k,ne)=>{const{panelDataArray:ue}=V.current,ie=vl(ue,k);return zB({defaultSize:ne,dragState:v,layout:R,panelData:ue,panelIndex:ie})},[v,R]),oe=S.useCallback(k=>{const{layout:ne,panelDataArray:ue}=V.current,{collapsedSize:ie=0,collapsible:he,panelSize:_e}=mi(ue,k,ne);return qe(_e!=null,`Panel size not found for panel "${k.id}"`),he===!0&&Kr(_e,ie)},[]),we=S.useCallback(k=>{const{layout:ne,panelDataArray:ue}=V.current,{collapsedSize:ie=0,collapsible:he,panelSize:_e}=mi(ue,k,ne);return qe(_e!=null,`Panel size not found for panel "${k.id}"`),!he||wi(_e,ie)>0},[]),pe=S.useCallback(k=>{const{panelDataArray:ne}=V.current;ne.push(k),ne.sort((ue,ie)=>{const he=ue.order,_e=ie.order;return he==null&&_e==null?0:he==null?-1:_e==null?1:he-_e}),V.current.panelDataArrayChanged=!0,B()},[B]);xi(()=>{if(V.current.panelDataArrayChanged){V.current.panelDataArrayChanged=!1;const{autoSaveId:k,onLayout:ne,storage:ue}=z.current,{layout:ie,panelDataArray:he}=V.current;let _e=null;if(k){const Ye=UB(k,he,ue);Ye&&(D.current=new Map(Object.entries(Ye.expandToSizes)),_e=Ye.layout)}_e==null&&(_e=BB({panelDataArray:he}));const Te=hT({layout:_e,panelConstraints:he.map(Ye=>Ye.constraints)});fT(ie,Te)||(O(Te),V.current.layout=Te,ne&&ne(Te),Tl(he,Te,U.current))}}),xi(()=>{const k=V.current;return()=>{k.layout=[]}},[]);const ae=S.useCallback(k=>{let ne=!1;const ue=T.current;return ue&&window.getComputedStyle(ue,null).getPropertyValue("direction")==="rtl"&&(ne=!0),function(he){he.preventDefault();const _e=T.current;if(!_e)return()=>null;const{direction:Te,dragState:Ye,id:xt,keyboardResizeBy:wt,onLayout:rt}=z.current,{layout:ht,panelDataArray:dn}=V.current,{initialLayout:hn}=Ye??{},pr=m3(xt,k,_e);let Le=MB(he,k,Te,Ye,wt,_e);const ut=Te==="horizontal";ut&&ne&&(Le=-Le);const Ut=dn.map(Pl=>Pl.constraints),Pt=Qu({delta:Le,initialLayout:hn??ht,panelConstraints:Ut,pivotIndices:pr,prevLayout:ht,trigger:a3(he)?"keyboard":"mouse-or-touch"}),Vn=!Zo(ht,Pt);(i3(he)||l3(he))&&F.current!=Le&&(F.current=Le,!Vn&&Le!==0?ut?nm(k,Le<0?s3:o3):nm(k,Le<0?c3:f3):nm(k,0)),Vn&&(O(Pt),V.current.layout=Pt,rt&&rt(Pt),Tl(dn,Pt,U.current))}},[]),P=S.useCallback((k,ne)=>{const{onLayout:ue}=z.current,{layout:ie,panelDataArray:he}=V.current,_e=he.map(ht=>ht.constraints),{panelSize:Te,pivotIndices:Ye}=mi(he,k,ie);qe(Te!=null,`Panel size not found for panel "${k.id}"`);const wt=vl(he,k)===he.length-1?Te-ne:ne-Te,rt=Qu({delta:wt,initialLayout:ie,panelConstraints:_e,pivotIndices:Ye,prevLayout:ie,trigger:"imperative-api"});Zo(ie,rt)||(O(rt),V.current.layout=rt,ue&&ue(rt),Tl(he,rt,U.current))},[]),te=S.useCallback((k,ne)=>{const{layout:ue,panelDataArray:ie}=V.current,{collapsedSize:he=0,collapsible:_e}=ne,{collapsedSize:Te=0,collapsible:Ye,maxSize:xt=100,minSize:wt=0}=k.constraints,{panelSize:rt}=mi(ie,k,ue);rt!=null&&(_e&&Ye&&Kr(rt,he)?Kr(he,Te)||P(k,Te):rt<wt?P(k,wt):rt>xt&&P(k,xt))},[P]),fe=S.useCallback((k,ne)=>{const{direction:ue}=z.current,{layout:ie}=V.current;if(!T.current)return;const he=tf(k,T.current);qe(he,`Drag handle element not found for id "${k}"`);const _e=g3(ue,ne);N({dragHandleId:k,dragHandleRect:he.getBoundingClientRect(),initialCursorPosition:_e,initialLayout:ie})},[]),xe=S.useCallback(()=>{N(null)},[]),C=S.useCallback(k=>{const{panelDataArray:ne}=V.current,ue=vl(ne,k);ue>=0&&(ne.splice(ue,1),delete U.current[k.id],V.current.panelDataArrayChanged=!0,B())},[B]),M=S.useMemo(()=>({collapsePanel:G,direction:a,dragState:v,expandPanel:be,getPanelSize:q,getPanelStyle:ce,groupId:E,isPanelCollapsed:oe,isPanelExpanded:we,reevaluatePanelConstraints:te,registerPanel:pe,registerResizeHandle:ae,resizePanel:P,startDragging:fe,stopDragging:xe,unregisterPanel:C,panelGroupElement:T.current}),[G,v,a,be,q,ce,E,oe,we,te,pe,ae,P,fe,xe,C]),W={display:"flex",flexDirection:a==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return S.createElement(Kc.Provider,{value:M},S.createElement(b,{...g,children:t,className:n,id:s,ref:T,style:{...W,...d},[It.group]:"",[It.groupDirection]:a,[It.groupId]:E}))}const x3=S.forwardRef((e,t)=>S.createElement(T3,{...e,forwardedRef:t}));T3.displayName="PanelGroup";x3.displayName="forwardRef(PanelGroup)";function vl(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function mi(e,t,n){const a=vl(e,t),s=a===e.length-1?[a-1,a]:[a,a+1],o=n[a];return{...t.constraints,panelSize:o,pivotIndices:s}}function FB({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:a}){S.useEffect(()=>{if(e||n==null||a==null)return;const u=tf(t,a);if(u==null)return;const s=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),n(o);break}case"F6":{o.preventDefault();const f=u.getAttribute(It.groupId);qe(f,`No group element found for id "${f}"`);const h=ds(f,a),d=h3(f,t,a);qe(d!==null,`No resize element found for id "${t}"`);const b=o.shiftKey?d>0?d-1:h.length-1:d+1<h.length?d+1:0;h[b].focus();break}}};return u.addEventListener("keydown",s),()=>{u.removeEventListener("keydown",s)}},[a,e,t,n])}function _3({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:a,id:u,onBlur:s,onClick:o,onDragging:f,onFocus:h,onPointerDown:d,onPointerUp:b,style:g={},tabIndex:E=0,tagName:T="div",...v}){var N,R;const O=S.useRef(null),B=S.useRef({onClick:o,onDragging:f,onPointerDown:d,onPointerUp:b});S.useEffect(()=>{B.current.onClick=o,B.current.onDragging=f,B.current.onPointerDown=d,B.current.onPointerUp=b});const U=S.useContext(Kc);if(U===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:F,registerResizeHandle:z,startDragging:V,stopDragging:G,panelGroupElement:be}=U,q=j0(u),[ce,oe]=S.useState("inactive"),[we,pe]=S.useState(!1),[ae,P]=S.useState(null),te=S.useRef({state:ce});xi(()=>{te.current.state=ce}),S.useEffect(()=>{if(n)P(null);else{const M=z(q);P(()=>M)}},[n,q,z]);const fe=(N=a==null?void 0:a.coarse)!==null&&N!==void 0?N:15,xe=(R=a==null?void 0:a.fine)!==null&&R!==void 0?R:5;S.useEffect(()=>{if(n||ae==null)return;const M=O.current;qe(M,"Element ref not attached");let W=!1;return kB(q,M,D,{coarse:fe,fine:xe},(ne,ue,ie)=>{if(!ue){oe("inactive");return}switch(ne){case"down":{oe("drag"),W=!1,qe(ie,'Expected event to be defined for "down" action'),V(q,ie);const{onDragging:he,onPointerDown:_e}=B.current;he==null||he(!0),_e==null||_e();break}case"move":{const{state:he}=te.current;W=!0,he!=="drag"&&oe("hover"),qe(ie,'Expected event to be defined for "move" action'),ae(ie);break}case"up":{oe("hover"),G();const{onClick:he,onDragging:_e,onPointerUp:Te}=B.current;_e==null||_e(!1),Te==null||Te(),W||he==null||he();break}}})},[fe,D,n,xe,z,q,ae,V,G]),FB({disabled:n,handleId:q,resizeHandler:ae,panelGroupElement:be});const C={touchAction:"none",userSelect:"none"};return S.createElement(T,{...v,children:e,className:t,id:u,onBlur:()=>{pe(!1),s==null||s()},onFocus:()=>{pe(!0),h==null||h()},ref:O,role:"separator",style:{...C,...g},tabIndex:E,[It.groupDirection]:D,[It.groupId]:F,[It.resizeHandle]:"",[It.resizeHandleActive]:ce==="drag"?"pointer":we?"keyboard":void 0,[It.resizeHandleEnabled]:!n,[It.resizeHandleId]:q,[It.resizeHandleState]:ce})}_3.displayName="PanelResizeHandle";const qB=({className:e,...t})=>_.jsx(x3,{className:Gt("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),pT=r3,YB=({withHandle:e,className:t,...n})=>_.jsx(_3,{className:Gt("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...n,children:e&&_.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:_.jsx(Ak,{className:"h-2.5 w-2.5"})})}),VB=[{mode:"conversation",label:"Conversation only",Icon:wk},{mode:"split",label:"Split view",Icon:_k},{mode:"surface",label:"Surface only",Icon:ok}];function $B({sessionId:e,onSwitch:t}){const{events:n,meta:a,presence:u,status:s,loadError:o,ended:f,send:h}=IC(e),d=S.useRef(null),b=S.useRef(null),g=S.useRef(null),[E,T]=S.useState(!1),[v,N]=S.useState(!1),[R,O]=S.useState([]),[B,U]=S.useState(!1),[D,F]=S.useState(null),[z,V]=S.useState(!1),G=S.useRef(R);G.current=R,S.useEffect(()=>()=>{for(const fe of G.current)fe.previewUrl&&URL.revokeObjectURL(fe.previewUrl)},[]);const be=S.useCallback((fe,xe)=>{const C=xe?URL.createObjectURL(xe):void 0;O(M=>[...M,{id:crypto.randomUUID(),target:fe,note:"",screenshot:xe,previewUrl:C}]),F(null)},[]),q=S.useCallback(fe=>{var C;const xe=new File([fe],`region-${crypto.randomUUID().slice(0,8)}.png`,{type:fe.type||"image/png"});(C=g.current)==null||C.addFiles([xe])},[]),ce=S.useCallback((fe,xe)=>{O(C=>C.map(M=>M.id===fe?{...M,note:xe}:M))},[]),oe=S.useCallback(fe=>{O(xe=>{const C=xe.find(M=>M.id===fe);return C!=null&&C.previewUrl&&URL.revokeObjectURL(C.previewUrl),xe.filter(M=>M.id!==fe)})},[]),we=S.useCallback(()=>{O(fe=>{for(const xe of fe)xe.previewUrl&&URL.revokeObjectURL(xe.previewUrl);return[]})},[]),pe=async()=>{if(!(R.length===0||B||f)){U(!0),F(null);try{const fe=[];for(const xe of R){let C;if(xe.screenshot){const W=new File([xe.screenshot],"annotation.png",{type:xe.screenshot.type||"image/png"});C=(await Qm(e,W)).id}const M=xe.note.trim();fe.push({...M?{note:M}:{},target:xe.target,...C?{screenshotAttachmentId:C}:{}})}await XA(e,{items:fe}),we()}catch(fe){F(fe.message)}finally{U(!1)}}},ae=v&&!E?"conversation":E&&!v?"surface":"split",P=fe=>{const xe=d.current,C=b.current;!xe||!C||(fe==="conversation"?(xe.expand(),C.collapse()):fe==="surface"?(C.expand(),xe.collapse()):(xe.expand(),C.expand()))},te=async()=>{try{await KA(e)}catch{}};return _.jsxs("main",{className:"flex h-full min-h-0 flex-col",children:[_.jsxs("header",{className:"flex shrink-0 items-center gap-3 border-b px-4 py-2",children:[_.jsxs("div",{className:"min-w-0 flex-1",children:[_.jsx("h1",{className:"truncate font-medium text-sm",children:(a==null?void 0:a.title)??"chamba session"}),_.jsx("span",{className:"block truncate text-muted-foreground text-xs",children:e})]}),_.jsx(K7,{presence:u,status:s,ended:f}),_.jsx(J7,{currentId:e,onSwitch:t}),_.jsx(At,{type:"button",variant:"ghost",size:"sm",onClick:()=>V(!0),children:"Report issue"}),f?null:_.jsx(At,{type:"button",variant:"outline",size:"sm",onClick:()=>void te(),children:"Hand back"}),_.jsx("div",{className:"flex items-center rounded-md border p-0.5",role:"toolbar","aria-label":"View mode",children:VB.map(({mode:fe,label:xe,Icon:C})=>_.jsx("button",{type:"button",onClick:()=>P(fe),"aria-pressed":ae===fe,"aria-label":xe,title:xe,className:Gt("flex h-7 w-7 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:text-foreground",ae===fe&&"bg-accent text-accent-foreground"),children:_.jsx(C,{className:"h-4 w-4"})},fe))})]}),_.jsxs(qB,{direction:"horizontal",autoSaveId:`chamba:layout:${e}`,className:"min-h-0 flex-1",children:[_.jsx(pT,{ref:d,defaultSize:38,minSize:30,collapsible:!0,collapsedSize:0,onCollapse:()=>T(!0),onExpand:()=>T(!1),children:_.jsx(G7,{sessionId:e,events:n,ended:f,presence:u,status:s,loadError:o,onSend:h,queue:R,sendingQueue:B,queueError:D,onNoteChange:ce,onDiscard:oe,onDiscardAll:we,onSendBatch:()=>void pe(),composerRef:g})}),_.jsx(YB,{withHandle:!0}),_.jsx(pT,{ref:b,defaultSize:62,minSize:25,collapsible:!0,collapsedSize:0,onCollapse:()=>N(!0),onExpand:()=>N(!1),children:_.jsx(hB,{kind:(a==null?void 0:a.kind)??"everyday",sessionId:e,events:n,onAnnotation:be,onRegionShot:q})})]}),z?_.jsx(X7,{sessionId:e,onClose:()=>V(!1)}):null]})}function GB(){const[e,t]=S.useState(ay);S.useEffect(()=>{const a=()=>t(ay());return window.addEventListener("popstate",a),()=>window.removeEventListener("popstate",a)},[]);const n=S.useCallback(a=>{t(u=>{if(u===a)return u;u&&LT(u,a).catch(()=>{});const s=new URL(window.location.href);return s.searchParams.set("s",a),window.history.pushState({},"",s),a})},[]);return e?_.jsx($B,{sessionId:e,onSwitch:n},e):_.jsx(tk,{onOpen:n})}const v3=document.getElementById("root");if(!v3)throw new Error("root element #root not found");ZS.createRoot(v3).render(_.jsx(S.StrictMode,{children:_.jsx(GB,{})}));const QB=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:W_},Symbol.toStringTag,{value:"Module"}));export{_M as A,WB as L,Yn as R,e0 as _,jm as g,_ as j,S as r};